@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,180 @@
|
|
|
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.UserV1Api = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class UserV1Api extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get billing information about a User
|
|
34
|
+
*/
|
|
35
|
+
getUserRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['uuid'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getUser().');
|
|
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/users/{uuid}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1UserFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get billing information about a User
|
|
61
|
+
*/
|
|
62
|
+
getUser(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const response = yield this.getUserRaw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get billing status of a user
|
|
70
|
+
*/
|
|
71
|
+
getUserStatusRaw(requestParameters, initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
if (requestParameters['uuid'] == null) {
|
|
74
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getUserStatus().');
|
|
75
|
+
}
|
|
76
|
+
const queryParameters = {};
|
|
77
|
+
const headerParameters = {};
|
|
78
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
79
|
+
// oauth required
|
|
80
|
+
const token = this.configuration.accessToken;
|
|
81
|
+
const tokenString = yield token("OAuth2", []);
|
|
82
|
+
if (tokenString) {
|
|
83
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const response = yield this.request({
|
|
87
|
+
path: `/v1/users/{uuid}/status`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
88
|
+
method: 'GET',
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1UserStatusFromJSON)(jsonValue));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get billing status of a user
|
|
97
|
+
*/
|
|
98
|
+
getUserStatus(requestParameters, initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const response = yield this.getUserStatusRaw(requestParameters, initOverrides);
|
|
101
|
+
return yield response.value();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Set the user non-billable
|
|
106
|
+
*/
|
|
107
|
+
setNonBillableRaw(requestParameters, initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
if (requestParameters['uuid'] == null) {
|
|
110
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling setNonBillable().');
|
|
111
|
+
}
|
|
112
|
+
if (requestParameters['v1SetUserNonBillablePayload'] == null) {
|
|
113
|
+
throw new runtime.RequiredError('v1SetUserNonBillablePayload', 'Required parameter "v1SetUserNonBillablePayload" was null or undefined when calling setNonBillable().');
|
|
114
|
+
}
|
|
115
|
+
const queryParameters = {};
|
|
116
|
+
const headerParameters = {};
|
|
117
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
118
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
119
|
+
// oauth required
|
|
120
|
+
const token = this.configuration.accessToken;
|
|
121
|
+
const tokenString = yield token("OAuth2", []);
|
|
122
|
+
if (tokenString) {
|
|
123
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const response = yield this.request({
|
|
127
|
+
path: `/v1/users/{uuid}/nonBillable`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
128
|
+
method: 'PUT',
|
|
129
|
+
headers: headerParameters,
|
|
130
|
+
query: queryParameters,
|
|
131
|
+
body: (0, index_1.V1SetUserNonBillablePayloadToJSON)(requestParameters['v1SetUserNonBillablePayload']),
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
return new runtime.VoidApiResponse(response);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Set the user non-billable
|
|
138
|
+
*/
|
|
139
|
+
setNonBillable(requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
yield this.setNonBillableRaw(requestParameters, initOverrides);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Remove the non-billable flag on the user
|
|
146
|
+
*/
|
|
147
|
+
unsetNonBillableRaw(requestParameters, initOverrides) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
if (requestParameters['uuid'] == null) {
|
|
150
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling unsetNonBillable().');
|
|
151
|
+
}
|
|
152
|
+
const queryParameters = {};
|
|
153
|
+
const headerParameters = {};
|
|
154
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
155
|
+
// oauth required
|
|
156
|
+
const token = this.configuration.accessToken;
|
|
157
|
+
const tokenString = yield token("OAuth2", []);
|
|
158
|
+
if (tokenString) {
|
|
159
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const response = yield this.request({
|
|
163
|
+
path: `/v1/users/{uuid}/nonBillable`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
164
|
+
method: 'DELETE',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
return new runtime.VoidApiResponse(response);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Remove the non-billable flag on the user
|
|
173
|
+
*/
|
|
174
|
+
unsetNonBillable(requestParameters, initOverrides) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
yield this.unsetNonBillableRaw(requestParameters, initOverrides);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.UserV1Api = UserV1Api;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./DistributorV1Api"), exports);
|
|
20
|
+
__exportStar(require("./OrganizationV1Api"), exports);
|
|
21
|
+
__exportStar(require("./UserV1Api"), exports);
|
|
@@ -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,98 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Billing
|
|
5
|
+
* Micro-Service to handle billing
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.1.1-SNAPSHOT
|
|
8
|
+
* Contact: customersuccess@equisoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { V1DistributorFromJSON, V1DistributorListFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class DistributorV1Api extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Get billing information about a distributor
|
|
31
|
+
*/
|
|
32
|
+
getDistributorRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['code'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('code', 'Required parameter "code" was null or undefined when calling getDistributor().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
40
|
+
// oauth required
|
|
41
|
+
const token = this.configuration.accessToken;
|
|
42
|
+
const tokenString = yield token("OAuth2", []);
|
|
43
|
+
if (tokenString) {
|
|
44
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: `/v1/distributors/{code}`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters['code']))),
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => V1DistributorFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get billing information about a distributor
|
|
58
|
+
*/
|
|
59
|
+
getDistributor(requestParameters, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const response = yield this.getDistributorRaw(requestParameters, initOverrides);
|
|
62
|
+
return yield response.value();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List all available distributors
|
|
67
|
+
*/
|
|
68
|
+
listDistributorsRaw(initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const queryParameters = {};
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
73
|
+
// oauth required
|
|
74
|
+
const token = this.configuration.accessToken;
|
|
75
|
+
const tokenString = yield token("OAuth2", []);
|
|
76
|
+
if (tokenString) {
|
|
77
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const response = yield this.request({
|
|
81
|
+
path: `/v1/distributors`,
|
|
82
|
+
method: 'GET',
|
|
83
|
+
headers: headerParameters,
|
|
84
|
+
query: queryParameters,
|
|
85
|
+
}, initOverrides);
|
|
86
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => V1DistributorListFromJSON(jsonValue));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* List all available distributors
|
|
91
|
+
*/
|
|
92
|
+
listDistributors(initOverrides) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const response = yield this.listDistributorsRaw(initOverrides);
|
|
95
|
+
return yield response.value();
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -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
|
+
}
|