@managespace/sdk 0.1.188 → 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 +28 -0
- package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
- package/dist/extensibility/functions/project/billing.js +10 -0
- package/dist/generated/apis/default-api.d.ts +13 -3
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +40 -5
- 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-site-custom.d.ts +12 -0
- package/dist/generated/models/create-site-custom.d.ts.map +1 -1
- package/dist/generated/models/create-site-custom.js +4 -0
- package/dist/generated/models/create-subscription-charge.d.ts +3 -9
- package/dist/generated/models/create-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/create-subscription-charge.js +3 -11
- 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/refund-invoice.d.ts +6 -0
- package/dist/generated/models/refund-invoice.d.ts.map +1 -1
- package/dist/generated/models/refund-invoice.js +2 -0
- package/dist/generated/models/site.d.ts +12 -0
- package/dist/generated/models/site.d.ts.map +1 -1
- package/dist/generated/models/site.js +8 -0
- package/dist/generated/models/subscription-charge.d.ts +3 -15
- package/dist/generated/models/subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/subscription-charge.js +3 -15
- 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 +8 -14
- package/dist/generated/models/update-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/update-subscription-charge.js +4 -10
- package/package.deploy.json +8 -4
- package/package.json +8 -4
- package/src/extensibility/functions/project/billing.ts +33 -0
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/default-api.ts +61 -6
- package/src/generated/models/create-credit.ts +17 -0
- package/src/generated/models/create-product-custom.ts +8 -0
- package/src/generated/models/create-site-custom.ts +16 -0
- package/src/generated/models/create-subscription-charge.ts +6 -17
- 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/refund-invoice.ts +8 -0
- package/src/generated/models/site.ts +18 -0
- package/src/generated/models/subscription-charge.ts +6 -26
- package/src/generated/models/update-product.ts +8 -0
- package/src/generated/models/update-subscription-charge.ts +12 -22
|
@@ -923,7 +923,7 @@ export interface GenerateAccountsReceivableReportRequest {
|
|
|
923
923
|
accountsReceivableReportFilters: AccountsReceivableReportFilters;
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
-
export interface
|
|
926
|
+
export interface GenerateAccrualExcelRequest {
|
|
927
927
|
accrualReportFilters: AccrualReportFilters;
|
|
928
928
|
}
|
|
929
929
|
|
|
@@ -1587,6 +1587,11 @@ export interface RefundPaymentRequest {
|
|
|
1587
1587
|
refundPayment: RefundPayment;
|
|
1588
1588
|
}
|
|
1589
1589
|
|
|
1590
|
+
export interface ReverseInvoiceRequest {
|
|
1591
|
+
invoiceId: string;
|
|
1592
|
+
sendEmail: boolean;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1590
1595
|
export interface SendEmailRequest {
|
|
1591
1596
|
sendEmail: SendEmail;
|
|
1592
1597
|
siteId?: string;
|
|
@@ -4365,11 +4370,11 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
4365
4370
|
|
|
4366
4371
|
/**
|
|
4367
4372
|
*/
|
|
4368
|
-
async
|
|
4373
|
+
async generateAccrualExcelRaw(requestParameters: GenerateAccrualExcelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
4369
4374
|
if (requestParameters['accrualReportFilters'] == null) {
|
|
4370
4375
|
throw new runtime.RequiredError(
|
|
4371
4376
|
'accrualReportFilters',
|
|
4372
|
-
'Required parameter "accrualReportFilters" was null or undefined when calling
|
|
4377
|
+
'Required parameter "accrualReportFilters" was null or undefined when calling generateAccrualExcel().'
|
|
4373
4378
|
);
|
|
4374
4379
|
}
|
|
4375
4380
|
|
|
@@ -4388,7 +4393,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
4388
4393
|
}
|
|
4389
4394
|
}
|
|
4390
4395
|
const response = await this.request({
|
|
4391
|
-
path: `/api/org/reports/accrual/
|
|
4396
|
+
path: `/api/org/reports/accrual/excel`,
|
|
4392
4397
|
method: 'POST',
|
|
4393
4398
|
headers: headerParameters,
|
|
4394
4399
|
query: queryParameters,
|
|
@@ -4400,8 +4405,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
4400
4405
|
|
|
4401
4406
|
/**
|
|
4402
4407
|
*/
|
|
4403
|
-
async
|
|
4404
|
-
await this.
|
|
4408
|
+
async generateAccrualExcel(requestParameters: GenerateAccrualExcelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
4409
|
+
await this.generateAccrualExcelRaw(requestParameters, initOverrides);
|
|
4405
4410
|
}
|
|
4406
4411
|
|
|
4407
4412
|
/**
|
|
@@ -10608,6 +10613,56 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
10608
10613
|
return await response.value();
|
|
10609
10614
|
}
|
|
10610
10615
|
|
|
10616
|
+
/**
|
|
10617
|
+
*/
|
|
10618
|
+
async reverseInvoiceRaw(requestParameters: ReverseInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Invoice>> {
|
|
10619
|
+
if (requestParameters['invoiceId'] == null) {
|
|
10620
|
+
throw new runtime.RequiredError(
|
|
10621
|
+
'invoiceId',
|
|
10622
|
+
'Required parameter "invoiceId" was null or undefined when calling reverseInvoice().'
|
|
10623
|
+
);
|
|
10624
|
+
}
|
|
10625
|
+
|
|
10626
|
+
if (requestParameters['sendEmail'] == null) {
|
|
10627
|
+
throw new runtime.RequiredError(
|
|
10628
|
+
'sendEmail',
|
|
10629
|
+
'Required parameter "sendEmail" was null or undefined when calling reverseInvoice().'
|
|
10630
|
+
);
|
|
10631
|
+
}
|
|
10632
|
+
|
|
10633
|
+
const queryParameters: any = {};
|
|
10634
|
+
|
|
10635
|
+
if (requestParameters['sendEmail'] != null) {
|
|
10636
|
+
queryParameters['sendEmail'] = requestParameters['sendEmail'];
|
|
10637
|
+
}
|
|
10638
|
+
|
|
10639
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
10640
|
+
|
|
10641
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10642
|
+
const token = this.configuration.accessToken;
|
|
10643
|
+
const tokenString = await token("bearer", []);
|
|
10644
|
+
|
|
10645
|
+
if (tokenString) {
|
|
10646
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
const response = await this.request({
|
|
10650
|
+
path: `/api/billing/invoices/{invoiceId}/reverse`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
|
|
10651
|
+
method: 'PUT',
|
|
10652
|
+
headers: headerParameters,
|
|
10653
|
+
query: queryParameters,
|
|
10654
|
+
}, initOverrides);
|
|
10655
|
+
|
|
10656
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvoiceFromJSON(jsonValue));
|
|
10657
|
+
}
|
|
10658
|
+
|
|
10659
|
+
/**
|
|
10660
|
+
*/
|
|
10661
|
+
async reverseInvoice(requestParameters: ReverseInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Invoice> {
|
|
10662
|
+
const response = await this.reverseInvoiceRaw(requestParameters, initOverrides);
|
|
10663
|
+
return await response.value();
|
|
10664
|
+
}
|
|
10665
|
+
|
|
10611
10666
|
/**
|
|
10612
10667
|
*/
|
|
10613
10668
|
async sendEmailRaw(requestParameters: SendEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Communication>> {
|
|
@@ -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
|
|
|
@@ -64,6 +64,18 @@ export interface CreateSiteCustom {
|
|
|
64
64
|
* @memberof CreateSiteCustom
|
|
65
65
|
*/
|
|
66
66
|
division?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Merchant identifier for payment processing
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof CreateSiteCustom
|
|
71
|
+
*/
|
|
72
|
+
merchantId?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Account number for payment processing
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof CreateSiteCustom
|
|
77
|
+
*/
|
|
78
|
+
accountNumber?: string | null;
|
|
67
79
|
/**
|
|
68
80
|
* Site address.
|
|
69
81
|
* @type {CreateAddress}
|
|
@@ -100,6 +112,8 @@ export function CreateSiteCustomFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
100
112
|
'phoneNumber': json['phoneNumber'],
|
|
101
113
|
'siteCode': json['siteCode'] == null ? undefined : json['siteCode'],
|
|
102
114
|
'division': json['division'] == null ? undefined : json['division'],
|
|
115
|
+
'merchantId': json['merchantId'] == null ? undefined : json['merchantId'],
|
|
116
|
+
'accountNumber': json['accountNumber'] == null ? undefined : json['accountNumber'],
|
|
103
117
|
'address': CreateAddressFromJSON(json['address']),
|
|
104
118
|
};
|
|
105
119
|
}
|
|
@@ -121,6 +135,8 @@ export function CreateSiteCustomToJSONTyped(value?: CreateSiteCustom | null, ign
|
|
|
121
135
|
'phoneNumber': value['phoneNumber'],
|
|
122
136
|
'siteCode': value['siteCode'],
|
|
123
137
|
'division': value['division'],
|
|
138
|
+
'merchantId': value['merchantId'],
|
|
139
|
+
'accountNumber': value['accountNumber'],
|
|
124
140
|
'address': CreateAddressToJSON(value['address']),
|
|
125
141
|
};
|
|
126
142
|
}
|
|
@@ -52,7 +52,7 @@ export interface CreateSubscriptionCharge {
|
|
|
52
52
|
* @type {string}
|
|
53
53
|
* @memberof CreateSubscriptionCharge
|
|
54
54
|
*/
|
|
55
|
-
planId
|
|
55
|
+
planId?: string;
|
|
56
56
|
/**
|
|
57
57
|
* Name of plan
|
|
58
58
|
* @type {string}
|
|
@@ -64,13 +64,13 @@ export interface CreateSubscriptionCharge {
|
|
|
64
64
|
* @type {string}
|
|
65
65
|
* @memberof CreateSubscriptionCharge
|
|
66
66
|
*/
|
|
67
|
-
chargeId
|
|
67
|
+
chargeId?: string;
|
|
68
68
|
/**
|
|
69
69
|
* Name of charge
|
|
70
70
|
* @type {string}
|
|
71
71
|
* @memberof CreateSubscriptionCharge
|
|
72
72
|
*/
|
|
73
|
-
chargeName
|
|
73
|
+
chargeName?: string;
|
|
74
74
|
/**
|
|
75
75
|
* How charge will be priced
|
|
76
76
|
* @type {string}
|
|
@@ -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}
|
|
@@ -312,9 +306,6 @@ export interface CreateSubscriptionCharge {
|
|
|
312
306
|
*/
|
|
313
307
|
export function instanceOfCreateSubscriptionCharge(value: object): value is CreateSubscriptionCharge {
|
|
314
308
|
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
315
|
-
if (!('planId' in value) || value['planId'] === undefined) return false;
|
|
316
|
-
if (!('chargeId' in value) || value['chargeId'] === undefined) return false;
|
|
317
|
-
if (!('chargeName' in value) || value['chargeName'] === undefined) return false;
|
|
318
309
|
if (!('assetId' in value) || value['assetId'] === undefined) return false;
|
|
319
310
|
return true;
|
|
320
311
|
}
|
|
@@ -331,16 +322,15 @@ export function CreateSubscriptionChargeFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
331
322
|
|
|
332
323
|
'productId': json['productId'],
|
|
333
324
|
'productName': json['productName'] == null ? undefined : json['productName'],
|
|
334
|
-
'planId': json['planId'],
|
|
325
|
+
'planId': json['planId'] == null ? undefined : json['planId'],
|
|
335
326
|
'planName': json['planName'] == null ? undefined : json['planName'],
|
|
336
|
-
'chargeId': json['chargeId'],
|
|
337
|
-
'chargeName': json['chargeName'],
|
|
327
|
+
'chargeId': json['chargeId'] == null ? undefined : json['chargeId'],
|
|
328
|
+
'chargeName': json['chargeName'] == null ? undefined : json['chargeName'],
|
|
338
329
|
'pricingModel': json['pricingModel'] == null ? undefined : json['pricingModel'],
|
|
339
330
|
'listPrice': json['listPrice'] == null ? undefined : json['listPrice'],
|
|
340
331
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
341
332
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
342
333
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
343
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
344
334
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
345
335
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
346
336
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -399,7 +389,6 @@ export function CreateSubscriptionChargeToJSONTyped(value?: CreateSubscriptionCh
|
|
|
399
389
|
'priceBase': value['priceBase'],
|
|
400
390
|
'quantity': value['quantity'],
|
|
401
391
|
'includedUnits': value['includedUnits'],
|
|
402
|
-
'discount': value['discount'],
|
|
403
392
|
'effectivePrice': value['effectivePrice'],
|
|
404
393
|
'chargeType': value['chargeType'],
|
|
405
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
|
|
|
@@ -44,6 +44,12 @@ export interface RefundInvoice {
|
|
|
44
44
|
* @memberof RefundInvoice
|
|
45
45
|
*/
|
|
46
46
|
refundType: string;
|
|
47
|
+
/**
|
|
48
|
+
* Originating payment ID for Electronic refunds on credit invoices
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof RefundInvoice
|
|
51
|
+
*/
|
|
52
|
+
paymentId?: string;
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
/**
|
|
@@ -71,6 +77,7 @@ export function RefundInvoiceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
71
77
|
'refundDate': json['refundDate'],
|
|
72
78
|
'refundAmount': json['refundAmount'],
|
|
73
79
|
'refundType': json['refundType'],
|
|
80
|
+
'paymentId': json['paymentId'] == null ? undefined : json['paymentId'],
|
|
74
81
|
};
|
|
75
82
|
}
|
|
76
83
|
|
|
@@ -89,6 +96,7 @@ export function RefundInvoiceToJSONTyped(value?: RefundInvoice | null, ignoreDis
|
|
|
89
96
|
'refundDate': value['refundDate'],
|
|
90
97
|
'refundAmount': value['refundAmount'],
|
|
91
98
|
'refundType': value['refundType'],
|
|
99
|
+
'paymentId': value['paymentId'],
|
|
92
100
|
};
|
|
93
101
|
}
|
|
94
102
|
|
|
@@ -309,6 +309,18 @@ export interface Site {
|
|
|
309
309
|
* @memberof Site
|
|
310
310
|
*/
|
|
311
311
|
division: string | null;
|
|
312
|
+
/**
|
|
313
|
+
* Merchant identifier for payment processing
|
|
314
|
+
* @type {string}
|
|
315
|
+
* @memberof Site
|
|
316
|
+
*/
|
|
317
|
+
merchantId: string | null;
|
|
318
|
+
/**
|
|
319
|
+
* Account number for payment processing
|
|
320
|
+
* @type {string}
|
|
321
|
+
* @memberof Site
|
|
322
|
+
*/
|
|
323
|
+
accountNumber: string | null;
|
|
312
324
|
/**
|
|
313
325
|
* When onboarding was completed for this site
|
|
314
326
|
* @type {Date}
|
|
@@ -330,6 +342,8 @@ export function instanceOfSite(value: object): value is Site {
|
|
|
330
342
|
if (!('addressId' in value) || value['addressId'] === undefined) return false;
|
|
331
343
|
if (!('siteCode' in value) || value['siteCode'] === undefined) return false;
|
|
332
344
|
if (!('division' in value) || value['division'] === undefined) return false;
|
|
345
|
+
if (!('merchantId' in value) || value['merchantId'] === undefined) return false;
|
|
346
|
+
if (!('accountNumber' in value) || value['accountNumber'] === undefined) return false;
|
|
333
347
|
if (!('onboardCompletedAt' in value) || value['onboardCompletedAt'] === undefined) return false;
|
|
334
348
|
return true;
|
|
335
349
|
}
|
|
@@ -371,6 +385,8 @@ export function SiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): Site
|
|
|
371
385
|
'siteRoles': json['siteRoles'] == null ? undefined : ((json['siteRoles'] as Array<any>).map(SiteRoleFromJSON)),
|
|
372
386
|
'siteCode': json['siteCode'],
|
|
373
387
|
'division': json['division'],
|
|
388
|
+
'merchantId': json['merchantId'],
|
|
389
|
+
'accountNumber': json['accountNumber'],
|
|
374
390
|
'onboardCompletedAt': (json['onboardCompletedAt'] == null ? null : new Date(json['onboardCompletedAt'])),
|
|
375
391
|
};
|
|
376
392
|
}
|
|
@@ -413,6 +429,8 @@ export function SiteToJSONTyped(value?: Site | null, ignoreDiscriminator: boolea
|
|
|
413
429
|
'siteRoles': value['siteRoles'] == null ? undefined : ((value['siteRoles'] as Array<any>).map(SiteRoleToJSON)),
|
|
414
430
|
'siteCode': value['siteCode'],
|
|
415
431
|
'division': value['division'],
|
|
432
|
+
'merchantId': value['merchantId'],
|
|
433
|
+
'accountNumber': value['accountNumber'],
|
|
416
434
|
'onboardCompletedAt': (value['onboardCompletedAt'] == null ? null : (value['onboardCompletedAt'] as any).toISOString()),
|
|
417
435
|
};
|
|
418
436
|
}
|