@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.
Files changed (189) hide show
  1. package/.openapi-generator/FILES +41 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +13 -0
  4. package/.tool-versions +3 -0
  5. package/README.md +46 -0
  6. package/dist/apis/DistributorV1Api.d.ts +37 -0
  7. package/dist/apis/DistributorV1Api.js +102 -0
  8. package/dist/apis/OrganizationV1Api.d.ts +180 -0
  9. package/dist/apis/OrganizationV1Api.js +566 -0
  10. package/dist/apis/UserV1Api.d.ts +63 -0
  11. package/dist/apis/UserV1Api.js +180 -0
  12. package/dist/apis/index.d.ts +3 -0
  13. package/dist/apis/index.js +21 -0
  14. package/dist/esm/apis/DistributorV1Api.d.ts +37 -0
  15. package/dist/esm/apis/DistributorV1Api.js +98 -0
  16. package/dist/esm/apis/OrganizationV1Api.d.ts +180 -0
  17. package/dist/esm/apis/OrganizationV1Api.js +562 -0
  18. package/dist/esm/apis/UserV1Api.d.ts +63 -0
  19. package/dist/esm/apis/UserV1Api.js +176 -0
  20. package/dist/esm/apis/index.d.ts +3 -0
  21. package/dist/esm/apis/index.js +5 -0
  22. package/dist/esm/index.d.ts +3 -0
  23. package/dist/esm/index.js +5 -0
  24. package/dist/esm/models/ErrorCodes.d.ts +31 -0
  25. package/dist/esm/models/ErrorCodes.js +49 -0
  26. package/dist/esm/models/ErrorSchema.d.ts +39 -0
  27. package/dist/esm/models/ErrorSchema.js +46 -0
  28. package/dist/esm/models/SubscriptionCreationMode.d.ts +26 -0
  29. package/dist/esm/models/SubscriptionCreationMode.js +44 -0
  30. package/dist/esm/models/V1BillingStatus.d.ts +48 -0
  31. package/dist/esm/models/V1BillingStatus.js +66 -0
  32. package/dist/esm/models/V1BillingType.d.ts +30 -0
  33. package/dist/esm/models/V1BillingType.js +48 -0
  34. package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
  35. package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.js +49 -0
  36. package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
  37. package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.js +49 -0
  38. package/dist/esm/models/V1ChargebeeV1PortalSession.d.ts +44 -0
  39. package/dist/esm/models/V1ChargebeeV1PortalSession.js +49 -0
  40. package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
  41. package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.js +49 -0
  42. package/dist/esm/models/V1CollectChargebeeV1Payment.d.ts +32 -0
  43. package/dist/esm/models/V1CollectChargebeeV1Payment.js +43 -0
  44. package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
  45. package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.js +41 -0
  46. package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
  47. package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +47 -0
  48. package/dist/esm/models/V1Distributor.d.ts +50 -0
  49. package/dist/esm/models/V1Distributor.js +53 -0
  50. package/dist/esm/models/V1DistributorList.d.ts +33 -0
  51. package/dist/esm/models/V1DistributorList.js +44 -0
  52. package/dist/esm/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
  53. package/dist/esm/models/V1MigrateLegacyBillingPayload.js +47 -0
  54. package/dist/esm/models/V1Organization.d.ts +57 -0
  55. package/dist/esm/models/V1Organization.js +54 -0
  56. package/dist/esm/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
  57. package/dist/esm/models/V1OrganizationChargebeeV1Status.js +72 -0
  58. package/dist/esm/models/V1OrganizationStatus.d.ts +59 -0
  59. package/dist/esm/models/V1OrganizationStatus.js +58 -0
  60. package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
  61. package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.js +49 -0
  62. package/dist/esm/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
  63. package/dist/esm/models/V1OrganizationStatusChargebeeV1User.js +53 -0
  64. package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
  65. package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +58 -0
  66. package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
  67. package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.js +43 -0
  68. package/dist/esm/models/V1SetChargebeeV1Payload.d.ts +45 -0
  69. package/dist/esm/models/V1SetChargebeeV1Payload.js +52 -0
  70. package/dist/esm/models/V1SetLegacyBillingPayload.d.ts +45 -0
  71. package/dist/esm/models/V1SetLegacyBillingPayload.js +50 -0
  72. package/dist/esm/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
  73. package/dist/esm/models/V1SetOrganisationDistributorPayload.js +43 -0
  74. package/dist/esm/models/V1SetUserNonBillablePayload.d.ts +32 -0
  75. package/dist/esm/models/V1SetUserNonBillablePayload.js +43 -0
  76. package/dist/esm/models/V1User.d.ts +50 -0
  77. package/dist/esm/models/V1User.js +55 -0
  78. package/dist/esm/models/V1UserServiceStatus.d.ts +44 -0
  79. package/dist/esm/models/V1UserServiceStatus.js +51 -0
  80. package/dist/esm/models/V1UserStatus.d.ts +33 -0
  81. package/dist/esm/models/V1UserStatus.js +44 -0
  82. package/dist/esm/models/index.d.ts +29 -0
  83. package/dist/esm/models/index.js +31 -0
  84. package/dist/esm/runtime.d.ts +184 -0
  85. package/dist/esm/runtime.js +334 -0
  86. package/dist/index.d.ts +3 -0
  87. package/dist/index.js +21 -0
  88. package/dist/models/ErrorCodes.d.ts +31 -0
  89. package/dist/models/ErrorCodes.js +57 -0
  90. package/dist/models/ErrorSchema.d.ts +39 -0
  91. package/dist/models/ErrorSchema.js +53 -0
  92. package/dist/models/SubscriptionCreationMode.d.ts +26 -0
  93. package/dist/models/SubscriptionCreationMode.js +52 -0
  94. package/dist/models/V1BillingStatus.d.ts +48 -0
  95. package/dist/models/V1BillingStatus.js +74 -0
  96. package/dist/models/V1BillingType.d.ts +30 -0
  97. package/dist/models/V1BillingType.js +56 -0
  98. package/dist/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
  99. package/dist/models/V1ChargebeeV1NotPaidInvoice.js +56 -0
  100. package/dist/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
  101. package/dist/models/V1ChargebeeV1PaymentDueInvoice.js +56 -0
  102. package/dist/models/V1ChargebeeV1PortalSession.d.ts +44 -0
  103. package/dist/models/V1ChargebeeV1PortalSession.js +56 -0
  104. package/dist/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
  105. package/dist/models/V1ChargebeeV1UnpaidInvoice.js +56 -0
  106. package/dist/models/V1CollectChargebeeV1Payment.d.ts +32 -0
  107. package/dist/models/V1CollectChargebeeV1Payment.js +50 -0
  108. package/dist/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
  109. package/dist/models/V1CreateChargebeeV1PortalSessionPayload.js +48 -0
  110. package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
  111. package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +54 -0
  112. package/dist/models/V1Distributor.d.ts +50 -0
  113. package/dist/models/V1Distributor.js +60 -0
  114. package/dist/models/V1DistributorList.d.ts +33 -0
  115. package/dist/models/V1DistributorList.js +51 -0
  116. package/dist/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
  117. package/dist/models/V1MigrateLegacyBillingPayload.js +54 -0
  118. package/dist/models/V1Organization.d.ts +57 -0
  119. package/dist/models/V1Organization.js +61 -0
  120. package/dist/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
  121. package/dist/models/V1OrganizationChargebeeV1Status.js +79 -0
  122. package/dist/models/V1OrganizationStatus.d.ts +59 -0
  123. package/dist/models/V1OrganizationStatus.js +65 -0
  124. package/dist/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
  125. package/dist/models/V1OrganizationStatusChargebeeV1Addon.js +56 -0
  126. package/dist/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
  127. package/dist/models/V1OrganizationStatusChargebeeV1User.js +60 -0
  128. package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
  129. package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +66 -0
  130. package/dist/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
  131. package/dist/models/V1SetChargebeeV1BillingPayorPayload.js +50 -0
  132. package/dist/models/V1SetChargebeeV1Payload.d.ts +45 -0
  133. package/dist/models/V1SetChargebeeV1Payload.js +59 -0
  134. package/dist/models/V1SetLegacyBillingPayload.d.ts +45 -0
  135. package/dist/models/V1SetLegacyBillingPayload.js +57 -0
  136. package/dist/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
  137. package/dist/models/V1SetOrganisationDistributorPayload.js +50 -0
  138. package/dist/models/V1SetUserNonBillablePayload.d.ts +32 -0
  139. package/dist/models/V1SetUserNonBillablePayload.js +50 -0
  140. package/dist/models/V1User.d.ts +50 -0
  141. package/dist/models/V1User.js +62 -0
  142. package/dist/models/V1UserServiceStatus.d.ts +44 -0
  143. package/dist/models/V1UserServiceStatus.js +58 -0
  144. package/dist/models/V1UserStatus.d.ts +33 -0
  145. package/dist/models/V1UserStatus.js +51 -0
  146. package/dist/models/index.d.ts +29 -0
  147. package/dist/models/index.js +47 -0
  148. package/dist/runtime.d.ts +184 -0
  149. package/dist/runtime.js +350 -0
  150. package/package.json +22 -0
  151. package/renovate.json +6 -0
  152. package/src/apis/DistributorV1Api.ts +117 -0
  153. package/src/apis/OrganizationV1Api.ts +784 -0
  154. package/src/apis/UserV1Api.ts +232 -0
  155. package/src/apis/index.ts +5 -0
  156. package/src/index.ts +5 -0
  157. package/src/models/ErrorCodes.ts +59 -0
  158. package/src/models/ErrorSchema.ts +84 -0
  159. package/src/models/SubscriptionCreationMode.ts +54 -0
  160. package/src/models/V1BillingStatus.ts +76 -0
  161. package/src/models/V1BillingType.ts +58 -0
  162. package/src/models/V1ChargebeeV1NotPaidInvoice.ts +83 -0
  163. package/src/models/V1ChargebeeV1PaymentDueInvoice.ts +83 -0
  164. package/src/models/V1ChargebeeV1PortalSession.ts +83 -0
  165. package/src/models/V1ChargebeeV1UnpaidInvoice.ts +83 -0
  166. package/src/models/V1CollectChargebeeV1Payment.ts +66 -0
  167. package/src/models/V1CreateChargebeeV1PortalSessionPayload.ts +65 -0
  168. package/src/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.ts +75 -0
  169. package/src/models/V1Distributor.ts +92 -0
  170. package/src/models/V1DistributorList.ts +74 -0
  171. package/src/models/V1MigrateLegacyBillingPayload.ts +75 -0
  172. package/src/models/V1Organization.ts +109 -0
  173. package/src/models/V1OrganizationChargebeeV1Status.ts +163 -0
  174. package/src/models/V1OrganizationStatus.ts +124 -0
  175. package/src/models/V1OrganizationStatusChargebeeV1Addon.ts +83 -0
  176. package/src/models/V1OrganizationStatusChargebeeV1User.ts +101 -0
  177. package/src/models/V1OrganizationStatusChargebeeV1UserBillingStatus.ts +68 -0
  178. package/src/models/V1SetChargebeeV1BillingPayorPayload.ts +66 -0
  179. package/src/models/V1SetChargebeeV1Payload.ts +94 -0
  180. package/src/models/V1SetLegacyBillingPayload.ts +93 -0
  181. package/src/models/V1SetOrganisationDistributorPayload.ts +66 -0
  182. package/src/models/V1SetUserNonBillablePayload.ts +66 -0
  183. package/src/models/V1User.ts +93 -0
  184. package/src/models/V1UserServiceStatus.ts +84 -0
  185. package/src/models/V1UserStatus.ts +74 -0
  186. package/src/models/index.ts +31 -0
  187. package/src/runtime.ts +432 -0
  188. package/tsconfig.esm.json +7 -0
  189. 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,3 @@
1
+ export * from './DistributorV1Api';
2
+ export * from './OrganizationV1Api';
3
+ export * from './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
+ }