1.1.1 • Published 3 years ago
@datenkraft/bb-x-debt-capturing-api-ts-client v1.1.1
Backbone - Debt Capturing API TS Client
Introduction
The Debt Capturing API TS Client enables you to work with the Debt Capturing API.
Prerequisites
- npm
Installation
You can use npm to install the package.
npm install @datenkraft/bb-debt-capturing-api-ts-clientUsing the package
The package can be used to communicate with the Debt Capturing API. The Client includes functionalities for every endpoint defined in the openapi.json. The Client is auto-generated with ferdikoomen/openapi-typescript-codegen using an openapi.json file.
Initializing the Client
import { ConfigOptions } from '@datenkraft/bb-base-api-ts-client';
import { DebtCapturingApiClient } from '@datenkraft/bb-debt-capturing-api-ts-client';
const configOptions: ConfigOptions = {
clientId: 'clientId',
clientSecret: 'clientSecret',
oAuthTokenHost: 'oAuthTokenHost',
tokenTradeInPath: 'tokenTradeInPath',
externalIdToken: 'externalIdToken',
useExternalIdToken: true,
};
DebtCapturingApiClient.init(configOptions).then(() => {
// Client is initialized
});Example Endpoint: Get DebtLineItem
DebtCapturingApiClient.Generated.DebtLineItemService
.getDebtLineItem('debt-line-item-id')
.then((debtLineItem) => {
// Request succeeded
})
.catch((error) => {
// An error occured
});License
This repository is available under the MIT license.