@managespace/sdk 0.0.121 → 0.0.122
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/dist/generated/apis/default-api.d.ts +12 -1
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +37 -0
- package/dist/generated/models/create-subscription.d.ts +162 -0
- package/dist/generated/models/create-subscription.d.ts.map +1 -1
- package/dist/generated/models/create-subscription.js +54 -0
- package/dist/generated/models/index.d.ts +0 -1
- package/dist/generated/models/index.d.ts.map +1 -1
- package/dist/generated/models/index.js +0 -1
- package/dist/generated/models/subscription.d.ts +121 -79
- package/dist/generated/models/subscription.d.ts.map +1 -1
- package/dist/generated/models/subscription.js +57 -91
- package/dist/generated/models/update-subscription-charge.d.ts +6 -6
- package/dist/generated/models/update-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/update-subscription-charge.js +2 -4
- package/dist/generated/models/update-subscription.d.ts +160 -4
- package/dist/generated/models/update-subscription.d.ts.map +1 -1
- package/dist/generated/models/update-subscription.js +54 -4
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +0 -1
- package/src/generated/apis/default-api.ts +65 -0
- package/src/generated/models/create-subscription.ts +216 -0
- package/src/generated/models/index.ts +0 -1
- package/src/generated/models/subscription.ts +181 -149
- package/src/generated/models/update-subscription-charge.ts +8 -9
- package/src/generated/models/update-subscription.ts +214 -7
|
@@ -26,8 +26,6 @@ function instanceOfUpdateSubscriptionCharge(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('chargeName' in value) || value['chargeName'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('assetId' in value) || value['assetId'] === undefined)
|
|
30
|
-
return false;
|
|
31
29
|
if (!('chargeType' in value) || value['chargeType'] === undefined)
|
|
32
30
|
return false;
|
|
33
31
|
if (!('billingPeriod' in value) || value['billingPeriod'] === undefined)
|
|
@@ -85,11 +83,11 @@ function UpdateSubscriptionChargeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
85
83
|
'customRecognitionStartDate': json['customRecognitionStartDate'] == null ? undefined : json['customRecognitionStartDate'],
|
|
86
84
|
'customRecognitionEndDate': json['customRecognitionEndDate'] == null ? undefined : json['customRecognitionEndDate'],
|
|
87
85
|
'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : (json['transactionPostingEntries'].map(transaction_posting_entries_1.TransactionPostingEntriesFromJSON)),
|
|
88
|
-
'assetId': json['assetId'],
|
|
89
86
|
'chargeId': json['chargeId'] == null ? undefined : json['chargeId'],
|
|
90
87
|
'chargeType': json['chargeType'],
|
|
91
88
|
'billingPeriod': json['billingPeriod'],
|
|
92
89
|
'listPrice': json['listPrice'],
|
|
90
|
+
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
93
91
|
};
|
|
94
92
|
}
|
|
95
93
|
exports.UpdateSubscriptionChargeFromJSONTyped = UpdateSubscriptionChargeFromJSONTyped;
|
|
@@ -141,11 +139,11 @@ function UpdateSubscriptionChargeToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
141
139
|
'customRecognitionStartDate': value['customRecognitionStartDate'],
|
|
142
140
|
'customRecognitionEndDate': value['customRecognitionEndDate'],
|
|
143
141
|
'transactionPostingEntries': value['transactionPostingEntries'] == null ? undefined : (value['transactionPostingEntries'].map(transaction_posting_entries_1.TransactionPostingEntriesToJSON)),
|
|
144
|
-
'assetId': value['assetId'],
|
|
145
142
|
'chargeId': value['chargeId'],
|
|
146
143
|
'chargeType': value['chargeType'],
|
|
147
144
|
'billingPeriod': value['billingPeriod'],
|
|
148
145
|
'listPrice': value['listPrice'],
|
|
146
|
+
'assetId': value['assetId'],
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
149
|
exports.UpdateSubscriptionChargeToJSONTyped = UpdateSubscriptionChargeToJSONTyped;
|
|
@@ -34,6 +34,114 @@ export interface UpdateSubscription {
|
|
|
34
34
|
* @memberof UpdateSubscription
|
|
35
35
|
*/
|
|
36
36
|
serviceStartDate?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Date order was placed
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UpdateSubscription
|
|
41
|
+
*/
|
|
42
|
+
orderPlacedAt?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Date subscription contract was terminated
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof UpdateSubscription
|
|
47
|
+
*/
|
|
48
|
+
cancellationDate?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Cancel as of option
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof UpdateSubscription
|
|
53
|
+
*/
|
|
54
|
+
cancellationType?: string;
|
|
55
|
+
/**
|
|
56
|
+
* auto-renew subscription contract
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof UpdateSubscription
|
|
59
|
+
*/
|
|
60
|
+
autoRenew?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* currency
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof UpdateSubscription
|
|
65
|
+
*/
|
|
66
|
+
currency?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Calculate due date of invoice
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof UpdateSubscription
|
|
71
|
+
*/
|
|
72
|
+
paymentTerms?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Contracted MRR per charge
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof UpdateSubscription
|
|
77
|
+
*/
|
|
78
|
+
cmrr?: string;
|
|
79
|
+
/**
|
|
80
|
+
* MRR calculated based on % discount
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof UpdateSubscription
|
|
83
|
+
*/
|
|
84
|
+
discountedCmrr?: string;
|
|
85
|
+
/**
|
|
86
|
+
* separate invoice generated
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof UpdateSubscription
|
|
89
|
+
*/
|
|
90
|
+
separateInvoice?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Miscellaneous notes
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof UpdateSubscription
|
|
95
|
+
*/
|
|
96
|
+
notes?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Coupon Code
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof UpdateSubscription
|
|
101
|
+
*/
|
|
102
|
+
couponCode?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Version of subscription contract
|
|
105
|
+
* @type {number}
|
|
106
|
+
* @memberof UpdateSubscription
|
|
107
|
+
*/
|
|
108
|
+
version?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Subscription contract version type
|
|
111
|
+
* @type {string}
|
|
112
|
+
* @memberof UpdateSubscription
|
|
113
|
+
*/
|
|
114
|
+
versionType?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Subscription contract term
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @memberof UpdateSubscription
|
|
119
|
+
*/
|
|
120
|
+
contractTerm?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Length of time Subscription Contract will be renewed for
|
|
123
|
+
* @type {string}
|
|
124
|
+
* @memberof UpdateSubscription
|
|
125
|
+
*/
|
|
126
|
+
renewalTerm?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Date Subscription Contract will start
|
|
129
|
+
* @type {string}
|
|
130
|
+
* @memberof UpdateSubscription
|
|
131
|
+
*/
|
|
132
|
+
currentTermStartDate?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Date subscription contract will end
|
|
135
|
+
* @type {string}
|
|
136
|
+
* @memberof UpdateSubscription
|
|
137
|
+
*/
|
|
138
|
+
currentTermEndDate?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Date subscription contract was terminated
|
|
141
|
+
* @type {number}
|
|
142
|
+
* @memberof UpdateSubscription
|
|
143
|
+
*/
|
|
144
|
+
renewalIncrementPercent?: number;
|
|
37
145
|
/**
|
|
38
146
|
* Asset ID
|
|
39
147
|
* @type {string}
|
|
@@ -41,17 +149,65 @@ export interface UpdateSubscription {
|
|
|
41
149
|
*/
|
|
42
150
|
assetId?: string;
|
|
43
151
|
/**
|
|
44
|
-
*
|
|
152
|
+
* Id of billing contact
|
|
45
153
|
* @type {string}
|
|
46
154
|
* @memberof UpdateSubscription
|
|
47
155
|
*/
|
|
48
|
-
|
|
156
|
+
billContactId?: string;
|
|
49
157
|
/**
|
|
50
|
-
*
|
|
158
|
+
* Id of shipping contact
|
|
51
159
|
* @type {string}
|
|
52
160
|
* @memberof UpdateSubscription
|
|
53
161
|
*/
|
|
54
|
-
|
|
162
|
+
shippingContactId?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Date record was created
|
|
165
|
+
* @type {string}
|
|
166
|
+
* @memberof UpdateSubscription
|
|
167
|
+
*/
|
|
168
|
+
updatedAt?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Date record was created
|
|
171
|
+
* @type {string}
|
|
172
|
+
* @memberof UpdateSubscription
|
|
173
|
+
*/
|
|
174
|
+
createdAt?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Email of user who created record
|
|
177
|
+
* @type {string}
|
|
178
|
+
* @memberof UpdateSubscription
|
|
179
|
+
*/
|
|
180
|
+
createdBy?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Email of user who last modifed record
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @memberof UpdateSubscription
|
|
185
|
+
*/
|
|
186
|
+
updatedBy?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Custom fields on the invoice
|
|
189
|
+
* @type {object}
|
|
190
|
+
* @memberof UpdateSubscription
|
|
191
|
+
*/
|
|
192
|
+
customFields?: object;
|
|
193
|
+
/**
|
|
194
|
+
* Total contract value of the subsctiption contract
|
|
195
|
+
* @type {number}
|
|
196
|
+
* @memberof UpdateSubscription
|
|
197
|
+
*/
|
|
198
|
+
tcv?: number;
|
|
199
|
+
/**
|
|
200
|
+
* Set to defer start date
|
|
201
|
+
* @type {boolean}
|
|
202
|
+
* @memberof UpdateSubscription
|
|
203
|
+
*/
|
|
204
|
+
deferStartDate?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Date subscription contract was signed and activated
|
|
207
|
+
* @type {string}
|
|
208
|
+
* @memberof UpdateSubscription
|
|
209
|
+
*/
|
|
210
|
+
contractEffectiveDate: string;
|
|
55
211
|
/**
|
|
56
212
|
* Charges associated the subscription
|
|
57
213
|
* @type {Array<UpdateSubscriptionCharge>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-subscription.d.ts","sourceRoot":"","sources":["../../../src/generated/models/update-subscription.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAQ7E;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"update-subscription.d.ts","sourceRoot":"","sources":["../../../src/generated/models/update-subscription.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAQ7E;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAIvF;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,kBAAkB,CAExE;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,kBAAkB,CAwC3G;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,kBAAkB,CAEtE;AAED,wBAAgB,6BAA6B,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAyC1H"}
|
|
@@ -21,8 +21,6 @@ const update_subscription_charge_1 = require("./update-subscription-charge");
|
|
|
21
21
|
function instanceOfUpdateSubscription(value) {
|
|
22
22
|
if (!('contractEffectiveDate' in value) || value['contractEffectiveDate'] === undefined)
|
|
23
23
|
return false;
|
|
24
|
-
if (!('contractTerm' in value) || value['contractTerm'] === undefined)
|
|
25
|
-
return false;
|
|
26
24
|
if (!('charges' in value) || value['charges'] === undefined)
|
|
27
25
|
return false;
|
|
28
26
|
return true;
|
|
@@ -40,9 +38,35 @@ function UpdateSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
38
|
'status': json['status'] == null ? undefined : json['status'],
|
|
41
39
|
'billingStartDate': json['billingStartDate'] == null ? undefined : json['billingStartDate'],
|
|
42
40
|
'serviceStartDate': json['serviceStartDate'] == null ? undefined : json['serviceStartDate'],
|
|
41
|
+
'orderPlacedAt': json['orderPlacedAt'] == null ? undefined : json['orderPlacedAt'],
|
|
42
|
+
'cancellationDate': json['cancellationDate'] == null ? undefined : json['cancellationDate'],
|
|
43
|
+
'cancellationType': json['cancellationType'] == null ? undefined : json['cancellationType'],
|
|
44
|
+
'autoRenew': json['autoRenew'] == null ? undefined : json['autoRenew'],
|
|
45
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
46
|
+
'paymentTerms': json['paymentTerms'] == null ? undefined : json['paymentTerms'],
|
|
47
|
+
'cmrr': json['cmrr'] == null ? undefined : json['cmrr'],
|
|
48
|
+
'discountedCmrr': json['discountedCmrr'] == null ? undefined : json['discountedCmrr'],
|
|
49
|
+
'separateInvoice': json['separateInvoice'] == null ? undefined : json['separateInvoice'],
|
|
50
|
+
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
51
|
+
'couponCode': json['couponCode'] == null ? undefined : json['couponCode'],
|
|
52
|
+
'version': json['version'] == null ? undefined : json['version'],
|
|
53
|
+
'versionType': json['versionType'] == null ? undefined : json['versionType'],
|
|
54
|
+
'contractTerm': json['contractTerm'] == null ? undefined : json['contractTerm'],
|
|
55
|
+
'renewalTerm': json['renewalTerm'] == null ? undefined : json['renewalTerm'],
|
|
56
|
+
'currentTermStartDate': json['currentTermStartDate'] == null ? undefined : json['currentTermStartDate'],
|
|
57
|
+
'currentTermEndDate': json['currentTermEndDate'] == null ? undefined : json['currentTermEndDate'],
|
|
58
|
+
'renewalIncrementPercent': json['renewalIncrementPercent'] == null ? undefined : json['renewalIncrementPercent'],
|
|
43
59
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
60
|
+
'billContactId': json['billContactId'] == null ? undefined : json['billContactId'],
|
|
61
|
+
'shippingContactId': json['shippingContactId'] == null ? undefined : json['shippingContactId'],
|
|
62
|
+
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
|
|
63
|
+
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
64
|
+
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
|
|
65
|
+
'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
|
|
66
|
+
'customFields': json['customFields'] == null ? undefined : json['customFields'],
|
|
67
|
+
'tcv': json['tcv'] == null ? undefined : json['tcv'],
|
|
68
|
+
'deferStartDate': json['deferStartDate'] == null ? undefined : json['deferStartDate'],
|
|
44
69
|
'contractEffectiveDate': json['contractEffectiveDate'],
|
|
45
|
-
'contractTerm': json['contractTerm'],
|
|
46
70
|
'charges': (json['charges'].map(update_subscription_charge_1.UpdateSubscriptionChargeFromJSON)),
|
|
47
71
|
};
|
|
48
72
|
}
|
|
@@ -59,9 +83,35 @@ function UpdateSubscriptionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
59
83
|
'status': value['status'],
|
|
60
84
|
'billingStartDate': value['billingStartDate'],
|
|
61
85
|
'serviceStartDate': value['serviceStartDate'],
|
|
86
|
+
'orderPlacedAt': value['orderPlacedAt'],
|
|
87
|
+
'cancellationDate': value['cancellationDate'],
|
|
88
|
+
'cancellationType': value['cancellationType'],
|
|
89
|
+
'autoRenew': value['autoRenew'],
|
|
90
|
+
'currency': value['currency'],
|
|
91
|
+
'paymentTerms': value['paymentTerms'],
|
|
92
|
+
'cmrr': value['cmrr'],
|
|
93
|
+
'discountedCmrr': value['discountedCmrr'],
|
|
94
|
+
'separateInvoice': value['separateInvoice'],
|
|
95
|
+
'notes': value['notes'],
|
|
96
|
+
'couponCode': value['couponCode'],
|
|
97
|
+
'version': value['version'],
|
|
98
|
+
'versionType': value['versionType'],
|
|
99
|
+
'contractTerm': value['contractTerm'],
|
|
100
|
+
'renewalTerm': value['renewalTerm'],
|
|
101
|
+
'currentTermStartDate': value['currentTermStartDate'],
|
|
102
|
+
'currentTermEndDate': value['currentTermEndDate'],
|
|
103
|
+
'renewalIncrementPercent': value['renewalIncrementPercent'],
|
|
62
104
|
'assetId': value['assetId'],
|
|
105
|
+
'billContactId': value['billContactId'],
|
|
106
|
+
'shippingContactId': value['shippingContactId'],
|
|
107
|
+
'updatedAt': value['updatedAt'],
|
|
108
|
+
'createdAt': value['createdAt'],
|
|
109
|
+
'createdBy': value['createdBy'],
|
|
110
|
+
'updatedBy': value['updatedBy'],
|
|
111
|
+
'customFields': value['customFields'],
|
|
112
|
+
'tcv': value['tcv'],
|
|
113
|
+
'deferStartDate': value['deferStartDate'],
|
|
63
114
|
'contractEffectiveDate': value['contractEffectiveDate'],
|
|
64
|
-
'contractTerm': value['contractTerm'],
|
|
65
115
|
'charges': (value['charges'].map(update_subscription_charge_1.UpdateSubscriptionChargeToJSON)),
|
|
66
116
|
};
|
|
67
117
|
}
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
AssetFeature,
|
|
23
23
|
BillingRun,
|
|
24
24
|
Calendar,
|
|
25
|
+
CancelSubscription,
|
|
25
26
|
Charge,
|
|
26
27
|
ChartOfAccounts,
|
|
27
28
|
Communication,
|
|
@@ -168,6 +169,8 @@ import {
|
|
|
168
169
|
BillingRunToJSON,
|
|
169
170
|
CalendarFromJSON,
|
|
170
171
|
CalendarToJSON,
|
|
172
|
+
CancelSubscriptionFromJSON,
|
|
173
|
+
CancelSubscriptionToJSON,
|
|
171
174
|
ChargeFromJSON,
|
|
172
175
|
ChargeToJSON,
|
|
173
176
|
ChartOfAccountsFromJSON,
|
|
@@ -434,6 +437,12 @@ export interface AdminSignUpRequest {
|
|
|
434
437
|
adminSignUp: AdminSignUp;
|
|
435
438
|
}
|
|
436
439
|
|
|
440
|
+
export interface CancelSubscriptionRequest {
|
|
441
|
+
siteId: string;
|
|
442
|
+
subscriptionId: string;
|
|
443
|
+
cancelSubscription: CancelSubscription;
|
|
444
|
+
}
|
|
445
|
+
|
|
437
446
|
export interface CheckStrengthRequest {
|
|
438
447
|
password: Password;
|
|
439
448
|
}
|
|
@@ -1188,6 +1197,62 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1188
1197
|
return await response.value();
|
|
1189
1198
|
}
|
|
1190
1199
|
|
|
1200
|
+
/**
|
|
1201
|
+
*/
|
|
1202
|
+
async cancelSubscriptionRaw(requestParameters: CancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subscription>> {
|
|
1203
|
+
if (requestParameters['siteId'] == null) {
|
|
1204
|
+
throw new runtime.RequiredError(
|
|
1205
|
+
'siteId',
|
|
1206
|
+
'Required parameter "siteId" was null or undefined when calling cancelSubscription().'
|
|
1207
|
+
);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
1211
|
+
throw new runtime.RequiredError(
|
|
1212
|
+
'subscriptionId',
|
|
1213
|
+
'Required parameter "subscriptionId" was null or undefined when calling cancelSubscription().'
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
if (requestParameters['cancelSubscription'] == null) {
|
|
1218
|
+
throw new runtime.RequiredError(
|
|
1219
|
+
'cancelSubscription',
|
|
1220
|
+
'Required parameter "cancelSubscription" was null or undefined when calling cancelSubscription().'
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
const queryParameters: any = {};
|
|
1225
|
+
|
|
1226
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1227
|
+
|
|
1228
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1229
|
+
|
|
1230
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1231
|
+
const token = this.configuration.accessToken;
|
|
1232
|
+
const tokenString = await token("bearer", []);
|
|
1233
|
+
|
|
1234
|
+
if (tokenString) {
|
|
1235
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
const response = await this.request({
|
|
1239
|
+
path: `/api/sites/{siteId}/subscriptions/{subscriptionId}/cancel`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
1240
|
+
method: 'PUT',
|
|
1241
|
+
headers: headerParameters,
|
|
1242
|
+
query: queryParameters,
|
|
1243
|
+
body: CancelSubscriptionToJSON(requestParameters['cancelSubscription']),
|
|
1244
|
+
}, initOverrides);
|
|
1245
|
+
|
|
1246
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionFromJSON(jsonValue));
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
*/
|
|
1251
|
+
async cancelSubscription(requestParameters: CancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subscription> {
|
|
1252
|
+
const response = await this.cancelSubscriptionRaw(requestParameters, initOverrides);
|
|
1253
|
+
return await response.value();
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1191
1256
|
/**
|
|
1192
1257
|
*/
|
|
1193
1258
|
async checkStrengthRaw(requestParameters: CheckStrengthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasswordStrengthCheck>> {
|
|
@@ -45,12 +45,120 @@ export interface CreateSubscription {
|
|
|
45
45
|
* @memberof CreateSubscription
|
|
46
46
|
*/
|
|
47
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
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,6 +171,60 @@ 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
|
/**
|
|
@@ -86,9 +248,36 @@ export function CreateSubscriptionFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
86
248
|
'status': json['status'] == null ? undefined : json['status'],
|
|
87
249
|
'billingStartDate': json['billingStartDate'] == null ? undefined : json['billingStartDate'],
|
|
88
250
|
'serviceStartDate': json['serviceStartDate'] == null ? undefined : json['serviceStartDate'],
|
|
251
|
+
'orderPlacedAt': json['orderPlacedAt'] == null ? undefined : json['orderPlacedAt'],
|
|
89
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
270
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
91
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'],
|
|
92
281
|
};
|
|
93
282
|
}
|
|
94
283
|
|
|
@@ -106,9 +295,36 @@ export function CreateSubscriptionToJSONTyped(value?: CreateSubscription | null,
|
|
|
106
295
|
'status': value['status'],
|
|
107
296
|
'billingStartDate': value['billingStartDate'],
|
|
108
297
|
'serviceStartDate': value['serviceStartDate'],
|
|
298
|
+
'orderPlacedAt': value['orderPlacedAt'],
|
|
109
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'],
|
|
110
317
|
'assetId': value['assetId'],
|
|
111
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'],
|
|
112
328
|
};
|
|
113
329
|
}
|
|
114
330
|
|