@managespace/sdk 0.1.188-melissa.dev → 0.1.189-disbursements
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/extensibility/functions/project/billing.d.ts +21 -0
- package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
- package/dist/extensibility/functions/project/billing.js +5 -0
- package/dist/generated/apis/default-api.d.ts +13 -13
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +38 -36
- package/dist/generated/models/create-credit.d.ts +7 -0
- package/dist/generated/models/create-credit.d.ts.map +1 -1
- package/dist/generated/models/create-credit.js +3 -0
- package/dist/generated/models/create-product-custom.d.ts +6 -0
- package/dist/generated/models/create-product-custom.d.ts.map +1 -1
- package/dist/generated/models/create-product-custom.js +2 -0
- package/dist/generated/models/create-subscription-charge.d.ts +0 -6
- package/dist/generated/models/create-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/create-subscription-charge.js +0 -2
- package/dist/generated/models/credit-applies-to-product-type.d.ts +29 -0
- package/dist/generated/models/credit-applies-to-product-type.d.ts.map +1 -0
- package/dist/generated/models/credit-applies-to-product-type.js +55 -0
- package/dist/generated/models/credit.d.ts +7 -0
- package/dist/generated/models/credit.d.ts.map +1 -1
- package/dist/generated/models/credit.js +3 -0
- package/dist/generated/models/index.d.ts +1 -0
- package/dist/generated/models/index.d.ts.map +1 -1
- package/dist/generated/models/index.js +1 -0
- package/dist/generated/models/journal-entry-entries.d.ts +12 -0
- package/dist/generated/models/journal-entry-entries.d.ts.map +1 -1
- package/dist/generated/models/journal-entry-entries.js +8 -0
- package/dist/generated/models/journal-entry.d.ts +31 -0
- package/dist/generated/models/journal-entry.d.ts.map +1 -1
- package/dist/generated/models/journal-entry.js +25 -0
- package/dist/generated/models/product-custom.d.ts +6 -0
- package/dist/generated/models/product-custom.d.ts.map +1 -1
- package/dist/generated/models/product-custom.js +2 -0
- package/dist/generated/models/product-type.d.ts +3 -0
- package/dist/generated/models/product-type.d.ts.map +1 -1
- package/dist/generated/models/product-type.js +4 -1
- package/dist/generated/models/subscription-charge.d.ts +0 -12
- package/dist/generated/models/subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/subscription-charge.js +0 -6
- package/dist/generated/models/update-product.d.ts +6 -0
- package/dist/generated/models/update-product.d.ts.map +1 -1
- package/dist/generated/models/update-product.js +2 -0
- package/dist/generated/models/update-subscription-charge.d.ts +0 -6
- package/dist/generated/models/update-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/update-subscription-charge.js +0 -2
- package/package.deploy.json +8 -4
- package/package.json +8 -4
- package/src/extensibility/functions/project/billing.ts +24 -0
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/default-api.ts +53 -48
- package/src/generated/models/create-credit.ts +17 -0
- package/src/generated/models/create-product-custom.ts +8 -0
- package/src/generated/models/create-subscription-charge.ts +0 -8
- package/src/generated/models/credit-applies-to-product-type.ts +57 -0
- package/src/generated/models/credit.ts +17 -0
- package/src/generated/models/index.ts +1 -0
- package/src/generated/models/journal-entry-entries.ts +18 -0
- package/src/generated/models/journal-entry.ts +43 -0
- package/src/generated/models/product-custom.ts +8 -0
- package/src/generated/models/product-type.ts +4 -1
- package/src/generated/models/subscription-charge.ts +0 -17
- package/src/generated/models/update-product.ts +8 -0
- package/src/generated/models/update-subscription-charge.ts +0 -8
|
@@ -28,6 +28,13 @@ import {
|
|
|
28
28
|
CreateCreditInvoiceToJSON,
|
|
29
29
|
CreateCreditInvoiceToJSONTyped,
|
|
30
30
|
} from './create-credit-invoice';
|
|
31
|
+
import type { CreditAppliesToProductType } from './credit-applies-to-product-type';
|
|
32
|
+
import {
|
|
33
|
+
CreditAppliesToProductTypeFromJSON,
|
|
34
|
+
CreditAppliesToProductTypeFromJSONTyped,
|
|
35
|
+
CreditAppliesToProductTypeToJSON,
|
|
36
|
+
CreditAppliesToProductTypeToJSONTyped,
|
|
37
|
+
} from './credit-applies-to-product-type';
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
*
|
|
@@ -77,6 +84,12 @@ export interface CreateCredit {
|
|
|
77
84
|
* @memberof CreateCredit
|
|
78
85
|
*/
|
|
79
86
|
currency?: string;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {CreditAppliesToProductType}
|
|
90
|
+
* @memberof CreateCredit
|
|
91
|
+
*/
|
|
92
|
+
appliesToProductType?: CreditAppliesToProductType;
|
|
80
93
|
/**
|
|
81
94
|
* Automatically apply credit to most recent invoice
|
|
82
95
|
* @type {boolean}
|
|
@@ -109,6 +122,8 @@ export interface CreateCredit {
|
|
|
109
122
|
creditLineItems: Array<CreateCreditLineItems>;
|
|
110
123
|
}
|
|
111
124
|
|
|
125
|
+
|
|
126
|
+
|
|
112
127
|
/**
|
|
113
128
|
* Check if a given object implements the CreateCredit interface.
|
|
114
129
|
*/
|
|
@@ -137,6 +152,7 @@ export function CreateCreditFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
137
152
|
'appliedAmount': json['appliedAmount'] == null ? undefined : json['appliedAmount'],
|
|
138
153
|
'unappliedAmount': json['unappliedAmount'] == null ? undefined : json['unappliedAmount'],
|
|
139
154
|
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
155
|
+
'appliesToProductType': json['appliesToProductType'] == null ? undefined : CreditAppliesToProductTypeFromJSON(json['appliesToProductType']),
|
|
140
156
|
'autoApply': json['autoApply'] == null ? undefined : json['autoApply'],
|
|
141
157
|
'isPrepayment': json['isPrepayment'] == null ? undefined : json['isPrepayment'],
|
|
142
158
|
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
@@ -163,6 +179,7 @@ export function CreateCreditToJSONTyped(value?: CreateCredit | null, ignoreDiscr
|
|
|
163
179
|
'appliedAmount': value['appliedAmount'],
|
|
164
180
|
'unappliedAmount': value['unappliedAmount'],
|
|
165
181
|
'currency': value['currency'],
|
|
182
|
+
'appliesToProductType': CreditAppliesToProductTypeToJSON(value['appliesToProductType']),
|
|
166
183
|
'autoApply': value['autoApply'],
|
|
167
184
|
'isPrepayment': value['isPrepayment'],
|
|
168
185
|
'subscriptionId': value['subscriptionId'],
|
|
@@ -119,6 +119,12 @@ export interface CreateProductCustom {
|
|
|
119
119
|
* @memberof CreateProductCustom
|
|
120
120
|
*/
|
|
121
121
|
oneTimeCharge: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Product ID to use when writing off this product's charge
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof CreateProductCustom
|
|
126
|
+
*/
|
|
127
|
+
writeOffProductId?: string;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
|
|
@@ -161,6 +167,7 @@ export function CreateProductCustomFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
161
167
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
162
168
|
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
163
169
|
'oneTimeCharge': json['oneTimeCharge'],
|
|
170
|
+
'writeOffProductId': json['writeOffProductId'] == null ? undefined : json['writeOffProductId'],
|
|
164
171
|
};
|
|
165
172
|
}
|
|
166
173
|
|
|
@@ -189,6 +196,7 @@ export function CreateProductCustomToJSONTyped(value?: CreateProductCustom | nul
|
|
|
189
196
|
'incomeAccount': value['incomeAccount'],
|
|
190
197
|
'productTaxGroupName': value['productTaxGroupName'],
|
|
191
198
|
'oneTimeCharge': value['oneTimeCharge'],
|
|
199
|
+
'writeOffProductId': value['writeOffProductId'],
|
|
192
200
|
};
|
|
193
201
|
}
|
|
194
202
|
|
|
@@ -101,12 +101,6 @@ export interface CreateSubscriptionCharge {
|
|
|
101
101
|
* @memberof CreateSubscriptionCharge
|
|
102
102
|
*/
|
|
103
103
|
includedUnits?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Discount applied to product
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof CreateSubscriptionCharge
|
|
108
|
-
*/
|
|
109
|
-
discount?: number;
|
|
110
104
|
/**
|
|
111
105
|
* Effective price of product
|
|
112
106
|
* @type {string}
|
|
@@ -337,7 +331,6 @@ export function CreateSubscriptionChargeFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
337
331
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
338
332
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
339
333
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
340
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
341
334
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
342
335
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
343
336
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -396,7 +389,6 @@ export function CreateSubscriptionChargeToJSONTyped(value?: CreateSubscriptionCh
|
|
|
396
389
|
'priceBase': value['priceBase'],
|
|
397
390
|
'quantity': value['quantity'],
|
|
398
391
|
'includedUnits': value['includedUnits'],
|
|
399
|
-
'discount': value['discount'],
|
|
400
392
|
'effectivePrice': value['effectivePrice'],
|
|
401
393
|
'chargeType': value['chargeType'],
|
|
402
394
|
'billingPeriod': value['billingPeriod'],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* ManageSpace API
|
|
6
|
+
* ManageSpace API Documentation
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The product type this credit is intended to apply against
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
export const CreditAppliesToProductType = {
|
|
22
|
+
RENT: 'RENT',
|
|
23
|
+
RENT_TREATMENT: 'RENT_TREATMENT',
|
|
24
|
+
INSURANCE: 'INSURANCE',
|
|
25
|
+
FEE: 'FEE',
|
|
26
|
+
MERCHANDISE: 'MERCHANDISE'
|
|
27
|
+
} as const;
|
|
28
|
+
export type CreditAppliesToProductType = typeof CreditAppliesToProductType[keyof typeof CreditAppliesToProductType];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export function instanceOfCreditAppliesToProductType(value: any): boolean {
|
|
32
|
+
for (const key in CreditAppliesToProductType) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(CreditAppliesToProductType, key)) {
|
|
34
|
+
if (CreditAppliesToProductType[key as keyof typeof CreditAppliesToProductType] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CreditAppliesToProductTypeFromJSON(json: any): CreditAppliesToProductType {
|
|
43
|
+
return CreditAppliesToProductTypeFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CreditAppliesToProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreditAppliesToProductType {
|
|
47
|
+
return json as CreditAppliesToProductType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CreditAppliesToProductTypeToJSON(value?: CreditAppliesToProductType | null): any {
|
|
51
|
+
return value as any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CreditAppliesToProductTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CreditAppliesToProductType {
|
|
55
|
+
return value as CreditAppliesToProductType;
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -28,6 +28,13 @@ import {
|
|
|
28
28
|
CreditLineItemsToJSON,
|
|
29
29
|
CreditLineItemsToJSONTyped,
|
|
30
30
|
} from './credit-line-items';
|
|
31
|
+
import type { CreditAppliesToProductType } from './credit-applies-to-product-type';
|
|
32
|
+
import {
|
|
33
|
+
CreditAppliesToProductTypeFromJSON,
|
|
34
|
+
CreditAppliesToProductTypeFromJSONTyped,
|
|
35
|
+
CreditAppliesToProductTypeToJSON,
|
|
36
|
+
CreditAppliesToProductTypeToJSONTyped,
|
|
37
|
+
} from './credit-applies-to-product-type';
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
*
|
|
@@ -65,6 +72,12 @@ export interface Credit {
|
|
|
65
72
|
* @memberof Credit
|
|
66
73
|
*/
|
|
67
74
|
currency: string;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {CreditAppliesToProductType}
|
|
78
|
+
* @memberof Credit
|
|
79
|
+
*/
|
|
80
|
+
appliesToProductType?: CreditAppliesToProductType;
|
|
68
81
|
/**
|
|
69
82
|
* Notes about the credit
|
|
70
83
|
* @type {string}
|
|
@@ -151,6 +164,8 @@ export interface Credit {
|
|
|
151
164
|
updatedDate?: string;
|
|
152
165
|
}
|
|
153
166
|
|
|
167
|
+
|
|
168
|
+
|
|
154
169
|
/**
|
|
155
170
|
* Check if a given object implements the Credit interface.
|
|
156
171
|
*/
|
|
@@ -178,6 +193,7 @@ export function CreditFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cr
|
|
|
178
193
|
'creditDate': json['creditDate'],
|
|
179
194
|
'creditAmount': json['creditAmount'],
|
|
180
195
|
'currency': json['currency'],
|
|
196
|
+
'appliesToProductType': json['appliesToProductType'] == null ? undefined : CreditAppliesToProductTypeFromJSON(json['appliesToProductType']),
|
|
181
197
|
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
182
198
|
'appliedAmount': json['appliedAmount'] == null ? undefined : json['appliedAmount'],
|
|
183
199
|
'unappliedAmount': json['unappliedAmount'] == null ? undefined : json['unappliedAmount'],
|
|
@@ -211,6 +227,7 @@ export function CreditToJSONTyped(value?: Credit | null, ignoreDiscriminator: bo
|
|
|
211
227
|
'creditDate': value['creditDate'],
|
|
212
228
|
'creditAmount': value['creditAmount'],
|
|
213
229
|
'currency': value['currency'],
|
|
230
|
+
'appliesToProductType': CreditAppliesToProductTypeToJSON(value['appliesToProductType']),
|
|
214
231
|
'notes': value['notes'],
|
|
215
232
|
'appliedAmount': value['appliedAmount'],
|
|
216
233
|
'unappliedAmount': value['unappliedAmount'],
|
|
@@ -81,6 +81,7 @@ export * from './create-task-definition';
|
|
|
81
81
|
export * from './create-task-instance';
|
|
82
82
|
export * from './create-template';
|
|
83
83
|
export * from './credit';
|
|
84
|
+
export * from './credit-applies-to-product-type';
|
|
84
85
|
export * from './credit-line-items';
|
|
85
86
|
export * from './custom-create-checklist';
|
|
86
87
|
export * from './custom-create-contact';
|
|
@@ -56,6 +56,18 @@ export interface JournalEntryEntries {
|
|
|
56
56
|
* @memberof JournalEntryEntries
|
|
57
57
|
*/
|
|
58
58
|
customerId: string;
|
|
59
|
+
/**
|
|
60
|
+
* Customer name associated with journal entry line
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof JournalEntryEntries
|
|
63
|
+
*/
|
|
64
|
+
customerName: string;
|
|
65
|
+
/**
|
|
66
|
+
* Custom fields on the journal entry line
|
|
67
|
+
* @type {object}
|
|
68
|
+
* @memberof JournalEntryEntries
|
|
69
|
+
*/
|
|
70
|
+
customFields: object;
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
/**
|
|
@@ -68,6 +80,8 @@ export function instanceOfJournalEntryEntries(value: object): value is JournalEn
|
|
|
68
80
|
if (!('credit' in value) || value['credit'] === undefined) return false;
|
|
69
81
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
70
82
|
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
83
|
+
if (!('customerName' in value) || value['customerName'] === undefined) return false;
|
|
84
|
+
if (!('customFields' in value) || value['customFields'] === undefined) return false;
|
|
71
85
|
return true;
|
|
72
86
|
}
|
|
73
87
|
|
|
@@ -87,6 +101,8 @@ export function JournalEntryEntriesFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
87
101
|
'credit': json['credit'],
|
|
88
102
|
'description': json['description'],
|
|
89
103
|
'customerId': json['customerId'],
|
|
104
|
+
'customerName': json['customerName'],
|
|
105
|
+
'customFields': json['customFields'],
|
|
90
106
|
};
|
|
91
107
|
}
|
|
92
108
|
|
|
@@ -107,6 +123,8 @@ export function JournalEntryEntriesToJSONTyped(value?: JournalEntryEntries | nul
|
|
|
107
123
|
'credit': value['credit'],
|
|
108
124
|
'description': value['description'],
|
|
109
125
|
'customerId': value['customerId'],
|
|
126
|
+
'customerName': value['customerName'],
|
|
127
|
+
'customFields': value['customFields'],
|
|
110
128
|
};
|
|
111
129
|
}
|
|
112
130
|
|
|
@@ -58,6 +58,24 @@ export interface JournalEntry {
|
|
|
58
58
|
* @memberof JournalEntry
|
|
59
59
|
*/
|
|
60
60
|
description: string;
|
|
61
|
+
/**
|
|
62
|
+
* The Ordway object that produced this journal entry. Used to join back to the source transaction when resolving sub-account labels in the accrual report.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof JournalEntry
|
|
65
|
+
*/
|
|
66
|
+
sourceType: JournalEntrySourceType;
|
|
67
|
+
/**
|
|
68
|
+
* Identifier of the object that produced this journal entry (e.g. INV-54921, CR-01287, PMT-13031, REF-00246).
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof JournalEntry
|
|
71
|
+
*/
|
|
72
|
+
sourceId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Total transaction amount for the journal entry in the transaction currency
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof JournalEntry
|
|
77
|
+
*/
|
|
78
|
+
transactionAmount: string;
|
|
61
79
|
/**
|
|
62
80
|
* Journal entries
|
|
63
81
|
* @type {Array<JournalEntryEntries>}
|
|
@@ -108,6 +126,22 @@ export interface JournalEntry {
|
|
|
108
126
|
transactionConversionRate: number;
|
|
109
127
|
}
|
|
110
128
|
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @export
|
|
132
|
+
*/
|
|
133
|
+
export const JournalEntrySourceType = {
|
|
134
|
+
Subscription: 'Subscription',
|
|
135
|
+
Order: 'Order',
|
|
136
|
+
Invoice: 'Invoice',
|
|
137
|
+
Payment: 'Payment',
|
|
138
|
+
Credit: 'Credit',
|
|
139
|
+
RevenueSchedule: 'RevenueSchedule',
|
|
140
|
+
Refund: 'Refund'
|
|
141
|
+
} as const;
|
|
142
|
+
export type JournalEntrySourceType = typeof JournalEntrySourceType[keyof typeof JournalEntrySourceType];
|
|
143
|
+
|
|
144
|
+
|
|
111
145
|
/**
|
|
112
146
|
* Check if a given object implements the JournalEntry interface.
|
|
113
147
|
*/
|
|
@@ -117,6 +151,9 @@ export function instanceOfJournalEntry(value: object): value is JournalEntry {
|
|
|
117
151
|
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
118
152
|
if (!('customerName' in value) || value['customerName'] === undefined) return false;
|
|
119
153
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
154
|
+
if (!('sourceType' in value) || value['sourceType'] === undefined) return false;
|
|
155
|
+
if (!('sourceId' in value) || value['sourceId'] === undefined) return false;
|
|
156
|
+
if (!('transactionAmount' in value) || value['transactionAmount'] === undefined) return false;
|
|
120
157
|
if (!('entries' in value) || value['entries'] === undefined) return false;
|
|
121
158
|
if (!('customFields' in value) || value['customFields'] === undefined) return false;
|
|
122
159
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
@@ -143,6 +180,9 @@ export function JournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
143
180
|
'customerId': json['customerId'],
|
|
144
181
|
'customerName': json['customerName'],
|
|
145
182
|
'description': json['description'],
|
|
183
|
+
'sourceType': json['sourceType'],
|
|
184
|
+
'sourceId': json['sourceId'],
|
|
185
|
+
'transactionAmount': json['transactionAmount'],
|
|
146
186
|
'entries': ((json['entries'] as Array<any>).map(JournalEntryEntriesFromJSON)),
|
|
147
187
|
'customFields': json['customFields'],
|
|
148
188
|
'createdAt': json['createdAt'],
|
|
@@ -170,6 +210,9 @@ export function JournalEntryToJSONTyped(value?: JournalEntry | null, ignoreDiscr
|
|
|
170
210
|
'customerId': value['customerId'],
|
|
171
211
|
'customerName': value['customerName'],
|
|
172
212
|
'description': value['description'],
|
|
213
|
+
'sourceType': value['sourceType'],
|
|
214
|
+
'sourceId': value['sourceId'],
|
|
215
|
+
'transactionAmount': value['transactionAmount'],
|
|
173
216
|
'entries': ((value['entries'] as Array<any>).map(JournalEntryEntriesToJSON)),
|
|
174
217
|
'customFields': value['customFields'],
|
|
175
218
|
'createdAt': value['createdAt'],
|
|
@@ -119,6 +119,12 @@ export interface ProductCustom {
|
|
|
119
119
|
* @memberof ProductCustom
|
|
120
120
|
*/
|
|
121
121
|
oneTimeCharge: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Product ID to use when writing off this product's charge
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof ProductCustom
|
|
126
|
+
*/
|
|
127
|
+
writeOffProductId?: string;
|
|
122
128
|
/**
|
|
123
129
|
* Product ID
|
|
124
130
|
* @type {string}
|
|
@@ -175,6 +181,7 @@ export function ProductCustomFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
175
181
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
176
182
|
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
177
183
|
'oneTimeCharge': json['oneTimeCharge'],
|
|
184
|
+
'writeOffProductId': json['writeOffProductId'] == null ? undefined : json['writeOffProductId'],
|
|
178
185
|
'id': json['id'],
|
|
179
186
|
'msExternalId': json['msExternalId'],
|
|
180
187
|
};
|
|
@@ -205,6 +212,7 @@ export function ProductCustomToJSONTyped(value?: ProductCustom | null, ignoreDis
|
|
|
205
212
|
'incomeAccount': value['incomeAccount'],
|
|
206
213
|
'productTaxGroupName': value['productTaxGroupName'],
|
|
207
214
|
'oneTimeCharge': value['oneTimeCharge'],
|
|
215
|
+
'writeOffProductId': value['writeOffProductId'],
|
|
208
216
|
'id': value['id'],
|
|
209
217
|
'msExternalId': value['msExternalId'],
|
|
210
218
|
};
|
|
@@ -24,7 +24,10 @@ export const ProductType = {
|
|
|
24
24
|
RENT_TREATMENT: 'RENT_TREATMENT',
|
|
25
25
|
INSURANCE: 'INSURANCE',
|
|
26
26
|
FEE: 'FEE',
|
|
27
|
-
MERCHANDISE: 'MERCHANDISE'
|
|
27
|
+
MERCHANDISE: 'MERCHANDISE',
|
|
28
|
+
WRITE_OFF: 'WRITE_OFF',
|
|
29
|
+
CREDIT: 'CREDIT',
|
|
30
|
+
DISCOUNT: 'DISCOUNT'
|
|
28
31
|
} as const;
|
|
29
32
|
export type ProductType = typeof ProductType[keyof typeof ProductType];
|
|
30
33
|
|
|
@@ -101,12 +101,6 @@ export interface SubscriptionCharge {
|
|
|
101
101
|
* @memberof SubscriptionCharge
|
|
102
102
|
*/
|
|
103
103
|
includedUnits?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Discount applied to product
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof SubscriptionCharge
|
|
108
|
-
*/
|
|
109
|
-
discount?: number;
|
|
110
104
|
/**
|
|
111
105
|
* Effective price of product
|
|
112
106
|
* @type {string}
|
|
@@ -305,12 +299,6 @@ export interface SubscriptionCharge {
|
|
|
305
299
|
* @memberof SubscriptionCharge
|
|
306
300
|
*/
|
|
307
301
|
assetId: string;
|
|
308
|
-
/**
|
|
309
|
-
* MRR calculated based on % discount
|
|
310
|
-
* @type {string}
|
|
311
|
-
* @memberof SubscriptionCharge
|
|
312
|
-
*/
|
|
313
|
-
discountedCmrr: string;
|
|
314
302
|
}
|
|
315
303
|
|
|
316
304
|
/**
|
|
@@ -319,7 +307,6 @@ export interface SubscriptionCharge {
|
|
|
319
307
|
export function instanceOfSubscriptionCharge(value: object): value is SubscriptionCharge {
|
|
320
308
|
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
321
309
|
if (!('assetId' in value) || value['assetId'] === undefined) return false;
|
|
322
|
-
if (!('discountedCmrr' in value) || value['discountedCmrr'] === undefined) return false;
|
|
323
310
|
return true;
|
|
324
311
|
}
|
|
325
312
|
|
|
@@ -344,7 +331,6 @@ export function SubscriptionChargeFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
344
331
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
345
332
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
346
333
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
347
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
348
334
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
349
335
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
350
336
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -378,7 +364,6 @@ export function SubscriptionChargeFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
378
364
|
'customRecognitionEndDate': json['customRecognitionEndDate'] == null ? undefined : json['customRecognitionEndDate'],
|
|
379
365
|
'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|
|
380
366
|
'assetId': json['assetId'],
|
|
381
|
-
'discountedCmrr': json['discountedCmrr'],
|
|
382
367
|
};
|
|
383
368
|
}
|
|
384
369
|
|
|
@@ -404,7 +389,6 @@ export function SubscriptionChargeToJSONTyped(value?: SubscriptionCharge | null,
|
|
|
404
389
|
'priceBase': value['priceBase'],
|
|
405
390
|
'quantity': value['quantity'],
|
|
406
391
|
'includedUnits': value['includedUnits'],
|
|
407
|
-
'discount': value['discount'],
|
|
408
392
|
'effectivePrice': value['effectivePrice'],
|
|
409
393
|
'chargeType': value['chargeType'],
|
|
410
394
|
'billingPeriod': value['billingPeriod'],
|
|
@@ -438,7 +422,6 @@ export function SubscriptionChargeToJSONTyped(value?: SubscriptionCharge | null,
|
|
|
438
422
|
'customRecognitionEndDate': value['customRecognitionEndDate'],
|
|
439
423
|
'transactionPostingEntries': value['transactionPostingEntries'] == null ? undefined : ((value['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesToJSON)),
|
|
440
424
|
'assetId': value['assetId'],
|
|
441
|
-
'discountedCmrr': value['discountedCmrr'],
|
|
442
425
|
};
|
|
443
426
|
}
|
|
444
427
|
|
|
@@ -119,6 +119,12 @@ export interface UpdateProduct {
|
|
|
119
119
|
* @memberof UpdateProduct
|
|
120
120
|
*/
|
|
121
121
|
oneTimeCharge: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Product ID to use when writing off this product's charge
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof UpdateProduct
|
|
126
|
+
*/
|
|
127
|
+
writeOffProductId?: string;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
|
|
@@ -161,6 +167,7 @@ export function UpdateProductFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
161
167
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
162
168
|
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
163
169
|
'oneTimeCharge': json['oneTimeCharge'],
|
|
170
|
+
'writeOffProductId': json['writeOffProductId'] == null ? undefined : json['writeOffProductId'],
|
|
164
171
|
};
|
|
165
172
|
}
|
|
166
173
|
|
|
@@ -189,6 +196,7 @@ export function UpdateProductToJSONTyped(value?: UpdateProduct | null, ignoreDis
|
|
|
189
196
|
'incomeAccount': value['incomeAccount'],
|
|
190
197
|
'productTaxGroupName': value['productTaxGroupName'],
|
|
191
198
|
'oneTimeCharge': value['oneTimeCharge'],
|
|
199
|
+
'writeOffProductId': value['writeOffProductId'],
|
|
192
200
|
};
|
|
193
201
|
}
|
|
194
202
|
|
|
@@ -101,12 +101,6 @@ export interface UpdateSubscriptionCharge {
|
|
|
101
101
|
* @memberof UpdateSubscriptionCharge
|
|
102
102
|
*/
|
|
103
103
|
includedUnits?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Discount applied to product
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof UpdateSubscriptionCharge
|
|
108
|
-
*/
|
|
109
|
-
discount?: number;
|
|
110
104
|
/**
|
|
111
105
|
* Effective price of product
|
|
112
106
|
* @type {string}
|
|
@@ -336,7 +330,6 @@ export function UpdateSubscriptionChargeFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
336
330
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
337
331
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
338
332
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
339
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
340
333
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
341
334
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
342
335
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -395,7 +388,6 @@ export function UpdateSubscriptionChargeToJSONTyped(value?: UpdateSubscriptionCh
|
|
|
395
388
|
'priceBase': value['priceBase'],
|
|
396
389
|
'quantity': value['quantity'],
|
|
397
390
|
'includedUnits': value['includedUnits'],
|
|
398
|
-
'discount': value['discount'],
|
|
399
391
|
'effectivePrice': value['effectivePrice'],
|
|
400
392
|
'chargeType': value['chargeType'],
|
|
401
393
|
'billingPeriod': value['billingPeriod'],
|