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/merchantURLsApi.ts
CHANGED
|
@@ -1,586 +1,586 @@
|
|
|
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 { InternalServerError } from '../model/internalServerError';
|
|
21
|
-
import { MerchantURL } from '../model/merchantURL';
|
|
22
|
-
import { WTMerchantURLCreate } from '../model/wTMerchantURLCreate';
|
|
23
|
-
import { WTMerchantURLUpdate } from '../model/wTMerchantURLUpdate';
|
|
24
|
-
import { WalletPageView } from '../model/walletPageView';
|
|
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 MerchantURLsApiApiKeys {
|
|
38
|
-
api_key,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class MerchantURLsApi {
|
|
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: MerchantURLsApiApiKeys, value: string) {
|
|
91
|
-
(this.authentications as any)[MerchantURLsApiApiKeys[key]].apiKey = value;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
-
this.interceptors.push(interceptor);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @summary Archive merchant url
|
|
101
|
-
* @param id
|
|
102
|
-
*/
|
|
103
|
-
public async archiveMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
104
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
105
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
106
|
-
let localVarQueryParameters: any = {};
|
|
107
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
108
|
-
const produces = ['application/json'];
|
|
109
|
-
// give precedence to 'application/json'
|
|
110
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
111
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
112
|
-
} else {
|
|
113
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
114
|
-
}
|
|
115
|
-
let localVarFormParams: any = {};
|
|
116
|
-
|
|
117
|
-
// verify required parameter 'id' is not null or undefined
|
|
118
|
-
if (id === null || id === undefined) {
|
|
119
|
-
throw new Error('Required parameter id was null or undefined when calling archiveMerchantURL.');
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
123
|
-
|
|
124
|
-
let localVarUseFormData = false;
|
|
125
|
-
|
|
126
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
127
|
-
method: 'DELETE',
|
|
128
|
-
qs: localVarQueryParameters,
|
|
129
|
-
headers: localVarHeaderParams,
|
|
130
|
-
uri: localVarPath,
|
|
131
|
-
useQuerystring: this._useQuerystring,
|
|
132
|
-
json: true,
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
let authenticationPromise = Promise.resolve();
|
|
136
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
137
|
-
|
|
138
|
-
let interceptorPromise = authenticationPromise;
|
|
139
|
-
for (const interceptor of this.interceptors) {
|
|
140
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return interceptorPromise.then(() => {
|
|
144
|
-
if (Object.keys(localVarFormParams).length) {
|
|
145
|
-
if (localVarUseFormData) {
|
|
146
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
147
|
-
} else {
|
|
148
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
152
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
153
|
-
if (error) {
|
|
154
|
-
reject(error);
|
|
155
|
-
} else {
|
|
156
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
157
|
-
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
158
|
-
resolve({ response: response, body: body });
|
|
159
|
-
} else {
|
|
160
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @summary Create merchant url
|
|
170
|
-
* @param wTMerchantURLCreate
|
|
171
|
-
*/
|
|
172
|
-
public async createMerchantURL (wTMerchantURLCreate: WTMerchantURLCreate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
173
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl';
|
|
174
|
-
let localVarQueryParameters: any = {};
|
|
175
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
176
|
-
const produces = ['application/json'];
|
|
177
|
-
// give precedence to 'application/json'
|
|
178
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
179
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
180
|
-
} else {
|
|
181
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
182
|
-
}
|
|
183
|
-
let localVarFormParams: any = {};
|
|
184
|
-
|
|
185
|
-
// verify required parameter 'wTMerchantURLCreate' is not null or undefined
|
|
186
|
-
if (wTMerchantURLCreate === null || wTMerchantURLCreate === undefined) {
|
|
187
|
-
throw new Error('Required parameter wTMerchantURLCreate was null or undefined when calling createMerchantURL.');
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
191
|
-
|
|
192
|
-
let localVarUseFormData = false;
|
|
193
|
-
|
|
194
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
195
|
-
method: 'POST',
|
|
196
|
-
qs: localVarQueryParameters,
|
|
197
|
-
headers: localVarHeaderParams,
|
|
198
|
-
uri: localVarPath,
|
|
199
|
-
useQuerystring: this._useQuerystring,
|
|
200
|
-
json: true,
|
|
201
|
-
body: ObjectSerializer.serialize(wTMerchantURLCreate, "WTMerchantURLCreate")
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
let authenticationPromise = Promise.resolve();
|
|
205
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
206
|
-
|
|
207
|
-
let interceptorPromise = authenticationPromise;
|
|
208
|
-
for (const interceptor of this.interceptors) {
|
|
209
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return interceptorPromise.then(() => {
|
|
213
|
-
if (Object.keys(localVarFormParams).length) {
|
|
214
|
-
if (localVarUseFormData) {
|
|
215
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
216
|
-
} else {
|
|
217
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
221
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
222
|
-
if (error) {
|
|
223
|
-
reject(error);
|
|
224
|
-
} else {
|
|
225
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
226
|
-
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
227
|
-
resolve({ response: response, body: body });
|
|
228
|
-
} else {
|
|
229
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
*
|
|
238
|
-
* @summary Fetch all merchant urls
|
|
239
|
-
* @param isArchiveIncluded
|
|
240
|
-
*/
|
|
241
|
-
public async fetchAllMerchantURLs (isArchiveIncluded?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
242
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/all';
|
|
243
|
-
let localVarQueryParameters: any = {};
|
|
244
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
245
|
-
const produces = ['application/json'];
|
|
246
|
-
// give precedence to 'application/json'
|
|
247
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
248
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
249
|
-
} else {
|
|
250
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
251
|
-
}
|
|
252
|
-
let localVarFormParams: any = {};
|
|
253
|
-
|
|
254
|
-
if (isArchiveIncluded !== undefined) {
|
|
255
|
-
localVarQueryParameters['isArchiveIncluded'] = ObjectSerializer.serialize(isArchiveIncluded, "boolean");
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
259
|
-
|
|
260
|
-
let localVarUseFormData = false;
|
|
261
|
-
|
|
262
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
263
|
-
method: 'GET',
|
|
264
|
-
qs: localVarQueryParameters,
|
|
265
|
-
headers: localVarHeaderParams,
|
|
266
|
-
uri: localVarPath,
|
|
267
|
-
useQuerystring: this._useQuerystring,
|
|
268
|
-
json: true,
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
let authenticationPromise = Promise.resolve();
|
|
272
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
273
|
-
|
|
274
|
-
let interceptorPromise = authenticationPromise;
|
|
275
|
-
for (const interceptor of this.interceptors) {
|
|
276
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return interceptorPromise.then(() => {
|
|
280
|
-
if (Object.keys(localVarFormParams).length) {
|
|
281
|
-
if (localVarUseFormData) {
|
|
282
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
283
|
-
} else {
|
|
284
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
288
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
289
|
-
if (error) {
|
|
290
|
-
reject(error);
|
|
291
|
-
} else {
|
|
292
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
293
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
294
|
-
resolve({ response: response, body: body });
|
|
295
|
-
} else {
|
|
296
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
*
|
|
305
|
-
* @summary Fetch merchant url
|
|
306
|
-
* @param id
|
|
307
|
-
*/
|
|
308
|
-
public async fetchMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
309
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
310
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
311
|
-
let localVarQueryParameters: any = {};
|
|
312
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
313
|
-
const produces = ['application/json'];
|
|
314
|
-
// give precedence to 'application/json'
|
|
315
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
316
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
317
|
-
} else {
|
|
318
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
319
|
-
}
|
|
320
|
-
let localVarFormParams: any = {};
|
|
321
|
-
|
|
322
|
-
// verify required parameter 'id' is not null or undefined
|
|
323
|
-
if (id === null || id === undefined) {
|
|
324
|
-
throw new Error('Required parameter id was null or undefined when calling fetchMerchantURL.');
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
328
|
-
|
|
329
|
-
let localVarUseFormData = false;
|
|
330
|
-
|
|
331
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
332
|
-
method: 'GET',
|
|
333
|
-
qs: localVarQueryParameters,
|
|
334
|
-
headers: localVarHeaderParams,
|
|
335
|
-
uri: localVarPath,
|
|
336
|
-
useQuerystring: this._useQuerystring,
|
|
337
|
-
json: true,
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
let authenticationPromise = Promise.resolve();
|
|
341
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
342
|
-
|
|
343
|
-
let interceptorPromise = authenticationPromise;
|
|
344
|
-
for (const interceptor of this.interceptors) {
|
|
345
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return interceptorPromise.then(() => {
|
|
349
|
-
if (Object.keys(localVarFormParams).length) {
|
|
350
|
-
if (localVarUseFormData) {
|
|
351
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
352
|
-
} else {
|
|
353
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
357
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
358
|
-
if (error) {
|
|
359
|
-
reject(error);
|
|
360
|
-
} else {
|
|
361
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
362
|
-
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
363
|
-
resolve({ response: response, body: body });
|
|
364
|
-
} else {
|
|
365
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
*
|
|
374
|
-
* @summary Fetch requests
|
|
375
|
-
* @param id
|
|
376
|
-
*/
|
|
377
|
-
public async fetchMerchantURLRequests (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }> {
|
|
378
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/requests/{id}'
|
|
379
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
380
|
-
let localVarQueryParameters: any = {};
|
|
381
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
382
|
-
const produces = ['application/json'];
|
|
383
|
-
// give precedence to 'application/json'
|
|
384
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
385
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
386
|
-
} else {
|
|
387
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
388
|
-
}
|
|
389
|
-
let localVarFormParams: any = {};
|
|
390
|
-
|
|
391
|
-
// verify required parameter 'id' is not null or undefined
|
|
392
|
-
if (id === null || id === undefined) {
|
|
393
|
-
throw new Error('Required parameter id was null or undefined when calling fetchMerchantURLRequests.');
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
397
|
-
|
|
398
|
-
let localVarUseFormData = false;
|
|
399
|
-
|
|
400
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
401
|
-
method: 'GET',
|
|
402
|
-
qs: localVarQueryParameters,
|
|
403
|
-
headers: localVarHeaderParams,
|
|
404
|
-
uri: localVarPath,
|
|
405
|
-
useQuerystring: this._useQuerystring,
|
|
406
|
-
json: true,
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
let authenticationPromise = Promise.resolve();
|
|
410
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
411
|
-
|
|
412
|
-
let interceptorPromise = authenticationPromise;
|
|
413
|
-
for (const interceptor of this.interceptors) {
|
|
414
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
return interceptorPromise.then(() => {
|
|
418
|
-
if (Object.keys(localVarFormParams).length) {
|
|
419
|
-
if (localVarUseFormData) {
|
|
420
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
421
|
-
} else {
|
|
422
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }>((resolve, reject) => {
|
|
426
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
427
|
-
if (error) {
|
|
428
|
-
reject(error);
|
|
429
|
-
} else {
|
|
430
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
431
|
-
body = ObjectSerializer.deserialize(body, "Array<WalletPageView>");
|
|
432
|
-
resolve({ response: response, body: body });
|
|
433
|
-
} else {
|
|
434
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
*
|
|
443
|
-
* @summary Restore merchant url
|
|
444
|
-
* @param id
|
|
445
|
-
*/
|
|
446
|
-
public async restoreMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
447
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
448
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
449
|
-
let localVarQueryParameters: any = {};
|
|
450
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
451
|
-
const produces = ['application/json'];
|
|
452
|
-
// give precedence to 'application/json'
|
|
453
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
454
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
455
|
-
} else {
|
|
456
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
457
|
-
}
|
|
458
|
-
let localVarFormParams: any = {};
|
|
459
|
-
|
|
460
|
-
// verify required parameter 'id' is not null or undefined
|
|
461
|
-
if (id === null || id === undefined) {
|
|
462
|
-
throw new Error('Required parameter id was null or undefined when calling restoreMerchantURL.');
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
466
|
-
|
|
467
|
-
let localVarUseFormData = false;
|
|
468
|
-
|
|
469
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
470
|
-
method: 'PATCH',
|
|
471
|
-
qs: localVarQueryParameters,
|
|
472
|
-
headers: localVarHeaderParams,
|
|
473
|
-
uri: localVarPath,
|
|
474
|
-
useQuerystring: this._useQuerystring,
|
|
475
|
-
json: true,
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
let authenticationPromise = Promise.resolve();
|
|
479
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
480
|
-
|
|
481
|
-
let interceptorPromise = authenticationPromise;
|
|
482
|
-
for (const interceptor of this.interceptors) {
|
|
483
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
return interceptorPromise.then(() => {
|
|
487
|
-
if (Object.keys(localVarFormParams).length) {
|
|
488
|
-
if (localVarUseFormData) {
|
|
489
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
490
|
-
} else {
|
|
491
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
495
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
496
|
-
if (error) {
|
|
497
|
-
reject(error);
|
|
498
|
-
} else {
|
|
499
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
500
|
-
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
501
|
-
resolve({ response: response, body: body });
|
|
502
|
-
} else {
|
|
503
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
*
|
|
512
|
-
* @summary Update merchant url
|
|
513
|
-
* @param id
|
|
514
|
-
* @param wTMerchantURLUpdate
|
|
515
|
-
*/
|
|
516
|
-
public async updateMerchantURL (id: any, wTMerchantURLUpdate: WTMerchantURLUpdate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
517
|
-
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
518
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
519
|
-
let localVarQueryParameters: any = {};
|
|
520
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
521
|
-
const produces = ['application/json'];
|
|
522
|
-
// give precedence to 'application/json'
|
|
523
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
524
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
525
|
-
} else {
|
|
526
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
527
|
-
}
|
|
528
|
-
let localVarFormParams: any = {};
|
|
529
|
-
|
|
530
|
-
// verify required parameter 'id' is not null or undefined
|
|
531
|
-
if (id === null || id === undefined) {
|
|
532
|
-
throw new Error('Required parameter id was null or undefined when calling updateMerchantURL.');
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
// verify required parameter 'wTMerchantURLUpdate' is not null or undefined
|
|
536
|
-
if (wTMerchantURLUpdate === null || wTMerchantURLUpdate === undefined) {
|
|
537
|
-
throw new Error('Required parameter wTMerchantURLUpdate was null or undefined when calling updateMerchantURL.');
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
541
|
-
|
|
542
|
-
let localVarUseFormData = false;
|
|
543
|
-
|
|
544
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
545
|
-
method: 'PUT',
|
|
546
|
-
qs: localVarQueryParameters,
|
|
547
|
-
headers: localVarHeaderParams,
|
|
548
|
-
uri: localVarPath,
|
|
549
|
-
useQuerystring: this._useQuerystring,
|
|
550
|
-
json: true,
|
|
551
|
-
body: ObjectSerializer.serialize(wTMerchantURLUpdate, "WTMerchantURLUpdate")
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
let authenticationPromise = Promise.resolve();
|
|
555
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
556
|
-
|
|
557
|
-
let interceptorPromise = authenticationPromise;
|
|
558
|
-
for (const interceptor of this.interceptors) {
|
|
559
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
return interceptorPromise.then(() => {
|
|
563
|
-
if (Object.keys(localVarFormParams).length) {
|
|
564
|
-
if (localVarUseFormData) {
|
|
565
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
566
|
-
} else {
|
|
567
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
571
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
572
|
-
if (error) {
|
|
573
|
-
reject(error);
|
|
574
|
-
} else {
|
|
575
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
576
|
-
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
577
|
-
resolve({ response: response, body: body });
|
|
578
|
-
} else {
|
|
579
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
}
|
|
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 { InternalServerError } from '../model/internalServerError';
|
|
21
|
+
import { MerchantURL } from '../model/merchantURL';
|
|
22
|
+
import { WTMerchantURLCreate } from '../model/wTMerchantURLCreate';
|
|
23
|
+
import { WTMerchantURLUpdate } from '../model/wTMerchantURLUpdate';
|
|
24
|
+
import { WalletPageView } from '../model/walletPageView';
|
|
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 MerchantURLsApiApiKeys {
|
|
38
|
+
api_key,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class MerchantURLsApi {
|
|
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: MerchantURLsApiApiKeys, value: string) {
|
|
91
|
+
(this.authentications as any)[MerchantURLsApiApiKeys[key]].apiKey = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
+
this.interceptors.push(interceptor);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Archive merchant url
|
|
101
|
+
* @param id
|
|
102
|
+
*/
|
|
103
|
+
public async archiveMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
104
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
105
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
106
|
+
let localVarQueryParameters: any = {};
|
|
107
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
108
|
+
const produces = ['application/json'];
|
|
109
|
+
// give precedence to 'application/json'
|
|
110
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
111
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
112
|
+
} else {
|
|
113
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
114
|
+
}
|
|
115
|
+
let localVarFormParams: any = {};
|
|
116
|
+
|
|
117
|
+
// verify required parameter 'id' is not null or undefined
|
|
118
|
+
if (id === null || id === undefined) {
|
|
119
|
+
throw new Error('Required parameter id was null or undefined when calling archiveMerchantURL.');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
123
|
+
|
|
124
|
+
let localVarUseFormData = false;
|
|
125
|
+
|
|
126
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
127
|
+
method: 'DELETE',
|
|
128
|
+
qs: localVarQueryParameters,
|
|
129
|
+
headers: localVarHeaderParams,
|
|
130
|
+
uri: localVarPath,
|
|
131
|
+
useQuerystring: this._useQuerystring,
|
|
132
|
+
json: true,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
let authenticationPromise = Promise.resolve();
|
|
136
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
137
|
+
|
|
138
|
+
let interceptorPromise = authenticationPromise;
|
|
139
|
+
for (const interceptor of this.interceptors) {
|
|
140
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return interceptorPromise.then(() => {
|
|
144
|
+
if (Object.keys(localVarFormParams).length) {
|
|
145
|
+
if (localVarUseFormData) {
|
|
146
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
147
|
+
} else {
|
|
148
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
152
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
153
|
+
if (error) {
|
|
154
|
+
reject(error);
|
|
155
|
+
} else {
|
|
156
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
157
|
+
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
158
|
+
resolve({ response: response, body: body });
|
|
159
|
+
} else {
|
|
160
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @summary Create merchant url
|
|
170
|
+
* @param wTMerchantURLCreate
|
|
171
|
+
*/
|
|
172
|
+
public async createMerchantURL (wTMerchantURLCreate: WTMerchantURLCreate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
173
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl';
|
|
174
|
+
let localVarQueryParameters: any = {};
|
|
175
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
176
|
+
const produces = ['application/json'];
|
|
177
|
+
// give precedence to 'application/json'
|
|
178
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
179
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
180
|
+
} else {
|
|
181
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
182
|
+
}
|
|
183
|
+
let localVarFormParams: any = {};
|
|
184
|
+
|
|
185
|
+
// verify required parameter 'wTMerchantURLCreate' is not null or undefined
|
|
186
|
+
if (wTMerchantURLCreate === null || wTMerchantURLCreate === undefined) {
|
|
187
|
+
throw new Error('Required parameter wTMerchantURLCreate was null or undefined when calling createMerchantURL.');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
191
|
+
|
|
192
|
+
let localVarUseFormData = false;
|
|
193
|
+
|
|
194
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
195
|
+
method: 'POST',
|
|
196
|
+
qs: localVarQueryParameters,
|
|
197
|
+
headers: localVarHeaderParams,
|
|
198
|
+
uri: localVarPath,
|
|
199
|
+
useQuerystring: this._useQuerystring,
|
|
200
|
+
json: true,
|
|
201
|
+
body: ObjectSerializer.serialize(wTMerchantURLCreate, "WTMerchantURLCreate")
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
let authenticationPromise = Promise.resolve();
|
|
205
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
206
|
+
|
|
207
|
+
let interceptorPromise = authenticationPromise;
|
|
208
|
+
for (const interceptor of this.interceptors) {
|
|
209
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return interceptorPromise.then(() => {
|
|
213
|
+
if (Object.keys(localVarFormParams).length) {
|
|
214
|
+
if (localVarUseFormData) {
|
|
215
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
216
|
+
} else {
|
|
217
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
221
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
222
|
+
if (error) {
|
|
223
|
+
reject(error);
|
|
224
|
+
} else {
|
|
225
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
226
|
+
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
227
|
+
resolve({ response: response, body: body });
|
|
228
|
+
} else {
|
|
229
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
*
|
|
238
|
+
* @summary Fetch all merchant urls
|
|
239
|
+
* @param isArchiveIncluded
|
|
240
|
+
*/
|
|
241
|
+
public async fetchAllMerchantURLs (isArchiveIncluded?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
242
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/all';
|
|
243
|
+
let localVarQueryParameters: any = {};
|
|
244
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
245
|
+
const produces = ['application/json'];
|
|
246
|
+
// give precedence to 'application/json'
|
|
247
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
248
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
249
|
+
} else {
|
|
250
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
251
|
+
}
|
|
252
|
+
let localVarFormParams: any = {};
|
|
253
|
+
|
|
254
|
+
if (isArchiveIncluded !== undefined) {
|
|
255
|
+
localVarQueryParameters['isArchiveIncluded'] = ObjectSerializer.serialize(isArchiveIncluded, "boolean");
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
259
|
+
|
|
260
|
+
let localVarUseFormData = false;
|
|
261
|
+
|
|
262
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
263
|
+
method: 'GET',
|
|
264
|
+
qs: localVarQueryParameters,
|
|
265
|
+
headers: localVarHeaderParams,
|
|
266
|
+
uri: localVarPath,
|
|
267
|
+
useQuerystring: this._useQuerystring,
|
|
268
|
+
json: true,
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
let authenticationPromise = Promise.resolve();
|
|
272
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
273
|
+
|
|
274
|
+
let interceptorPromise = authenticationPromise;
|
|
275
|
+
for (const interceptor of this.interceptors) {
|
|
276
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return interceptorPromise.then(() => {
|
|
280
|
+
if (Object.keys(localVarFormParams).length) {
|
|
281
|
+
if (localVarUseFormData) {
|
|
282
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
283
|
+
} else {
|
|
284
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
288
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
289
|
+
if (error) {
|
|
290
|
+
reject(error);
|
|
291
|
+
} else {
|
|
292
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
293
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
294
|
+
resolve({ response: response, body: body });
|
|
295
|
+
} else {
|
|
296
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
* @summary Fetch merchant url
|
|
306
|
+
* @param id
|
|
307
|
+
*/
|
|
308
|
+
public async fetchMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
309
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
310
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
311
|
+
let localVarQueryParameters: any = {};
|
|
312
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
313
|
+
const produces = ['application/json'];
|
|
314
|
+
// give precedence to 'application/json'
|
|
315
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
316
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
317
|
+
} else {
|
|
318
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
319
|
+
}
|
|
320
|
+
let localVarFormParams: any = {};
|
|
321
|
+
|
|
322
|
+
// verify required parameter 'id' is not null or undefined
|
|
323
|
+
if (id === null || id === undefined) {
|
|
324
|
+
throw new Error('Required parameter id was null or undefined when calling fetchMerchantURL.');
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
328
|
+
|
|
329
|
+
let localVarUseFormData = false;
|
|
330
|
+
|
|
331
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
332
|
+
method: 'GET',
|
|
333
|
+
qs: localVarQueryParameters,
|
|
334
|
+
headers: localVarHeaderParams,
|
|
335
|
+
uri: localVarPath,
|
|
336
|
+
useQuerystring: this._useQuerystring,
|
|
337
|
+
json: true,
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
let authenticationPromise = Promise.resolve();
|
|
341
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
342
|
+
|
|
343
|
+
let interceptorPromise = authenticationPromise;
|
|
344
|
+
for (const interceptor of this.interceptors) {
|
|
345
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return interceptorPromise.then(() => {
|
|
349
|
+
if (Object.keys(localVarFormParams).length) {
|
|
350
|
+
if (localVarUseFormData) {
|
|
351
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
352
|
+
} else {
|
|
353
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
357
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
358
|
+
if (error) {
|
|
359
|
+
reject(error);
|
|
360
|
+
} else {
|
|
361
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
362
|
+
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
363
|
+
resolve({ response: response, body: body });
|
|
364
|
+
} else {
|
|
365
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
*
|
|
374
|
+
* @summary Fetch requests
|
|
375
|
+
* @param id
|
|
376
|
+
*/
|
|
377
|
+
public async fetchMerchantURLRequests (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }> {
|
|
378
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/requests/{id}'
|
|
379
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
380
|
+
let localVarQueryParameters: any = {};
|
|
381
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
382
|
+
const produces = ['application/json'];
|
|
383
|
+
// give precedence to 'application/json'
|
|
384
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
385
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
386
|
+
} else {
|
|
387
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
388
|
+
}
|
|
389
|
+
let localVarFormParams: any = {};
|
|
390
|
+
|
|
391
|
+
// verify required parameter 'id' is not null or undefined
|
|
392
|
+
if (id === null || id === undefined) {
|
|
393
|
+
throw new Error('Required parameter id was null or undefined when calling fetchMerchantURLRequests.');
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
397
|
+
|
|
398
|
+
let localVarUseFormData = false;
|
|
399
|
+
|
|
400
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
401
|
+
method: 'GET',
|
|
402
|
+
qs: localVarQueryParameters,
|
|
403
|
+
headers: localVarHeaderParams,
|
|
404
|
+
uri: localVarPath,
|
|
405
|
+
useQuerystring: this._useQuerystring,
|
|
406
|
+
json: true,
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
let authenticationPromise = Promise.resolve();
|
|
410
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
411
|
+
|
|
412
|
+
let interceptorPromise = authenticationPromise;
|
|
413
|
+
for (const interceptor of this.interceptors) {
|
|
414
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return interceptorPromise.then(() => {
|
|
418
|
+
if (Object.keys(localVarFormParams).length) {
|
|
419
|
+
if (localVarUseFormData) {
|
|
420
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
421
|
+
} else {
|
|
422
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }>((resolve, reject) => {
|
|
426
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
427
|
+
if (error) {
|
|
428
|
+
reject(error);
|
|
429
|
+
} else {
|
|
430
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
431
|
+
body = ObjectSerializer.deserialize(body, "Array<WalletPageView>");
|
|
432
|
+
resolve({ response: response, body: body });
|
|
433
|
+
} else {
|
|
434
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
*
|
|
443
|
+
* @summary Restore merchant url
|
|
444
|
+
* @param id
|
|
445
|
+
*/
|
|
446
|
+
public async restoreMerchantURL (id: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
447
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
448
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
449
|
+
let localVarQueryParameters: any = {};
|
|
450
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
451
|
+
const produces = ['application/json'];
|
|
452
|
+
// give precedence to 'application/json'
|
|
453
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
454
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
455
|
+
} else {
|
|
456
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
457
|
+
}
|
|
458
|
+
let localVarFormParams: any = {};
|
|
459
|
+
|
|
460
|
+
// verify required parameter 'id' is not null or undefined
|
|
461
|
+
if (id === null || id === undefined) {
|
|
462
|
+
throw new Error('Required parameter id was null or undefined when calling restoreMerchantURL.');
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
466
|
+
|
|
467
|
+
let localVarUseFormData = false;
|
|
468
|
+
|
|
469
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
470
|
+
method: 'PATCH',
|
|
471
|
+
qs: localVarQueryParameters,
|
|
472
|
+
headers: localVarHeaderParams,
|
|
473
|
+
uri: localVarPath,
|
|
474
|
+
useQuerystring: this._useQuerystring,
|
|
475
|
+
json: true,
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
let authenticationPromise = Promise.resolve();
|
|
479
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
480
|
+
|
|
481
|
+
let interceptorPromise = authenticationPromise;
|
|
482
|
+
for (const interceptor of this.interceptors) {
|
|
483
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
return interceptorPromise.then(() => {
|
|
487
|
+
if (Object.keys(localVarFormParams).length) {
|
|
488
|
+
if (localVarUseFormData) {
|
|
489
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
490
|
+
} else {
|
|
491
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
495
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
496
|
+
if (error) {
|
|
497
|
+
reject(error);
|
|
498
|
+
} else {
|
|
499
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
500
|
+
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
501
|
+
resolve({ response: response, body: body });
|
|
502
|
+
} else {
|
|
503
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
*
|
|
512
|
+
* @summary Update merchant url
|
|
513
|
+
* @param id
|
|
514
|
+
* @param wTMerchantURLUpdate
|
|
515
|
+
*/
|
|
516
|
+
public async updateMerchantURL (id: any, wTMerchantURLUpdate: WTMerchantURLUpdate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MerchantURL; }> {
|
|
517
|
+
const localVarPath = this.basePath + '/v1/business/merchantUrl/{id}'
|
|
518
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
519
|
+
let localVarQueryParameters: any = {};
|
|
520
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
521
|
+
const produces = ['application/json'];
|
|
522
|
+
// give precedence to 'application/json'
|
|
523
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
524
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
525
|
+
} else {
|
|
526
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
527
|
+
}
|
|
528
|
+
let localVarFormParams: any = {};
|
|
529
|
+
|
|
530
|
+
// verify required parameter 'id' is not null or undefined
|
|
531
|
+
if (id === null || id === undefined) {
|
|
532
|
+
throw new Error('Required parameter id was null or undefined when calling updateMerchantURL.');
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// verify required parameter 'wTMerchantURLUpdate' is not null or undefined
|
|
536
|
+
if (wTMerchantURLUpdate === null || wTMerchantURLUpdate === undefined) {
|
|
537
|
+
throw new Error('Required parameter wTMerchantURLUpdate was null or undefined when calling updateMerchantURL.');
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
541
|
+
|
|
542
|
+
let localVarUseFormData = false;
|
|
543
|
+
|
|
544
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
545
|
+
method: 'PUT',
|
|
546
|
+
qs: localVarQueryParameters,
|
|
547
|
+
headers: localVarHeaderParams,
|
|
548
|
+
uri: localVarPath,
|
|
549
|
+
useQuerystring: this._useQuerystring,
|
|
550
|
+
json: true,
|
|
551
|
+
body: ObjectSerializer.serialize(wTMerchantURLUpdate, "WTMerchantURLUpdate")
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
let authenticationPromise = Promise.resolve();
|
|
555
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
556
|
+
|
|
557
|
+
let interceptorPromise = authenticationPromise;
|
|
558
|
+
for (const interceptor of this.interceptors) {
|
|
559
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
return interceptorPromise.then(() => {
|
|
563
|
+
if (Object.keys(localVarFormParams).length) {
|
|
564
|
+
if (localVarUseFormData) {
|
|
565
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
566
|
+
} else {
|
|
567
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return new Promise<{ response: http.IncomingMessage; body: MerchantURL; }>((resolve, reject) => {
|
|
571
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
572
|
+
if (error) {
|
|
573
|
+
reject(error);
|
|
574
|
+
} else {
|
|
575
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
576
|
+
body = ObjectSerializer.deserialize(body, "MerchantURL");
|
|
577
|
+
resolve({ response: response, body: body });
|
|
578
|
+
} else {
|
|
579
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
});
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
}
|