@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,232 @@
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
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ErrorSchema,
19
+ V1SetUserNonBillablePayload,
20
+ V1User,
21
+ V1UserStatus,
22
+ } from '../models/index';
23
+ import {
24
+ ErrorSchemaFromJSON,
25
+ ErrorSchemaToJSON,
26
+ V1SetUserNonBillablePayloadFromJSON,
27
+ V1SetUserNonBillablePayloadToJSON,
28
+ V1UserFromJSON,
29
+ V1UserToJSON,
30
+ V1UserStatusFromJSON,
31
+ V1UserStatusToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface GetUserRequest {
35
+ uuid: string;
36
+ }
37
+
38
+ export interface GetUserStatusRequest {
39
+ uuid: string;
40
+ }
41
+
42
+ export interface SetNonBillableRequest {
43
+ uuid: string;
44
+ v1SetUserNonBillablePayload: V1SetUserNonBillablePayload;
45
+ }
46
+
47
+ export interface UnsetNonBillableRequest {
48
+ uuid: string;
49
+ }
50
+
51
+ /**
52
+ *
53
+ */
54
+ export class UserV1Api extends runtime.BaseAPI {
55
+
56
+ /**
57
+ * Get billing information about a User
58
+ */
59
+ async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1User>> {
60
+ if (requestParameters['uuid'] == null) {
61
+ throw new runtime.RequiredError(
62
+ 'uuid',
63
+ 'Required parameter "uuid" was null or undefined when calling getUser().'
64
+ );
65
+ }
66
+
67
+ const queryParameters: any = {};
68
+
69
+ const headerParameters: runtime.HTTPHeaders = {};
70
+
71
+ if (this.configuration && this.configuration.accessToken) {
72
+ // oauth required
73
+ const token = this.configuration.accessToken;
74
+ const tokenString = await token("OAuth2", []);
75
+ if (tokenString) {
76
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
77
+ }
78
+ }
79
+
80
+ const response = await this.request({
81
+ path: `/v1/users/{uuid}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
82
+ method: 'GET',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ }, initOverrides);
86
+
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => V1UserFromJSON(jsonValue));
88
+ }
89
+
90
+ /**
91
+ * Get billing information about a User
92
+ */
93
+ async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1User> {
94
+ const response = await this.getUserRaw(requestParameters, initOverrides);
95
+ return await response.value();
96
+ }
97
+
98
+ /**
99
+ * Get billing status of a user
100
+ */
101
+ async getUserStatusRaw(requestParameters: GetUserStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V1UserStatus>> {
102
+ if (requestParameters['uuid'] == null) {
103
+ throw new runtime.RequiredError(
104
+ 'uuid',
105
+ 'Required parameter "uuid" was null or undefined when calling getUserStatus().'
106
+ );
107
+ }
108
+
109
+ const queryParameters: any = {};
110
+
111
+ const headerParameters: runtime.HTTPHeaders = {};
112
+
113
+ if (this.configuration && this.configuration.accessToken) {
114
+ // oauth required
115
+ const token = this.configuration.accessToken;
116
+ const tokenString = await token("OAuth2", []);
117
+ if (tokenString) {
118
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
119
+ }
120
+ }
121
+
122
+ const response = await this.request({
123
+ path: `/v1/users/{uuid}/status`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
124
+ method: 'GET',
125
+ headers: headerParameters,
126
+ query: queryParameters,
127
+ }, initOverrides);
128
+
129
+ return new runtime.JSONApiResponse(response, (jsonValue) => V1UserStatusFromJSON(jsonValue));
130
+ }
131
+
132
+ /**
133
+ * Get billing status of a user
134
+ */
135
+ async getUserStatus(requestParameters: GetUserStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V1UserStatus> {
136
+ const response = await this.getUserStatusRaw(requestParameters, initOverrides);
137
+ return await response.value();
138
+ }
139
+
140
+ /**
141
+ * Set the user non-billable
142
+ */
143
+ async setNonBillableRaw(requestParameters: SetNonBillableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
144
+ if (requestParameters['uuid'] == null) {
145
+ throw new runtime.RequiredError(
146
+ 'uuid',
147
+ 'Required parameter "uuid" was null or undefined when calling setNonBillable().'
148
+ );
149
+ }
150
+
151
+ if (requestParameters['v1SetUserNonBillablePayload'] == null) {
152
+ throw new runtime.RequiredError(
153
+ 'v1SetUserNonBillablePayload',
154
+ 'Required parameter "v1SetUserNonBillablePayload" was null or undefined when calling setNonBillable().'
155
+ );
156
+ }
157
+
158
+ const queryParameters: any = {};
159
+
160
+ const headerParameters: runtime.HTTPHeaders = {};
161
+
162
+ headerParameters['Content-Type'] = 'application/json';
163
+
164
+ if (this.configuration && this.configuration.accessToken) {
165
+ // oauth required
166
+ const token = this.configuration.accessToken;
167
+ const tokenString = await token("OAuth2", []);
168
+ if (tokenString) {
169
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
170
+ }
171
+ }
172
+
173
+ const response = await this.request({
174
+ path: `/v1/users/{uuid}/nonBillable`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
175
+ method: 'PUT',
176
+ headers: headerParameters,
177
+ query: queryParameters,
178
+ body: V1SetUserNonBillablePayloadToJSON(requestParameters['v1SetUserNonBillablePayload']),
179
+ }, initOverrides);
180
+
181
+ return new runtime.VoidApiResponse(response);
182
+ }
183
+
184
+ /**
185
+ * Set the user non-billable
186
+ */
187
+ async setNonBillable(requestParameters: SetNonBillableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
188
+ await this.setNonBillableRaw(requestParameters, initOverrides);
189
+ }
190
+
191
+ /**
192
+ * Remove the non-billable flag on the user
193
+ */
194
+ async unsetNonBillableRaw(requestParameters: UnsetNonBillableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
195
+ if (requestParameters['uuid'] == null) {
196
+ throw new runtime.RequiredError(
197
+ 'uuid',
198
+ 'Required parameter "uuid" was null or undefined when calling unsetNonBillable().'
199
+ );
200
+ }
201
+
202
+ const queryParameters: any = {};
203
+
204
+ const headerParameters: runtime.HTTPHeaders = {};
205
+
206
+ if (this.configuration && this.configuration.accessToken) {
207
+ // oauth required
208
+ const token = this.configuration.accessToken;
209
+ const tokenString = await token("OAuth2", []);
210
+ if (tokenString) {
211
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
212
+ }
213
+ }
214
+
215
+ const response = await this.request({
216
+ path: `/v1/users/{uuid}/nonBillable`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
217
+ method: 'DELETE',
218
+ headers: headerParameters,
219
+ query: queryParameters,
220
+ }, initOverrides);
221
+
222
+ return new runtime.VoidApiResponse(response);
223
+ }
224
+
225
+ /**
226
+ * Remove the non-billable flag on the user
227
+ */
228
+ async unsetNonBillable(requestParameters: UnsetNonBillableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
229
+ await this.unsetNonBillableRaw(requestParameters, initOverrides);
230
+ }
231
+
232
+ }
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './DistributorV1Api';
4
+ export * from './OrganizationV1Api';
5
+ export * from './UserV1Api';
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,59 @@
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
+
15
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const ErrorCodes = {
21
+ NOT_FOUND: 'NOT_FOUND',
22
+ SERVER_ERROR: 'SERVER_ERROR',
23
+ SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
24
+ INVALID_BILLING_TYPE: 'INVALID_BILLING_TYPE',
25
+ ACCESS_DENIED: 'ACCESS_DENIED',
26
+ PAYMENT_ERROR: 'PAYMENT_ERROR',
27
+ INVALID_PORTAL_SESSION_REDIRECT_URL: 'INVALID_PORTAL_SESSION_REDIRECT_URL',
28
+ unknown_default_open_api: '11184809'
29
+ } as const;
30
+ export type ErrorCodes = typeof ErrorCodes[keyof typeof ErrorCodes];
31
+
32
+
33
+ export function instanceOfErrorCodes(value: any): boolean {
34
+ for (const key in ErrorCodes) {
35
+ if (Object.prototype.hasOwnProperty.call(ErrorCodes, key)) {
36
+ if (ErrorCodes[key as keyof typeof ErrorCodes] === value) {
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+ return false;
42
+ }
43
+
44
+ export function ErrorCodesFromJSON(json: any): ErrorCodes {
45
+ return ErrorCodesFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ErrorCodesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorCodes {
49
+ return json as ErrorCodes;
50
+ }
51
+
52
+ export function ErrorCodesToJSON(value?: ErrorCodes | null): any {
53
+ return value as any;
54
+ }
55
+
56
+ export function ErrorCodesToJSONTyped(value: any, ignoreDiscriminator: boolean): ErrorCodes {
57
+ return value as ErrorCodes;
58
+ }
59
+
@@ -0,0 +1,84 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ErrorCodes } from './ErrorCodes';
17
+ import {
18
+ ErrorCodesFromJSON,
19
+ ErrorCodesFromJSONTyped,
20
+ ErrorCodesToJSON,
21
+ ErrorCodesToJSONTyped,
22
+ } from './ErrorCodes';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ErrorSchema
28
+ */
29
+ export interface ErrorSchema {
30
+ /**
31
+ *
32
+ * @type {ErrorCodes}
33
+ * @memberof ErrorSchema
34
+ */
35
+ code: ErrorCodes;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ErrorSchema
40
+ */
41
+ message?: string | null;
42
+ }
43
+
44
+
45
+
46
+ /**
47
+ * Check if a given object implements the ErrorSchema interface.
48
+ */
49
+ export function instanceOfErrorSchema(value: object): value is ErrorSchema {
50
+ if (!('code' in value) || value['code'] === undefined) return false;
51
+ return true;
52
+ }
53
+
54
+ export function ErrorSchemaFromJSON(json: any): ErrorSchema {
55
+ return ErrorSchemaFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function ErrorSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSchema {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'code': ErrorCodesFromJSON(json['code']),
65
+ 'message': json['message'] == null ? undefined : json['message'],
66
+ };
67
+ }
68
+
69
+ export function ErrorSchemaToJSON(json: any): ErrorSchema {
70
+ return ErrorSchemaToJSONTyped(json, false);
71
+ }
72
+
73
+ export function ErrorSchemaToJSONTyped(value?: ErrorSchema | null, ignoreDiscriminator: boolean = false): any {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+
78
+ return {
79
+
80
+ 'code': ErrorCodesToJSON(value['code']),
81
+ 'message': value['message'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,54 @@
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
+
15
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const SubscriptionCreationMode = {
21
+ CREATE_ON_FIRST_PAYMENT: 'CREATE_ON_FIRST_PAYMENT',
22
+ CREATE_NOW_WITH_PAYMENT_DUE: 'CREATE_NOW_WITH_PAYMENT_DUE',
23
+ unknown_default_open_api: '11184809'
24
+ } as const;
25
+ export type SubscriptionCreationMode = typeof SubscriptionCreationMode[keyof typeof SubscriptionCreationMode];
26
+
27
+
28
+ export function instanceOfSubscriptionCreationMode(value: any): boolean {
29
+ for (const key in SubscriptionCreationMode) {
30
+ if (Object.prototype.hasOwnProperty.call(SubscriptionCreationMode, key)) {
31
+ if (SubscriptionCreationMode[key as keyof typeof SubscriptionCreationMode] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function SubscriptionCreationModeFromJSON(json: any): SubscriptionCreationMode {
40
+ return SubscriptionCreationModeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function SubscriptionCreationModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCreationMode {
44
+ return json as SubscriptionCreationMode;
45
+ }
46
+
47
+ export function SubscriptionCreationModeToJSON(value?: SubscriptionCreationMode | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function SubscriptionCreationModeToJSONTyped(value: any, ignoreDiscriminator: boolean): SubscriptionCreationMode {
52
+ return value as SubscriptionCreationMode;
53
+ }
54
+
@@ -0,0 +1,76 @@
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
+
15
+
16
+ /**
17
+ * Billing status of the organization. This is agnostic and complementary to the billingType
18
+ * @export
19
+ */
20
+ export const V1BillingStatus = {
21
+ /**
22
+ * Automatic billing with active subscription
23
+ */
24
+ ACTIVE_SUBSCRIPTION: 'ACTIVE_SUBSCRIPTION',
25
+ /**
26
+ * Automatic billing without subscription. Waiting customer first payment.
27
+ */
28
+ NO_SUBSCRIPTION: 'NO_SUBSCRIPTION',
29
+ /**
30
+ * Automatic billing without unpaid invoices
31
+ */
32
+ UNPAID_SUBSCRIPTION: 'UNPAID_SUBSCRIPTION',
33
+ /**
34
+ * Automatic billing with canceled subscription
35
+ */
36
+ CANCELLED_SUBSCRIPTION: 'CANCELLED_SUBSCRIPTION',
37
+ /**
38
+ * Manual billing
39
+ */
40
+ MANUAL: 'MANUAL',
41
+ /**
42
+ * No billing
43
+ */
44
+ NONE: 'NONE',
45
+ unknown_default_open_api: '11184809'
46
+ } as const;
47
+ export type V1BillingStatus = typeof V1BillingStatus[keyof typeof V1BillingStatus];
48
+
49
+
50
+ export function instanceOfV1BillingStatus(value: any): boolean {
51
+ for (const key in V1BillingStatus) {
52
+ if (Object.prototype.hasOwnProperty.call(V1BillingStatus, key)) {
53
+ if (V1BillingStatus[key as keyof typeof V1BillingStatus] === value) {
54
+ return true;
55
+ }
56
+ }
57
+ }
58
+ return false;
59
+ }
60
+
61
+ export function V1BillingStatusFromJSON(json: any): V1BillingStatus {
62
+ return V1BillingStatusFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function V1BillingStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1BillingStatus {
66
+ return json as V1BillingStatus;
67
+ }
68
+
69
+ export function V1BillingStatusToJSON(value?: V1BillingStatus | null): any {
70
+ return value as any;
71
+ }
72
+
73
+ export function V1BillingStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): V1BillingStatus {
74
+ return value as V1BillingStatus;
75
+ }
76
+
@@ -0,0 +1,58 @@
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
+
15
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const V1BillingType = {
21
+ NONE: 'NONE',
22
+ MANUAL: 'MANUAL',
23
+ LEGACY_CONNECT: 'LEGACY_CONNECT',
24
+ LEGACY_PLAN: 'LEGACY_PLAN',
25
+ CHARGEBEE_V1: 'CHARGEBEE_V1',
26
+ NON_BILLABLE: 'NON_BILLABLE',
27
+ unknown_default_open_api: '11184809'
28
+ } as const;
29
+ export type V1BillingType = typeof V1BillingType[keyof typeof V1BillingType];
30
+
31
+
32
+ export function instanceOfV1BillingType(value: any): boolean {
33
+ for (const key in V1BillingType) {
34
+ if (Object.prototype.hasOwnProperty.call(V1BillingType, key)) {
35
+ if (V1BillingType[key as keyof typeof V1BillingType] === value) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ export function V1BillingTypeFromJSON(json: any): V1BillingType {
44
+ return V1BillingTypeFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function V1BillingTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1BillingType {
48
+ return json as V1BillingType;
49
+ }
50
+
51
+ export function V1BillingTypeToJSON(value?: V1BillingType | null): any {
52
+ return value as any;
53
+ }
54
+
55
+ export function V1BillingTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): V1BillingType {
56
+ return value as V1BillingType;
57
+ }
58
+
@@ -0,0 +1,83 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface V1ChargebeeV1NotPaidInvoice
20
+ */
21
+ export interface V1ChargebeeV1NotPaidInvoice {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof V1ChargebeeV1NotPaidInvoice
26
+ */
27
+ id: string;
28
+ /**
29
+ * Due date of the invoice
30
+ * @type {Date}
31
+ * @memberof V1ChargebeeV1NotPaidInvoice
32
+ */
33
+ dueDate?: Date | null;
34
+ /**
35
+ * The unpaid amount that is due on the invoice in dollars.
36
+ * @type {number}
37
+ * @memberof V1ChargebeeV1NotPaidInvoice
38
+ */
39
+ amountDue: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the V1ChargebeeV1NotPaidInvoice interface.
44
+ */
45
+ export function instanceOfV1ChargebeeV1NotPaidInvoice(value: object): value is V1ChargebeeV1NotPaidInvoice {
46
+ if (!('id' in value) || value['id'] === undefined) return false;
47
+ if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function V1ChargebeeV1NotPaidInvoiceFromJSON(json: any): V1ChargebeeV1NotPaidInvoice {
52
+ return V1ChargebeeV1NotPaidInvoiceFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function V1ChargebeeV1NotPaidInvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1ChargebeeV1NotPaidInvoice {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'id': json['id'],
62
+ 'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
63
+ 'amountDue': json['amountDue'],
64
+ };
65
+ }
66
+
67
+ export function V1ChargebeeV1NotPaidInvoiceToJSON(json: any): V1ChargebeeV1NotPaidInvoice {
68
+ return V1ChargebeeV1NotPaidInvoiceToJSONTyped(json, false);
69
+ }
70
+
71
+ export function V1ChargebeeV1NotPaidInvoiceToJSONTyped(value?: V1ChargebeeV1NotPaidInvoice | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'id': value['id'],
79
+ 'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate'] as any).toISOString()),
80
+ 'amountDue': value['amountDue'],
81
+ };
82
+ }
83
+