@equisoft/billing-sdk 0.0.2-snapshot.20250930230514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +41 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +13 -0
- package/.tool-versions +3 -0
- package/README.md +46 -0
- package/dist/apis/DistributorV1Api.d.ts +37 -0
- package/dist/apis/DistributorV1Api.js +102 -0
- package/dist/apis/OrganizationV1Api.d.ts +180 -0
- package/dist/apis/OrganizationV1Api.js +566 -0
- package/dist/apis/UserV1Api.d.ts +63 -0
- package/dist/apis/UserV1Api.js +180 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +21 -0
- package/dist/esm/apis/DistributorV1Api.d.ts +37 -0
- package/dist/esm/apis/DistributorV1Api.js +98 -0
- package/dist/esm/apis/OrganizationV1Api.d.ts +180 -0
- package/dist/esm/apis/OrganizationV1Api.js +562 -0
- package/dist/esm/apis/UserV1Api.d.ts +63 -0
- package/dist/esm/apis/UserV1Api.js +176 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +5 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ErrorCodes.d.ts +31 -0
- package/dist/esm/models/ErrorCodes.js +49 -0
- package/dist/esm/models/ErrorSchema.d.ts +39 -0
- package/dist/esm/models/ErrorSchema.js +46 -0
- package/dist/esm/models/SubscriptionCreationMode.d.ts +26 -0
- package/dist/esm/models/SubscriptionCreationMode.js +44 -0
- package/dist/esm/models/V1BillingStatus.d.ts +48 -0
- package/dist/esm/models/V1BillingStatus.js +66 -0
- package/dist/esm/models/V1BillingType.d.ts +30 -0
- package/dist/esm/models/V1BillingType.js +48 -0
- package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
- package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.js +49 -0
- package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
- package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.js +49 -0
- package/dist/esm/models/V1ChargebeeV1PortalSession.d.ts +44 -0
- package/dist/esm/models/V1ChargebeeV1PortalSession.js +49 -0
- package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
- package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.js +49 -0
- package/dist/esm/models/V1CollectChargebeeV1Payment.d.ts +32 -0
- package/dist/esm/models/V1CollectChargebeeV1Payment.js +43 -0
- package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
- package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.js +41 -0
- package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
- package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +47 -0
- package/dist/esm/models/V1Distributor.d.ts +50 -0
- package/dist/esm/models/V1Distributor.js +53 -0
- package/dist/esm/models/V1DistributorList.d.ts +33 -0
- package/dist/esm/models/V1DistributorList.js +44 -0
- package/dist/esm/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
- package/dist/esm/models/V1MigrateLegacyBillingPayload.js +47 -0
- package/dist/esm/models/V1Organization.d.ts +57 -0
- package/dist/esm/models/V1Organization.js +54 -0
- package/dist/esm/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
- package/dist/esm/models/V1OrganizationChargebeeV1Status.js +72 -0
- package/dist/esm/models/V1OrganizationStatus.d.ts +59 -0
- package/dist/esm/models/V1OrganizationStatus.js +58 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.js +49 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1User.js +53 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
- package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +58 -0
- package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
- package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.js +43 -0
- package/dist/esm/models/V1SetChargebeeV1Payload.d.ts +45 -0
- package/dist/esm/models/V1SetChargebeeV1Payload.js +52 -0
- package/dist/esm/models/V1SetLegacyBillingPayload.d.ts +45 -0
- package/dist/esm/models/V1SetLegacyBillingPayload.js +50 -0
- package/dist/esm/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
- package/dist/esm/models/V1SetOrganisationDistributorPayload.js +43 -0
- package/dist/esm/models/V1SetUserNonBillablePayload.d.ts +32 -0
- package/dist/esm/models/V1SetUserNonBillablePayload.js +43 -0
- package/dist/esm/models/V1User.d.ts +50 -0
- package/dist/esm/models/V1User.js +55 -0
- package/dist/esm/models/V1UserServiceStatus.d.ts +44 -0
- package/dist/esm/models/V1UserServiceStatus.js +51 -0
- package/dist/esm/models/V1UserStatus.d.ts +33 -0
- package/dist/esm/models/V1UserStatus.js +44 -0
- package/dist/esm/models/index.d.ts +29 -0
- package/dist/esm/models/index.js +31 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/ErrorCodes.d.ts +31 -0
- package/dist/models/ErrorCodes.js +57 -0
- package/dist/models/ErrorSchema.d.ts +39 -0
- package/dist/models/ErrorSchema.js +53 -0
- package/dist/models/SubscriptionCreationMode.d.ts +26 -0
- package/dist/models/SubscriptionCreationMode.js +52 -0
- package/dist/models/V1BillingStatus.d.ts +48 -0
- package/dist/models/V1BillingStatus.js +74 -0
- package/dist/models/V1BillingType.d.ts +30 -0
- package/dist/models/V1BillingType.js +56 -0
- package/dist/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
- package/dist/models/V1ChargebeeV1NotPaidInvoice.js +56 -0
- package/dist/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
- package/dist/models/V1ChargebeeV1PaymentDueInvoice.js +56 -0
- package/dist/models/V1ChargebeeV1PortalSession.d.ts +44 -0
- package/dist/models/V1ChargebeeV1PortalSession.js +56 -0
- package/dist/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
- package/dist/models/V1ChargebeeV1UnpaidInvoice.js +56 -0
- package/dist/models/V1CollectChargebeeV1Payment.d.ts +32 -0
- package/dist/models/V1CollectChargebeeV1Payment.js +50 -0
- package/dist/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
- package/dist/models/V1CreateChargebeeV1PortalSessionPayload.js +48 -0
- package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
- package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +54 -0
- package/dist/models/V1Distributor.d.ts +50 -0
- package/dist/models/V1Distributor.js +60 -0
- package/dist/models/V1DistributorList.d.ts +33 -0
- package/dist/models/V1DistributorList.js +51 -0
- package/dist/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
- package/dist/models/V1MigrateLegacyBillingPayload.js +54 -0
- package/dist/models/V1Organization.d.ts +57 -0
- package/dist/models/V1Organization.js +61 -0
- package/dist/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
- package/dist/models/V1OrganizationChargebeeV1Status.js +79 -0
- package/dist/models/V1OrganizationStatus.d.ts +59 -0
- package/dist/models/V1OrganizationStatus.js +65 -0
- package/dist/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
- package/dist/models/V1OrganizationStatusChargebeeV1Addon.js +56 -0
- package/dist/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
- package/dist/models/V1OrganizationStatusChargebeeV1User.js +60 -0
- package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
- package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +66 -0
- package/dist/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
- package/dist/models/V1SetChargebeeV1BillingPayorPayload.js +50 -0
- package/dist/models/V1SetChargebeeV1Payload.d.ts +45 -0
- package/dist/models/V1SetChargebeeV1Payload.js +59 -0
- package/dist/models/V1SetLegacyBillingPayload.d.ts +45 -0
- package/dist/models/V1SetLegacyBillingPayload.js +57 -0
- package/dist/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
- package/dist/models/V1SetOrganisationDistributorPayload.js +50 -0
- package/dist/models/V1SetUserNonBillablePayload.d.ts +32 -0
- package/dist/models/V1SetUserNonBillablePayload.js +50 -0
- package/dist/models/V1User.d.ts +50 -0
- package/dist/models/V1User.js +62 -0
- package/dist/models/V1UserServiceStatus.d.ts +44 -0
- package/dist/models/V1UserServiceStatus.js +58 -0
- package/dist/models/V1UserStatus.d.ts +33 -0
- package/dist/models/V1UserStatus.js +51 -0
- package/dist/models/index.d.ts +29 -0
- package/dist/models/index.js +47 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/package.json +22 -0
- package/renovate.json +6 -0
- package/src/apis/DistributorV1Api.ts +117 -0
- package/src/apis/OrganizationV1Api.ts +784 -0
- package/src/apis/UserV1Api.ts +232 -0
- package/src/apis/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/models/ErrorCodes.ts +59 -0
- package/src/models/ErrorSchema.ts +84 -0
- package/src/models/SubscriptionCreationMode.ts +54 -0
- package/src/models/V1BillingStatus.ts +76 -0
- package/src/models/V1BillingType.ts +58 -0
- package/src/models/V1ChargebeeV1NotPaidInvoice.ts +83 -0
- package/src/models/V1ChargebeeV1PaymentDueInvoice.ts +83 -0
- package/src/models/V1ChargebeeV1PortalSession.ts +83 -0
- package/src/models/V1ChargebeeV1UnpaidInvoice.ts +83 -0
- package/src/models/V1CollectChargebeeV1Payment.ts +66 -0
- package/src/models/V1CreateChargebeeV1PortalSessionPayload.ts +65 -0
- package/src/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.ts +75 -0
- package/src/models/V1Distributor.ts +92 -0
- package/src/models/V1DistributorList.ts +74 -0
- package/src/models/V1MigrateLegacyBillingPayload.ts +75 -0
- package/src/models/V1Organization.ts +109 -0
- package/src/models/V1OrganizationChargebeeV1Status.ts +163 -0
- package/src/models/V1OrganizationStatus.ts +124 -0
- package/src/models/V1OrganizationStatusChargebeeV1Addon.ts +83 -0
- package/src/models/V1OrganizationStatusChargebeeV1User.ts +101 -0
- package/src/models/V1OrganizationStatusChargebeeV1UserBillingStatus.ts +68 -0
- package/src/models/V1SetChargebeeV1BillingPayorPayload.ts +66 -0
- package/src/models/V1SetChargebeeV1Payload.ts +94 -0
- package/src/models/V1SetLegacyBillingPayload.ts +93 -0
- package/src/models/V1SetOrganisationDistributorPayload.ts +66 -0
- package/src/models/V1SetUserNonBillablePayload.ts +66 -0
- package/src/models/V1User.ts +93 -0
- package/src/models/V1UserServiceStatus.ts +84 -0
- package/src/models/V1UserStatus.ts +74 -0
- package/src/models/index.ts +31 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.npmignore
|
|
2
|
+
README.md
|
|
3
|
+
package.json
|
|
4
|
+
src/apis/DistributorV1Api.ts
|
|
5
|
+
src/apis/OrganizationV1Api.ts
|
|
6
|
+
src/apis/UserV1Api.ts
|
|
7
|
+
src/apis/index.ts
|
|
8
|
+
src/index.ts
|
|
9
|
+
src/models/ErrorCodes.ts
|
|
10
|
+
src/models/ErrorSchema.ts
|
|
11
|
+
src/models/SubscriptionCreationMode.ts
|
|
12
|
+
src/models/V1BillingStatus.ts
|
|
13
|
+
src/models/V1BillingType.ts
|
|
14
|
+
src/models/V1ChargebeeV1NotPaidInvoice.ts
|
|
15
|
+
src/models/V1ChargebeeV1PaymentDueInvoice.ts
|
|
16
|
+
src/models/V1ChargebeeV1PortalSession.ts
|
|
17
|
+
src/models/V1ChargebeeV1UnpaidInvoice.ts
|
|
18
|
+
src/models/V1CollectChargebeeV1Payment.ts
|
|
19
|
+
src/models/V1CreateChargebeeV1PortalSessionPayload.ts
|
|
20
|
+
src/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.ts
|
|
21
|
+
src/models/V1Distributor.ts
|
|
22
|
+
src/models/V1DistributorList.ts
|
|
23
|
+
src/models/V1MigrateLegacyBillingPayload.ts
|
|
24
|
+
src/models/V1Organization.ts
|
|
25
|
+
src/models/V1OrganizationChargebeeV1Status.ts
|
|
26
|
+
src/models/V1OrganizationStatus.ts
|
|
27
|
+
src/models/V1OrganizationStatusChargebeeV1Addon.ts
|
|
28
|
+
src/models/V1OrganizationStatusChargebeeV1User.ts
|
|
29
|
+
src/models/V1OrganizationStatusChargebeeV1UserBillingStatus.ts
|
|
30
|
+
src/models/V1SetChargebeeV1BillingPayorPayload.ts
|
|
31
|
+
src/models/V1SetChargebeeV1Payload.ts
|
|
32
|
+
src/models/V1SetLegacyBillingPayload.ts
|
|
33
|
+
src/models/V1SetOrganisationDistributorPayload.ts
|
|
34
|
+
src/models/V1SetUserNonBillablePayload.ts
|
|
35
|
+
src/models/V1User.ts
|
|
36
|
+
src/models/V1UserServiceStatus.ts
|
|
37
|
+
src/models/V1UserStatus.ts
|
|
38
|
+
src/models/index.ts
|
|
39
|
+
src/runtime.ts
|
|
40
|
+
tsconfig.esm.json
|
|
41
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.13.0-equisoft1
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
.gitignore
|
|
8
|
+
.tool-versions
|
|
9
|
+
.github
|
|
10
|
+
|
|
11
|
+
local.build.gradle.kts
|
|
12
|
+
local.settings.gradle.kts
|
|
13
|
+
gradle.properties
|
package/.tool-versions
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## billing-sdk@2.1.1-SNAPSHOT
|
|
2
|
+
|
|
3
|
+
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
|
|
19
|
+
|
|
20
|
+
### Building
|
|
21
|
+
|
|
22
|
+
To build and compile the typescript sources to javascript use:
|
|
23
|
+
```
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Publishing
|
|
29
|
+
|
|
30
|
+
First build the package then run `npm publish`
|
|
31
|
+
|
|
32
|
+
### Consuming
|
|
33
|
+
|
|
34
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
35
|
+
|
|
36
|
+
_published:_
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm install billing-sdk@2.1.1-SNAPSHOT --save
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
_unPublished (not recommended):_
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing
|
|
3
|
+
* Micro-Service to handle billing
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.1.1-SNAPSHOT
|
|
6
|
+
* Contact: customersuccess@equisoft.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { V1Distributor, V1DistributorList } from '../models/index';
|
|
14
|
+
export interface GetDistributorRequest {
|
|
15
|
+
code: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class DistributorV1Api extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Get billing information about a distributor
|
|
23
|
+
*/
|
|
24
|
+
getDistributorRaw(requestParameters: GetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1Distributor>>;
|
|
25
|
+
/**
|
|
26
|
+
* Get billing information about a distributor
|
|
27
|
+
*/
|
|
28
|
+
getDistributor(requestParameters: GetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1Distributor>;
|
|
29
|
+
/**
|
|
30
|
+
* List all available distributors
|
|
31
|
+
*/
|
|
32
|
+
listDistributorsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1DistributorList>>;
|
|
33
|
+
/**
|
|
34
|
+
* List all available distributors
|
|
35
|
+
*/
|
|
36
|
+
listDistributors(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1DistributorList>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Billing
|
|
6
|
+
* Micro-Service to handle billing
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.1.1-SNAPSHOT
|
|
9
|
+
* Contact: customersuccess@equisoft.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.DistributorV1Api = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class DistributorV1Api extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get billing information about a distributor
|
|
34
|
+
*/
|
|
35
|
+
getDistributorRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['code'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('code', 'Required parameter "code" was null or undefined when calling getDistributor().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
// oauth required
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("OAuth2", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: `/v1/distributors/{code}`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters['code']))),
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1DistributorFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get billing information about a distributor
|
|
61
|
+
*/
|
|
62
|
+
getDistributor(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const response = yield this.getDistributorRaw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* List all available distributors
|
|
70
|
+
*/
|
|
71
|
+
listDistributorsRaw(initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
76
|
+
// oauth required
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = yield token("OAuth2", []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const response = yield this.request({
|
|
84
|
+
path: `/v1/distributors`,
|
|
85
|
+
method: 'GET',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
}, initOverrides);
|
|
89
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1DistributorListFromJSON)(jsonValue));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* List all available distributors
|
|
94
|
+
*/
|
|
95
|
+
listDistributors(initOverrides) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const response = yield this.listDistributorsRaw(initOverrides);
|
|
98
|
+
return yield response.value();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.DistributorV1Api = DistributorV1Api;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing
|
|
3
|
+
* Micro-Service to handle billing
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.1.1-SNAPSHOT
|
|
6
|
+
* Contact: customersuccess@equisoft.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { V1ChargebeeV1PortalSession, V1CollectChargebeeV1Payment, V1CreateChargebeeV1PortalSessionPayload, V1CreateOrUpdateChargebeeV1SubscriptionPayload, V1MigrateLegacyBillingPayload, V1Organization, V1OrganizationStatus, V1SetChargebeeV1BillingPayorPayload, V1SetChargebeeV1Payload, V1SetLegacyBillingPayload, V1SetOrganisationDistributorPayload } from '../models/index';
|
|
14
|
+
export interface CollectChargebeeV1PaymentRequest {
|
|
15
|
+
uuid: string;
|
|
16
|
+
v1CollectChargebeeV1Payment: V1CollectChargebeeV1Payment;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateChargebeeV1PortalSessionRequest {
|
|
19
|
+
uuid: string;
|
|
20
|
+
v1CreateChargebeeV1PortalSessionPayload: V1CreateChargebeeV1PortalSessionPayload;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateOrUpdateSubscriptionRequest {
|
|
23
|
+
uuid: string;
|
|
24
|
+
v1CreateOrUpdateChargebeeV1SubscriptionPayload: V1CreateOrUpdateChargebeeV1SubscriptionPayload;
|
|
25
|
+
}
|
|
26
|
+
export interface GetOrganizationRequest {
|
|
27
|
+
uuid: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GetOrganizationStatusRequest {
|
|
30
|
+
uuid: string;
|
|
31
|
+
}
|
|
32
|
+
export interface MigrateLegacyBillingRequest {
|
|
33
|
+
uuid: string;
|
|
34
|
+
v1MigrateLegacyBillingPayload: V1MigrateLegacyBillingPayload;
|
|
35
|
+
}
|
|
36
|
+
export interface SetChargebeeV1BillingRequest {
|
|
37
|
+
uuid: string;
|
|
38
|
+
v1SetChargebeeV1Payload: V1SetChargebeeV1Payload;
|
|
39
|
+
}
|
|
40
|
+
export interface SetDistributorRequest {
|
|
41
|
+
uuid: string;
|
|
42
|
+
v1SetOrganisationDistributorPayload: V1SetOrganisationDistributorPayload;
|
|
43
|
+
}
|
|
44
|
+
export interface SetLegacyBillingRequest {
|
|
45
|
+
uuid: string;
|
|
46
|
+
v1SetLegacyBillingPayload: V1SetLegacyBillingPayload;
|
|
47
|
+
}
|
|
48
|
+
export interface SetManualBillingRequest {
|
|
49
|
+
uuid: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SetNonBillableBillingRequest {
|
|
52
|
+
uuid: string;
|
|
53
|
+
}
|
|
54
|
+
export interface SetPayorUserIdRequest {
|
|
55
|
+
uuid: string;
|
|
56
|
+
v1SetChargebeeV1BillingPayorPayload: V1SetChargebeeV1BillingPayorPayload;
|
|
57
|
+
}
|
|
58
|
+
export interface UnsetBillingRequest {
|
|
59
|
+
uuid: string;
|
|
60
|
+
}
|
|
61
|
+
export interface UnsetDistributorRequest {
|
|
62
|
+
uuid: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class OrganizationV1Api extends runtime.BaseAPI {
|
|
68
|
+
/**
|
|
69
|
+
* Collect all CHARGEBEE_V1 unpaid invoices for the organization
|
|
70
|
+
*/
|
|
71
|
+
collectChargebeeV1PaymentRaw(requestParameters: CollectChargebeeV1PaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
72
|
+
/**
|
|
73
|
+
* Collect all CHARGEBEE_V1 unpaid invoices for the organization
|
|
74
|
+
*/
|
|
75
|
+
collectChargebeeV1Payment(requestParameters: CollectChargebeeV1PaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a Chargebee V1 portal session for the organization
|
|
78
|
+
*/
|
|
79
|
+
createChargebeeV1PortalSessionRaw(requestParameters: CreateChargebeeV1PortalSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1ChargebeeV1PortalSession>>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a Chargebee V1 portal session for the organization
|
|
82
|
+
*/
|
|
83
|
+
createChargebeeV1PortalSession(requestParameters: CreateChargebeeV1PortalSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1ChargebeeV1PortalSession>;
|
|
84
|
+
/**
|
|
85
|
+
* Create or Update Chargebee v1 subscription
|
|
86
|
+
*/
|
|
87
|
+
createOrUpdateSubscriptionRaw(requestParameters: CreateOrUpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
88
|
+
/**
|
|
89
|
+
* Create or Update Chargebee v1 subscription
|
|
90
|
+
*/
|
|
91
|
+
createOrUpdateSubscription(requestParameters: CreateOrUpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Get billing information about an organization
|
|
94
|
+
*/
|
|
95
|
+
getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1Organization>>;
|
|
96
|
+
/**
|
|
97
|
+
* Get billing information about an organization
|
|
98
|
+
*/
|
|
99
|
+
getOrganization(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1Organization>;
|
|
100
|
+
/**
|
|
101
|
+
* Get detailed billing status about an organization
|
|
102
|
+
*/
|
|
103
|
+
getOrganizationStatusRaw(requestParameters: GetOrganizationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1OrganizationStatus>>;
|
|
104
|
+
/**
|
|
105
|
+
* Get detailed billing status about an organization
|
|
106
|
+
*/
|
|
107
|
+
getOrganizationStatus(requestParameters: GetOrganizationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1OrganizationStatus>;
|
|
108
|
+
/**
|
|
109
|
+
* Migration organization from a legacy billing to Chargebee V1 billing
|
|
110
|
+
*/
|
|
111
|
+
migrateLegacyBillingRaw(requestParameters: MigrateLegacyBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
112
|
+
/**
|
|
113
|
+
* Migration organization from a legacy billing to Chargebee V1 billing
|
|
114
|
+
*/
|
|
115
|
+
migrateLegacyBilling(requestParameters: MigrateLegacyBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Set Chargebee V1 Billing for the organization
|
|
118
|
+
*/
|
|
119
|
+
setChargebeeV1BillingRaw(requestParameters: SetChargebeeV1BillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
120
|
+
/**
|
|
121
|
+
* Set Chargebee V1 Billing for the organization
|
|
122
|
+
*/
|
|
123
|
+
setChargebeeV1Billing(requestParameters: SetChargebeeV1BillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Set the distributor for an organization
|
|
126
|
+
*/
|
|
127
|
+
setDistributorRaw(requestParameters: SetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
128
|
+
/**
|
|
129
|
+
* Set the distributor for an organization
|
|
130
|
+
*/
|
|
131
|
+
setDistributor(requestParameters: SetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Set Legacy Billing for the organization
|
|
134
|
+
*/
|
|
135
|
+
setLegacyBillingRaw(requestParameters: SetLegacyBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
136
|
+
/**
|
|
137
|
+
* Set Legacy Billing for the organization
|
|
138
|
+
*/
|
|
139
|
+
setLegacyBilling(requestParameters: SetLegacyBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Set Manual Billing for the organization
|
|
142
|
+
*/
|
|
143
|
+
setManualBillingRaw(requestParameters: SetManualBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
144
|
+
/**
|
|
145
|
+
* Set Manual Billing for the organization
|
|
146
|
+
*/
|
|
147
|
+
setManualBilling(requestParameters: SetManualBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Set Non-Billable Billing for the organization
|
|
150
|
+
*/
|
|
151
|
+
setNonBillableBillingRaw(requestParameters: SetNonBillableBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
152
|
+
/**
|
|
153
|
+
* Set Non-Billable Billing for the organization
|
|
154
|
+
*/
|
|
155
|
+
setNonBillableBilling(requestParameters: SetNonBillableBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Set the payor user for Chargebee V1 billing
|
|
158
|
+
*/
|
|
159
|
+
setPayorUserIdRaw(requestParameters: SetPayorUserIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
160
|
+
/**
|
|
161
|
+
* Set the payor user for Chargebee V1 billing
|
|
162
|
+
*/
|
|
163
|
+
setPayorUserId(requestParameters: SetPayorUserIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Unset billing for the organization
|
|
166
|
+
*/
|
|
167
|
+
unsetBillingRaw(requestParameters: UnsetBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
168
|
+
/**
|
|
169
|
+
* Unset billing for the organization
|
|
170
|
+
*/
|
|
171
|
+
unsetBilling(requestParameters: UnsetBillingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Unset the distributor for an organization
|
|
174
|
+
*/
|
|
175
|
+
unsetDistributorRaw(requestParameters: UnsetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
176
|
+
/**
|
|
177
|
+
* Unset the distributor for an organization
|
|
178
|
+
*/
|
|
179
|
+
unsetDistributor(requestParameters: UnsetDistributorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
180
|
+
}
|