@managespace/sdk 0.0.125 → 0.0.126
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 +6 -7
- package/src/generated/.openapi-generator/FILES +3 -2
- package/src/generated/apis/default-api.ts +55 -66
- package/src/generated/models/create-product-custom.ts +0 -8
- package/src/generated/models/create-subscription.ts +12 -224
- package/src/generated/models/index.ts +3 -2
- package/src/generated/models/product-custom.ts +0 -8
- package/src/generated/models/subscription-invoice-line.ts +192 -0
- package/src/generated/models/subscription-invoice.ts +110 -0
- package/src/generated/models/subscription-preview.ts +440 -0
- package/src/generated/models/subscription.ts +143 -175
- package/src/generated/models/update-subscription-charge.ts +0 -430
- package/src/generated/models/update-subscription.ts +0 -331
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
CreateOrder as _CreateOrder,
|
|
28
28
|
PlanCustom,
|
|
29
29
|
CreateSubscription as _CreateSubscription,
|
|
30
|
-
|
|
30
|
+
SubscriptionPreview,
|
|
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
|
-
siteId: string;
|
|
264
|
+
// siteId: string;
|
|
265
265
|
subscriptionId: string;
|
|
266
266
|
cancelSubscriptionPayload: _CancelSubscription;
|
|
267
267
|
};
|
|
@@ -292,11 +292,10 @@ export namespace Billing {
|
|
|
292
292
|
payload!: BasePaginationQuery & { status?: string };
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
export class
|
|
296
|
-
responseType!:
|
|
295
|
+
export class GetPreview implements ExtPlugin {
|
|
296
|
+
responseType!: SubscriptionPreview;
|
|
297
297
|
payload!: {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
} & _UpdateSubscription;
|
|
298
|
+
id: string;
|
|
299
|
+
};
|
|
301
300
|
}
|
|
302
301
|
}
|
|
@@ -164,6 +164,9 @@ models/statement.ts
|
|
|
164
164
|
models/step-data.ts
|
|
165
165
|
models/sub-total.ts
|
|
166
166
|
models/subscription-charge.ts
|
|
167
|
+
models/subscription-invoice-line.ts
|
|
168
|
+
models/subscription-invoice.ts
|
|
169
|
+
models/subscription-preview.ts
|
|
167
170
|
models/subscription.ts
|
|
168
171
|
models/success.ts
|
|
169
172
|
models/task-completion-status.ts
|
|
@@ -184,8 +187,6 @@ models/update-map-feature.ts
|
|
|
184
187
|
models/update-note.ts
|
|
185
188
|
models/update-org.ts
|
|
186
189
|
models/update-smart-bar-prompt.ts
|
|
187
|
-
models/update-subscription-charge.ts
|
|
188
|
-
models/update-subscription.ts
|
|
189
190
|
models/update-user-properties.ts
|
|
190
191
|
models/user-id.ts
|
|
191
192
|
models/user.ts
|
|
@@ -129,6 +129,7 @@ import type {
|
|
|
129
129
|
Statement,
|
|
130
130
|
StepData,
|
|
131
131
|
Subscription,
|
|
132
|
+
SubscriptionPreview,
|
|
132
133
|
Success,
|
|
133
134
|
Task,
|
|
134
135
|
TaskTemplate,
|
|
@@ -143,7 +144,6 @@ import type {
|
|
|
143
144
|
UpdateNote,
|
|
144
145
|
UpdateOrg,
|
|
145
146
|
UpdateSmartBarPrompt,
|
|
146
|
-
UpdateSubscription,
|
|
147
147
|
UpdateUserProperties,
|
|
148
148
|
User,
|
|
149
149
|
UserId,
|
|
@@ -383,6 +383,8 @@ import {
|
|
|
383
383
|
StepDataToJSON,
|
|
384
384
|
SubscriptionFromJSON,
|
|
385
385
|
SubscriptionToJSON,
|
|
386
|
+
SubscriptionPreviewFromJSON,
|
|
387
|
+
SubscriptionPreviewToJSON,
|
|
386
388
|
SuccessFromJSON,
|
|
387
389
|
SuccessToJSON,
|
|
388
390
|
TaskFromJSON,
|
|
@@ -411,8 +413,6 @@ import {
|
|
|
411
413
|
UpdateOrgToJSON,
|
|
412
414
|
UpdateSmartBarPromptFromJSON,
|
|
413
415
|
UpdateSmartBarPromptToJSON,
|
|
414
|
-
UpdateSubscriptionFromJSON,
|
|
415
|
-
UpdateSubscriptionToJSON,
|
|
416
416
|
UpdateUserPropertiesFromJSON,
|
|
417
417
|
UpdateUserPropertiesToJSON,
|
|
418
418
|
UserFromJSON,
|
|
@@ -912,6 +912,11 @@ export interface GetSubscriptionRequest {
|
|
|
912
912
|
subscriptionId: string;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
+
export interface GetSubscriptionPreviewRequest {
|
|
916
|
+
siteId: string;
|
|
917
|
+
subscriptionId: string;
|
|
918
|
+
}
|
|
919
|
+
|
|
915
920
|
export interface GetSubscriptionsRequest {
|
|
916
921
|
siteId: string;
|
|
917
922
|
offset?: number;
|
|
@@ -1129,12 +1134,6 @@ export interface UpdateSmartBarPromptRequest {
|
|
|
1129
1134
|
updateSmartBarPrompt: UpdateSmartBarPrompt;
|
|
1130
1135
|
}
|
|
1131
1136
|
|
|
1132
|
-
export interface UpdateSubscriptionRequest {
|
|
1133
|
-
siteId: string;
|
|
1134
|
-
subscriptionId: string;
|
|
1135
|
-
updateSubscription: UpdateSubscription;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
1137
|
export interface UpdateTaskTemplateRequest {
|
|
1139
1138
|
siteId: string;
|
|
1140
1139
|
taskTemplateId: string;
|
|
@@ -1236,7 +1235,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1236
1235
|
}
|
|
1237
1236
|
}
|
|
1238
1237
|
const response = await this.request({
|
|
1239
|
-
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}
|
|
1238
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
1240
1239
|
method: 'PUT',
|
|
1241
1240
|
headers: headerParameters,
|
|
1242
1241
|
query: queryParameters,
|
|
@@ -5450,6 +5449,52 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
5450
5449
|
return await response.value();
|
|
5451
5450
|
}
|
|
5452
5451
|
|
|
5452
|
+
/**
|
|
5453
|
+
*/
|
|
5454
|
+
async getSubscriptionPreviewRaw(requestParameters: GetSubscriptionPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPreview>> {
|
|
5455
|
+
if (requestParameters['siteId'] == null) {
|
|
5456
|
+
throw new runtime.RequiredError(
|
|
5457
|
+
'siteId',
|
|
5458
|
+
'Required parameter "siteId" was null or undefined when calling getSubscriptionPreview().'
|
|
5459
|
+
);
|
|
5460
|
+
}
|
|
5461
|
+
|
|
5462
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
5463
|
+
throw new runtime.RequiredError(
|
|
5464
|
+
'subscriptionId',
|
|
5465
|
+
'Required parameter "subscriptionId" was null or undefined when calling getSubscriptionPreview().'
|
|
5466
|
+
);
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
const queryParameters: any = {};
|
|
5470
|
+
|
|
5471
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
5472
|
+
|
|
5473
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
5474
|
+
const token = this.configuration.accessToken;
|
|
5475
|
+
const tokenString = await token("bearer", []);
|
|
5476
|
+
|
|
5477
|
+
if (tokenString) {
|
|
5478
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
const response = await this.request({
|
|
5482
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}/preview`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
5483
|
+
method: 'GET',
|
|
5484
|
+
headers: headerParameters,
|
|
5485
|
+
query: queryParameters,
|
|
5486
|
+
}, initOverrides);
|
|
5487
|
+
|
|
5488
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionPreviewFromJSON(jsonValue));
|
|
5489
|
+
}
|
|
5490
|
+
|
|
5491
|
+
/**
|
|
5492
|
+
*/
|
|
5493
|
+
async getSubscriptionPreview(requestParameters: GetSubscriptionPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPreview> {
|
|
5494
|
+
const response = await this.getSubscriptionPreviewRaw(requestParameters, initOverrides);
|
|
5495
|
+
return await response.value();
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5453
5498
|
/**
|
|
5454
5499
|
*/
|
|
5455
5500
|
async getSubscriptionsRaw(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSubscriptions200Response>> {
|
|
@@ -7407,62 +7452,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
7407
7452
|
return await response.value();
|
|
7408
7453
|
}
|
|
7409
7454
|
|
|
7410
|
-
/**
|
|
7411
|
-
*/
|
|
7412
|
-
async updateSubscriptionRaw(requestParameters: UpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subscription>> {
|
|
7413
|
-
if (requestParameters['siteId'] == null) {
|
|
7414
|
-
throw new runtime.RequiredError(
|
|
7415
|
-
'siteId',
|
|
7416
|
-
'Required parameter "siteId" was null or undefined when calling updateSubscription().'
|
|
7417
|
-
);
|
|
7418
|
-
}
|
|
7419
|
-
|
|
7420
|
-
if (requestParameters['subscriptionId'] == null) {
|
|
7421
|
-
throw new runtime.RequiredError(
|
|
7422
|
-
'subscriptionId',
|
|
7423
|
-
'Required parameter "subscriptionId" was null or undefined when calling updateSubscription().'
|
|
7424
|
-
);
|
|
7425
|
-
}
|
|
7426
|
-
|
|
7427
|
-
if (requestParameters['updateSubscription'] == null) {
|
|
7428
|
-
throw new runtime.RequiredError(
|
|
7429
|
-
'updateSubscription',
|
|
7430
|
-
'Required parameter "updateSubscription" was null or undefined when calling updateSubscription().'
|
|
7431
|
-
);
|
|
7432
|
-
}
|
|
7433
|
-
|
|
7434
|
-
const queryParameters: any = {};
|
|
7435
|
-
|
|
7436
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
7437
|
-
|
|
7438
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
7439
|
-
|
|
7440
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
7441
|
-
const token = this.configuration.accessToken;
|
|
7442
|
-
const tokenString = await token("bearer", []);
|
|
7443
|
-
|
|
7444
|
-
if (tokenString) {
|
|
7445
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7446
|
-
}
|
|
7447
|
-
}
|
|
7448
|
-
const response = await this.request({
|
|
7449
|
-
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
7450
|
-
method: 'PUT',
|
|
7451
|
-
headers: headerParameters,
|
|
7452
|
-
query: queryParameters,
|
|
7453
|
-
body: UpdateSubscriptionToJSON(requestParameters['updateSubscription']),
|
|
7454
|
-
}, initOverrides);
|
|
7455
|
-
|
|
7456
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionFromJSON(jsonValue));
|
|
7457
|
-
}
|
|
7458
|
-
|
|
7459
|
-
/**
|
|
7460
|
-
*/
|
|
7461
|
-
async updateSubscription(requestParameters: UpdateSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subscription> {
|
|
7462
|
-
const response = await this.updateSubscriptionRaw(requestParameters, initOverrides);
|
|
7463
|
-
return await response.value();
|
|
7464
|
-
}
|
|
7465
|
-
|
|
7466
7455
|
/**
|
|
7467
7456
|
*/
|
|
7468
7457
|
async updateTaskTemplateRaw(requestParameters: UpdateTaskTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaskTemplate>> {
|
|
@@ -99,12 +99,6 @@ export interface CreateProductCustom {
|
|
|
99
99
|
* @memberof CreateProductCustom
|
|
100
100
|
*/
|
|
101
101
|
incomeAccount?: string;
|
|
102
|
-
/**
|
|
103
|
-
* Select which tax group to be used
|
|
104
|
-
* @type {string}
|
|
105
|
-
* @memberof CreateProductCustom
|
|
106
|
-
*/
|
|
107
|
-
productTaxGroupName?: string;
|
|
108
102
|
}
|
|
109
103
|
|
|
110
104
|
/**
|
|
@@ -141,7 +135,6 @@ export function CreateProductCustomFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
141
135
|
'transactionPostingEntries': ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|
|
142
136
|
'customFields': json['customFields'] == null ? undefined : json['customFields'],
|
|
143
137
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
144
|
-
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
145
138
|
};
|
|
146
139
|
}
|
|
147
140
|
|
|
@@ -168,7 +161,6 @@ export function CreateProductCustomToJSONTyped(value?: CreateProductCustom | nul
|
|
|
168
161
|
'transactionPostingEntries': ((value['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesToJSON)),
|
|
169
162
|
'customFields': value['customFields'],
|
|
170
163
|
'incomeAccount': value['incomeAccount'],
|
|
171
|
-
'productTaxGroupName': value['productTaxGroupName'],
|
|
172
164
|
};
|
|
173
165
|
}
|
|
174
166
|
|
|
@@ -32,133 +32,25 @@ 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
|
|
48
|
-
/**
|
|
49
|
-
* Date order was placed
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof CreateSubscription
|
|
52
|
-
*/
|
|
53
|
-
orderPlacedAt?: string;
|
|
47
|
+
serviceStartDate: string;
|
|
54
48
|
/**
|
|
55
49
|
* Date subscription contract was signed and activated
|
|
56
50
|
* @type {string}
|
|
57
51
|
* @memberof CreateSubscription
|
|
58
52
|
*/
|
|
59
|
-
contractEffectiveDate
|
|
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;
|
|
53
|
+
contractEffectiveDate: string;
|
|
162
54
|
/**
|
|
163
55
|
* Asset ID
|
|
164
56
|
* @type {string}
|
|
@@ -171,66 +63,16 @@ export interface CreateSubscription {
|
|
|
171
63
|
* @memberof CreateSubscription
|
|
172
64
|
*/
|
|
173
65
|
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;
|
|
228
66
|
}
|
|
229
67
|
|
|
230
68
|
/**
|
|
231
69
|
* Check if a given object implements the CreateSubscription interface.
|
|
232
70
|
*/
|
|
233
71
|
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;
|
|
234
76
|
if (!('charges' in value) || value['charges'] === undefined) return false;
|
|
235
77
|
return true;
|
|
236
78
|
}
|
|
@@ -245,39 +87,12 @@ export function CreateSubscriptionFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
245
87
|
}
|
|
246
88
|
return {
|
|
247
89
|
|
|
248
|
-
'status': json['status']
|
|
249
|
-
'billingStartDate': json['billingStartDate']
|
|
250
|
-
'serviceStartDate': json['serviceStartDate']
|
|
251
|
-
'
|
|
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'],
|
|
90
|
+
'status': json['status'],
|
|
91
|
+
'billingStartDate': json['billingStartDate'],
|
|
92
|
+
'serviceStartDate': json['serviceStartDate'],
|
|
93
|
+
'contractEffectiveDate': json['contractEffectiveDate'],
|
|
270
94
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
271
95
|
'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'],
|
|
281
96
|
};
|
|
282
97
|
}
|
|
283
98
|
|
|
@@ -295,36 +110,9 @@ export function CreateSubscriptionToJSONTyped(value?: CreateSubscription | null,
|
|
|
295
110
|
'status': value['status'],
|
|
296
111
|
'billingStartDate': value['billingStartDate'],
|
|
297
112
|
'serviceStartDate': value['serviceStartDate'],
|
|
298
|
-
'orderPlacedAt': value['orderPlacedAt'],
|
|
299
113
|
'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'],
|
|
317
114
|
'assetId': value['assetId'],
|
|
318
115
|
'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'],
|
|
328
116
|
};
|
|
329
117
|
}
|
|
330
118
|
|
|
@@ -163,6 +163,9 @@ export * from './step-data';
|
|
|
163
163
|
export * from './sub-total';
|
|
164
164
|
export * from './subscription';
|
|
165
165
|
export * from './subscription-charge';
|
|
166
|
+
export * from './subscription-invoice';
|
|
167
|
+
export * from './subscription-invoice-line';
|
|
168
|
+
export * from './subscription-preview';
|
|
166
169
|
export * from './success';
|
|
167
170
|
export * from './task';
|
|
168
171
|
export * from './task-completion-status';
|
|
@@ -182,8 +185,6 @@ export * from './update-map-feature';
|
|
|
182
185
|
export * from './update-note';
|
|
183
186
|
export * from './update-org';
|
|
184
187
|
export * from './update-smart-bar-prompt';
|
|
185
|
-
export * from './update-subscription';
|
|
186
|
-
export * from './update-subscription-charge';
|
|
187
188
|
export * from './update-user-properties';
|
|
188
189
|
export * from './user';
|
|
189
190
|
export * from './user-id';
|
|
@@ -99,12 +99,6 @@ export interface ProductCustom {
|
|
|
99
99
|
* @memberof ProductCustom
|
|
100
100
|
*/
|
|
101
101
|
incomeAccount?: string;
|
|
102
|
-
/**
|
|
103
|
-
* Select which tax group to be used
|
|
104
|
-
* @type {string}
|
|
105
|
-
* @memberof ProductCustom
|
|
106
|
-
*/
|
|
107
|
-
productTaxGroupName?: string;
|
|
108
102
|
/**
|
|
109
103
|
* Product ID
|
|
110
104
|
* @type {string}
|
|
@@ -148,7 +142,6 @@ export function ProductCustomFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
148
142
|
'transactionPostingEntries': ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|
|
149
143
|
'customFields': json['customFields'] == null ? undefined : json['customFields'],
|
|
150
144
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
151
|
-
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
152
145
|
'id': json['id'],
|
|
153
146
|
};
|
|
154
147
|
}
|
|
@@ -176,7 +169,6 @@ export function ProductCustomToJSONTyped(value?: ProductCustom | null, ignoreDis
|
|
|
176
169
|
'transactionPostingEntries': ((value['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesToJSON)),
|
|
177
170
|
'customFields': value['customFields'],
|
|
178
171
|
'incomeAccount': value['incomeAccount'],
|
|
179
|
-
'productTaxGroupName': value['productTaxGroupName'],
|
|
180
172
|
'id': value['id'],
|
|
181
173
|
};
|
|
182
174
|
}
|