@managespace/sdk 0.0.137 → 0.0.138
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/package.json +1 -1
- package/src/extensibility/functions/project/billing.ts +14 -6
- package/src/generated/.openapi-generator/FILES +2 -3
- package/src/generated/apis/default-api.ts +117 -55
- package/src/generated/models/create-subscription.ts +224 -12
- package/src/generated/models/index.ts +2 -3
- package/src/generated/models/subscription.ts +175 -143
- package/src/generated/models/update-subscription-charge.ts +430 -0
- package/src/generated/models/update-subscription.ts +331 -0
- package/src/generated/models/subscription-invoice-line.ts +0 -192
- package/src/generated/models/subscription-invoice.ts +0 -110
- package/src/generated/models/subscription-preview.ts +0 -440
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
CreateOrder as _CreateOrder,
|
|
28
28
|
PlanCustom,
|
|
29
29
|
CreateSubscription as _CreateSubscription,
|
|
30
|
-
|
|
30
|
+
UpdateSubscription as _UpdateSubscription,
|
|
31
31
|
} from '../../../generated';
|
|
32
32
|
import { CustomCreateContact } from '../../../generated/models/custom-create-contact';
|
|
33
33
|
import { CustomUpdateCustomer } from '../../../generated/models/custom-update-customer';
|
|
@@ -261,7 +261,7 @@ export namespace Billing {
|
|
|
261
261
|
export class CancelSubscription implements ExtPlugin {
|
|
262
262
|
responseType!: Subscription;
|
|
263
263
|
payload!: {
|
|
264
|
-
|
|
264
|
+
siteId: string;
|
|
265
265
|
subscriptionId: string;
|
|
266
266
|
cancelSubscriptionPayload: _CancelSubscription;
|
|
267
267
|
};
|
|
@@ -277,7 +277,7 @@ export namespace Billing {
|
|
|
277
277
|
|
|
278
278
|
export class CreateOrder implements ExtPlugin {
|
|
279
279
|
responseType!: Order;
|
|
280
|
-
payload!: _CreateOrder;
|
|
280
|
+
payload!: { siteId: string } & _CreateOrder;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
export class GetOrder implements ExtPlugin {
|
|
@@ -292,11 +292,19 @@ export namespace Billing {
|
|
|
292
292
|
payload!: BasePaginationQuery & { status?: string };
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
export class
|
|
296
|
-
responseType!:
|
|
295
|
+
export class ActivateSubscription implements ExtPlugin {
|
|
296
|
+
responseType!: Subscription;
|
|
297
297
|
payload!: {
|
|
298
298
|
siteId: string;
|
|
299
|
-
|
|
299
|
+
subscriptionId: string;
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
+
|
|
303
|
+
export class UpdateSubscription implements ExtPlugin {
|
|
304
|
+
responseType!: Subscription;
|
|
305
|
+
payload!: {
|
|
306
|
+
siteId: string;
|
|
307
|
+
subscriptionId: string;
|
|
308
|
+
} & _UpdateSubscription;
|
|
309
|
+
}
|
|
302
310
|
}
|
|
@@ -166,9 +166,6 @@ models/statement.ts
|
|
|
166
166
|
models/step-data.ts
|
|
167
167
|
models/sub-total.ts
|
|
168
168
|
models/subscription-charge.ts
|
|
169
|
-
models/subscription-invoice-line.ts
|
|
170
|
-
models/subscription-invoice.ts
|
|
171
|
-
models/subscription-preview.ts
|
|
172
169
|
models/subscription.ts
|
|
173
170
|
models/success.ts
|
|
174
171
|
models/task-completion-status.ts
|
|
@@ -189,6 +186,8 @@ models/update-map-feature.ts
|
|
|
189
186
|
models/update-note.ts
|
|
190
187
|
models/update-org.ts
|
|
191
188
|
models/update-smart-bar-prompt.ts
|
|
189
|
+
models/update-subscription-charge.ts
|
|
190
|
+
models/update-subscription.ts
|
|
192
191
|
models/update-user-properties.ts
|
|
193
192
|
models/upload-document.ts
|
|
194
193
|
models/uploaded-document.ts
|
|
@@ -131,7 +131,6 @@ import type {
|
|
|
131
131
|
Statement,
|
|
132
132
|
StepData,
|
|
133
133
|
Subscription,
|
|
134
|
-
SubscriptionPreview,
|
|
135
134
|
Success,
|
|
136
135
|
Task,
|
|
137
136
|
TaskTemplate,
|
|
@@ -146,6 +145,7 @@ import type {
|
|
|
146
145
|
UpdateNote,
|
|
147
146
|
UpdateOrg,
|
|
148
147
|
UpdateSmartBarPrompt,
|
|
148
|
+
UpdateSubscription,
|
|
149
149
|
UpdateUserProperties,
|
|
150
150
|
UploadDocument,
|
|
151
151
|
UploadedDocument,
|
|
@@ -392,8 +392,6 @@ import {
|
|
|
392
392
|
StepDataToJSON,
|
|
393
393
|
SubscriptionFromJSON,
|
|
394
394
|
SubscriptionToJSON,
|
|
395
|
-
SubscriptionPreviewFromJSON,
|
|
396
|
-
SubscriptionPreviewToJSON,
|
|
397
395
|
SuccessFromJSON,
|
|
398
396
|
SuccessToJSON,
|
|
399
397
|
TaskFromJSON,
|
|
@@ -422,6 +420,8 @@ import {
|
|
|
422
420
|
UpdateOrgToJSON,
|
|
423
421
|
UpdateSmartBarPromptFromJSON,
|
|
424
422
|
UpdateSmartBarPromptToJSON,
|
|
423
|
+
UpdateSubscriptionFromJSON,
|
|
424
|
+
UpdateSubscriptionToJSON,
|
|
425
425
|
UpdateUserPropertiesFromJSON,
|
|
426
426
|
UpdateUserPropertiesToJSON,
|
|
427
427
|
UploadDocumentFromJSON,
|
|
@@ -448,6 +448,11 @@ import {
|
|
|
448
448
|
WorkflowStepInstancesToJSON,
|
|
449
449
|
} from '../models/index';
|
|
450
450
|
|
|
451
|
+
export interface ActivateSubscriptionRequest {
|
|
452
|
+
siteId: string;
|
|
453
|
+
subscriptionId: string;
|
|
454
|
+
}
|
|
455
|
+
|
|
451
456
|
export interface AdminSignUpRequest {
|
|
452
457
|
adminSignUp: AdminSignUp;
|
|
453
458
|
}
|
|
@@ -939,11 +944,6 @@ export interface GetSubscriptionRequest {
|
|
|
939
944
|
subscriptionId: string;
|
|
940
945
|
}
|
|
941
946
|
|
|
942
|
-
export interface GetSubscriptionPreviewRequest {
|
|
943
|
-
siteId: string;
|
|
944
|
-
subscriptionId: string;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
947
|
export interface GetSubscriptionsRequest {
|
|
948
948
|
siteId: string;
|
|
949
949
|
offset?: number;
|
|
@@ -1170,6 +1170,12 @@ export interface UpdateSmartBarPromptRequest {
|
|
|
1170
1170
|
updateSmartBarPrompt: UpdateSmartBarPrompt;
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
|
+
export interface UpdateSubscriptionRequest {
|
|
1174
|
+
siteId: string;
|
|
1175
|
+
subscriptionId: string;
|
|
1176
|
+
updateSubscription: UpdateSubscription;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1173
1179
|
export interface UpdateTaskTemplateRequest {
|
|
1174
1180
|
siteId: string;
|
|
1175
1181
|
taskTemplateId: string;
|
|
@@ -1194,6 +1200,52 @@ export interface UploadPluginRequest {
|
|
|
1194
1200
|
*/
|
|
1195
1201
|
export class DefaultApi extends runtime.BaseAPI {
|
|
1196
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
*/
|
|
1205
|
+
async activateSubscriptionRaw(requestParameters: ActivateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSubscriptions200Response>> {
|
|
1206
|
+
if (requestParameters['siteId'] == null) {
|
|
1207
|
+
throw new runtime.RequiredError(
|
|
1208
|
+
'siteId',
|
|
1209
|
+
'Required parameter "siteId" was null or undefined when calling activateSubscription().'
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
1214
|
+
throw new runtime.RequiredError(
|
|
1215
|
+
'subscriptionId',
|
|
1216
|
+
'Required parameter "subscriptionId" was null or undefined when calling activateSubscription().'
|
|
1217
|
+
);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
const queryParameters: any = {};
|
|
1221
|
+
|
|
1222
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1223
|
+
|
|
1224
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1225
|
+
const token = this.configuration.accessToken;
|
|
1226
|
+
const tokenString = await token("bearer", []);
|
|
1227
|
+
|
|
1228
|
+
if (tokenString) {
|
|
1229
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
const response = await this.request({
|
|
1233
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}/activate`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
1234
|
+
method: 'PUT',
|
|
1235
|
+
headers: headerParameters,
|
|
1236
|
+
query: queryParameters,
|
|
1237
|
+
}, initOverrides);
|
|
1238
|
+
|
|
1239
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetSubscriptions200ResponseFromJSON(jsonValue));
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
*/
|
|
1244
|
+
async activateSubscription(requestParameters: ActivateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSubscriptions200Response> {
|
|
1245
|
+
const response = await this.activateSubscriptionRaw(requestParameters, initOverrides);
|
|
1246
|
+
return await response.value();
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1197
1249
|
/**
|
|
1198
1250
|
*/
|
|
1199
1251
|
async adminSignUpRaw(requestParameters: AdminSignUpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Token>> {
|
|
@@ -1275,7 +1327,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1275
1327
|
}
|
|
1276
1328
|
}
|
|
1277
1329
|
const response = await this.request({
|
|
1278
|
-
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
1330
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}/cancel`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
1279
1331
|
method: 'PUT',
|
|
1280
1332
|
headers: headerParameters,
|
|
1281
1333
|
query: queryParameters,
|
|
@@ -5589,52 +5641,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
5589
5641
|
return await response.value();
|
|
5590
5642
|
}
|
|
5591
5643
|
|
|
5592
|
-
/**
|
|
5593
|
-
*/
|
|
5594
|
-
async getSubscriptionPreviewRaw(requestParameters: GetSubscriptionPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPreview>> {
|
|
5595
|
-
if (requestParameters['siteId'] == null) {
|
|
5596
|
-
throw new runtime.RequiredError(
|
|
5597
|
-
'siteId',
|
|
5598
|
-
'Required parameter "siteId" was null or undefined when calling getSubscriptionPreview().'
|
|
5599
|
-
);
|
|
5600
|
-
}
|
|
5601
|
-
|
|
5602
|
-
if (requestParameters['subscriptionId'] == null) {
|
|
5603
|
-
throw new runtime.RequiredError(
|
|
5604
|
-
'subscriptionId',
|
|
5605
|
-
'Required parameter "subscriptionId" was null or undefined when calling getSubscriptionPreview().'
|
|
5606
|
-
);
|
|
5607
|
-
}
|
|
5608
|
-
|
|
5609
|
-
const queryParameters: any = {};
|
|
5610
|
-
|
|
5611
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
5612
|
-
|
|
5613
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
5614
|
-
const token = this.configuration.accessToken;
|
|
5615
|
-
const tokenString = await token("bearer", []);
|
|
5616
|
-
|
|
5617
|
-
if (tokenString) {
|
|
5618
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
5619
|
-
}
|
|
5620
|
-
}
|
|
5621
|
-
const response = await this.request({
|
|
5622
|
-
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}/preview`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
5623
|
-
method: 'GET',
|
|
5624
|
-
headers: headerParameters,
|
|
5625
|
-
query: queryParameters,
|
|
5626
|
-
}, initOverrides);
|
|
5627
|
-
|
|
5628
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionPreviewFromJSON(jsonValue));
|
|
5629
|
-
}
|
|
5630
|
-
|
|
5631
|
-
/**
|
|
5632
|
-
*/
|
|
5633
|
-
async getSubscriptionPreview(requestParameters: GetSubscriptionPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPreview> {
|
|
5634
|
-
const response = await this.getSubscriptionPreviewRaw(requestParameters, initOverrides);
|
|
5635
|
-
return await response.value();
|
|
5636
|
-
}
|
|
5637
|
-
|
|
5638
5644
|
/**
|
|
5639
5645
|
*/
|
|
5640
5646
|
async getSubscriptionsRaw(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSubscriptions200Response>> {
|
|
@@ -7671,6 +7677,62 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
7671
7677
|
return await response.value();
|
|
7672
7678
|
}
|
|
7673
7679
|
|
|
7680
|
+
/**
|
|
7681
|
+
*/
|
|
7682
|
+
async updateSubscriptionRaw(requestParameters: UpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subscription>> {
|
|
7683
|
+
if (requestParameters['siteId'] == null) {
|
|
7684
|
+
throw new runtime.RequiredError(
|
|
7685
|
+
'siteId',
|
|
7686
|
+
'Required parameter "siteId" was null or undefined when calling updateSubscription().'
|
|
7687
|
+
);
|
|
7688
|
+
}
|
|
7689
|
+
|
|
7690
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
7691
|
+
throw new runtime.RequiredError(
|
|
7692
|
+
'subscriptionId',
|
|
7693
|
+
'Required parameter "subscriptionId" was null or undefined when calling updateSubscription().'
|
|
7694
|
+
);
|
|
7695
|
+
}
|
|
7696
|
+
|
|
7697
|
+
if (requestParameters['updateSubscription'] == null) {
|
|
7698
|
+
throw new runtime.RequiredError(
|
|
7699
|
+
'updateSubscription',
|
|
7700
|
+
'Required parameter "updateSubscription" was null or undefined when calling updateSubscription().'
|
|
7701
|
+
);
|
|
7702
|
+
}
|
|
7703
|
+
|
|
7704
|
+
const queryParameters: any = {};
|
|
7705
|
+
|
|
7706
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
7707
|
+
|
|
7708
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
7709
|
+
|
|
7710
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7711
|
+
const token = this.configuration.accessToken;
|
|
7712
|
+
const tokenString = await token("bearer", []);
|
|
7713
|
+
|
|
7714
|
+
if (tokenString) {
|
|
7715
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7716
|
+
}
|
|
7717
|
+
}
|
|
7718
|
+
const response = await this.request({
|
|
7719
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
7720
|
+
method: 'PUT',
|
|
7721
|
+
headers: headerParameters,
|
|
7722
|
+
query: queryParameters,
|
|
7723
|
+
body: UpdateSubscriptionToJSON(requestParameters['updateSubscription']),
|
|
7724
|
+
}, initOverrides);
|
|
7725
|
+
|
|
7726
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionFromJSON(jsonValue));
|
|
7727
|
+
}
|
|
7728
|
+
|
|
7729
|
+
/**
|
|
7730
|
+
*/
|
|
7731
|
+
async updateSubscription(requestParameters: UpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subscription> {
|
|
7732
|
+
const response = await this.updateSubscriptionRaw(requestParameters, initOverrides);
|
|
7733
|
+
return await response.value();
|
|
7734
|
+
}
|
|
7735
|
+
|
|
7674
7736
|
/**
|
|
7675
7737
|
*/
|
|
7676
7738
|
async updateTaskTemplateRaw(requestParameters: UpdateTaskTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaskTemplate>> {
|
|
@@ -32,25 +32,133 @@ export interface CreateSubscription {
|
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof CreateSubscription
|
|
34
34
|
*/
|
|
35
|
-
status
|
|
35
|
+
status?: string;
|
|
36
36
|
/**
|
|
37
37
|
* Billing start date for subscription contract
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof CreateSubscription
|
|
40
40
|
*/
|
|
41
|
-
billingStartDate
|
|
41
|
+
billingStartDate?: string;
|
|
42
42
|
/**
|
|
43
43
|
* Service start date for subscription contract
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof CreateSubscription
|
|
46
46
|
*/
|
|
47
|
-
serviceStartDate
|
|
47
|
+
serviceStartDate?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Date order was placed
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CreateSubscription
|
|
52
|
+
*/
|
|
53
|
+
orderPlacedAt?: string;
|
|
48
54
|
/**
|
|
49
55
|
* Date subscription contract was signed and activated
|
|
50
56
|
* @type {string}
|
|
51
57
|
* @memberof CreateSubscription
|
|
52
58
|
*/
|
|
53
|
-
contractEffectiveDate
|
|
59
|
+
contractEffectiveDate?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Date subscription contract was terminated
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof CreateSubscription
|
|
64
|
+
*/
|
|
65
|
+
cancellationDate?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Cancel as of option
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof CreateSubscription
|
|
70
|
+
*/
|
|
71
|
+
cancellationType?: string;
|
|
72
|
+
/**
|
|
73
|
+
* auto-renew subscription contract
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof CreateSubscription
|
|
76
|
+
*/
|
|
77
|
+
autoRenew?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* currency
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof CreateSubscription
|
|
82
|
+
*/
|
|
83
|
+
currency?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Calculate due date of invoice
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof CreateSubscription
|
|
88
|
+
*/
|
|
89
|
+
paymentTerms?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Contracted MRR per charge
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof CreateSubscription
|
|
94
|
+
*/
|
|
95
|
+
cmrr?: string;
|
|
96
|
+
/**
|
|
97
|
+
* MRR calculated based on % discount
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof CreateSubscription
|
|
100
|
+
*/
|
|
101
|
+
discountedCmrr?: string;
|
|
102
|
+
/**
|
|
103
|
+
* separate invoice generated
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof CreateSubscription
|
|
106
|
+
*/
|
|
107
|
+
separateInvoice?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Miscellaneous notes
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof CreateSubscription
|
|
112
|
+
*/
|
|
113
|
+
notes?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Coupon Code
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof CreateSubscription
|
|
118
|
+
*/
|
|
119
|
+
couponCode?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Version of subscription contract
|
|
122
|
+
* @type {number}
|
|
123
|
+
* @memberof CreateSubscription
|
|
124
|
+
*/
|
|
125
|
+
version?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Subscription contract version type
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof CreateSubscription
|
|
130
|
+
*/
|
|
131
|
+
versionType?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Term of contract in months
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof CreateSubscription
|
|
136
|
+
*/
|
|
137
|
+
contractTerm?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Length of time Subscription Contract will be renewed for
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof CreateSubscription
|
|
142
|
+
*/
|
|
143
|
+
renewalTerm?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Date Subscription Contract will start
|
|
146
|
+
* @type {string}
|
|
147
|
+
* @memberof CreateSubscription
|
|
148
|
+
*/
|
|
149
|
+
currentTermStartDate?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Date subscription contract will end
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @memberof CreateSubscription
|
|
154
|
+
*/
|
|
155
|
+
currentTermEndDate?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Date subscription contract was terminated
|
|
158
|
+
* @type {number}
|
|
159
|
+
* @memberof CreateSubscription
|
|
160
|
+
*/
|
|
161
|
+
renewalIncrementPercent?: number;
|
|
54
162
|
/**
|
|
55
163
|
* Asset ID
|
|
56
164
|
* @type {string}
|
|
@@ -63,16 +171,66 @@ export interface CreateSubscription {
|
|
|
63
171
|
* @memberof CreateSubscription
|
|
64
172
|
*/
|
|
65
173
|
charges: Array<CreateSubscriptionCharge>;
|
|
174
|
+
/**
|
|
175
|
+
* Id of billing contact
|
|
176
|
+
* @type {string}
|
|
177
|
+
* @memberof CreateSubscription
|
|
178
|
+
*/
|
|
179
|
+
billContactId?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Id of shipping contact
|
|
182
|
+
* @type {string}
|
|
183
|
+
* @memberof CreateSubscription
|
|
184
|
+
*/
|
|
185
|
+
shippingContactId?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Date record was created
|
|
188
|
+
* @type {string}
|
|
189
|
+
* @memberof CreateSubscription
|
|
190
|
+
*/
|
|
191
|
+
updatedAt?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Date record was created
|
|
194
|
+
* @type {string}
|
|
195
|
+
* @memberof CreateSubscription
|
|
196
|
+
*/
|
|
197
|
+
createdAt?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Email of user who created record
|
|
200
|
+
* @type {string}
|
|
201
|
+
* @memberof CreateSubscription
|
|
202
|
+
*/
|
|
203
|
+
createdBy?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Email of user who last modifed record
|
|
206
|
+
* @type {string}
|
|
207
|
+
* @memberof CreateSubscription
|
|
208
|
+
*/
|
|
209
|
+
updatedBy?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Custom fields on the invoice
|
|
212
|
+
* @type {object}
|
|
213
|
+
* @memberof CreateSubscription
|
|
214
|
+
*/
|
|
215
|
+
customFields?: object;
|
|
216
|
+
/**
|
|
217
|
+
* Total contract value of the subsctiption contract
|
|
218
|
+
* @type {number}
|
|
219
|
+
* @memberof CreateSubscription
|
|
220
|
+
*/
|
|
221
|
+
tcv?: number;
|
|
222
|
+
/**
|
|
223
|
+
* Set to defer start date
|
|
224
|
+
* @type {boolean}
|
|
225
|
+
* @memberof CreateSubscription
|
|
226
|
+
*/
|
|
227
|
+
deferStartDate?: boolean;
|
|
66
228
|
}
|
|
67
229
|
|
|
68
230
|
/**
|
|
69
231
|
* Check if a given object implements the CreateSubscription interface.
|
|
70
232
|
*/
|
|
71
233
|
export function instanceOfCreateSubscription(value: object): value is CreateSubscription {
|
|
72
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
73
|
-
if (!('billingStartDate' in value) || value['billingStartDate'] === undefined) return false;
|
|
74
|
-
if (!('serviceStartDate' in value) || value['serviceStartDate'] === undefined) return false;
|
|
75
|
-
if (!('contractEffectiveDate' in value) || value['contractEffectiveDate'] === undefined) return false;
|
|
76
234
|
if (!('charges' in value) || value['charges'] === undefined) return false;
|
|
77
235
|
return true;
|
|
78
236
|
}
|
|
@@ -87,12 +245,39 @@ export function CreateSubscriptionFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
87
245
|
}
|
|
88
246
|
return {
|
|
89
247
|
|
|
90
|
-
'status': json['status'],
|
|
91
|
-
'billingStartDate': json['billingStartDate'],
|
|
92
|
-
'serviceStartDate': json['serviceStartDate'],
|
|
93
|
-
'
|
|
248
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
249
|
+
'billingStartDate': json['billingStartDate'] == null ? undefined : json['billingStartDate'],
|
|
250
|
+
'serviceStartDate': json['serviceStartDate'] == null ? undefined : json['serviceStartDate'],
|
|
251
|
+
'orderPlacedAt': json['orderPlacedAt'] == null ? undefined : json['orderPlacedAt'],
|
|
252
|
+
'contractEffectiveDate': json['contractEffectiveDate'] == null ? undefined : json['contractEffectiveDate'],
|
|
253
|
+
'cancellationDate': json['cancellationDate'] == null ? undefined : json['cancellationDate'],
|
|
254
|
+
'cancellationType': json['cancellationType'] == null ? undefined : json['cancellationType'],
|
|
255
|
+
'autoRenew': json['autoRenew'] == null ? undefined : json['autoRenew'],
|
|
256
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
257
|
+
'paymentTerms': json['paymentTerms'] == null ? undefined : json['paymentTerms'],
|
|
258
|
+
'cmrr': json['cmrr'] == null ? undefined : json['cmrr'],
|
|
259
|
+
'discountedCmrr': json['discountedCmrr'] == null ? undefined : json['discountedCmrr'],
|
|
260
|
+
'separateInvoice': json['separateInvoice'] == null ? undefined : json['separateInvoice'],
|
|
261
|
+
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
262
|
+
'couponCode': json['couponCode'] == null ? undefined : json['couponCode'],
|
|
263
|
+
'version': json['version'] == null ? undefined : json['version'],
|
|
264
|
+
'versionType': json['versionType'] == null ? undefined : json['versionType'],
|
|
265
|
+
'contractTerm': json['contractTerm'] == null ? undefined : json['contractTerm'],
|
|
266
|
+
'renewalTerm': json['renewalTerm'] == null ? undefined : json['renewalTerm'],
|
|
267
|
+
'currentTermStartDate': json['currentTermStartDate'] == null ? undefined : json['currentTermStartDate'],
|
|
268
|
+
'currentTermEndDate': json['currentTermEndDate'] == null ? undefined : json['currentTermEndDate'],
|
|
269
|
+
'renewalIncrementPercent': json['renewalIncrementPercent'] == null ? undefined : json['renewalIncrementPercent'],
|
|
94
270
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
95
271
|
'charges': ((json['charges'] as Array<any>).map(CreateSubscriptionChargeFromJSON)),
|
|
272
|
+
'billContactId': json['billContactId'] == null ? undefined : json['billContactId'],
|
|
273
|
+
'shippingContactId': json['shippingContactId'] == null ? undefined : json['shippingContactId'],
|
|
274
|
+
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
|
|
275
|
+
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
276
|
+
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
|
|
277
|
+
'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
|
|
278
|
+
'customFields': json['customFields'] == null ? undefined : json['customFields'],
|
|
279
|
+
'tcv': json['tcv'] == null ? undefined : json['tcv'],
|
|
280
|
+
'deferStartDate': json['deferStartDate'] == null ? undefined : json['deferStartDate'],
|
|
96
281
|
};
|
|
97
282
|
}
|
|
98
283
|
|
|
@@ -110,9 +295,36 @@ export function CreateSubscriptionToJSONTyped(value?: CreateSubscription | null,
|
|
|
110
295
|
'status': value['status'],
|
|
111
296
|
'billingStartDate': value['billingStartDate'],
|
|
112
297
|
'serviceStartDate': value['serviceStartDate'],
|
|
298
|
+
'orderPlacedAt': value['orderPlacedAt'],
|
|
113
299
|
'contractEffectiveDate': value['contractEffectiveDate'],
|
|
300
|
+
'cancellationDate': value['cancellationDate'],
|
|
301
|
+
'cancellationType': value['cancellationType'],
|
|
302
|
+
'autoRenew': value['autoRenew'],
|
|
303
|
+
'currency': value['currency'],
|
|
304
|
+
'paymentTerms': value['paymentTerms'],
|
|
305
|
+
'cmrr': value['cmrr'],
|
|
306
|
+
'discountedCmrr': value['discountedCmrr'],
|
|
307
|
+
'separateInvoice': value['separateInvoice'],
|
|
308
|
+
'notes': value['notes'],
|
|
309
|
+
'couponCode': value['couponCode'],
|
|
310
|
+
'version': value['version'],
|
|
311
|
+
'versionType': value['versionType'],
|
|
312
|
+
'contractTerm': value['contractTerm'],
|
|
313
|
+
'renewalTerm': value['renewalTerm'],
|
|
314
|
+
'currentTermStartDate': value['currentTermStartDate'],
|
|
315
|
+
'currentTermEndDate': value['currentTermEndDate'],
|
|
316
|
+
'renewalIncrementPercent': value['renewalIncrementPercent'],
|
|
114
317
|
'assetId': value['assetId'],
|
|
115
318
|
'charges': ((value['charges'] as Array<any>).map(CreateSubscriptionChargeToJSON)),
|
|
319
|
+
'billContactId': value['billContactId'],
|
|
320
|
+
'shippingContactId': value['shippingContactId'],
|
|
321
|
+
'updatedAt': value['updatedAt'],
|
|
322
|
+
'createdAt': value['createdAt'],
|
|
323
|
+
'createdBy': value['createdBy'],
|
|
324
|
+
'updatedBy': value['updatedBy'],
|
|
325
|
+
'customFields': value['customFields'],
|
|
326
|
+
'tcv': value['tcv'],
|
|
327
|
+
'deferStartDate': value['deferStartDate'],
|
|
116
328
|
};
|
|
117
329
|
}
|
|
118
330
|
|
|
@@ -165,9 +165,6 @@ export * from './step-data';
|
|
|
165
165
|
export * from './sub-total';
|
|
166
166
|
export * from './subscription';
|
|
167
167
|
export * from './subscription-charge';
|
|
168
|
-
export * from './subscription-invoice';
|
|
169
|
-
export * from './subscription-invoice-line';
|
|
170
|
-
export * from './subscription-preview';
|
|
171
168
|
export * from './success';
|
|
172
169
|
export * from './task';
|
|
173
170
|
export * from './task-completion-status';
|
|
@@ -187,6 +184,8 @@ export * from './update-map-feature';
|
|
|
187
184
|
export * from './update-note';
|
|
188
185
|
export * from './update-org';
|
|
189
186
|
export * from './update-smart-bar-prompt';
|
|
187
|
+
export * from './update-subscription';
|
|
188
|
+
export * from './update-subscription-charge';
|
|
190
189
|
export * from './update-user-properties';
|
|
191
190
|
export * from './upload-document';
|
|
192
191
|
export * from './uploaded-document';
|