@vendasta/billing 14.49.0 → 14.51.0
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/esm2022/lib/_internal/enums/index.mjs +2 -2
- package/esm2022/lib/_internal/enums/invoice.enum.mjs +4 -1
- package/esm2022/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2022/lib/_internal/interfaces/invoice.interface.mjs +1 -1
- package/esm2022/lib/_internal/objects/index.mjs +2 -2
- package/esm2022/lib/_internal/objects/invoice.mjs +11 -1
- package/fesm2022/vendasta-billing.mjs +232 -220
- package/fesm2022/vendasta-billing.mjs.map +1 -1
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/invoice.enum.d.ts +4 -1
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/interfaces/invoice.interface.d.ts +3 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/objects/invoice.d.ts +3 -0
- package/package.json +1 -1
|
@@ -300,6 +300,20 @@ var RecurringInvoiceStatus;
|
|
|
300
300
|
RecurringInvoiceStatus[RecurringInvoiceStatus["RECURRING_INVOICE_STATUS_ARCHIVED"] = 3] = "RECURRING_INVOICE_STATUS_ARCHIVED";
|
|
301
301
|
})(RecurringInvoiceStatus || (RecurringInvoiceStatus = {}));
|
|
302
302
|
|
|
303
|
+
// *********************************
|
|
304
|
+
// Code generated by sdkgen
|
|
305
|
+
// DO NOT EDIT!.
|
|
306
|
+
//
|
|
307
|
+
// Enums.
|
|
308
|
+
// *********************************
|
|
309
|
+
var DisplayOption;
|
|
310
|
+
(function (DisplayOption) {
|
|
311
|
+
DisplayOption[DisplayOption["DISPLAY_OPTION_INVALID"] = 0] = "DISPLAY_OPTION_INVALID";
|
|
312
|
+
DisplayOption[DisplayOption["SHOW_CONTENT_SHOW_PRICES"] = 1] = "SHOW_CONTENT_SHOW_PRICES";
|
|
313
|
+
DisplayOption[DisplayOption["SHOW_CONTENT_HIDE_PRICES"] = 2] = "SHOW_CONTENT_HIDE_PRICES";
|
|
314
|
+
DisplayOption[DisplayOption["HIDE_CONTENT_HIDE_PRICES"] = 3] = "HIDE_CONTENT_HIDE_PRICES";
|
|
315
|
+
})(DisplayOption || (DisplayOption = {}));
|
|
316
|
+
|
|
303
317
|
// *********************************
|
|
304
318
|
// Code generated by sdkgen
|
|
305
319
|
// DO NOT EDIT!.
|
|
@@ -338,6 +352,9 @@ var ProcessingFailureCode;
|
|
|
338
352
|
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_UNSET"] = 0] = "PROCESSING_FAILURE_CODE_UNSET";
|
|
339
353
|
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_TAX_CALCULATION_INVALID_ADDRESS"] = 1] = "PROCESSING_FAILURE_CODE_TAX_CALCULATION_INVALID_ADDRESS";
|
|
340
354
|
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_TAX_CALCULATION_GENERAL_ERROR"] = 2] = "PROCESSING_FAILURE_CODE_TAX_CALCULATION_GENERAL_ERROR";
|
|
355
|
+
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_UNABLE_TO_CHARGE_OR_SEND"] = 3] = "PROCESSING_FAILURE_CODE_UNABLE_TO_CHARGE_OR_SEND";
|
|
356
|
+
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_UNABLE_TO_SEND"] = 4] = "PROCESSING_FAILURE_CODE_UNABLE_TO_SEND";
|
|
357
|
+
ProcessingFailureCode[ProcessingFailureCode["PROCESSING_FAILURE_CODE_UNABLE_TO_CHARGE"] = 5] = "PROCESSING_FAILURE_CODE_UNABLE_TO_CHARGE";
|
|
341
358
|
})(ProcessingFailureCode || (ProcessingFailureCode = {}));
|
|
342
359
|
|
|
343
360
|
// *********************************
|
|
@@ -747,20 +764,6 @@ var CreditNoteReason;
|
|
|
747
764
|
CreditNoteReason[CreditNoteReason["CREDIT_NOTE_REASON_OTHER"] = 4] = "CREDIT_NOTE_REASON_OTHER";
|
|
748
765
|
})(CreditNoteReason || (CreditNoteReason = {}));
|
|
749
766
|
|
|
750
|
-
// *********************************
|
|
751
|
-
// Code generated by sdkgen
|
|
752
|
-
// DO NOT EDIT!.
|
|
753
|
-
//
|
|
754
|
-
// Enums.
|
|
755
|
-
// *********************************
|
|
756
|
-
var DisplayOption;
|
|
757
|
-
(function (DisplayOption) {
|
|
758
|
-
DisplayOption[DisplayOption["DISPLAY_OPTION_INVALID"] = 0] = "DISPLAY_OPTION_INVALID";
|
|
759
|
-
DisplayOption[DisplayOption["SHOW_CONTENT_SHOW_PRICES"] = 1] = "SHOW_CONTENT_SHOW_PRICES";
|
|
760
|
-
DisplayOption[DisplayOption["SHOW_CONTENT_HIDE_PRICES"] = 2] = "SHOW_CONTENT_HIDE_PRICES";
|
|
761
|
-
DisplayOption[DisplayOption["HIDE_CONTENT_HIDE_PRICES"] = 3] = "HIDE_CONTENT_HIDE_PRICES";
|
|
762
|
-
})(DisplayOption || (DisplayOption = {}));
|
|
763
|
-
|
|
764
767
|
// *********************************
|
|
765
768
|
// Code generated by sdkgen
|
|
766
769
|
// DO NOT EDIT!.
|
|
@@ -6708,6 +6711,85 @@ function enumStringToValue$q(enumRef, value) {
|
|
|
6708
6711
|
}
|
|
6709
6712
|
return enumRef[value];
|
|
6710
6713
|
}
|
|
6714
|
+
class CreateRetailSubscriptionGroupRequest {
|
|
6715
|
+
static fromProto(proto) {
|
|
6716
|
+
let m = new CreateRetailSubscriptionGroupRequest();
|
|
6717
|
+
m = Object.assign(m, proto);
|
|
6718
|
+
if (proto.retailSubscriptionGroup) {
|
|
6719
|
+
m.retailSubscriptionGroup = RetailSubscriptionGroup.fromProto(proto.retailSubscriptionGroup);
|
|
6720
|
+
}
|
|
6721
|
+
return m;
|
|
6722
|
+
}
|
|
6723
|
+
constructor(kwargs) {
|
|
6724
|
+
if (!kwargs) {
|
|
6725
|
+
return;
|
|
6726
|
+
}
|
|
6727
|
+
Object.assign(this, kwargs);
|
|
6728
|
+
}
|
|
6729
|
+
toApiJson() {
|
|
6730
|
+
const toReturn = {};
|
|
6731
|
+
if (typeof this.retailSubscriptionGroup !== 'undefined' && this.retailSubscriptionGroup !== null) {
|
|
6732
|
+
toReturn['retailSubscriptionGroup'] = 'toApiJson' in this.retailSubscriptionGroup ? this.retailSubscriptionGroup.toApiJson() : this.retailSubscriptionGroup;
|
|
6733
|
+
}
|
|
6734
|
+
return toReturn;
|
|
6735
|
+
}
|
|
6736
|
+
}
|
|
6737
|
+
class CreateRetailSubscriptionGroupResponse {
|
|
6738
|
+
static fromProto(proto) {
|
|
6739
|
+
let m = new CreateRetailSubscriptionGroupResponse();
|
|
6740
|
+
m = Object.assign(m, proto);
|
|
6741
|
+
return m;
|
|
6742
|
+
}
|
|
6743
|
+
constructor(kwargs) {
|
|
6744
|
+
if (!kwargs) {
|
|
6745
|
+
return;
|
|
6746
|
+
}
|
|
6747
|
+
Object.assign(this, kwargs);
|
|
6748
|
+
}
|
|
6749
|
+
toApiJson() {
|
|
6750
|
+
const toReturn = {};
|
|
6751
|
+
if (typeof this.id !== 'undefined') {
|
|
6752
|
+
toReturn['id'] = this.id;
|
|
6753
|
+
}
|
|
6754
|
+
return toReturn;
|
|
6755
|
+
}
|
|
6756
|
+
}
|
|
6757
|
+
class RetailSubscriptionGroup {
|
|
6758
|
+
static fromProto(proto) {
|
|
6759
|
+
let m = new RetailSubscriptionGroup();
|
|
6760
|
+
m = Object.assign(m, proto);
|
|
6761
|
+
if (proto.displayOption) {
|
|
6762
|
+
m.displayOption = enumStringToValue$q(DisplayOption, proto.displayOption);
|
|
6763
|
+
}
|
|
6764
|
+
return m;
|
|
6765
|
+
}
|
|
6766
|
+
constructor(kwargs) {
|
|
6767
|
+
if (!kwargs) {
|
|
6768
|
+
return;
|
|
6769
|
+
}
|
|
6770
|
+
Object.assign(this, kwargs);
|
|
6771
|
+
}
|
|
6772
|
+
toApiJson() {
|
|
6773
|
+
const toReturn = {};
|
|
6774
|
+
if (typeof this.id !== 'undefined') {
|
|
6775
|
+
toReturn['id'] = this.id;
|
|
6776
|
+
}
|
|
6777
|
+
if (typeof this.name !== 'undefined') {
|
|
6778
|
+
toReturn['name'] = this.name;
|
|
6779
|
+
}
|
|
6780
|
+
if (typeof this.displayOption !== 'undefined') {
|
|
6781
|
+
toReturn['displayOption'] = this.displayOption;
|
|
6782
|
+
}
|
|
6783
|
+
return toReturn;
|
|
6784
|
+
}
|
|
6785
|
+
}
|
|
6786
|
+
|
|
6787
|
+
function enumStringToValue$p(enumRef, value) {
|
|
6788
|
+
if (typeof value === 'number') {
|
|
6789
|
+
return value;
|
|
6790
|
+
}
|
|
6791
|
+
return enumRef[value];
|
|
6792
|
+
}
|
|
6711
6793
|
class AddBundleRequest {
|
|
6712
6794
|
static fromProto(proto) {
|
|
6713
6795
|
let m = new AddBundleRequest();
|
|
@@ -6847,7 +6929,7 @@ class AppliedCreditNote {
|
|
|
6847
6929
|
m.amount = parseInt(proto.amount, 10);
|
|
6848
6930
|
}
|
|
6849
6931
|
if (proto.creditNoteType) {
|
|
6850
|
-
m.creditNoteType = enumStringToValue$
|
|
6932
|
+
m.creditNoteType = enumStringToValue$p(CreditNoteType, proto.creditNoteType);
|
|
6851
6933
|
}
|
|
6852
6934
|
return m;
|
|
6853
6935
|
}
|
|
@@ -6911,10 +6993,10 @@ class CreateInvoiceRequest {
|
|
|
6911
6993
|
m.items = proto.items.map(InvoiceItem.fromProto);
|
|
6912
6994
|
}
|
|
6913
6995
|
if (proto.collectionMethod) {
|
|
6914
|
-
m.collectionMethod = enumStringToValue$
|
|
6996
|
+
m.collectionMethod = enumStringToValue$p(CollectionMethod, proto.collectionMethod);
|
|
6915
6997
|
}
|
|
6916
6998
|
if (proto.origin) {
|
|
6917
|
-
m.origin = enumStringToValue$
|
|
6999
|
+
m.origin = enumStringToValue$p(Origin, proto.origin);
|
|
6918
7000
|
}
|
|
6919
7001
|
if (proto.issued) {
|
|
6920
7002
|
m.issued = new Date(proto.issued);
|
|
@@ -7080,7 +7162,7 @@ class ListInvoicesRequestFiltersDateFilter {
|
|
|
7080
7162
|
let m = new ListInvoicesRequestFiltersDateFilter();
|
|
7081
7163
|
m = Object.assign(m, proto);
|
|
7082
7164
|
if (proto.dateField) {
|
|
7083
|
-
m.dateField = enumStringToValue$
|
|
7165
|
+
m.dateField = enumStringToValue$p(ListInvoicesRequestFiltersDateFilterDateField, proto.dateField);
|
|
7084
7166
|
}
|
|
7085
7167
|
if (proto.dateLte) {
|
|
7086
7168
|
m.dateLte = new Date(proto.dateLte);
|
|
@@ -7230,13 +7312,13 @@ class ListInvoicesRequestFilters {
|
|
|
7230
7312
|
let m = new ListInvoicesRequestFilters();
|
|
7231
7313
|
m = Object.assign(m, proto);
|
|
7232
7314
|
if (proto.statuses) {
|
|
7233
|
-
m.statuses = proto.statuses.map((v) => enumStringToValue$
|
|
7315
|
+
m.statuses = proto.statuses.map((v) => enumStringToValue$p(InvoiceStatus, v));
|
|
7234
7316
|
}
|
|
7235
7317
|
if (proto.dateFilter) {
|
|
7236
7318
|
m.dateFilter = ListInvoicesRequestFiltersDateFilter.fromProto(proto.dateFilter);
|
|
7237
7319
|
}
|
|
7238
7320
|
if (proto.lastPaymentStatuses) {
|
|
7239
|
-
m.lastPaymentStatuses = proto.lastPaymentStatuses.map((v) => enumStringToValue$
|
|
7321
|
+
m.lastPaymentStatuses = proto.lastPaymentStatuses.map((v) => enumStringToValue$p(LastPaymentStatus, v));
|
|
7240
7322
|
}
|
|
7241
7323
|
return m;
|
|
7242
7324
|
}
|
|
@@ -7427,7 +7509,7 @@ class Invoice {
|
|
|
7427
7509
|
let m = new Invoice();
|
|
7428
7510
|
m = Object.assign(m, proto);
|
|
7429
7511
|
if (proto.status) {
|
|
7430
|
-
m.status = enumStringToValue$
|
|
7512
|
+
m.status = enumStringToValue$p(InvoiceStatus, proto.status);
|
|
7431
7513
|
}
|
|
7432
7514
|
if (proto.subtotal) {
|
|
7433
7515
|
m.subtotal = parseInt(proto.subtotal, 10);
|
|
@@ -7454,7 +7536,7 @@ class Invoice {
|
|
|
7454
7536
|
m.items = proto.items.map(InvoiceItem.fromProto);
|
|
7455
7537
|
}
|
|
7456
7538
|
if (proto.currency) {
|
|
7457
|
-
m.currency = enumStringToValue$
|
|
7539
|
+
m.currency = enumStringToValue$p(Currency, proto.currency);
|
|
7458
7540
|
}
|
|
7459
7541
|
if (proto.paid) {
|
|
7460
7542
|
m.paid = new Date(proto.paid);
|
|
@@ -7487,10 +7569,10 @@ class Invoice {
|
|
|
7487
7569
|
m.autoAdvance = new Date(proto.autoAdvance);
|
|
7488
7570
|
}
|
|
7489
7571
|
if (proto.paymentMethodTypes) {
|
|
7490
|
-
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$
|
|
7572
|
+
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$p(PaymentMethodType, v));
|
|
7491
7573
|
}
|
|
7492
7574
|
if (proto.lastPaymentStatus) {
|
|
7493
|
-
m.lastPaymentStatus = enumStringToValue$
|
|
7575
|
+
m.lastPaymentStatus = enumStringToValue$p(LastPaymentStatus, proto.lastPaymentStatus);
|
|
7494
7576
|
}
|
|
7495
7577
|
if (proto.amountOwing) {
|
|
7496
7578
|
m.amountOwing = parseInt(proto.amountOwing, 10);
|
|
@@ -7499,7 +7581,10 @@ class Invoice {
|
|
|
7499
7581
|
m.appliedCreditNotes = proto.appliedCreditNotes.map(AppliedCreditNote.fromProto);
|
|
7500
7582
|
}
|
|
7501
7583
|
if (proto.processingFailureCode) {
|
|
7502
|
-
m.processingFailureCode = enumStringToValue$
|
|
7584
|
+
m.processingFailureCode = enumStringToValue$p(ProcessingFailureCode, proto.processingFailureCode);
|
|
7585
|
+
}
|
|
7586
|
+
if (proto.retailSubscriptionGroups) {
|
|
7587
|
+
m.retailSubscriptionGroups = proto.retailSubscriptionGroups.map(RetailSubscriptionGroup.fromProto);
|
|
7503
7588
|
}
|
|
7504
7589
|
return m;
|
|
7505
7590
|
}
|
|
@@ -7625,6 +7710,9 @@ class Invoice {
|
|
|
7625
7710
|
if (typeof this.processingFailureCode !== 'undefined') {
|
|
7626
7711
|
toReturn['processingFailureCode'] = this.processingFailureCode;
|
|
7627
7712
|
}
|
|
7713
|
+
if (typeof this.retailSubscriptionGroups !== 'undefined' && this.retailSubscriptionGroups !== null) {
|
|
7714
|
+
toReturn['retailSubscriptionGroups'] = 'toApiJson' in this.retailSubscriptionGroups ? this.retailSubscriptionGroups.toApiJson() : this.retailSubscriptionGroups;
|
|
7715
|
+
}
|
|
7628
7716
|
return toReturn;
|
|
7629
7717
|
}
|
|
7630
7718
|
}
|
|
@@ -7714,6 +7802,9 @@ class InvoiceItem {
|
|
|
7714
7802
|
if (typeof this.retailSubscriptionGroup !== 'undefined' && this.retailSubscriptionGroup !== null) {
|
|
7715
7803
|
toReturn['retailSubscriptionGroup'] = 'toApiJson' in this.retailSubscriptionGroup ? this.retailSubscriptionGroup.toApiJson() : this.retailSubscriptionGroup;
|
|
7716
7804
|
}
|
|
7805
|
+
if (typeof this.retailSubscriptionGroupId !== 'undefined') {
|
|
7806
|
+
toReturn['retailSubscriptionGroupId'] = this.retailSubscriptionGroupId;
|
|
7807
|
+
}
|
|
7717
7808
|
return toReturn;
|
|
7718
7809
|
}
|
|
7719
7810
|
}
|
|
@@ -8208,7 +8299,7 @@ class VoidInvoiceRequest {
|
|
|
8208
8299
|
}
|
|
8209
8300
|
}
|
|
8210
8301
|
|
|
8211
|
-
function enumStringToValue$
|
|
8302
|
+
function enumStringToValue$o(enumRef, value) {
|
|
8212
8303
|
if (typeof value === 'number') {
|
|
8213
8304
|
return value;
|
|
8214
8305
|
}
|
|
@@ -8302,7 +8393,7 @@ class BalanceAmount {
|
|
|
8302
8393
|
}
|
|
8303
8394
|
}
|
|
8304
8395
|
|
|
8305
|
-
function enumStringToValue$
|
|
8396
|
+
function enumStringToValue$n(enumRef, value) {
|
|
8306
8397
|
if (typeof value === 'number') {
|
|
8307
8398
|
return value;
|
|
8308
8399
|
}
|
|
@@ -8338,7 +8429,7 @@ class DateRange {
|
|
|
8338
8429
|
}
|
|
8339
8430
|
}
|
|
8340
8431
|
|
|
8341
|
-
function enumStringToValue$
|
|
8432
|
+
function enumStringToValue$m(enumRef, value) {
|
|
8342
8433
|
if (typeof value === 'number') {
|
|
8343
8434
|
return value;
|
|
8344
8435
|
}
|
|
@@ -8439,13 +8530,13 @@ class Payout {
|
|
|
8439
8530
|
m.amount = parseInt(proto.amount, 10);
|
|
8440
8531
|
}
|
|
8441
8532
|
if (proto.currency) {
|
|
8442
|
-
m.currency = enumStringToValue$
|
|
8533
|
+
m.currency = enumStringToValue$m(Currency, proto.currency);
|
|
8443
8534
|
}
|
|
8444
8535
|
if (proto.status) {
|
|
8445
|
-
m.status = enumStringToValue$
|
|
8536
|
+
m.status = enumStringToValue$m(PayoutStatus, proto.status);
|
|
8446
8537
|
}
|
|
8447
8538
|
if (proto.type) {
|
|
8448
|
-
m.type = enumStringToValue$
|
|
8539
|
+
m.type = enumStringToValue$m(PayoutType, proto.type);
|
|
8449
8540
|
}
|
|
8450
8541
|
return m;
|
|
8451
8542
|
}
|
|
@@ -8547,10 +8638,10 @@ class RetailPayout {
|
|
|
8547
8638
|
m.amount = parseInt(proto.amount, 10);
|
|
8548
8639
|
}
|
|
8549
8640
|
if (proto.status) {
|
|
8550
|
-
m.status = enumStringToValue$
|
|
8641
|
+
m.status = enumStringToValue$m(PayoutStatus, proto.status);
|
|
8551
8642
|
}
|
|
8552
8643
|
if (proto.type) {
|
|
8553
|
-
m.type = enumStringToValue$
|
|
8644
|
+
m.type = enumStringToValue$m(PayoutType, proto.type);
|
|
8554
8645
|
}
|
|
8555
8646
|
return m;
|
|
8556
8647
|
}
|
|
@@ -8599,7 +8690,7 @@ class RetailPayout {
|
|
|
8599
8690
|
}
|
|
8600
8691
|
}
|
|
8601
8692
|
|
|
8602
|
-
function enumStringToValue$
|
|
8693
|
+
function enumStringToValue$l(enumRef, value) {
|
|
8603
8694
|
if (typeof value === 'number') {
|
|
8604
8695
|
return value;
|
|
8605
8696
|
}
|
|
@@ -8714,7 +8805,7 @@ class CreateMerchantRequest {
|
|
|
8714
8805
|
m.includeInFinancialRecords = CreateMerchantRequestIncludeInFinancialRecords.fromProto(proto.includeInFinancialRecords);
|
|
8715
8806
|
}
|
|
8716
8807
|
if (proto.merchantType) {
|
|
8717
|
-
m.merchantType = enumStringToValue$
|
|
8808
|
+
m.merchantType = enumStringToValue$l(MerchantType, proto.merchantType);
|
|
8718
8809
|
}
|
|
8719
8810
|
return m;
|
|
8720
8811
|
}
|
|
@@ -8978,7 +9069,7 @@ class GetOutstandingBalanceResponse {
|
|
|
8978
9069
|
m.outstandingBalance = parseInt(proto.outstandingBalance, 10);
|
|
8979
9070
|
}
|
|
8980
9071
|
if (proto.currency) {
|
|
8981
|
-
m.currency = enumStringToValue$
|
|
9072
|
+
m.currency = enumStringToValue$l(Currency, proto.currency);
|
|
8982
9073
|
}
|
|
8983
9074
|
return m;
|
|
8984
9075
|
}
|
|
@@ -9289,7 +9380,7 @@ class Merchant {
|
|
|
9289
9380
|
let m = new Merchant();
|
|
9290
9381
|
m = Object.assign(m, proto);
|
|
9291
9382
|
if (proto.merchantType) {
|
|
9292
|
-
m.merchantType = enumStringToValue$
|
|
9383
|
+
m.merchantType = enumStringToValue$l(MerchantType, proto.merchantType);
|
|
9293
9384
|
}
|
|
9294
9385
|
return m;
|
|
9295
9386
|
}
|
|
@@ -9444,10 +9535,10 @@ class SearchMerchantsRequest {
|
|
|
9444
9535
|
let m = new SearchMerchantsRequest();
|
|
9445
9536
|
m = Object.assign(m, proto);
|
|
9446
9537
|
if (proto.sortBy) {
|
|
9447
|
-
m.sortBy = enumStringToValue$
|
|
9538
|
+
m.sortBy = enumStringToValue$l(SearchMerchantsRequestSortBy, proto.sortBy);
|
|
9448
9539
|
}
|
|
9449
9540
|
if (proto.sortDirection) {
|
|
9450
|
-
m.sortDirection = enumStringToValue$
|
|
9541
|
+
m.sortDirection = enumStringToValue$l(SortDirection, proto.sortDirection);
|
|
9451
9542
|
}
|
|
9452
9543
|
if (proto.pagingOptions) {
|
|
9453
9544
|
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
@@ -9655,7 +9746,7 @@ class UpdateMerchantRequest {
|
|
|
9655
9746
|
m.includeInFinancialRecords = UpdateMerchantRequestIncludeInFinancialRecords.fromProto(proto.includeInFinancialRecords);
|
|
9656
9747
|
}
|
|
9657
9748
|
if (proto.merchantType) {
|
|
9658
|
-
m.merchantType = enumStringToValue$
|
|
9749
|
+
m.merchantType = enumStringToValue$l(MerchantType, proto.merchantType);
|
|
9659
9750
|
}
|
|
9660
9751
|
return m;
|
|
9661
9752
|
}
|
|
@@ -9780,7 +9871,7 @@ class UpsertRetailConfigurationRequest {
|
|
|
9780
9871
|
}
|
|
9781
9872
|
}
|
|
9782
9873
|
|
|
9783
|
-
function enumStringToValue$
|
|
9874
|
+
function enumStringToValue$k(enumRef, value) {
|
|
9784
9875
|
if (typeof value === 'number') {
|
|
9785
9876
|
return value;
|
|
9786
9877
|
}
|
|
@@ -9849,13 +9940,13 @@ class MerchantReport {
|
|
|
9849
9940
|
m.year = parseInt(proto.year, 10);
|
|
9850
9941
|
}
|
|
9851
9942
|
if (proto.month) {
|
|
9852
|
-
m.month = enumStringToValue$
|
|
9943
|
+
m.month = enumStringToValue$k(Month, proto.month);
|
|
9853
9944
|
}
|
|
9854
9945
|
if (proto.created) {
|
|
9855
9946
|
m.created = new Date(proto.created);
|
|
9856
9947
|
}
|
|
9857
9948
|
if (proto.status) {
|
|
9858
|
-
m.status = enumStringToValue$
|
|
9949
|
+
m.status = enumStringToValue$k(MerchantReportStatus, proto.status);
|
|
9859
9950
|
}
|
|
9860
9951
|
return m;
|
|
9861
9952
|
}
|
|
@@ -9886,7 +9977,7 @@ class MerchantReport {
|
|
|
9886
9977
|
}
|
|
9887
9978
|
}
|
|
9888
9979
|
|
|
9889
|
-
function enumStringToValue$
|
|
9980
|
+
function enumStringToValue$j(enumRef, value) {
|
|
9890
9981
|
if (typeof value === 'number') {
|
|
9891
9982
|
return value;
|
|
9892
9983
|
}
|
|
@@ -9983,7 +10074,7 @@ class TickComponentUsageRequest {
|
|
|
9983
10074
|
}
|
|
9984
10075
|
}
|
|
9985
10076
|
|
|
9986
|
-
function enumStringToValue$
|
|
10077
|
+
function enumStringToValue$i(enumRef, value) {
|
|
9987
10078
|
if (typeof value === 'number') {
|
|
9988
10079
|
return value;
|
|
9989
10080
|
}
|
|
@@ -10096,7 +10187,7 @@ class RetailPaymentCardDetails {
|
|
|
10096
10187
|
let m = new RetailPaymentCardDetails();
|
|
10097
10188
|
m = Object.assign(m, proto);
|
|
10098
10189
|
if (proto.cardType) {
|
|
10099
|
-
m.cardType = enumStringToValue$
|
|
10190
|
+
m.cardType = enumStringToValue$i(CardType, proto.cardType);
|
|
10100
10191
|
}
|
|
10101
10192
|
return m;
|
|
10102
10193
|
}
|
|
@@ -10145,7 +10236,7 @@ class ConfigureRetailPaymentProviderRequest {
|
|
|
10145
10236
|
let m = new ConfigureRetailPaymentProviderRequest();
|
|
10146
10237
|
m = Object.assign(m, proto);
|
|
10147
10238
|
if (proto.paymentFacilitatorType) {
|
|
10148
|
-
m.paymentFacilitatorType = enumStringToValue$
|
|
10239
|
+
m.paymentFacilitatorType = enumStringToValue$i(PaymentFacilitatorType, proto.paymentFacilitatorType);
|
|
10149
10240
|
}
|
|
10150
10241
|
return m;
|
|
10151
10242
|
}
|
|
@@ -10223,7 +10314,7 @@ class Dispute {
|
|
|
10223
10314
|
let m = new Dispute();
|
|
10224
10315
|
m = Object.assign(m, proto);
|
|
10225
10316
|
if (proto.status) {
|
|
10226
|
-
m.status = enumStringToValue$
|
|
10317
|
+
m.status = enumStringToValue$i(DisputeStatus, proto.status);
|
|
10227
10318
|
}
|
|
10228
10319
|
if (proto.amount) {
|
|
10229
10320
|
m.amount = parseInt(proto.amount, 10);
|
|
@@ -10241,7 +10332,7 @@ class Dispute {
|
|
|
10241
10332
|
m.fee = parseInt(proto.fee, 10);
|
|
10242
10333
|
}
|
|
10243
10334
|
if (proto.paymentReferenceType) {
|
|
10244
|
-
m.paymentReferenceType = enumStringToValue$
|
|
10335
|
+
m.paymentReferenceType = enumStringToValue$i(RetailPaymentReferenceType, proto.paymentReferenceType);
|
|
10245
10336
|
}
|
|
10246
10337
|
if (proto.paymentReceivedAt) {
|
|
10247
10338
|
m.paymentReceivedAt = new Date(proto.paymentReceivedAt);
|
|
@@ -10557,7 +10648,7 @@ class GetRetailPaymentProviderResponse {
|
|
|
10557
10648
|
let m = new GetRetailPaymentProviderResponse();
|
|
10558
10649
|
m = Object.assign(m, proto);
|
|
10559
10650
|
if (proto.paymentFacilitatorType) {
|
|
10560
|
-
m.paymentFacilitatorType = enumStringToValue$
|
|
10651
|
+
m.paymentFacilitatorType = enumStringToValue$i(PaymentFacilitatorType, proto.paymentFacilitatorType);
|
|
10561
10652
|
}
|
|
10562
10653
|
return m;
|
|
10563
10654
|
}
|
|
@@ -10771,7 +10862,7 @@ class ListRetailDisputesRequestListRetailDisputesFilters {
|
|
|
10771
10862
|
let m = new ListRetailDisputesRequestListRetailDisputesFilters();
|
|
10772
10863
|
m = Object.assign(m, proto);
|
|
10773
10864
|
if (proto.status) {
|
|
10774
|
-
m.status = enumStringToValue$
|
|
10865
|
+
m.status = enumStringToValue$i(DisputeStatus, proto.status);
|
|
10775
10866
|
}
|
|
10776
10867
|
return m;
|
|
10777
10868
|
}
|
|
@@ -10957,7 +11048,7 @@ class ListRetailTransactionsRequestListRetailTransactionsFilters {
|
|
|
10957
11048
|
m.createdDateLte = new Date(proto.createdDateLte);
|
|
10958
11049
|
}
|
|
10959
11050
|
if (proto.type) {
|
|
10960
|
-
m.type = enumStringToValue$
|
|
11051
|
+
m.type = enumStringToValue$i(RetailTransactionType, proto.type);
|
|
10961
11052
|
}
|
|
10962
11053
|
return m;
|
|
10963
11054
|
}
|
|
@@ -11091,10 +11182,10 @@ class Payment {
|
|
|
11091
11182
|
m.created = new Date(proto.created);
|
|
11092
11183
|
}
|
|
11093
11184
|
if (proto.currency) {
|
|
11094
|
-
m.currency = enumStringToValue$
|
|
11185
|
+
m.currency = enumStringToValue$i(Currency, proto.currency);
|
|
11095
11186
|
}
|
|
11096
11187
|
if (proto.paymentSource) {
|
|
11097
|
-
m.paymentSource = enumStringToValue$
|
|
11188
|
+
m.paymentSource = enumStringToValue$i(PaymentSource, proto.paymentSource);
|
|
11098
11189
|
}
|
|
11099
11190
|
if (proto.allocations) {
|
|
11100
11191
|
m.allocations = proto.allocations.map(PaymentPaymentAllocation.fromProto);
|
|
@@ -11103,7 +11194,7 @@ class Payment {
|
|
|
11103
11194
|
m.total = parseInt(proto.total, 10);
|
|
11104
11195
|
}
|
|
11105
11196
|
if (proto.status) {
|
|
11106
|
-
m.status = enumStringToValue$
|
|
11197
|
+
m.status = enumStringToValue$i(PaymentStatus, proto.status);
|
|
11107
11198
|
}
|
|
11108
11199
|
return m;
|
|
11109
11200
|
}
|
|
@@ -11153,7 +11244,7 @@ class PaymentPaymentAllocation {
|
|
|
11153
11244
|
m.amount = parseInt(proto.amount, 10);
|
|
11154
11245
|
}
|
|
11155
11246
|
if (proto.type) {
|
|
11156
|
-
m.type = enumStringToValue$
|
|
11247
|
+
m.type = enumStringToValue$i(PaymentAllocationType, proto.type);
|
|
11157
11248
|
}
|
|
11158
11249
|
return m;
|
|
11159
11250
|
}
|
|
@@ -11182,13 +11273,13 @@ class PaymentIntent {
|
|
|
11182
11273
|
let m = new PaymentIntent();
|
|
11183
11274
|
m = Object.assign(m, proto);
|
|
11184
11275
|
if (proto.paymentIntentStatus) {
|
|
11185
|
-
m.paymentIntentStatus = enumStringToValue$
|
|
11276
|
+
m.paymentIntentStatus = enumStringToValue$i(PaymentIntentStatus, proto.paymentIntentStatus);
|
|
11186
11277
|
}
|
|
11187
11278
|
if (proto.paymentMethodType) {
|
|
11188
|
-
m.paymentMethodType = enumStringToValue$
|
|
11279
|
+
m.paymentMethodType = enumStringToValue$i(PaymentMethodType, proto.paymentMethodType);
|
|
11189
11280
|
}
|
|
11190
11281
|
if (proto.lastErrorCode) {
|
|
11191
|
-
m.lastErrorCode = enumStringToValue$
|
|
11282
|
+
m.lastErrorCode = enumStringToValue$i(PaymentErrorCode, proto.lastErrorCode);
|
|
11192
11283
|
}
|
|
11193
11284
|
return m;
|
|
11194
11285
|
}
|
|
@@ -11220,7 +11311,7 @@ class PrepareRetailPaymentRequest {
|
|
|
11220
11311
|
m.order = PrepareRetailPaymentRequestOrder.fromProto(proto.order);
|
|
11221
11312
|
}
|
|
11222
11313
|
if (proto.paymentMethodTypes) {
|
|
11223
|
-
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$
|
|
11314
|
+
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$i(PaymentMethodType, v));
|
|
11224
11315
|
}
|
|
11225
11316
|
return m;
|
|
11226
11317
|
}
|
|
@@ -11287,7 +11378,7 @@ class RefundRetailPaymentRequest {
|
|
|
11287
11378
|
m.amount = parseInt(proto.amount, 10);
|
|
11288
11379
|
}
|
|
11289
11380
|
if (proto.reason) {
|
|
11290
|
-
m.reason = enumStringToValue$
|
|
11381
|
+
m.reason = enumStringToValue$i(RetailRefundReason, proto.reason);
|
|
11291
11382
|
}
|
|
11292
11383
|
return m;
|
|
11293
11384
|
}
|
|
@@ -11348,10 +11439,10 @@ class RetailPayment {
|
|
|
11348
11439
|
m.amount = parseInt(proto.amount, 10);
|
|
11349
11440
|
}
|
|
11350
11441
|
if (proto.referenceType) {
|
|
11351
|
-
m.referenceType = enumStringToValue$
|
|
11442
|
+
m.referenceType = enumStringToValue$i(RetailPaymentReferenceType, proto.referenceType);
|
|
11352
11443
|
}
|
|
11353
11444
|
if (proto.status) {
|
|
11354
|
-
m.status = enumStringToValue$
|
|
11445
|
+
m.status = enumStringToValue$i(PaymentStatus, proto.status);
|
|
11355
11446
|
}
|
|
11356
11447
|
if (proto.applicationFee) {
|
|
11357
11448
|
m.applicationFee = parseInt(proto.applicationFee, 10);
|
|
@@ -11366,7 +11457,7 @@ class RetailPayment {
|
|
|
11366
11457
|
m.refunds = proto.refunds.map(RetailRefund.fromProto);
|
|
11367
11458
|
}
|
|
11368
11459
|
if (proto.paymentMethodDetailsType) {
|
|
11369
|
-
m.paymentMethodDetailsType = enumStringToValue$
|
|
11460
|
+
m.paymentMethodDetailsType = enumStringToValue$i(RetailPaymentPaymentMethodDetailsType, proto.paymentMethodDetailsType);
|
|
11370
11461
|
}
|
|
11371
11462
|
if (proto.achDebitDetails) {
|
|
11372
11463
|
m.achDebitDetails = RetailPaymentACHDetails.fromProto(proto.achDebitDetails);
|
|
@@ -11378,7 +11469,7 @@ class RetailPayment {
|
|
|
11378
11469
|
m.paymentFacilitatorFee = parseInt(proto.paymentFacilitatorFee, 10);
|
|
11379
11470
|
}
|
|
11380
11471
|
if (proto.paymentFacilitatorType) {
|
|
11381
|
-
m.paymentFacilitatorType = enumStringToValue$
|
|
11472
|
+
m.paymentFacilitatorType = enumStringToValue$i(PaymentFacilitatorType, proto.paymentFacilitatorType);
|
|
11382
11473
|
}
|
|
11383
11474
|
if (proto.settledAt) {
|
|
11384
11475
|
m.settledAt = new Date(proto.settledAt);
|
|
@@ -11513,13 +11604,13 @@ class RetailRefund {
|
|
|
11513
11604
|
m.amount = parseInt(proto.amount, 10);
|
|
11514
11605
|
}
|
|
11515
11606
|
if (proto.refundReason) {
|
|
11516
|
-
m.refundReason = enumStringToValue$
|
|
11607
|
+
m.refundReason = enumStringToValue$i(RetailRefundReason, proto.refundReason);
|
|
11517
11608
|
}
|
|
11518
11609
|
if (proto.status) {
|
|
11519
|
-
m.status = enumStringToValue$
|
|
11610
|
+
m.status = enumStringToValue$i(RetailRefundStatus, proto.status);
|
|
11520
11611
|
}
|
|
11521
11612
|
if (proto.failureReason) {
|
|
11522
|
-
m.failureReason = enumStringToValue$
|
|
11613
|
+
m.failureReason = enumStringToValue$i(RetailRefundFailureReason, proto.failureReason);
|
|
11523
11614
|
}
|
|
11524
11615
|
if (proto.created) {
|
|
11525
11616
|
m.created = new Date(proto.created);
|
|
@@ -11783,7 +11874,7 @@ class RetailStatusResponseVerificationRequirements {
|
|
|
11783
11874
|
}
|
|
11784
11875
|
}
|
|
11785
11876
|
|
|
11786
|
-
function enumStringToValue$
|
|
11877
|
+
function enumStringToValue$h(enumRef, value) {
|
|
11787
11878
|
if (typeof value === 'number') {
|
|
11788
11879
|
return value;
|
|
11789
11880
|
}
|
|
@@ -11794,7 +11885,7 @@ class CreatePricingPlanProductRequest {
|
|
|
11794
11885
|
let m = new CreatePricingPlanProductRequest();
|
|
11795
11886
|
m = Object.assign(m, proto);
|
|
11796
11887
|
if (proto.frequency) {
|
|
11797
|
-
m.frequency = enumStringToValue$
|
|
11888
|
+
m.frequency = enumStringToValue$h(Frequency, proto.frequency);
|
|
11798
11889
|
}
|
|
11799
11890
|
if (proto.pricing) {
|
|
11800
11891
|
m.pricing = Object.keys(proto.pricing).reduce((obj, k) => { obj[k] = PricingPlanProductPricing.fromProto(proto.pricing[k]); return obj; }, {});
|
|
@@ -11803,7 +11894,7 @@ class CreatePricingPlanProductRequest {
|
|
|
11803
11894
|
m.commitment = Commitment.fromProto(proto.commitment);
|
|
11804
11895
|
}
|
|
11805
11896
|
if (proto.strategy) {
|
|
11806
|
-
m.strategy = enumStringToValue$
|
|
11897
|
+
m.strategy = enumStringToValue$h(BillingStrategy, proto.strategy);
|
|
11807
11898
|
}
|
|
11808
11899
|
if (proto.volumeCommitment) {
|
|
11809
11900
|
m.volumeCommitment = parseInt(proto.volumeCommitment, 10);
|
|
@@ -11977,7 +12068,7 @@ class GetPricingPlanProductResponse {
|
|
|
11977
12068
|
m.pricingPlanProduct = PricingPlanProduct.fromProto(proto.pricingPlanProduct);
|
|
11978
12069
|
}
|
|
11979
12070
|
if (proto.pricingPlanDefaultStrategy) {
|
|
11980
|
-
m.pricingPlanDefaultStrategy = enumStringToValue$
|
|
12071
|
+
m.pricingPlanDefaultStrategy = enumStringToValue$h(BillingStrategy, proto.pricingPlanDefaultStrategy);
|
|
11981
12072
|
}
|
|
11982
12073
|
return m;
|
|
11983
12074
|
}
|
|
@@ -12165,7 +12256,7 @@ class PricingPlanProduct {
|
|
|
12165
12256
|
let m = new PricingPlanProduct();
|
|
12166
12257
|
m = Object.assign(m, proto);
|
|
12167
12258
|
if (proto.frequency) {
|
|
12168
|
-
m.frequency = enumStringToValue$
|
|
12259
|
+
m.frequency = enumStringToValue$h(Frequency, proto.frequency);
|
|
12169
12260
|
}
|
|
12170
12261
|
if (proto.pricing) {
|
|
12171
12262
|
m.pricing = Object.keys(proto.pricing).reduce((obj, k) => { obj[k] = PricingPlanProductPricing.fromProto(proto.pricing[k]); return obj; }, {});
|
|
@@ -12180,7 +12271,7 @@ class PricingPlanProduct {
|
|
|
12180
12271
|
m.modified = new Date(proto.modified);
|
|
12181
12272
|
}
|
|
12182
12273
|
if (proto.strategy) {
|
|
12183
|
-
m.strategy = enumStringToValue$
|
|
12274
|
+
m.strategy = enumStringToValue$h(BillingStrategy, proto.strategy);
|
|
12184
12275
|
}
|
|
12185
12276
|
if (proto.volumeCommitment) {
|
|
12186
12277
|
m.volumeCommitment = parseInt(proto.volumeCommitment, 10);
|
|
@@ -12192,7 +12283,7 @@ class PricingPlanProduct {
|
|
|
12192
12283
|
m.volumeCommitmentEndsAt = new Date(proto.volumeCommitmentEndsAt);
|
|
12193
12284
|
}
|
|
12194
12285
|
if (proto.pricingType) {
|
|
12195
|
-
m.pricingType = enumStringToValue$
|
|
12286
|
+
m.pricingType = enumStringToValue$h(ProductPricingType, proto.pricingType);
|
|
12196
12287
|
}
|
|
12197
12288
|
return m;
|
|
12198
12289
|
}
|
|
@@ -12248,7 +12339,7 @@ class UpdatePricingPlanProductRequest {
|
|
|
12248
12339
|
let m = new UpdatePricingPlanProductRequest();
|
|
12249
12340
|
m = Object.assign(m, proto);
|
|
12250
12341
|
if (proto.frequency) {
|
|
12251
|
-
m.frequency = enumStringToValue$
|
|
12342
|
+
m.frequency = enumStringToValue$h(Frequency, proto.frequency);
|
|
12252
12343
|
}
|
|
12253
12344
|
if (proto.pricing) {
|
|
12254
12345
|
m.pricing = Object.keys(proto.pricing).reduce((obj, k) => { obj[k] = PricingPlanProductPricing.fromProto(proto.pricing[k]); return obj; }, {});
|
|
@@ -12260,7 +12351,7 @@ class UpdatePricingPlanProductRequest {
|
|
|
12260
12351
|
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
12261
12352
|
}
|
|
12262
12353
|
if (proto.strategy) {
|
|
12263
|
-
m.strategy = enumStringToValue$
|
|
12354
|
+
m.strategy = enumStringToValue$h(BillingStrategy, proto.strategy);
|
|
12264
12355
|
}
|
|
12265
12356
|
if (proto.volumeCommitment) {
|
|
12266
12357
|
m.volumeCommitment = parseInt(proto.volumeCommitment, 10);
|
|
@@ -12342,7 +12433,7 @@ class UpsertWholesalePricingRequest {
|
|
|
12342
12433
|
m.termCommitment = Commitment.fromProto(proto.termCommitment);
|
|
12343
12434
|
}
|
|
12344
12435
|
if (proto.strategy) {
|
|
12345
|
-
m.strategy = enumStringToValue$
|
|
12436
|
+
m.strategy = enumStringToValue$h(BillingStrategy, proto.strategy);
|
|
12346
12437
|
}
|
|
12347
12438
|
if (proto.volumeCommitment) {
|
|
12348
12439
|
m.volumeCommitment = parseInt(proto.volumeCommitment, 10);
|
|
@@ -12391,7 +12482,7 @@ class UpsertWholesalePricingRequest {
|
|
|
12391
12482
|
}
|
|
12392
12483
|
}
|
|
12393
12484
|
|
|
12394
|
-
function enumStringToValue$
|
|
12485
|
+
function enumStringToValue$g(enumRef, value) {
|
|
12395
12486
|
if (typeof value === 'number') {
|
|
12396
12487
|
return value;
|
|
12397
12488
|
}
|
|
@@ -12402,7 +12493,7 @@ class CreateProductRequest {
|
|
|
12402
12493
|
let m = new CreateProductRequest();
|
|
12403
12494
|
m = Object.assign(m, proto);
|
|
12404
12495
|
if (proto.productType) {
|
|
12405
|
-
m.productType = enumStringToValue$
|
|
12496
|
+
m.productType = enumStringToValue$g(ProductType, proto.productType);
|
|
12406
12497
|
}
|
|
12407
12498
|
return m;
|
|
12408
12499
|
}
|
|
@@ -12506,7 +12597,7 @@ class ListProductsRequestListProductsFilters {
|
|
|
12506
12597
|
let m = new ListProductsRequestListProductsFilters();
|
|
12507
12598
|
m = Object.assign(m, proto);
|
|
12508
12599
|
if (proto.productType) {
|
|
12509
|
-
m.productType = proto.productType.map((v) => enumStringToValue$
|
|
12600
|
+
m.productType = proto.productType.map((v) => enumStringToValue$g(ProductType, v));
|
|
12510
12601
|
}
|
|
12511
12602
|
return m;
|
|
12512
12603
|
}
|
|
@@ -12602,7 +12693,7 @@ class Product {
|
|
|
12602
12693
|
let m = new Product();
|
|
12603
12694
|
m = Object.assign(m, proto);
|
|
12604
12695
|
if (proto.productType) {
|
|
12605
|
-
m.productType = enumStringToValue$
|
|
12696
|
+
m.productType = enumStringToValue$g(ProductType, proto.productType);
|
|
12606
12697
|
}
|
|
12607
12698
|
return m;
|
|
12608
12699
|
}
|
|
@@ -12669,7 +12760,7 @@ class UpdateProductRequest {
|
|
|
12669
12760
|
let m = new UpdateProductRequest();
|
|
12670
12761
|
m = Object.assign(m, proto);
|
|
12671
12762
|
if (proto.productType) {
|
|
12672
|
-
m.productType = enumStringToValue$
|
|
12763
|
+
m.productType = enumStringToValue$g(ProductType, proto.productType);
|
|
12673
12764
|
}
|
|
12674
12765
|
return m;
|
|
12675
12766
|
}
|
|
@@ -12700,7 +12791,7 @@ class UpdateProductRequest {
|
|
|
12700
12791
|
}
|
|
12701
12792
|
}
|
|
12702
12793
|
|
|
12703
|
-
function enumStringToValue$
|
|
12794
|
+
function enumStringToValue$f(enumRef, value) {
|
|
12704
12795
|
if (typeof value === 'number') {
|
|
12705
12796
|
return value;
|
|
12706
12797
|
}
|
|
@@ -12714,7 +12805,7 @@ class AppliedCredit {
|
|
|
12714
12805
|
m.appliedAmount = parseInt(proto.appliedAmount, 10);
|
|
12715
12806
|
}
|
|
12716
12807
|
if (proto.referenceType) {
|
|
12717
|
-
m.referenceType = enumStringToValue$
|
|
12808
|
+
m.referenceType = enumStringToValue$f(CreditType, proto.referenceType);
|
|
12718
12809
|
}
|
|
12719
12810
|
return m;
|
|
12720
12811
|
}
|
|
@@ -12743,7 +12834,7 @@ class ListPurchaseRequestListPurchaseBillingStrategyFilter {
|
|
|
12743
12834
|
let m = new ListPurchaseRequestListPurchaseBillingStrategyFilter();
|
|
12744
12835
|
m = Object.assign(m, proto);
|
|
12745
12836
|
if (proto.billingStrategy) {
|
|
12746
|
-
m.billingStrategy = proto.billingStrategy.map((v) => enumStringToValue$
|
|
12837
|
+
m.billingStrategy = proto.billingStrategy.map((v) => enumStringToValue$f(BillingStrategy, v));
|
|
12747
12838
|
}
|
|
12748
12839
|
return m;
|
|
12749
12840
|
}
|
|
@@ -12775,13 +12866,13 @@ class ListPurchaseRequestListPurchaseFilters {
|
|
|
12775
12866
|
m.billingStrategyFilter = ListPurchaseRequestListPurchaseBillingStrategyFilter.fromProto(proto.billingStrategyFilter);
|
|
12776
12867
|
}
|
|
12777
12868
|
if (proto.state) {
|
|
12778
|
-
m.state = enumStringToValue$
|
|
12869
|
+
m.state = enumStringToValue$f(ListPurchaseRequestState, proto.state);
|
|
12779
12870
|
}
|
|
12780
12871
|
if (proto.minPrice) {
|
|
12781
12872
|
m.minPrice = parseInt(proto.minPrice, 10);
|
|
12782
12873
|
}
|
|
12783
12874
|
if (proto.status) {
|
|
12784
|
-
m.status = enumStringToValue$
|
|
12875
|
+
m.status = enumStringToValue$f(PurchaseStatus, proto.status);
|
|
12785
12876
|
}
|
|
12786
12877
|
if (proto.dunningPauseStart) {
|
|
12787
12878
|
m.dunningPauseStart = new Date(proto.dunningPauseStart);
|
|
@@ -12910,7 +13001,7 @@ class ListPurchaseItemsResponse {
|
|
|
12910
13001
|
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
12911
13002
|
}
|
|
12912
13003
|
if (proto.currency) {
|
|
12913
|
-
m.currency = enumStringToValue$
|
|
13004
|
+
m.currency = enumStringToValue$f(Currency, proto.currency);
|
|
12914
13005
|
}
|
|
12915
13006
|
return m;
|
|
12916
13007
|
}
|
|
@@ -13035,13 +13126,13 @@ class Purchase {
|
|
|
13035
13126
|
m.total = parseInt(proto.total, 10);
|
|
13036
13127
|
}
|
|
13037
13128
|
if (proto.currency) {
|
|
13038
|
-
m.currency = enumStringToValue$
|
|
13129
|
+
m.currency = enumStringToValue$f(Currency, proto.currency);
|
|
13039
13130
|
}
|
|
13040
13131
|
if (proto.items) {
|
|
13041
13132
|
m.items = proto.items.map(PurchaseItem.fromProto);
|
|
13042
13133
|
}
|
|
13043
13134
|
if (proto.billingStrategy) {
|
|
13044
|
-
m.billingStrategy = enumStringToValue$
|
|
13135
|
+
m.billingStrategy = enumStringToValue$f(BillingStrategy, proto.billingStrategy);
|
|
13045
13136
|
}
|
|
13046
13137
|
if (proto.dunningAttempt) {
|
|
13047
13138
|
m.dunningAttempt = parseInt(proto.dunningAttempt, 10);
|
|
@@ -13050,7 +13141,7 @@ class Purchase {
|
|
|
13050
13141
|
m.voided = new Date(proto.voided);
|
|
13051
13142
|
}
|
|
13052
13143
|
if (proto.status) {
|
|
13053
|
-
m.status = enumStringToValue$
|
|
13144
|
+
m.status = enumStringToValue$f(PurchaseStatus, proto.status);
|
|
13054
13145
|
}
|
|
13055
13146
|
if (proto.creditAmount) {
|
|
13056
13147
|
m.creditAmount = parseInt(proto.creditAmount, 10);
|
|
@@ -13334,7 +13425,7 @@ class VoidPurchaseRequest {
|
|
|
13334
13425
|
}
|
|
13335
13426
|
}
|
|
13336
13427
|
|
|
13337
|
-
function enumStringToValue$
|
|
13428
|
+
function enumStringToValue$e(enumRef, value) {
|
|
13338
13429
|
if (typeof value === 'number') {
|
|
13339
13430
|
return value;
|
|
13340
13431
|
}
|
|
@@ -13348,10 +13439,10 @@ class CreateRefundRequest {
|
|
|
13348
13439
|
m.amount = parseInt(proto.amount, 10);
|
|
13349
13440
|
}
|
|
13350
13441
|
if (proto.reason) {
|
|
13351
|
-
m.reason = enumStringToValue$
|
|
13442
|
+
m.reason = enumStringToValue$e(RefundReason, proto.reason);
|
|
13352
13443
|
}
|
|
13353
13444
|
if (proto.referenceType) {
|
|
13354
|
-
m.referenceType = enumStringToValue$
|
|
13445
|
+
m.referenceType = enumStringToValue$e(ReferenceType, proto.referenceType);
|
|
13355
13446
|
}
|
|
13356
13447
|
return m;
|
|
13357
13448
|
}
|
|
@@ -13456,10 +13547,10 @@ class Refund {
|
|
|
13456
13547
|
m.amount = parseInt(proto.amount, 10);
|
|
13457
13548
|
}
|
|
13458
13549
|
if (proto.reason) {
|
|
13459
|
-
m.reason = enumStringToValue$
|
|
13550
|
+
m.reason = enumStringToValue$e(RefundReason, proto.reason);
|
|
13460
13551
|
}
|
|
13461
13552
|
if (proto.status) {
|
|
13462
|
-
m.status = enumStringToValue$
|
|
13553
|
+
m.status = enumStringToValue$e(RefundStatus, proto.status);
|
|
13463
13554
|
}
|
|
13464
13555
|
if (proto.created) {
|
|
13465
13556
|
m.created = new Date(proto.created);
|
|
@@ -13468,7 +13559,7 @@ class Refund {
|
|
|
13468
13559
|
m.updated = new Date(proto.updated);
|
|
13469
13560
|
}
|
|
13470
13561
|
if (proto.referenceType) {
|
|
13471
|
-
m.referenceType = enumStringToValue$
|
|
13562
|
+
m.referenceType = enumStringToValue$e(ReferenceType, proto.referenceType);
|
|
13472
13563
|
}
|
|
13473
13564
|
return m;
|
|
13474
13565
|
}
|
|
@@ -13520,7 +13611,7 @@ class Refund {
|
|
|
13520
13611
|
}
|
|
13521
13612
|
}
|
|
13522
13613
|
|
|
13523
|
-
function enumStringToValue$
|
|
13614
|
+
function enumStringToValue$d(enumRef, value) {
|
|
13524
13615
|
if (typeof value === 'number') {
|
|
13525
13616
|
return value;
|
|
13526
13617
|
}
|
|
@@ -13575,7 +13666,7 @@ class ListSalesCreditNoteRequestListSalesCreditNoteFilters {
|
|
|
13575
13666
|
let m = new ListSalesCreditNoteRequestListSalesCreditNoteFilters();
|
|
13576
13667
|
m = Object.assign(m, proto);
|
|
13577
13668
|
if (proto.statuses) {
|
|
13578
|
-
m.statuses = proto.statuses.map((v) => enumStringToValue$
|
|
13669
|
+
m.statuses = proto.statuses.map((v) => enumStringToValue$d(SalesCreditNoteStatus, v));
|
|
13579
13670
|
}
|
|
13580
13671
|
return m;
|
|
13581
13672
|
}
|
|
@@ -13665,7 +13756,7 @@ class SalesCreditNote {
|
|
|
13665
13756
|
m.dueDate = new Date(proto.dueDate);
|
|
13666
13757
|
}
|
|
13667
13758
|
if (proto.currency) {
|
|
13668
|
-
m.currency = enumStringToValue$
|
|
13759
|
+
m.currency = enumStringToValue$d(Currency, proto.currency);
|
|
13669
13760
|
}
|
|
13670
13761
|
if (proto.total) {
|
|
13671
13762
|
m.total = parseInt(proto.total, 10);
|
|
@@ -13674,7 +13765,7 @@ class SalesCreditNote {
|
|
|
13674
13765
|
m.outstanding = parseInt(proto.outstanding, 10);
|
|
13675
13766
|
}
|
|
13676
13767
|
if (proto.status) {
|
|
13677
|
-
m.status = enumStringToValue$
|
|
13768
|
+
m.status = enumStringToValue$d(SalesCreditNoteStatus, proto.status);
|
|
13678
13769
|
}
|
|
13679
13770
|
return m;
|
|
13680
13771
|
}
|
|
@@ -13732,7 +13823,7 @@ class SalesCreditNote {
|
|
|
13732
13823
|
}
|
|
13733
13824
|
}
|
|
13734
13825
|
|
|
13735
|
-
function enumStringToValue$
|
|
13826
|
+
function enumStringToValue$c(enumRef, value) {
|
|
13736
13827
|
if (typeof value === 'number') {
|
|
13737
13828
|
return value;
|
|
13738
13829
|
}
|
|
@@ -13789,10 +13880,10 @@ class ListSalesInvoiceRequestListSalesInvoiceFilters {
|
|
|
13789
13880
|
let m = new ListSalesInvoiceRequestListSalesInvoiceFilters();
|
|
13790
13881
|
m = Object.assign(m, proto);
|
|
13791
13882
|
if (proto.statuses) {
|
|
13792
|
-
m.statuses = proto.statuses.map((v) => enumStringToValue$
|
|
13883
|
+
m.statuses = proto.statuses.map((v) => enumStringToValue$c(SalesInvoiceStatus, v));
|
|
13793
13884
|
}
|
|
13794
13885
|
if (proto.paymentStatuses) {
|
|
13795
|
-
m.paymentStatuses = proto.paymentStatuses.map((v) => enumStringToValue$
|
|
13886
|
+
m.paymentStatuses = proto.paymentStatuses.map((v) => enumStringToValue$c(PaymentStatuses, v));
|
|
13796
13887
|
}
|
|
13797
13888
|
return m;
|
|
13798
13889
|
}
|
|
@@ -13920,16 +14011,16 @@ class SalesInvoice {
|
|
|
13920
14011
|
m.total = parseInt(proto.total, 10);
|
|
13921
14012
|
}
|
|
13922
14013
|
if (proto.currency) {
|
|
13923
|
-
m.currency = enumStringToValue$
|
|
14014
|
+
m.currency = enumStringToValue$c(Currency, proto.currency);
|
|
13924
14015
|
}
|
|
13925
14016
|
if (proto.status) {
|
|
13926
|
-
m.status = enumStringToValue$
|
|
14017
|
+
m.status = enumStringToValue$c(SalesInvoiceStatus, proto.status);
|
|
13927
14018
|
}
|
|
13928
14019
|
if (proto.outstanding) {
|
|
13929
14020
|
m.outstanding = parseInt(proto.outstanding, 10);
|
|
13930
14021
|
}
|
|
13931
14022
|
if (proto.type) {
|
|
13932
|
-
m.type = enumStringToValue$
|
|
14023
|
+
m.type = enumStringToValue$c(SalesInvoiceType, proto.type);
|
|
13933
14024
|
}
|
|
13934
14025
|
return m;
|
|
13935
14026
|
}
|
|
@@ -14033,7 +14124,7 @@ class SendSalesInvoiceReceiptEmailRequest {
|
|
|
14033
14124
|
}
|
|
14034
14125
|
}
|
|
14035
14126
|
|
|
14036
|
-
function enumStringToValue$
|
|
14127
|
+
function enumStringToValue$b(enumRef, value) {
|
|
14037
14128
|
if (typeof value === 'number') {
|
|
14038
14129
|
return value;
|
|
14039
14130
|
}
|
|
@@ -14142,10 +14233,10 @@ class ListTaxRulesRequestFilters {
|
|
|
14142
14233
|
let m = new ListTaxRulesRequestFilters();
|
|
14143
14234
|
m = Object.assign(m, proto);
|
|
14144
14235
|
if (proto.consumer) {
|
|
14145
|
-
m.consumer = enumStringToValue$
|
|
14236
|
+
m.consumer = enumStringToValue$b(Consumer, proto.consumer);
|
|
14146
14237
|
}
|
|
14147
14238
|
if (proto.entityType) {
|
|
14148
|
-
m.entityType = enumStringToValue$
|
|
14239
|
+
m.entityType = enumStringToValue$b(TaxRuleEntityType, proto.entityType);
|
|
14149
14240
|
}
|
|
14150
14241
|
return m;
|
|
14151
14242
|
}
|
|
@@ -14194,7 +14285,7 @@ class GetTaxProviderResponse {
|
|
|
14194
14285
|
let m = new GetTaxProviderResponse();
|
|
14195
14286
|
m = Object.assign(m, proto);
|
|
14196
14287
|
if (proto.taxProviderType) {
|
|
14197
|
-
m.taxProviderType = enumStringToValue$
|
|
14288
|
+
m.taxProviderType = enumStringToValue$b(TaxProviderType, proto.taxProviderType);
|
|
14198
14289
|
}
|
|
14199
14290
|
return m;
|
|
14200
14291
|
}
|
|
@@ -14318,7 +14409,7 @@ class TaxRuleProductProductIdentifier {
|
|
|
14318
14409
|
let m = new TaxRuleProductProductIdentifier();
|
|
14319
14410
|
m = Object.assign(m, proto);
|
|
14320
14411
|
if (proto.type) {
|
|
14321
|
-
m.type = enumStringToValue$
|
|
14412
|
+
m.type = enumStringToValue$b(ProductType, proto.type);
|
|
14322
14413
|
}
|
|
14323
14414
|
return m;
|
|
14324
14415
|
}
|
|
@@ -14347,13 +14438,13 @@ class ReplaceTaxRuleRequest {
|
|
|
14347
14438
|
let m = new ReplaceTaxRuleRequest();
|
|
14348
14439
|
m = Object.assign(m, proto);
|
|
14349
14440
|
if (proto.entityType) {
|
|
14350
|
-
m.entityType = enumStringToValue$
|
|
14441
|
+
m.entityType = enumStringToValue$b(TaxRuleEntityType, proto.entityType);
|
|
14351
14442
|
}
|
|
14352
14443
|
if (proto.type) {
|
|
14353
|
-
m.type = enumStringToValue$
|
|
14444
|
+
m.type = enumStringToValue$b(TaxRuleType, proto.type);
|
|
14354
14445
|
}
|
|
14355
14446
|
if (proto.consumer) {
|
|
14356
|
-
m.consumer = enumStringToValue$
|
|
14447
|
+
m.consumer = enumStringToValue$b(Consumer, proto.consumer);
|
|
14357
14448
|
}
|
|
14358
14449
|
return m;
|
|
14359
14450
|
}
|
|
@@ -14411,13 +14502,13 @@ class TaxRule {
|
|
|
14411
14502
|
let m = new TaxRule();
|
|
14412
14503
|
m = Object.assign(m, proto);
|
|
14413
14504
|
if (proto.entityType) {
|
|
14414
|
-
m.entityType = enumStringToValue$
|
|
14505
|
+
m.entityType = enumStringToValue$b(TaxRuleEntityType, proto.entityType);
|
|
14415
14506
|
}
|
|
14416
14507
|
if (proto.entity) {
|
|
14417
14508
|
m.entity = TaxRuleTaxRuleEntity.fromProto(proto.entity);
|
|
14418
14509
|
}
|
|
14419
14510
|
if (proto.type) {
|
|
14420
|
-
m.type = enumStringToValue$
|
|
14511
|
+
m.type = enumStringToValue$b(TaxRuleType, proto.type);
|
|
14421
14512
|
}
|
|
14422
14513
|
if (proto.taxRates) {
|
|
14423
14514
|
m.taxRates = proto.taxRates.map(TaxRate.fromProto);
|
|
@@ -14538,7 +14629,7 @@ class TaxRuleProduct {
|
|
|
14538
14629
|
}
|
|
14539
14630
|
}
|
|
14540
14631
|
|
|
14541
|
-
function enumStringToValue$
|
|
14632
|
+
function enumStringToValue$a(enumRef, value) {
|
|
14542
14633
|
if (typeof value === 'number') {
|
|
14543
14634
|
return value;
|
|
14544
14635
|
}
|
|
@@ -14678,7 +14769,7 @@ class ListContractDocumentsResponse {
|
|
|
14678
14769
|
}
|
|
14679
14770
|
}
|
|
14680
14771
|
|
|
14681
|
-
function enumStringToValue$
|
|
14772
|
+
function enumStringToValue$9(enumRef, value) {
|
|
14682
14773
|
if (typeof value === 'number') {
|
|
14683
14774
|
return value;
|
|
14684
14775
|
}
|
|
@@ -14744,7 +14835,7 @@ class RetailCustomerConfiguration {
|
|
|
14744
14835
|
m.netD = parseInt(proto.netD, 10);
|
|
14745
14836
|
}
|
|
14746
14837
|
if (proto.paymentMethodTypes) {
|
|
14747
|
-
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$
|
|
14838
|
+
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$9(PaymentMethodType, v));
|
|
14748
14839
|
}
|
|
14749
14840
|
return m;
|
|
14750
14841
|
}
|
|
@@ -14812,7 +14903,7 @@ class UpsertRetailCustomerConfigurationRequest {
|
|
|
14812
14903
|
m.netD = parseInt(proto.netD, 10);
|
|
14813
14904
|
}
|
|
14814
14905
|
if (proto.paymentMethodTypes) {
|
|
14815
|
-
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$
|
|
14906
|
+
m.paymentMethodTypes = proto.paymentMethodTypes.map((v) => enumStringToValue$9(PaymentMethodType, v));
|
|
14816
14907
|
}
|
|
14817
14908
|
if (proto.fieldMask) {
|
|
14818
14909
|
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
@@ -14873,7 +14964,7 @@ class UpsertRetailCustomerConfigurationRequest {
|
|
|
14873
14964
|
}
|
|
14874
14965
|
}
|
|
14875
14966
|
|
|
14876
|
-
function enumStringToValue$
|
|
14967
|
+
function enumStringToValue$8(enumRef, value) {
|
|
14877
14968
|
if (typeof value === 'number') {
|
|
14878
14969
|
return value;
|
|
14879
14970
|
}
|
|
@@ -14990,7 +15081,7 @@ class GetBalanceResponse {
|
|
|
14990
15081
|
}
|
|
14991
15082
|
}
|
|
14992
15083
|
|
|
14993
|
-
function enumStringToValue$
|
|
15084
|
+
function enumStringToValue$7(enumRef, value) {
|
|
14994
15085
|
if (typeof value === 'number') {
|
|
14995
15086
|
return value;
|
|
14996
15087
|
}
|
|
@@ -15001,7 +15092,7 @@ class CreateMerchantServicesReportRun {
|
|
|
15001
15092
|
let m = new CreateMerchantServicesReportRun();
|
|
15002
15093
|
m = Object.assign(m, proto);
|
|
15003
15094
|
if (proto.reportType) {
|
|
15004
|
-
m.reportType = enumStringToValue$
|
|
15095
|
+
m.reportType = enumStringToValue$7(MerchantServicesReportRunType, proto.reportType);
|
|
15005
15096
|
}
|
|
15006
15097
|
if (proto.intervalStart) {
|
|
15007
15098
|
m.intervalStart = new Date(proto.intervalStart);
|
|
@@ -15065,10 +15156,10 @@ class MerchantServicesReportRun {
|
|
|
15065
15156
|
m.created = new Date(proto.created);
|
|
15066
15157
|
}
|
|
15067
15158
|
if (proto.reportType) {
|
|
15068
|
-
m.reportType = enumStringToValue$
|
|
15159
|
+
m.reportType = enumStringToValue$7(MerchantServicesReportRunType, proto.reportType);
|
|
15069
15160
|
}
|
|
15070
15161
|
if (proto.status) {
|
|
15071
|
-
m.status = enumStringToValue$
|
|
15162
|
+
m.status = enumStringToValue$7(MerchantServicesReportRunStatus, proto.status);
|
|
15072
15163
|
}
|
|
15073
15164
|
return m;
|
|
15074
15165
|
}
|
|
@@ -15099,7 +15190,7 @@ class MerchantServicesReportRun {
|
|
|
15099
15190
|
}
|
|
15100
15191
|
}
|
|
15101
15192
|
|
|
15102
|
-
function enumStringToValue$
|
|
15193
|
+
function enumStringToValue$6(enumRef, value) {
|
|
15103
15194
|
if (typeof value === 'number') {
|
|
15104
15195
|
return value;
|
|
15105
15196
|
}
|
|
@@ -15149,7 +15240,7 @@ class MCPOptions {
|
|
|
15149
15240
|
}
|
|
15150
15241
|
}
|
|
15151
15242
|
|
|
15152
|
-
function enumStringToValue$
|
|
15243
|
+
function enumStringToValue$5(enumRef, value) {
|
|
15153
15244
|
if (typeof value === 'number') {
|
|
15154
15245
|
return value;
|
|
15155
15246
|
}
|
|
@@ -15160,13 +15251,13 @@ class ListSubscriptionRelationshipsRequestFilters {
|
|
|
15160
15251
|
let m = new ListSubscriptionRelationshipsRequestFilters();
|
|
15161
15252
|
m = Object.assign(m, proto);
|
|
15162
15253
|
if (proto.originType) {
|
|
15163
|
-
m.originType = enumStringToValue$
|
|
15254
|
+
m.originType = enumStringToValue$5(EntityType, proto.originType);
|
|
15164
15255
|
}
|
|
15165
15256
|
if (proto.targetType) {
|
|
15166
|
-
m.targetType = enumStringToValue$
|
|
15257
|
+
m.targetType = enumStringToValue$5(EntityType, proto.targetType);
|
|
15167
15258
|
}
|
|
15168
15259
|
if (proto.relationshipType) {
|
|
15169
|
-
m.relationshipType = enumStringToValue$
|
|
15260
|
+
m.relationshipType = enumStringToValue$5(RelationshipType, proto.relationshipType);
|
|
15170
15261
|
}
|
|
15171
15262
|
return m;
|
|
15172
15263
|
}
|
|
@@ -15354,13 +15445,13 @@ class SubscriptionRelationship {
|
|
|
15354
15445
|
let m = new SubscriptionRelationship();
|
|
15355
15446
|
m = Object.assign(m, proto);
|
|
15356
15447
|
if (proto.originType) {
|
|
15357
|
-
m.originType = enumStringToValue$
|
|
15448
|
+
m.originType = enumStringToValue$5(EntityType, proto.originType);
|
|
15358
15449
|
}
|
|
15359
15450
|
if (proto.targetType) {
|
|
15360
|
-
m.targetType = enumStringToValue$
|
|
15451
|
+
m.targetType = enumStringToValue$5(EntityType, proto.targetType);
|
|
15361
15452
|
}
|
|
15362
15453
|
if (proto.relationshipType) {
|
|
15363
|
-
m.relationshipType = enumStringToValue$
|
|
15454
|
+
m.relationshipType = enumStringToValue$5(RelationshipType, proto.relationshipType);
|
|
15364
15455
|
}
|
|
15365
15456
|
if (proto.created) {
|
|
15366
15457
|
m.created = new Date(proto.created);
|
|
@@ -15418,7 +15509,7 @@ class SubscriptionRelationship {
|
|
|
15418
15509
|
}
|
|
15419
15510
|
}
|
|
15420
15511
|
|
|
15421
|
-
function enumStringToValue$
|
|
15512
|
+
function enumStringToValue$4(enumRef, value) {
|
|
15422
15513
|
if (typeof value === 'number') {
|
|
15423
15514
|
return value;
|
|
15424
15515
|
}
|
|
@@ -15524,7 +15615,7 @@ class SubscriptionPreset {
|
|
|
15524
15615
|
}
|
|
15525
15616
|
}
|
|
15526
15617
|
|
|
15527
|
-
function enumStringToValue$
|
|
15618
|
+
function enumStringToValue$3(enumRef, value) {
|
|
15528
15619
|
if (typeof value === 'number') {
|
|
15529
15620
|
return value;
|
|
15530
15621
|
}
|
|
@@ -15535,13 +15626,13 @@ class AppliedTo {
|
|
|
15535
15626
|
let m = new AppliedTo();
|
|
15536
15627
|
m = Object.assign(m, proto);
|
|
15537
15628
|
if (proto.referenceType) {
|
|
15538
|
-
m.referenceType = enumStringToValue$
|
|
15629
|
+
m.referenceType = enumStringToValue$3(AppliedReferenceType, proto.referenceType);
|
|
15539
15630
|
}
|
|
15540
15631
|
if (proto.amount) {
|
|
15541
15632
|
m.amount = parseInt(proto.amount, 10);
|
|
15542
15633
|
}
|
|
15543
15634
|
if (proto.creditNoteType) {
|
|
15544
|
-
m.creditNoteType = enumStringToValue$
|
|
15635
|
+
m.creditNoteType = enumStringToValue$3(CreditNoteType, proto.creditNoteType);
|
|
15545
15636
|
}
|
|
15546
15637
|
if (proto.appliedAt) {
|
|
15547
15638
|
m.appliedAt = new Date(proto.appliedAt);
|
|
@@ -15689,7 +15780,7 @@ class CreditNote {
|
|
|
15689
15780
|
m.items = proto.items.map(LineItem.fromProto);
|
|
15690
15781
|
}
|
|
15691
15782
|
if (proto.currency) {
|
|
15692
|
-
m.currency = enumStringToValue$
|
|
15783
|
+
m.currency = enumStringToValue$3(Currency, proto.currency);
|
|
15693
15784
|
}
|
|
15694
15785
|
if (proto.amountTax) {
|
|
15695
15786
|
m.amountTax = parseInt(proto.amountTax, 10);
|
|
@@ -15701,7 +15792,7 @@ class CreditNote {
|
|
|
15701
15792
|
m.notes = proto.notes.map(Note.fromProto);
|
|
15702
15793
|
}
|
|
15703
15794
|
if (proto.reason) {
|
|
15704
|
-
m.reason = enumStringToValue$
|
|
15795
|
+
m.reason = enumStringToValue$3(CreditNoteReason, proto.reason);
|
|
15705
15796
|
}
|
|
15706
15797
|
if (proto.appliedTo) {
|
|
15707
15798
|
m.appliedTo = proto.appliedTo.map(AppliedTo.fromProto);
|
|
@@ -16041,85 +16132,6 @@ class SendCreditNoteRequest {
|
|
|
16041
16132
|
}
|
|
16042
16133
|
}
|
|
16043
16134
|
|
|
16044
|
-
function enumStringToValue$3(enumRef, value) {
|
|
16045
|
-
if (typeof value === 'number') {
|
|
16046
|
-
return value;
|
|
16047
|
-
}
|
|
16048
|
-
return enumRef[value];
|
|
16049
|
-
}
|
|
16050
|
-
class CreateRetailSubscriptionGroupRequest {
|
|
16051
|
-
static fromProto(proto) {
|
|
16052
|
-
let m = new CreateRetailSubscriptionGroupRequest();
|
|
16053
|
-
m = Object.assign(m, proto);
|
|
16054
|
-
if (proto.retailSubscriptionGroup) {
|
|
16055
|
-
m.retailSubscriptionGroup = RetailSubscriptionGroup.fromProto(proto.retailSubscriptionGroup);
|
|
16056
|
-
}
|
|
16057
|
-
return m;
|
|
16058
|
-
}
|
|
16059
|
-
constructor(kwargs) {
|
|
16060
|
-
if (!kwargs) {
|
|
16061
|
-
return;
|
|
16062
|
-
}
|
|
16063
|
-
Object.assign(this, kwargs);
|
|
16064
|
-
}
|
|
16065
|
-
toApiJson() {
|
|
16066
|
-
const toReturn = {};
|
|
16067
|
-
if (typeof this.retailSubscriptionGroup !== 'undefined' && this.retailSubscriptionGroup !== null) {
|
|
16068
|
-
toReturn['retailSubscriptionGroup'] = 'toApiJson' in this.retailSubscriptionGroup ? this.retailSubscriptionGroup.toApiJson() : this.retailSubscriptionGroup;
|
|
16069
|
-
}
|
|
16070
|
-
return toReturn;
|
|
16071
|
-
}
|
|
16072
|
-
}
|
|
16073
|
-
class CreateRetailSubscriptionGroupResponse {
|
|
16074
|
-
static fromProto(proto) {
|
|
16075
|
-
let m = new CreateRetailSubscriptionGroupResponse();
|
|
16076
|
-
m = Object.assign(m, proto);
|
|
16077
|
-
return m;
|
|
16078
|
-
}
|
|
16079
|
-
constructor(kwargs) {
|
|
16080
|
-
if (!kwargs) {
|
|
16081
|
-
return;
|
|
16082
|
-
}
|
|
16083
|
-
Object.assign(this, kwargs);
|
|
16084
|
-
}
|
|
16085
|
-
toApiJson() {
|
|
16086
|
-
const toReturn = {};
|
|
16087
|
-
if (typeof this.id !== 'undefined') {
|
|
16088
|
-
toReturn['id'] = this.id;
|
|
16089
|
-
}
|
|
16090
|
-
return toReturn;
|
|
16091
|
-
}
|
|
16092
|
-
}
|
|
16093
|
-
class RetailSubscriptionGroup {
|
|
16094
|
-
static fromProto(proto) {
|
|
16095
|
-
let m = new RetailSubscriptionGroup();
|
|
16096
|
-
m = Object.assign(m, proto);
|
|
16097
|
-
if (proto.displayOption) {
|
|
16098
|
-
m.displayOption = enumStringToValue$3(DisplayOption, proto.displayOption);
|
|
16099
|
-
}
|
|
16100
|
-
return m;
|
|
16101
|
-
}
|
|
16102
|
-
constructor(kwargs) {
|
|
16103
|
-
if (!kwargs) {
|
|
16104
|
-
return;
|
|
16105
|
-
}
|
|
16106
|
-
Object.assign(this, kwargs);
|
|
16107
|
-
}
|
|
16108
|
-
toApiJson() {
|
|
16109
|
-
const toReturn = {};
|
|
16110
|
-
if (typeof this.id !== 'undefined') {
|
|
16111
|
-
toReturn['id'] = this.id;
|
|
16112
|
-
}
|
|
16113
|
-
if (typeof this.name !== 'undefined') {
|
|
16114
|
-
toReturn['name'] = this.name;
|
|
16115
|
-
}
|
|
16116
|
-
if (typeof this.displayOption !== 'undefined') {
|
|
16117
|
-
toReturn['displayOption'] = this.displayOption;
|
|
16118
|
-
}
|
|
16119
|
-
return toReturn;
|
|
16120
|
-
}
|
|
16121
|
-
}
|
|
16122
|
-
|
|
16123
16135
|
function enumStringToValue$2(enumRef, value) {
|
|
16124
16136
|
if (typeof value === 'number') {
|
|
16125
16137
|
return value;
|