0.3.0 • Published 1 month ago

@softledger/node v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

Softledger TypeScript SDK 0.2.0

Welcome to the Softledger SDK documentation. This guide will help you get started with integrating and using the Softledger SDK in your project.

This SDK was generated by liblab

Versions

  • API version: 1.0.0
  • SDK version: 0.2.0

About the API

SoftLedger General Ledger Accounting API

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: TypeScript >= 4.8.4

Installation

To get started with the SDK, we recommend installing using npm:

npm install @softledger/node

Authentication

Access Token Authentication

The Softledger API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

const sdk = new Softledger({ token: 'YOUR_TOKEN' });

If you need to set or update the access token after initializing the SDK, you can use:

const sdk = new Softledger();
sdk.token = 'YOUR_TOKEN';

OAuth Authentication

The Softledger API uses OAuth for authentication.

You need to provide the OAuth parameters when initializing the SDK.

const sdk = new Softledger({ clientId: 'CLIENT_ID', clientSecret: 'CLIENT_SECRET' });

If you need to set or update the OAuth parameters after the SDK initialization, you can use:

const sdk = new Softledger();
sdk.clientId = 'CLIENT_ID';
sdk.clientSecret = 'CLIENT_SECRET';

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

const softledger = new Softledger({ timeout: 10000 });

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

import { AddressFilter, FilterOptions, Softledger } from '@softledger/node';

(async () => {
  const softledger = new Softledger({
    token: 'YOUR_TOKEN',
  });

  const equals = 'fugiat ';

  const not = 'sint in eu tem';

  const gt = 'culpa pariatu';

  const gte = 'nisi ea D';

  const lt = 'conseq';

  const lte = 'non q';

  const filterOptionsIn = 'irure anim al';

  const filterOptions: FilterOptions = {
    equals: equals,
    contains: 'contains',
    not: not,
    gt: gt,
    gte: gte,
    lt: lt,
    lte: lte,
    in: [filterOptionsIn],
    isNull: true,
  };

  const addressFilter: AddressFilter = {
    _id: filterOptions,
    label: filterOptions,
    line1: filterOptions,
    line2: filterOptions,
    city: filterOptions,
    state: filterOptions,
    zip: filterOptions,
    country: filterOptions,
    isDefault: filterOptions,
    isVerified: filterOptions,
    createdAt: filterOptions,
    updatedAt: filterOptions,
    CustomerId: filterOptions,
    VendorId: filterOptions,
  };
  const addressesSearchFilterType = 'all';
  const addressesSearchOrder = '_id:ASC';

  const { data } = await softledger.addresses.addressesSearch({
    filter: addressFilter,
    filterType: addressesSearchFilterType,
    cursor: 'cursor',
    limit: 25,
    order: addressesSearchOrder,
  });

  console.log(data);
})();

Services

The SDK provides various services to interact with the API.

Name
AuthenticationService
StatusService
AddressesService
ApiKeysService
AuditLogsService
BanksService
BatchPaymentsService
BillsService
BudgetsService
CashReceiptsService
CoinsService
ConsolidationRatesService
ContactsService
CostCentersService
CryptoTransactionsService
CurrenciesService
CustomDimensionsService
CustomersService
CustomFieldsService
EmailsService
ReportsService
FxRemeasureService
StockAdjustmentsService
InvoicesService
ItemsService
JobsService
JournalsService
LedgerAccountsService
LocationsService
PartNumbersService
PaymentsService
PeriodsService
PreferencesService
ProductsService
PurchaseOrdersService
RecurringJobsService
ReportLayoutsService
RolesService
SalesOrdersService
SettingsService
ShipmentReceiptsService
StatementsService
StockCountsService
SystemJobsService
TaxCodesService
TemplatesService
TimezonesService
TransactionsService
TransfersService
UsersService
VendorCreditsService
VendorPricesService
VendorsService
WalletsService
WarehousesService
WarehouseItemsService
WebhooksService
YearsService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

NameDescription
RequestTokenRequest
RequestTokenOkResponse
StatusGetOneType
StatusGetOneOkResponse
AddressFilter
FilterOptions
AddressesSearchFilterType
AddressesSearchOrderField to sort by
AddressesSearchOkResponse
AddressesCreateRequest
AddressesCreateCreatedResponse
CountResponse
AddressesUpdateRequest
AddressesUpdateOkResponse
AddressesOneOkResponse
ApiKeysGetAllOkResponse
ApiKeysCreateRequest
ApiKeysCreateCreatedResponse
ApiKeysGetPermissionsOkResponse
ApiKeysUpdatePermissionsRequest
AuditLogsSearchFilter
FilterOptions
AuditLogsSearchOkResponse
BankFilter
FilterOptions
AddressesSearchFilterType
BankOrderField to sort by
BanksSearchOkResponse
BankAccountsCreateRequest
BankAccountsCreateCreatedResponse
BankTransactionFilter
BankTransactionOrderField to sort by
BanksGetAccountTransactionsOkResponse
BanksLinkAccountRequest
BatchPaymentFilter
FilterOptions
AddressesSearchFilterType
BatchPaymentsSearchOrderField to sort by
BatchPaymentsSearchOkResponse
BatchPaymentsCreateRequest
BatchPaymentsCreateCreatedResponse
BillFilter
BillOrderField to sort by
BatchPaymentsBillsType
BatchPaymentsBillsOkResponse
BatchPaymentsBillsCountType
CountResponse
BatchPaymentsOneOkResponse
PaymentsFilter
BatchPaymentsPaymentsOrderField to sort by
BatchPaymentsPaymentsOkResponse
BatchPaymentsPaymentsCountType
BatchPaymentsVoidRequest
BillFilter

| AddressesSearchFilterType

0.3.0

1 month ago

0.1.3

3 months ago

0.1.2

4 months ago

0.1.0

4 months ago

0.0.9

4 months ago

0.0.8

4 months ago

0.0.7

4 months ago

0.0.6

4 months ago

0.0.2

5 months ago

0.0.1

6 months ago