wallet 1.1.3 → 1.1.4
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/.openapi-generator/FILES +309 -309
- package/.openapi-generator-ignore +23 -23
- package/api/advertisementCreditsApi.ts +589 -589
- package/api/analyticsApi.ts +5953 -5953
- package/api/apis.ts +86 -86
- package/api/appleWalletSubscribersApi.ts +235 -235
- package/api/billingApi.ts +680 -680
- package/api/clubMembersPointsApi.ts +798 -798
- package/api/configurationApi.ts +225 -225
- package/api/countriesApi.ts +155 -155
- package/api/customerApi.ts +737 -737
- package/api/dashboardApi.ts +1553 -1553
- package/api/dynamicVouchersApi.ts +603 -603
- package/api/employeeAccessApi.ts +165 -165
- package/api/employeesApi.ts +2933 -2933
- package/api/industriesApi.ts +155 -155
- package/api/infoGenesisReportsApi.ts +2023 -2023
- package/api/integratedTerminalsApi.ts +447 -447
- package/api/interactionsApi.ts +678 -678
- package/api/linkBookApi.ts +447 -447
- package/api/linkBookSectionApi.ts +447 -447
- package/api/loginAndLogoutApi.ts +296 -296
- package/api/membershipTiersApi.ts +729 -729
- package/api/merchantApi.ts +1534 -1534
- package/api/merchantCreditsApi.ts +798 -798
- package/api/merchantURLsApi.ts +586 -586
- package/api/mobileTerminalApi.ts +323 -323
- package/api/newsApi.ts +447 -447
- package/api/paymentDesignsApi.ts +519 -519
- package/api/performancesApi.ts +447 -447
- package/api/promoCodesApi.ts +447 -447
- package/api/sMSApi.ts +1999 -1999
- package/api/settingsApi.ts +220 -220
- package/api/staticVoucherCampaignGroupsApi.ts +165 -165
- package/api/staticVoucherCampaignsApi.ts +1484 -1484
- package/api/staticVouchersApi.ts +535 -535
- package/api/systemApi.ts +604 -604
- package/api/transactionLedgerApi.ts +203 -203
- package/api/utilitiesApi.ts +157 -157
- package/api/webTerminalApi.ts +309 -309
- package/api.ts +2 -2
- package/examples/advertisementcredits.example.ts +50 -50
- package/examples/clubmembers.example.ts +50 -50
- package/examples/linkbook.example.ts +50 -50
- package/examples/membershiptiers.example.ts +49 -49
- package/examples/merchanturls.example.ts +47 -47
- package/examples/news.example.ts +51 -51
- package/examples/paymentdesigns.example.ts +56 -56
- package/git_push.sh +57 -57
- package/model/advertisementCredit.ts +103 -103
- package/model/advertisementCreditBroadcast.ts +154 -154
- package/model/advertisementCreditScan.ts +170 -170
- package/model/agreement.ts +133 -133
- package/model/alert.ts +79 -79
- package/model/announcement.ts +67 -67
- package/model/applicableTerminals.ts +30 -30
- package/model/applicableTerminalsAnyOf.ts +17 -17
- package/model/applicableTerminalsAnyOf1.ts +17 -17
- package/model/applicableTerminalsAnyOf2.ts +17 -17
- package/model/applicableTerminalsAnyOf3.ts +17 -17
- package/model/authError.ts +55 -55
- package/model/availablePhoneNumbersRequest.ts +43 -43
- package/model/clickFunnelAmount.ts +37 -37
- package/model/clickFunnelContact.ts +248 -248
- package/model/clickFunnelContactProfile.ts +235 -235
- package/model/clickFunnelEvent.ts +38 -38
- package/model/clickFunnelOriginalAmount.ts +37 -37
- package/model/clickFunnelProduct.ts +194 -194
- package/model/clickFunnelPurchase.ts +178 -178
- package/model/createStaticVoucherCampaign.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +109 -109
- package/model/dashboardWidget.ts +115 -115
- package/model/duplicateRowFound.ts +55 -55
- package/model/dynamicVoucher.ts +224 -224
- package/model/dynamicVoucherBroadcast.ts +154 -154
- package/model/employee.ts +109 -109
- package/model/employeeActivityLog.ts +67 -67
- package/model/employeeAlert.ts +79 -79
- package/model/exportDataFile.ts +85 -85
- package/model/falsumError.ts +41 -41
- package/model/falsumField.ts +55 -55
- package/model/feature.ts +79 -79
- package/model/forbiddenRequest.ts +55 -55
- package/model/foreignKeyDoesNotExist.ts +55 -55
- package/model/helpDeskRequest.ts +85 -85
- package/model/importedList.ts +73 -73
- package/model/importedListRecipient.ts +73 -73
- package/model/inlineObject.ts +31 -31
- package/model/inlineObject1.ts +31 -31
- package/model/inlineObject10.ts +37 -37
- package/model/inlineObject11.ts +37 -37
- package/model/inlineObject12.ts +37 -37
- package/model/inlineObject13.ts +37 -37
- package/model/inlineObject14.ts +37 -37
- package/model/inlineObject15.ts +67 -67
- package/model/inlineObject16.ts +61 -61
- package/model/inlineObject17.ts +55 -55
- package/model/inlineObject18.ts +61 -61
- package/model/inlineObject19.ts +55 -55
- package/model/inlineObject2.ts +31 -31
- package/model/inlineObject20.ts +61 -61
- package/model/inlineObject21.ts +73 -73
- package/model/inlineObject22.ts +31 -31
- package/model/inlineObject23.ts +31 -31
- package/model/inlineObject24.ts +43 -43
- package/model/inlineObject25.ts +55 -55
- package/model/inlineObject26.ts +31 -31
- package/model/inlineObject27.ts +31 -31
- package/model/inlineObject28.ts +43 -43
- package/model/inlineObject29.ts +49 -49
- package/model/inlineObject3.ts +31 -31
- package/model/inlineObject30.ts +43 -43
- package/model/inlineObject31.ts +31 -31
- package/model/inlineObject32.ts +31 -31
- package/model/inlineObject33.ts +31 -31
- package/model/inlineObject34.ts +43 -43
- package/model/inlineObject35.ts +43 -43
- package/model/inlineObject36.ts +43 -43
- package/model/inlineObject37.ts +43 -43
- package/model/inlineObject38.ts +43 -43
- package/model/inlineObject39.ts +43 -43
- package/model/inlineObject4.ts +37 -37
- package/model/inlineObject40.ts +43 -43
- package/model/inlineObject41.ts +43 -43
- package/model/inlineObject42.ts +43 -43
- package/model/inlineObject43.ts +43 -43
- package/model/inlineObject44.ts +43 -43
- package/model/inlineObject45.ts +43 -43
- package/model/inlineObject46.ts +43 -43
- package/model/inlineObject47.ts +43 -43
- package/model/inlineObject48.ts +43 -43
- package/model/inlineObject49.ts +43 -43
- package/model/inlineObject5.ts +31 -31
- package/model/inlineObject50.ts +43 -43
- package/model/inlineObject51.ts +97 -97
- package/model/inlineObject52.ts +31 -31
- package/model/inlineObject53.ts +97 -97
- package/model/inlineObject54.ts +97 -97
- package/model/inlineObject55.ts +91 -91
- package/model/inlineObject56.ts +37 -37
- package/model/inlineObject57.ts +37 -37
- package/model/inlineObject58.ts +37 -37
- package/model/inlineObject59.ts +43 -43
- package/model/inlineObject6.ts +31 -31
- package/model/inlineObject60.ts +43 -43
- package/model/inlineObject61.ts +43 -43
- package/model/inlineObject62.ts +37 -37
- package/model/inlineObject63.ts +37 -37
- package/model/inlineObject64.ts +37 -37
- package/model/inlineObject65.ts +205 -205
- package/model/inlineObject66.ts +49 -49
- package/model/inlineObject67.ts +49 -49
- package/model/inlineObject68.ts +37 -37
- package/model/inlineObject69.ts +121 -121
- package/model/inlineObject7.ts +31 -31
- package/model/inlineObject8.ts +43 -43
- package/model/inlineObject9.ts +37 -37
- package/model/inlineResponse200.ts +37 -37
- package/model/inlineResponse2001.ts +56 -56
- package/model/inlineResponse20010.ts +109 -109
- package/model/inlineResponse20011.ts +43 -43
- package/model/inlineResponse2002.ts +31 -31
- package/model/inlineResponse2003.ts +31 -31
- package/model/inlineResponse2004.ts +43 -43
- package/model/inlineResponse2005.ts +38 -38
- package/model/inlineResponse2006.ts +97 -97
- package/model/inlineResponse2007.ts +44 -44
- package/model/inlineResponse2008.ts +31 -31
- package/model/inlineResponse2009.ts +98 -98
- package/model/internalServerError.ts +55 -55
- package/model/ledgerEntry.ts +176 -176
- package/model/linkBook.ts +85 -85
- package/model/linkBookSection.ts +61 -61
- package/model/mSMemberHistory.ts +112 -112
- package/model/mSMemberHistoryPagination.ts +53 -53
- package/model/mSMemberRedemption.ts +109 -109
- package/model/mSMemberRedemptionPagination.ts +53 -53
- package/model/mSMembershipTierHistory.ts +106 -106
- package/model/mSMembershipTierHistoryPagination.ts +53 -53
- package/model/mSMembershipTierRedemption.ts +121 -121
- package/model/mSMembershipTierRedemptionPagination.ts +53 -53
- package/model/mSMerchantCreditHistory.ts +88 -88
- package/model/mSMerchantCreditHistoryPagination.ts +53 -53
- package/model/mSMerchantCreditRedemption.ts +109 -109
- package/model/mSMerchantCreditRedemptionPagination.ts +53 -53
- package/model/mediaFile.ts +85 -85
- package/model/member.ts +118 -118
- package/model/memberSearch.ts +61 -61
- package/model/merchant.ts +133 -133
- package/model/merchantCreditSearch.ts +61 -61
- package/model/merchantNotInitialized.ts +55 -55
- package/model/merchantURL.ts +67 -67
- package/model/message.ts +74 -74
- package/model/models.ts +1015 -1015
- package/model/moduleError.ts +157 -157
- package/model/newsArticle.ts +85 -85
- package/model/optInList.ts +121 -121
- package/model/optInListSource.ts +73 -73
- package/model/optInListSubscriber.ts +104 -104
- package/model/outboundSMS.ts +157 -157
- package/model/paginatedWTMembers.ts +53 -53
- package/model/paginatedWTMerchantCredits.ts +53 -53
- package/model/paginationRequestWithSortOptions.ts +75 -75
- package/model/paymentDesign.ts +139 -139
- package/model/performance.ts +100 -100
- package/model/phoneNumber.ts +157 -157
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +106 -106
- package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +67 -67
- package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +106 -106
- package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +43 -43
- package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +82 -82
- package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +46 -46
- package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +52 -52
- package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +100 -100
- package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeID.ts +94 -94
- package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +100 -100
- package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +46 -46
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +154 -154
- package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +137 -137
- package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +58 -58
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +106 -106
- package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +142 -142
- package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsBackgroundImageURLOrCompanyLogoURLOrEmployeeID.ts +94 -94
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +106 -106
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +167 -167
- package/model/pickWTAdvertisementCreditCreateParamsExcludeKeyofWTAdvertisementCreditCreateParamsEmployeeID.ts +58 -58
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +58 -58
- package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumber.ts +76 -76
- package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +52 -52
- package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +40 -40
- package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +58 -58
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +138 -138
- package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +112 -112
- package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +46 -46
- package/model/plan.ts +62 -62
- package/model/portalPage.ts +67 -67
- package/model/presignedPost.ts +41 -41
- package/model/presignedPostFields.ts +43 -43
- package/model/product.ts +74 -74
- package/model/promoCode.ts +97 -97
- package/model/reachPerformanceStats.ts +70 -70
- package/model/request.ts +349 -349
- package/model/response.ts +67 -67
- package/model/role.ts +117 -117
- package/model/roleAuditLog.ts +97 -97
- package/model/sSOptInSource.ts +73 -73
- package/model/simpleSMSBroadcast.ts +147 -147
- package/model/staticVoucher.ts +224 -224
- package/model/staticVoucherCampaign.ts +175 -175
- package/model/staticVoucherCampaignBroadcast.ts +142 -142
- package/model/staticVoucherCampaignGroup.ts +85 -85
- package/model/staticVoucherCampaignUpdate.ts +85 -85
- package/model/status.ts +30 -30
- package/model/statusAnyOf.ts +17 -17
- package/model/statusAnyOf1.ts +17 -17
- package/model/statusAnyOf2.ts +17 -17
- package/model/statusAnyOf3.ts +17 -17
- package/model/subscriptionFeature.ts +79 -79
- package/model/subscriptionPlan.ts +69 -69
- package/model/subscriptionProduct.ts +81 -81
- package/model/tcpa.ts +67 -67
- package/model/updateStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/vSCampaignGeneratedMessage.ts +43 -43
- package/model/vSCampaignGeneratedMessagePagination.ts +53 -53
- package/model/vSDynamicVoucherStatus.ts +28 -28
- package/model/wTAdvertisementCredit.ts +103 -103
- package/model/wTAdvertisementCreditScan.ts +170 -170
- package/model/wTAdvertisementCreditUpdateParams.ts +55 -55
- package/model/wTDynamicVoucher.ts +224 -224
- package/model/wTDynamicVoucherCreateParams.ts +103 -103
- package/model/wTDynamicVoucherRedemption.ts +164 -164
- package/model/wTDynamicVoucherSummary.ts +169 -169
- package/model/wTDynamicVoucherUpdateParams.ts +103 -103
- package/model/wTEmployee.ts +109 -109
- package/model/wTEmployeeCreate.ts +61 -61
- package/model/wTEmployeeUpdate.ts +55 -55
- package/model/wTImportedList.ts +73 -73
- package/model/wTLinkBookCreateParams.ts +55 -55
- package/model/wTLinkBookSectionCreateParams.ts +31 -31
- package/model/wTLinkBookSectionUpdateParams.ts +31 -31
- package/model/wTLinkBookUpdateParams.ts +55 -55
- package/model/wTMember.ts +118 -118
- package/model/wTMemberCreationParams.ts +73 -73
- package/model/wTMembershipTier.ts +106 -106
- package/model/wTMembershipTierCreationParams.ts +64 -64
- package/model/wTMembershipTierUpdateParams.ts +64 -64
- package/model/wTMembershipTierWithMemberCount.ts +115 -115
- package/model/wTMerchantCredit.ts +106 -106
- package/model/wTMerchantCreditCreationParams.ts +49 -49
- package/model/wTMerchantURLCreate.ts +37 -37
- package/model/wTMerchantURLUpdate.ts +37 -37
- package/model/wTNewsArticleCreateParams.ts +55 -55
- package/model/wTNewsArticleUpdateParams.ts +55 -55
- package/model/wTOptInList.ts +121 -121
- package/model/wTOptInListCreationParams.ts +91 -91
- package/model/wTPaymentDesign.ts +139 -139
- package/model/wTPaymentDesignCreateParams.ts +115 -115
- package/model/wTPaymentDesignUpdateParams.ts +115 -115
- package/model/wTPerformanceCreateParams.ts +70 -70
- package/model/wTPerformanceUpdateParams.ts +70 -70
- package/model/wTPosMachine.ts +88 -88
- package/model/wTPosMachineCreateParams.ts +58 -58
- package/model/wTPosMachineUpdateParams.ts +58 -58
- package/model/wTPromoCodeCreateParams.ts +67 -67
- package/model/wTPromoCodeUpdateParams.ts +67 -67
- package/model/wTRole.ts +116 -116
- package/model/wTStaticVoucher.ts +224 -224
- package/model/wTStaticVoucherCampaign.ts +175 -175
- package/model/wTStaticVoucherCreateParams.ts +49 -49
- package/model/wTStaticVoucherUpdateParams.ts +43 -43
- package/model/wTWalletPageView.ts +251 -251
- package/model/wTWalletPageViewGeoPoint.ts +37 -37
- package/model/walletPageView.ts +251 -251
- package/model/webpage.ts +85 -85
- package/package.json +28 -25
- package/readme-generator.py +42 -42
- package/tsconfig.json +25 -25
package/api/billingApi.ts
CHANGED
|
@@ -1,680 +1,680 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* wallet-api
|
|
3
|
-
* API
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.1.3
|
|
6
|
-
* Contact: development@wallet.inc
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import localVarRequest from 'request';
|
|
15
|
-
import http from 'http';
|
|
16
|
-
|
|
17
|
-
/* tslint:disable:no-unused-locals */
|
|
18
|
-
import { AuthError } from '../model/authError';
|
|
19
|
-
import { FalsumError } from '../model/falsumError';
|
|
20
|
-
import { InlineObject } from '../model/inlineObject';
|
|
21
|
-
import { InlineObject1 } from '../model/inlineObject1';
|
|
22
|
-
import { InlineResponse200 } from '../model/inlineResponse200';
|
|
23
|
-
import { InlineResponse2001 } from '../model/inlineResponse2001';
|
|
24
|
-
import { InternalServerError } from '../model/internalServerError';
|
|
25
|
-
|
|
26
|
-
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
27
|
-
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
28
|
-
|
|
29
|
-
import { HttpError, RequestFile } from './apis';
|
|
30
|
-
|
|
31
|
-
let defaultBasePath = 'https://api.wall.et';
|
|
32
|
-
|
|
33
|
-
// ===============================================
|
|
34
|
-
// This file is autogenerated - Please do not edit
|
|
35
|
-
// ===============================================
|
|
36
|
-
|
|
37
|
-
export enum BillingApiApiKeys {
|
|
38
|
-
api_key,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class BillingApi {
|
|
42
|
-
protected _basePath = defaultBasePath;
|
|
43
|
-
protected _defaultHeaders : any = {};
|
|
44
|
-
protected _useQuerystring : boolean = false;
|
|
45
|
-
|
|
46
|
-
protected authentications = {
|
|
47
|
-
'default': <Authentication>new VoidAuth(),
|
|
48
|
-
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
protected interceptors: Interceptor[] = [];
|
|
52
|
-
|
|
53
|
-
constructor(basePath?: string);
|
|
54
|
-
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
55
|
-
if (password) {
|
|
56
|
-
if (basePath) {
|
|
57
|
-
this.basePath = basePath;
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
if (basePathOrUsername) {
|
|
61
|
-
this.basePath = basePathOrUsername
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
set useQuerystring(value: boolean) {
|
|
67
|
-
this._useQuerystring = value;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
set basePath(basePath: string) {
|
|
71
|
-
this._basePath = basePath;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
set defaultHeaders(defaultHeaders: any) {
|
|
75
|
-
this._defaultHeaders = defaultHeaders;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
get defaultHeaders() {
|
|
79
|
-
return this._defaultHeaders;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
get basePath() {
|
|
83
|
-
return this._basePath;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public setDefaultAuthentication(auth: Authentication) {
|
|
87
|
-
this.authentications.default = auth;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
public setApiKey(key: BillingApiApiKeys, value: string) {
|
|
91
|
-
(this.authentications as any)[BillingApiApiKeys[key]].apiKey = value;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
-
this.interceptors.push(interceptor);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @summary Fetch upcoming invoices
|
|
101
|
-
*/
|
|
102
|
-
public async cancelPlan (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
103
|
-
const localVarPath = this.basePath + '/v1/billing/plan';
|
|
104
|
-
let localVarQueryParameters: any = {};
|
|
105
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
106
|
-
const produces = ['application/json'];
|
|
107
|
-
// give precedence to 'application/json'
|
|
108
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
109
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
110
|
-
} else {
|
|
111
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
112
|
-
}
|
|
113
|
-
let localVarFormParams: any = {};
|
|
114
|
-
|
|
115
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
116
|
-
|
|
117
|
-
let localVarUseFormData = false;
|
|
118
|
-
|
|
119
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
120
|
-
method: 'DELETE',
|
|
121
|
-
qs: localVarQueryParameters,
|
|
122
|
-
headers: localVarHeaderParams,
|
|
123
|
-
uri: localVarPath,
|
|
124
|
-
useQuerystring: this._useQuerystring,
|
|
125
|
-
json: true,
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
let authenticationPromise = Promise.resolve();
|
|
129
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
130
|
-
|
|
131
|
-
let interceptorPromise = authenticationPromise;
|
|
132
|
-
for (const interceptor of this.interceptors) {
|
|
133
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return interceptorPromise.then(() => {
|
|
137
|
-
if (Object.keys(localVarFormParams).length) {
|
|
138
|
-
if (localVarUseFormData) {
|
|
139
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
140
|
-
} else {
|
|
141
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
145
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
146
|
-
if (error) {
|
|
147
|
-
reject(error);
|
|
148
|
-
} else {
|
|
149
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
150
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
151
|
-
resolve({ response: response, body: body });
|
|
152
|
-
} else {
|
|
153
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
*
|
|
162
|
-
* @summary Fetch upcoming invoices
|
|
163
|
-
* @param inlineObject1
|
|
164
|
-
*/
|
|
165
|
-
public async changePlan (inlineObject1: InlineObject1, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
166
|
-
const localVarPath = this.basePath + '/v1/billing/plan';
|
|
167
|
-
let localVarQueryParameters: any = {};
|
|
168
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
169
|
-
const produces = ['application/json'];
|
|
170
|
-
// give precedence to 'application/json'
|
|
171
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
172
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
173
|
-
} else {
|
|
174
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
175
|
-
}
|
|
176
|
-
let localVarFormParams: any = {};
|
|
177
|
-
|
|
178
|
-
// verify required parameter 'inlineObject1' is not null or undefined
|
|
179
|
-
if (inlineObject1 === null || inlineObject1 === undefined) {
|
|
180
|
-
throw new Error('Required parameter inlineObject1 was null or undefined when calling changePlan.');
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
184
|
-
|
|
185
|
-
let localVarUseFormData = false;
|
|
186
|
-
|
|
187
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
188
|
-
method: 'PUT',
|
|
189
|
-
qs: localVarQueryParameters,
|
|
190
|
-
headers: localVarHeaderParams,
|
|
191
|
-
uri: localVarPath,
|
|
192
|
-
useQuerystring: this._useQuerystring,
|
|
193
|
-
json: true,
|
|
194
|
-
body: ObjectSerializer.serialize(inlineObject1, "InlineObject1")
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
let authenticationPromise = Promise.resolve();
|
|
198
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
199
|
-
|
|
200
|
-
let interceptorPromise = authenticationPromise;
|
|
201
|
-
for (const interceptor of this.interceptors) {
|
|
202
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return interceptorPromise.then(() => {
|
|
206
|
-
if (Object.keys(localVarFormParams).length) {
|
|
207
|
-
if (localVarUseFormData) {
|
|
208
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
209
|
-
} else {
|
|
210
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
214
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
215
|
-
if (error) {
|
|
216
|
-
reject(error);
|
|
217
|
-
} else {
|
|
218
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
219
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
220
|
-
resolve({ response: response, body: body });
|
|
221
|
-
} else {
|
|
222
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
*
|
|
231
|
-
* @summary Fetch merchant\'s industry
|
|
232
|
-
*/
|
|
233
|
-
public async fetchIndustry (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InlineResponse2001; }> {
|
|
234
|
-
const localVarPath = this.basePath + '/v1/billing/industry';
|
|
235
|
-
let localVarQueryParameters: any = {};
|
|
236
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
237
|
-
const produces = ['application/json'];
|
|
238
|
-
// give precedence to 'application/json'
|
|
239
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
240
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
241
|
-
} else {
|
|
242
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
243
|
-
}
|
|
244
|
-
let localVarFormParams: any = {};
|
|
245
|
-
|
|
246
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
247
|
-
|
|
248
|
-
let localVarUseFormData = false;
|
|
249
|
-
|
|
250
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
251
|
-
method: 'GET',
|
|
252
|
-
qs: localVarQueryParameters,
|
|
253
|
-
headers: localVarHeaderParams,
|
|
254
|
-
uri: localVarPath,
|
|
255
|
-
useQuerystring: this._useQuerystring,
|
|
256
|
-
json: true,
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
let authenticationPromise = Promise.resolve();
|
|
260
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
261
|
-
|
|
262
|
-
let interceptorPromise = authenticationPromise;
|
|
263
|
-
for (const interceptor of this.interceptors) {
|
|
264
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return interceptorPromise.then(() => {
|
|
268
|
-
if (Object.keys(localVarFormParams).length) {
|
|
269
|
-
if (localVarUseFormData) {
|
|
270
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
271
|
-
} else {
|
|
272
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
return new Promise<{ response: http.IncomingMessage; body: InlineResponse2001; }>((resolve, reject) => {
|
|
276
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
277
|
-
if (error) {
|
|
278
|
-
reject(error);
|
|
279
|
-
} else {
|
|
280
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
281
|
-
body = ObjectSerializer.deserialize(body, "InlineResponse2001");
|
|
282
|
-
resolve({ response: response, body: body });
|
|
283
|
-
} else {
|
|
284
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
*
|
|
293
|
-
* @summary Fetch all invoices
|
|
294
|
-
*/
|
|
295
|
-
public async fetchInvoices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
296
|
-
const localVarPath = this.basePath + '/v1/billing/invoices/all';
|
|
297
|
-
let localVarQueryParameters: any = {};
|
|
298
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
299
|
-
const produces = ['application/json'];
|
|
300
|
-
// give precedence to 'application/json'
|
|
301
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
302
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
303
|
-
} else {
|
|
304
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
305
|
-
}
|
|
306
|
-
let localVarFormParams: any = {};
|
|
307
|
-
|
|
308
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
309
|
-
|
|
310
|
-
let localVarUseFormData = false;
|
|
311
|
-
|
|
312
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
313
|
-
method: 'GET',
|
|
314
|
-
qs: localVarQueryParameters,
|
|
315
|
-
headers: localVarHeaderParams,
|
|
316
|
-
uri: localVarPath,
|
|
317
|
-
useQuerystring: this._useQuerystring,
|
|
318
|
-
json: true,
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
let authenticationPromise = Promise.resolve();
|
|
322
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
323
|
-
|
|
324
|
-
let interceptorPromise = authenticationPromise;
|
|
325
|
-
for (const interceptor of this.interceptors) {
|
|
326
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return interceptorPromise.then(() => {
|
|
330
|
-
if (Object.keys(localVarFormParams).length) {
|
|
331
|
-
if (localVarUseFormData) {
|
|
332
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
333
|
-
} else {
|
|
334
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
338
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
339
|
-
if (error) {
|
|
340
|
-
reject(error);
|
|
341
|
-
} else {
|
|
342
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
343
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
344
|
-
resolve({ response: response, body: body });
|
|
345
|
-
} else {
|
|
346
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
*
|
|
355
|
-
* @summary Fetch subscription
|
|
356
|
-
*/
|
|
357
|
-
public async fetchSubscription (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
358
|
-
const localVarPath = this.basePath + '/v1/billing/subscription';
|
|
359
|
-
let localVarQueryParameters: any = {};
|
|
360
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
361
|
-
const produces = ['application/json'];
|
|
362
|
-
// give precedence to 'application/json'
|
|
363
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
364
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
365
|
-
} else {
|
|
366
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
367
|
-
}
|
|
368
|
-
let localVarFormParams: any = {};
|
|
369
|
-
|
|
370
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
371
|
-
|
|
372
|
-
let localVarUseFormData = false;
|
|
373
|
-
|
|
374
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
375
|
-
method: 'GET',
|
|
376
|
-
qs: localVarQueryParameters,
|
|
377
|
-
headers: localVarHeaderParams,
|
|
378
|
-
uri: localVarPath,
|
|
379
|
-
useQuerystring: this._useQuerystring,
|
|
380
|
-
json: true,
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
let authenticationPromise = Promise.resolve();
|
|
384
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
385
|
-
|
|
386
|
-
let interceptorPromise = authenticationPromise;
|
|
387
|
-
for (const interceptor of this.interceptors) {
|
|
388
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
return interceptorPromise.then(() => {
|
|
392
|
-
if (Object.keys(localVarFormParams).length) {
|
|
393
|
-
if (localVarUseFormData) {
|
|
394
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
395
|
-
} else {
|
|
396
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
400
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
401
|
-
if (error) {
|
|
402
|
-
reject(error);
|
|
403
|
-
} else {
|
|
404
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
405
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
406
|
-
resolve({ response: response, body: body });
|
|
407
|
-
} else {
|
|
408
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
*
|
|
417
|
-
* @summary Fetch usage summary
|
|
418
|
-
* @param startDateTime
|
|
419
|
-
* @param endDateTime
|
|
420
|
-
*/
|
|
421
|
-
public async fetchUsageSummary (startDateTime?: Date, endDateTime?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
422
|
-
const localVarPath = this.basePath + '/v1/billing/summary';
|
|
423
|
-
let localVarQueryParameters: any = {};
|
|
424
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
425
|
-
const produces = ['application/json'];
|
|
426
|
-
// give precedence to 'application/json'
|
|
427
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
428
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
429
|
-
} else {
|
|
430
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
431
|
-
}
|
|
432
|
-
let localVarFormParams: any = {};
|
|
433
|
-
|
|
434
|
-
if (startDateTime !== undefined) {
|
|
435
|
-
localVarQueryParameters['startDateTime'] = ObjectSerializer.serialize(startDateTime, "Date");
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (endDateTime !== undefined) {
|
|
439
|
-
localVarQueryParameters['endDateTime'] = ObjectSerializer.serialize(endDateTime, "Date");
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
443
|
-
|
|
444
|
-
let localVarUseFormData = false;
|
|
445
|
-
|
|
446
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
447
|
-
method: 'GET',
|
|
448
|
-
qs: localVarQueryParameters,
|
|
449
|
-
headers: localVarHeaderParams,
|
|
450
|
-
uri: localVarPath,
|
|
451
|
-
useQuerystring: this._useQuerystring,
|
|
452
|
-
json: true,
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
let authenticationPromise = Promise.resolve();
|
|
456
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
457
|
-
|
|
458
|
-
let interceptorPromise = authenticationPromise;
|
|
459
|
-
for (const interceptor of this.interceptors) {
|
|
460
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
return interceptorPromise.then(() => {
|
|
464
|
-
if (Object.keys(localVarFormParams).length) {
|
|
465
|
-
if (localVarUseFormData) {
|
|
466
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
467
|
-
} else {
|
|
468
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
472
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
473
|
-
if (error) {
|
|
474
|
-
reject(error);
|
|
475
|
-
} else {
|
|
476
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
477
|
-
body = ObjectSerializer.deserialize(body, "object");
|
|
478
|
-
resolve({ response: response, body: body });
|
|
479
|
-
} else {
|
|
480
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
});
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
*
|
|
489
|
-
* @summary Save payment method
|
|
490
|
-
* @param inlineObject
|
|
491
|
-
*/
|
|
492
|
-
public async savePaymentMethod (inlineObject: InlineObject, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
493
|
-
const localVarPath = this.basePath + '/v1/billing/paymentMethod';
|
|
494
|
-
let localVarQueryParameters: any = {};
|
|
495
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
496
|
-
const produces = ['application/json'];
|
|
497
|
-
// give precedence to 'application/json'
|
|
498
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
499
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
500
|
-
} else {
|
|
501
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
502
|
-
}
|
|
503
|
-
let localVarFormParams: any = {};
|
|
504
|
-
|
|
505
|
-
// verify required parameter 'inlineObject' is not null or undefined
|
|
506
|
-
if (inlineObject === null || inlineObject === undefined) {
|
|
507
|
-
throw new Error('Required parameter inlineObject was null or undefined when calling savePaymentMethod.');
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
511
|
-
|
|
512
|
-
let localVarUseFormData = false;
|
|
513
|
-
|
|
514
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
515
|
-
method: 'PUT',
|
|
516
|
-
qs: localVarQueryParameters,
|
|
517
|
-
headers: localVarHeaderParams,
|
|
518
|
-
uri: localVarPath,
|
|
519
|
-
useQuerystring: this._useQuerystring,
|
|
520
|
-
json: true,
|
|
521
|
-
body: ObjectSerializer.serialize(inlineObject, "InlineObject")
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
let authenticationPromise = Promise.resolve();
|
|
525
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
526
|
-
|
|
527
|
-
let interceptorPromise = authenticationPromise;
|
|
528
|
-
for (const interceptor of this.interceptors) {
|
|
529
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
return interceptorPromise.then(() => {
|
|
533
|
-
if (Object.keys(localVarFormParams).length) {
|
|
534
|
-
if (localVarUseFormData) {
|
|
535
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
536
|
-
} else {
|
|
537
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
541
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
542
|
-
if (error) {
|
|
543
|
-
reject(error);
|
|
544
|
-
} else {
|
|
545
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
546
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
547
|
-
resolve({ response: response, body: body });
|
|
548
|
-
} else {
|
|
549
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
});
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
*
|
|
558
|
-
* @summary Fetch upcoming invoices
|
|
559
|
-
*/
|
|
560
|
-
public async upcomingInvoices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
561
|
-
const localVarPath = this.basePath + '/v1/billing/invoices/upcoming';
|
|
562
|
-
let localVarQueryParameters: any = {};
|
|
563
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
564
|
-
const produces = ['application/json'];
|
|
565
|
-
// give precedence to 'application/json'
|
|
566
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
567
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
568
|
-
} else {
|
|
569
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
570
|
-
}
|
|
571
|
-
let localVarFormParams: any = {};
|
|
572
|
-
|
|
573
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
574
|
-
|
|
575
|
-
let localVarUseFormData = false;
|
|
576
|
-
|
|
577
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
578
|
-
method: 'GET',
|
|
579
|
-
qs: localVarQueryParameters,
|
|
580
|
-
headers: localVarHeaderParams,
|
|
581
|
-
uri: localVarPath,
|
|
582
|
-
useQuerystring: this._useQuerystring,
|
|
583
|
-
json: true,
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
let authenticationPromise = Promise.resolve();
|
|
587
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
588
|
-
|
|
589
|
-
let interceptorPromise = authenticationPromise;
|
|
590
|
-
for (const interceptor of this.interceptors) {
|
|
591
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
return interceptorPromise.then(() => {
|
|
595
|
-
if (Object.keys(localVarFormParams).length) {
|
|
596
|
-
if (localVarUseFormData) {
|
|
597
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
598
|
-
} else {
|
|
599
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
603
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
604
|
-
if (error) {
|
|
605
|
-
reject(error);
|
|
606
|
-
} else {
|
|
607
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
608
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
609
|
-
resolve({ response: response, body: body });
|
|
610
|
-
} else {
|
|
611
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
});
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
*
|
|
620
|
-
* @summary Verify payment method
|
|
621
|
-
*/
|
|
622
|
-
public async verifyPaymentMethod (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InlineResponse200; }> {
|
|
623
|
-
const localVarPath = this.basePath + '/v1/billing/paymentMethod';
|
|
624
|
-
let localVarQueryParameters: any = {};
|
|
625
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
626
|
-
const produces = ['application/json'];
|
|
627
|
-
// give precedence to 'application/json'
|
|
628
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
629
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
630
|
-
} else {
|
|
631
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
632
|
-
}
|
|
633
|
-
let localVarFormParams: any = {};
|
|
634
|
-
|
|
635
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
636
|
-
|
|
637
|
-
let localVarUseFormData = false;
|
|
638
|
-
|
|
639
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
640
|
-
method: 'GET',
|
|
641
|
-
qs: localVarQueryParameters,
|
|
642
|
-
headers: localVarHeaderParams,
|
|
643
|
-
uri: localVarPath,
|
|
644
|
-
useQuerystring: this._useQuerystring,
|
|
645
|
-
json: true,
|
|
646
|
-
};
|
|
647
|
-
|
|
648
|
-
let authenticationPromise = Promise.resolve();
|
|
649
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
650
|
-
|
|
651
|
-
let interceptorPromise = authenticationPromise;
|
|
652
|
-
for (const interceptor of this.interceptors) {
|
|
653
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
return interceptorPromise.then(() => {
|
|
657
|
-
if (Object.keys(localVarFormParams).length) {
|
|
658
|
-
if (localVarUseFormData) {
|
|
659
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
660
|
-
} else {
|
|
661
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
return new Promise<{ response: http.IncomingMessage; body: InlineResponse200; }>((resolve, reject) => {
|
|
665
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
666
|
-
if (error) {
|
|
667
|
-
reject(error);
|
|
668
|
-
} else {
|
|
669
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
670
|
-
body = ObjectSerializer.deserialize(body, "InlineResponse200");
|
|
671
|
-
resolve({ response: response, body: body });
|
|
672
|
-
} else {
|
|
673
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* wallet-api
|
|
3
|
+
* API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.1.3
|
|
6
|
+
* Contact: development@wallet.inc
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { AuthError } from '../model/authError';
|
|
19
|
+
import { FalsumError } from '../model/falsumError';
|
|
20
|
+
import { InlineObject } from '../model/inlineObject';
|
|
21
|
+
import { InlineObject1 } from '../model/inlineObject1';
|
|
22
|
+
import { InlineResponse200 } from '../model/inlineResponse200';
|
|
23
|
+
import { InlineResponse2001 } from '../model/inlineResponse2001';
|
|
24
|
+
import { InternalServerError } from '../model/internalServerError';
|
|
25
|
+
|
|
26
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
27
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
28
|
+
|
|
29
|
+
import { HttpError, RequestFile } from './apis';
|
|
30
|
+
|
|
31
|
+
let defaultBasePath = 'https://api.wall.et';
|
|
32
|
+
|
|
33
|
+
// ===============================================
|
|
34
|
+
// This file is autogenerated - Please do not edit
|
|
35
|
+
// ===============================================
|
|
36
|
+
|
|
37
|
+
export enum BillingApiApiKeys {
|
|
38
|
+
api_key,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class BillingApi {
|
|
42
|
+
protected _basePath = defaultBasePath;
|
|
43
|
+
protected _defaultHeaders : any = {};
|
|
44
|
+
protected _useQuerystring : boolean = false;
|
|
45
|
+
|
|
46
|
+
protected authentications = {
|
|
47
|
+
'default': <Authentication>new VoidAuth(),
|
|
48
|
+
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
protected interceptors: Interceptor[] = [];
|
|
52
|
+
|
|
53
|
+
constructor(basePath?: string);
|
|
54
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
55
|
+
if (password) {
|
|
56
|
+
if (basePath) {
|
|
57
|
+
this.basePath = basePath;
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
if (basePathOrUsername) {
|
|
61
|
+
this.basePath = basePathOrUsername
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
set useQuerystring(value: boolean) {
|
|
67
|
+
this._useQuerystring = value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
set basePath(basePath: string) {
|
|
71
|
+
this._basePath = basePath;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
75
|
+
this._defaultHeaders = defaultHeaders;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
get defaultHeaders() {
|
|
79
|
+
return this._defaultHeaders;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get basePath() {
|
|
83
|
+
return this._basePath;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
87
|
+
this.authentications.default = auth;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public setApiKey(key: BillingApiApiKeys, value: string) {
|
|
91
|
+
(this.authentications as any)[BillingApiApiKeys[key]].apiKey = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
+
this.interceptors.push(interceptor);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Fetch upcoming invoices
|
|
101
|
+
*/
|
|
102
|
+
public async cancelPlan (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
103
|
+
const localVarPath = this.basePath + '/v1/billing/plan';
|
|
104
|
+
let localVarQueryParameters: any = {};
|
|
105
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
106
|
+
const produces = ['application/json'];
|
|
107
|
+
// give precedence to 'application/json'
|
|
108
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
109
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
110
|
+
} else {
|
|
111
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
112
|
+
}
|
|
113
|
+
let localVarFormParams: any = {};
|
|
114
|
+
|
|
115
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
116
|
+
|
|
117
|
+
let localVarUseFormData = false;
|
|
118
|
+
|
|
119
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
120
|
+
method: 'DELETE',
|
|
121
|
+
qs: localVarQueryParameters,
|
|
122
|
+
headers: localVarHeaderParams,
|
|
123
|
+
uri: localVarPath,
|
|
124
|
+
useQuerystring: this._useQuerystring,
|
|
125
|
+
json: true,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
let authenticationPromise = Promise.resolve();
|
|
129
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
130
|
+
|
|
131
|
+
let interceptorPromise = authenticationPromise;
|
|
132
|
+
for (const interceptor of this.interceptors) {
|
|
133
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return interceptorPromise.then(() => {
|
|
137
|
+
if (Object.keys(localVarFormParams).length) {
|
|
138
|
+
if (localVarUseFormData) {
|
|
139
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
140
|
+
} else {
|
|
141
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
145
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
146
|
+
if (error) {
|
|
147
|
+
reject(error);
|
|
148
|
+
} else {
|
|
149
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
150
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
151
|
+
resolve({ response: response, body: body });
|
|
152
|
+
} else {
|
|
153
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @summary Fetch upcoming invoices
|
|
163
|
+
* @param inlineObject1
|
|
164
|
+
*/
|
|
165
|
+
public async changePlan (inlineObject1: InlineObject1, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
166
|
+
const localVarPath = this.basePath + '/v1/billing/plan';
|
|
167
|
+
let localVarQueryParameters: any = {};
|
|
168
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
169
|
+
const produces = ['application/json'];
|
|
170
|
+
// give precedence to 'application/json'
|
|
171
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
172
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
173
|
+
} else {
|
|
174
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
175
|
+
}
|
|
176
|
+
let localVarFormParams: any = {};
|
|
177
|
+
|
|
178
|
+
// verify required parameter 'inlineObject1' is not null or undefined
|
|
179
|
+
if (inlineObject1 === null || inlineObject1 === undefined) {
|
|
180
|
+
throw new Error('Required parameter inlineObject1 was null or undefined when calling changePlan.');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
184
|
+
|
|
185
|
+
let localVarUseFormData = false;
|
|
186
|
+
|
|
187
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
188
|
+
method: 'PUT',
|
|
189
|
+
qs: localVarQueryParameters,
|
|
190
|
+
headers: localVarHeaderParams,
|
|
191
|
+
uri: localVarPath,
|
|
192
|
+
useQuerystring: this._useQuerystring,
|
|
193
|
+
json: true,
|
|
194
|
+
body: ObjectSerializer.serialize(inlineObject1, "InlineObject1")
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
let authenticationPromise = Promise.resolve();
|
|
198
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
199
|
+
|
|
200
|
+
let interceptorPromise = authenticationPromise;
|
|
201
|
+
for (const interceptor of this.interceptors) {
|
|
202
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return interceptorPromise.then(() => {
|
|
206
|
+
if (Object.keys(localVarFormParams).length) {
|
|
207
|
+
if (localVarUseFormData) {
|
|
208
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
209
|
+
} else {
|
|
210
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
214
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
215
|
+
if (error) {
|
|
216
|
+
reject(error);
|
|
217
|
+
} else {
|
|
218
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
219
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
220
|
+
resolve({ response: response, body: body });
|
|
221
|
+
} else {
|
|
222
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @summary Fetch merchant\'s industry
|
|
232
|
+
*/
|
|
233
|
+
public async fetchIndustry (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InlineResponse2001; }> {
|
|
234
|
+
const localVarPath = this.basePath + '/v1/billing/industry';
|
|
235
|
+
let localVarQueryParameters: any = {};
|
|
236
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
237
|
+
const produces = ['application/json'];
|
|
238
|
+
// give precedence to 'application/json'
|
|
239
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
240
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
241
|
+
} else {
|
|
242
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
243
|
+
}
|
|
244
|
+
let localVarFormParams: any = {};
|
|
245
|
+
|
|
246
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
247
|
+
|
|
248
|
+
let localVarUseFormData = false;
|
|
249
|
+
|
|
250
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
251
|
+
method: 'GET',
|
|
252
|
+
qs: localVarQueryParameters,
|
|
253
|
+
headers: localVarHeaderParams,
|
|
254
|
+
uri: localVarPath,
|
|
255
|
+
useQuerystring: this._useQuerystring,
|
|
256
|
+
json: true,
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
let authenticationPromise = Promise.resolve();
|
|
260
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
261
|
+
|
|
262
|
+
let interceptorPromise = authenticationPromise;
|
|
263
|
+
for (const interceptor of this.interceptors) {
|
|
264
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return interceptorPromise.then(() => {
|
|
268
|
+
if (Object.keys(localVarFormParams).length) {
|
|
269
|
+
if (localVarUseFormData) {
|
|
270
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
271
|
+
} else {
|
|
272
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return new Promise<{ response: http.IncomingMessage; body: InlineResponse2001; }>((resolve, reject) => {
|
|
276
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
277
|
+
if (error) {
|
|
278
|
+
reject(error);
|
|
279
|
+
} else {
|
|
280
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
281
|
+
body = ObjectSerializer.deserialize(body, "InlineResponse2001");
|
|
282
|
+
resolve({ response: response, body: body });
|
|
283
|
+
} else {
|
|
284
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
*
|
|
293
|
+
* @summary Fetch all invoices
|
|
294
|
+
*/
|
|
295
|
+
public async fetchInvoices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
296
|
+
const localVarPath = this.basePath + '/v1/billing/invoices/all';
|
|
297
|
+
let localVarQueryParameters: any = {};
|
|
298
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
299
|
+
const produces = ['application/json'];
|
|
300
|
+
// give precedence to 'application/json'
|
|
301
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
302
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
303
|
+
} else {
|
|
304
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
305
|
+
}
|
|
306
|
+
let localVarFormParams: any = {};
|
|
307
|
+
|
|
308
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
309
|
+
|
|
310
|
+
let localVarUseFormData = false;
|
|
311
|
+
|
|
312
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
313
|
+
method: 'GET',
|
|
314
|
+
qs: localVarQueryParameters,
|
|
315
|
+
headers: localVarHeaderParams,
|
|
316
|
+
uri: localVarPath,
|
|
317
|
+
useQuerystring: this._useQuerystring,
|
|
318
|
+
json: true,
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
let authenticationPromise = Promise.resolve();
|
|
322
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
323
|
+
|
|
324
|
+
let interceptorPromise = authenticationPromise;
|
|
325
|
+
for (const interceptor of this.interceptors) {
|
|
326
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
return interceptorPromise.then(() => {
|
|
330
|
+
if (Object.keys(localVarFormParams).length) {
|
|
331
|
+
if (localVarUseFormData) {
|
|
332
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
333
|
+
} else {
|
|
334
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
338
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
339
|
+
if (error) {
|
|
340
|
+
reject(error);
|
|
341
|
+
} else {
|
|
342
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
343
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
344
|
+
resolve({ response: response, body: body });
|
|
345
|
+
} else {
|
|
346
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
*
|
|
355
|
+
* @summary Fetch subscription
|
|
356
|
+
*/
|
|
357
|
+
public async fetchSubscription (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
358
|
+
const localVarPath = this.basePath + '/v1/billing/subscription';
|
|
359
|
+
let localVarQueryParameters: any = {};
|
|
360
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
361
|
+
const produces = ['application/json'];
|
|
362
|
+
// give precedence to 'application/json'
|
|
363
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
364
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
365
|
+
} else {
|
|
366
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
367
|
+
}
|
|
368
|
+
let localVarFormParams: any = {};
|
|
369
|
+
|
|
370
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
371
|
+
|
|
372
|
+
let localVarUseFormData = false;
|
|
373
|
+
|
|
374
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
375
|
+
method: 'GET',
|
|
376
|
+
qs: localVarQueryParameters,
|
|
377
|
+
headers: localVarHeaderParams,
|
|
378
|
+
uri: localVarPath,
|
|
379
|
+
useQuerystring: this._useQuerystring,
|
|
380
|
+
json: true,
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
let authenticationPromise = Promise.resolve();
|
|
384
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
385
|
+
|
|
386
|
+
let interceptorPromise = authenticationPromise;
|
|
387
|
+
for (const interceptor of this.interceptors) {
|
|
388
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return interceptorPromise.then(() => {
|
|
392
|
+
if (Object.keys(localVarFormParams).length) {
|
|
393
|
+
if (localVarUseFormData) {
|
|
394
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
395
|
+
} else {
|
|
396
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
400
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
401
|
+
if (error) {
|
|
402
|
+
reject(error);
|
|
403
|
+
} else {
|
|
404
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
405
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
406
|
+
resolve({ response: response, body: body });
|
|
407
|
+
} else {
|
|
408
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @summary Fetch usage summary
|
|
418
|
+
* @param startDateTime
|
|
419
|
+
* @param endDateTime
|
|
420
|
+
*/
|
|
421
|
+
public async fetchUsageSummary (startDateTime?: Date, endDateTime?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
422
|
+
const localVarPath = this.basePath + '/v1/billing/summary';
|
|
423
|
+
let localVarQueryParameters: any = {};
|
|
424
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
425
|
+
const produces = ['application/json'];
|
|
426
|
+
// give precedence to 'application/json'
|
|
427
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
428
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
429
|
+
} else {
|
|
430
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
431
|
+
}
|
|
432
|
+
let localVarFormParams: any = {};
|
|
433
|
+
|
|
434
|
+
if (startDateTime !== undefined) {
|
|
435
|
+
localVarQueryParameters['startDateTime'] = ObjectSerializer.serialize(startDateTime, "Date");
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (endDateTime !== undefined) {
|
|
439
|
+
localVarQueryParameters['endDateTime'] = ObjectSerializer.serialize(endDateTime, "Date");
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
443
|
+
|
|
444
|
+
let localVarUseFormData = false;
|
|
445
|
+
|
|
446
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
447
|
+
method: 'GET',
|
|
448
|
+
qs: localVarQueryParameters,
|
|
449
|
+
headers: localVarHeaderParams,
|
|
450
|
+
uri: localVarPath,
|
|
451
|
+
useQuerystring: this._useQuerystring,
|
|
452
|
+
json: true,
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
let authenticationPromise = Promise.resolve();
|
|
456
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
457
|
+
|
|
458
|
+
let interceptorPromise = authenticationPromise;
|
|
459
|
+
for (const interceptor of this.interceptors) {
|
|
460
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
return interceptorPromise.then(() => {
|
|
464
|
+
if (Object.keys(localVarFormParams).length) {
|
|
465
|
+
if (localVarUseFormData) {
|
|
466
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
467
|
+
} else {
|
|
468
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
472
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
473
|
+
if (error) {
|
|
474
|
+
reject(error);
|
|
475
|
+
} else {
|
|
476
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
477
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
478
|
+
resolve({ response: response, body: body });
|
|
479
|
+
} else {
|
|
480
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
*
|
|
489
|
+
* @summary Save payment method
|
|
490
|
+
* @param inlineObject
|
|
491
|
+
*/
|
|
492
|
+
public async savePaymentMethod (inlineObject: InlineObject, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
493
|
+
const localVarPath = this.basePath + '/v1/billing/paymentMethod';
|
|
494
|
+
let localVarQueryParameters: any = {};
|
|
495
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
496
|
+
const produces = ['application/json'];
|
|
497
|
+
// give precedence to 'application/json'
|
|
498
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
499
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
500
|
+
} else {
|
|
501
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
502
|
+
}
|
|
503
|
+
let localVarFormParams: any = {};
|
|
504
|
+
|
|
505
|
+
// verify required parameter 'inlineObject' is not null or undefined
|
|
506
|
+
if (inlineObject === null || inlineObject === undefined) {
|
|
507
|
+
throw new Error('Required parameter inlineObject was null or undefined when calling savePaymentMethod.');
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
511
|
+
|
|
512
|
+
let localVarUseFormData = false;
|
|
513
|
+
|
|
514
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
515
|
+
method: 'PUT',
|
|
516
|
+
qs: localVarQueryParameters,
|
|
517
|
+
headers: localVarHeaderParams,
|
|
518
|
+
uri: localVarPath,
|
|
519
|
+
useQuerystring: this._useQuerystring,
|
|
520
|
+
json: true,
|
|
521
|
+
body: ObjectSerializer.serialize(inlineObject, "InlineObject")
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
let authenticationPromise = Promise.resolve();
|
|
525
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
526
|
+
|
|
527
|
+
let interceptorPromise = authenticationPromise;
|
|
528
|
+
for (const interceptor of this.interceptors) {
|
|
529
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return interceptorPromise.then(() => {
|
|
533
|
+
if (Object.keys(localVarFormParams).length) {
|
|
534
|
+
if (localVarUseFormData) {
|
|
535
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
536
|
+
} else {
|
|
537
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
541
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
542
|
+
if (error) {
|
|
543
|
+
reject(error);
|
|
544
|
+
} else {
|
|
545
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
546
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
547
|
+
resolve({ response: response, body: body });
|
|
548
|
+
} else {
|
|
549
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
*
|
|
558
|
+
* @summary Fetch upcoming invoices
|
|
559
|
+
*/
|
|
560
|
+
public async upcomingInvoices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
561
|
+
const localVarPath = this.basePath + '/v1/billing/invoices/upcoming';
|
|
562
|
+
let localVarQueryParameters: any = {};
|
|
563
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
564
|
+
const produces = ['application/json'];
|
|
565
|
+
// give precedence to 'application/json'
|
|
566
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
567
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
568
|
+
} else {
|
|
569
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
570
|
+
}
|
|
571
|
+
let localVarFormParams: any = {};
|
|
572
|
+
|
|
573
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
574
|
+
|
|
575
|
+
let localVarUseFormData = false;
|
|
576
|
+
|
|
577
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
578
|
+
method: 'GET',
|
|
579
|
+
qs: localVarQueryParameters,
|
|
580
|
+
headers: localVarHeaderParams,
|
|
581
|
+
uri: localVarPath,
|
|
582
|
+
useQuerystring: this._useQuerystring,
|
|
583
|
+
json: true,
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
let authenticationPromise = Promise.resolve();
|
|
587
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
588
|
+
|
|
589
|
+
let interceptorPromise = authenticationPromise;
|
|
590
|
+
for (const interceptor of this.interceptors) {
|
|
591
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
return interceptorPromise.then(() => {
|
|
595
|
+
if (Object.keys(localVarFormParams).length) {
|
|
596
|
+
if (localVarUseFormData) {
|
|
597
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
598
|
+
} else {
|
|
599
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
603
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
604
|
+
if (error) {
|
|
605
|
+
reject(error);
|
|
606
|
+
} else {
|
|
607
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
608
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
609
|
+
resolve({ response: response, body: body });
|
|
610
|
+
} else {
|
|
611
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
*
|
|
620
|
+
* @summary Verify payment method
|
|
621
|
+
*/
|
|
622
|
+
public async verifyPaymentMethod (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InlineResponse200; }> {
|
|
623
|
+
const localVarPath = this.basePath + '/v1/billing/paymentMethod';
|
|
624
|
+
let localVarQueryParameters: any = {};
|
|
625
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
626
|
+
const produces = ['application/json'];
|
|
627
|
+
// give precedence to 'application/json'
|
|
628
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
629
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
630
|
+
} else {
|
|
631
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
632
|
+
}
|
|
633
|
+
let localVarFormParams: any = {};
|
|
634
|
+
|
|
635
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
636
|
+
|
|
637
|
+
let localVarUseFormData = false;
|
|
638
|
+
|
|
639
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
640
|
+
method: 'GET',
|
|
641
|
+
qs: localVarQueryParameters,
|
|
642
|
+
headers: localVarHeaderParams,
|
|
643
|
+
uri: localVarPath,
|
|
644
|
+
useQuerystring: this._useQuerystring,
|
|
645
|
+
json: true,
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
let authenticationPromise = Promise.resolve();
|
|
649
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
650
|
+
|
|
651
|
+
let interceptorPromise = authenticationPromise;
|
|
652
|
+
for (const interceptor of this.interceptors) {
|
|
653
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
return interceptorPromise.then(() => {
|
|
657
|
+
if (Object.keys(localVarFormParams).length) {
|
|
658
|
+
if (localVarUseFormData) {
|
|
659
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
660
|
+
} else {
|
|
661
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return new Promise<{ response: http.IncomingMessage; body: InlineResponse200; }>((resolve, reject) => {
|
|
665
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
666
|
+
if (error) {
|
|
667
|
+
reject(error);
|
|
668
|
+
} else {
|
|
669
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
670
|
+
body = ObjectSerializer.deserialize(body, "InlineResponse200");
|
|
671
|
+
resolve({ response: response, body: body });
|
|
672
|
+
} else {
|
|
673
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
}
|