wallet 1.1.3 → 1.1.6
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/README.md +13 -1
- 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 +1 -26
- package/readme-generator.py +54 -42
- package/tsconfig.json +25 -25
package/api/interactionsApi.ts
CHANGED
|
@@ -1,678 +1,678 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* wallet-api
|
|
3
|
-
* API
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.1.
|
|
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 { AdvertisementCreditScan } from '../model/advertisementCreditScan';
|
|
19
|
-
import { DynamicVoucher } from '../model/dynamicVoucher';
|
|
20
|
-
import { FalsumError } from '../model/falsumError';
|
|
21
|
-
import { InlineObject66 } from '../model/inlineObject66';
|
|
22
|
-
import { InlineObject67 } from '../model/inlineObject67';
|
|
23
|
-
import { InlineResponse2009 } from '../model/inlineResponse2009';
|
|
24
|
-
import { InternalServerError } from '../model/internalServerError';
|
|
25
|
-
import { Member } from '../model/member';
|
|
26
|
-
import { StaticVoucher } from '../model/staticVoucher';
|
|
27
|
-
|
|
28
|
-
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
29
|
-
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
30
|
-
|
|
31
|
-
import { HttpError, RequestFile } from './apis';
|
|
32
|
-
|
|
33
|
-
let defaultBasePath = 'https://api.wall.et';
|
|
34
|
-
|
|
35
|
-
// ===============================================
|
|
36
|
-
// This file is autogenerated - Please do not edit
|
|
37
|
-
// ===============================================
|
|
38
|
-
|
|
39
|
-
export enum InteractionsApiApiKeys {
|
|
40
|
-
api_key,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export class InteractionsApi {
|
|
44
|
-
protected _basePath = defaultBasePath;
|
|
45
|
-
protected _defaultHeaders : any = {};
|
|
46
|
-
protected _useQuerystring : boolean = false;
|
|
47
|
-
|
|
48
|
-
protected authentications = {
|
|
49
|
-
'default': <Authentication>new VoidAuth(),
|
|
50
|
-
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
protected interceptors: Interceptor[] = [];
|
|
54
|
-
|
|
55
|
-
constructor(basePath?: string);
|
|
56
|
-
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
57
|
-
if (password) {
|
|
58
|
-
if (basePath) {
|
|
59
|
-
this.basePath = basePath;
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
if (basePathOrUsername) {
|
|
63
|
-
this.basePath = basePathOrUsername
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
set useQuerystring(value: boolean) {
|
|
69
|
-
this._useQuerystring = value;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
set basePath(basePath: string) {
|
|
73
|
-
this._basePath = basePath;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
set defaultHeaders(defaultHeaders: any) {
|
|
77
|
-
this._defaultHeaders = defaultHeaders;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
get defaultHeaders() {
|
|
81
|
-
return this._defaultHeaders;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get basePath() {
|
|
85
|
-
return this._basePath;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public setDefaultAuthentication(auth: Authentication) {
|
|
89
|
-
this.authentications.default = auth;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public setApiKey(key: InteractionsApiApiKeys, value: string) {
|
|
93
|
-
(this.authentications as any)[InteractionsApiApiKeys[key]].apiKey = value;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
97
|
-
this.interceptors.push(interceptor);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @summary Create ad credit scan
|
|
103
|
-
* @param adCreditID
|
|
104
|
-
*/
|
|
105
|
-
public async createAdvertisementCreditScan (adCreditID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AdvertisementCreditScan; }> {
|
|
106
|
-
const localVarPath = this.basePath + '/wallet/advertisementCredit/scan/{adCreditID}'
|
|
107
|
-
.replace('{' + 'adCreditID' + '}', encodeURIComponent(String(adCreditID)));
|
|
108
|
-
let localVarQueryParameters: any = {};
|
|
109
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
110
|
-
const produces = ['application/json'];
|
|
111
|
-
// give precedence to 'application/json'
|
|
112
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
113
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
114
|
-
} else {
|
|
115
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
116
|
-
}
|
|
117
|
-
let localVarFormParams: any = {};
|
|
118
|
-
|
|
119
|
-
// verify required parameter 'adCreditID' is not null or undefined
|
|
120
|
-
if (adCreditID === null || adCreditID === undefined) {
|
|
121
|
-
throw new Error('Required parameter adCreditID was null or undefined when calling createAdvertisementCreditScan.');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
125
|
-
|
|
126
|
-
let localVarUseFormData = false;
|
|
127
|
-
|
|
128
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
129
|
-
method: 'POST',
|
|
130
|
-
qs: localVarQueryParameters,
|
|
131
|
-
headers: localVarHeaderParams,
|
|
132
|
-
uri: localVarPath,
|
|
133
|
-
useQuerystring: this._useQuerystring,
|
|
134
|
-
json: true,
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
let authenticationPromise = Promise.resolve();
|
|
138
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
139
|
-
|
|
140
|
-
let interceptorPromise = authenticationPromise;
|
|
141
|
-
for (const interceptor of this.interceptors) {
|
|
142
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return interceptorPromise.then(() => {
|
|
146
|
-
if (Object.keys(localVarFormParams).length) {
|
|
147
|
-
if (localVarUseFormData) {
|
|
148
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
149
|
-
} else {
|
|
150
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return new Promise<{ response: http.IncomingMessage; body: AdvertisementCreditScan; }>((resolve, reject) => {
|
|
154
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
155
|
-
if (error) {
|
|
156
|
-
reject(error);
|
|
157
|
-
} else {
|
|
158
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
159
|
-
body = ObjectSerializer.deserialize(body, "AdvertisementCreditScan");
|
|
160
|
-
resolve({ response: response, body: body });
|
|
161
|
-
} else {
|
|
162
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
*
|
|
171
|
-
* @summary Fetch a customer\'s static vouchers on the basis of a given voucher ID
|
|
172
|
-
* @param voucherID
|
|
173
|
-
*/
|
|
174
|
-
public async fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<InlineResponse2009>; }> {
|
|
175
|
-
const localVarPath = this.basePath + '/wallet/staticVoucher/all';
|
|
176
|
-
let localVarQueryParameters: any = {};
|
|
177
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
178
|
-
const produces = ['application/json'];
|
|
179
|
-
// give precedence to 'application/json'
|
|
180
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
181
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
182
|
-
} else {
|
|
183
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
184
|
-
}
|
|
185
|
-
let localVarFormParams: any = {};
|
|
186
|
-
|
|
187
|
-
// verify required parameter 'voucherID' is not null or undefined
|
|
188
|
-
if (voucherID === null || voucherID === undefined) {
|
|
189
|
-
throw new Error('Required parameter voucherID was null or undefined when calling fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID.');
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (voucherID !== undefined) {
|
|
193
|
-
localVarQueryParameters['voucherID'] = ObjectSerializer.serialize(voucherID, "any");
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
197
|
-
|
|
198
|
-
let localVarUseFormData = false;
|
|
199
|
-
|
|
200
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
201
|
-
method: 'GET',
|
|
202
|
-
qs: localVarQueryParameters,
|
|
203
|
-
headers: localVarHeaderParams,
|
|
204
|
-
uri: localVarPath,
|
|
205
|
-
useQuerystring: this._useQuerystring,
|
|
206
|
-
json: true,
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
let authenticationPromise = Promise.resolve();
|
|
210
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
211
|
-
|
|
212
|
-
let interceptorPromise = authenticationPromise;
|
|
213
|
-
for (const interceptor of this.interceptors) {
|
|
214
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return interceptorPromise.then(() => {
|
|
218
|
-
if (Object.keys(localVarFormParams).length) {
|
|
219
|
-
if (localVarUseFormData) {
|
|
220
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
221
|
-
} else {
|
|
222
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<InlineResponse2009>; }>((resolve, reject) => {
|
|
226
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
227
|
-
if (error) {
|
|
228
|
-
reject(error);
|
|
229
|
-
} else {
|
|
230
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
231
|
-
body = ObjectSerializer.deserialize(body, "Array<InlineResponse2009>");
|
|
232
|
-
resolve({ response: response, body: body });
|
|
233
|
-
} else {
|
|
234
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
*
|
|
243
|
-
* @summary Fetch dynamic voucher
|
|
244
|
-
* @param voucherID
|
|
245
|
-
*/
|
|
246
|
-
public async fetchDynamicVoucherWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DynamicVoucher; }> {
|
|
247
|
-
const localVarPath = this.basePath + '/wallet/dynamicVoucher/{voucherID}'
|
|
248
|
-
.replace('{' + 'voucherID' + '}', encodeURIComponent(String(voucherID)));
|
|
249
|
-
let localVarQueryParameters: any = {};
|
|
250
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
251
|
-
const produces = ['application/json'];
|
|
252
|
-
// give precedence to 'application/json'
|
|
253
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
254
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
255
|
-
} else {
|
|
256
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
257
|
-
}
|
|
258
|
-
let localVarFormParams: any = {};
|
|
259
|
-
|
|
260
|
-
// verify required parameter 'voucherID' is not null or undefined
|
|
261
|
-
if (voucherID === null || voucherID === undefined) {
|
|
262
|
-
throw new Error('Required parameter voucherID was null or undefined when calling fetchDynamicVoucherWithVoucherID.');
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
266
|
-
|
|
267
|
-
let localVarUseFormData = false;
|
|
268
|
-
|
|
269
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
270
|
-
method: 'GET',
|
|
271
|
-
qs: localVarQueryParameters,
|
|
272
|
-
headers: localVarHeaderParams,
|
|
273
|
-
uri: localVarPath,
|
|
274
|
-
useQuerystring: this._useQuerystring,
|
|
275
|
-
json: true,
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
let authenticationPromise = Promise.resolve();
|
|
279
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
280
|
-
|
|
281
|
-
let interceptorPromise = authenticationPromise;
|
|
282
|
-
for (const interceptor of this.interceptors) {
|
|
283
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
return interceptorPromise.then(() => {
|
|
287
|
-
if (Object.keys(localVarFormParams).length) {
|
|
288
|
-
if (localVarUseFormData) {
|
|
289
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
290
|
-
} else {
|
|
291
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return new Promise<{ response: http.IncomingMessage; body: DynamicVoucher; }>((resolve, reject) => {
|
|
295
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
296
|
-
if (error) {
|
|
297
|
-
reject(error);
|
|
298
|
-
} else {
|
|
299
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
300
|
-
body = ObjectSerializer.deserialize(body, "DynamicVoucher");
|
|
301
|
-
resolve({ response: response, body: body });
|
|
302
|
-
} else {
|
|
303
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
*
|
|
312
|
-
* @summary Fetch member information
|
|
313
|
-
* @param memberID
|
|
314
|
-
* @param merchantID
|
|
315
|
-
*/
|
|
316
|
-
public async fetchMemberInformation (memberID: string, merchantID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Member; }> {
|
|
317
|
-
const localVarPath = this.basePath + '/wallet/member';
|
|
318
|
-
let localVarQueryParameters: any = {};
|
|
319
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
320
|
-
const produces = ['application/json'];
|
|
321
|
-
// give precedence to 'application/json'
|
|
322
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
323
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
324
|
-
} else {
|
|
325
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
326
|
-
}
|
|
327
|
-
let localVarFormParams: any = {};
|
|
328
|
-
|
|
329
|
-
// verify required parameter 'memberID' is not null or undefined
|
|
330
|
-
if (memberID === null || memberID === undefined) {
|
|
331
|
-
throw new Error('Required parameter memberID was null or undefined when calling fetchMemberInformation.');
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// verify required parameter 'merchantID' is not null or undefined
|
|
335
|
-
if (merchantID === null || merchantID === undefined) {
|
|
336
|
-
throw new Error('Required parameter merchantID was null or undefined when calling fetchMemberInformation.');
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (memberID !== undefined) {
|
|
340
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
if (merchantID !== undefined) {
|
|
344
|
-
localVarQueryParameters['merchantID'] = ObjectSerializer.serialize(merchantID, "string");
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
348
|
-
|
|
349
|
-
let localVarUseFormData = false;
|
|
350
|
-
|
|
351
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
352
|
-
method: 'GET',
|
|
353
|
-
qs: localVarQueryParameters,
|
|
354
|
-
headers: localVarHeaderParams,
|
|
355
|
-
uri: localVarPath,
|
|
356
|
-
useQuerystring: this._useQuerystring,
|
|
357
|
-
json: true,
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
let authenticationPromise = Promise.resolve();
|
|
361
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
362
|
-
|
|
363
|
-
let interceptorPromise = authenticationPromise;
|
|
364
|
-
for (const interceptor of this.interceptors) {
|
|
365
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return interceptorPromise.then(() => {
|
|
369
|
-
if (Object.keys(localVarFormParams).length) {
|
|
370
|
-
if (localVarUseFormData) {
|
|
371
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
372
|
-
} else {
|
|
373
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return new Promise<{ response: http.IncomingMessage; body: Member; }>((resolve, reject) => {
|
|
377
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
378
|
-
if (error) {
|
|
379
|
-
reject(error);
|
|
380
|
-
} else {
|
|
381
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
382
|
-
body = ObjectSerializer.deserialize(body, "Member");
|
|
383
|
-
resolve({ response: response, body: body });
|
|
384
|
-
} else {
|
|
385
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
*
|
|
394
|
-
* @summary Fetch static voucher
|
|
395
|
-
* @param voucherID
|
|
396
|
-
*/
|
|
397
|
-
public async fetchStaticVoucherWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StaticVoucher; }> {
|
|
398
|
-
const localVarPath = this.basePath + '/wallet/staticVoucher/{voucherID}'
|
|
399
|
-
.replace('{' + 'voucherID' + '}', encodeURIComponent(String(voucherID)));
|
|
400
|
-
let localVarQueryParameters: any = {};
|
|
401
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
402
|
-
const produces = ['application/json'];
|
|
403
|
-
// give precedence to 'application/json'
|
|
404
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
405
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
406
|
-
} else {
|
|
407
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
408
|
-
}
|
|
409
|
-
let localVarFormParams: any = {};
|
|
410
|
-
|
|
411
|
-
// verify required parameter 'voucherID' is not null or undefined
|
|
412
|
-
if (voucherID === null || voucherID === undefined) {
|
|
413
|
-
throw new Error('Required parameter voucherID was null or undefined when calling fetchStaticVoucherWithVoucherID.');
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
417
|
-
|
|
418
|
-
let localVarUseFormData = false;
|
|
419
|
-
|
|
420
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
421
|
-
method: 'GET',
|
|
422
|
-
qs: localVarQueryParameters,
|
|
423
|
-
headers: localVarHeaderParams,
|
|
424
|
-
uri: localVarPath,
|
|
425
|
-
useQuerystring: this._useQuerystring,
|
|
426
|
-
json: true,
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
let authenticationPromise = Promise.resolve();
|
|
430
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
431
|
-
|
|
432
|
-
let interceptorPromise = authenticationPromise;
|
|
433
|
-
for (const interceptor of this.interceptors) {
|
|
434
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return interceptorPromise.then(() => {
|
|
438
|
-
if (Object.keys(localVarFormParams).length) {
|
|
439
|
-
if (localVarUseFormData) {
|
|
440
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
441
|
-
} else {
|
|
442
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
return new Promise<{ response: http.IncomingMessage; body: StaticVoucher; }>((resolve, reject) => {
|
|
446
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
447
|
-
if (error) {
|
|
448
|
-
reject(error);
|
|
449
|
-
} else {
|
|
450
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
451
|
-
body = ObjectSerializer.deserialize(body, "StaticVoucher");
|
|
452
|
-
resolve({ response: response, body: body });
|
|
453
|
-
} else {
|
|
454
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
});
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
*
|
|
463
|
-
* @summary Fetch page with token NOTE: This route exists because a token can completely change the dataset returned to the client. A simple fetch just logs the token with the request, but a fetchWithToken request can have a very different object returned to the client.
|
|
464
|
-
* @param inlineObject67
|
|
465
|
-
*/
|
|
466
|
-
public async fetchWalletPageWithToken (inlineObject67: InlineObject67, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
467
|
-
const localVarPath = this.basePath + '/wallet/page/token';
|
|
468
|
-
let localVarQueryParameters: any = {};
|
|
469
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
470
|
-
const produces = ['application/json'];
|
|
471
|
-
// give precedence to 'application/json'
|
|
472
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
473
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
474
|
-
} else {
|
|
475
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
476
|
-
}
|
|
477
|
-
let localVarFormParams: any = {};
|
|
478
|
-
|
|
479
|
-
// verify required parameter 'inlineObject67' is not null or undefined
|
|
480
|
-
if (inlineObject67 === null || inlineObject67 === undefined) {
|
|
481
|
-
throw new Error('Required parameter inlineObject67 was null or undefined when calling fetchWalletPageWithToken.');
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
485
|
-
|
|
486
|
-
let localVarUseFormData = false;
|
|
487
|
-
|
|
488
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
489
|
-
method: 'POST',
|
|
490
|
-
qs: localVarQueryParameters,
|
|
491
|
-
headers: localVarHeaderParams,
|
|
492
|
-
uri: localVarPath,
|
|
493
|
-
useQuerystring: this._useQuerystring,
|
|
494
|
-
json: true,
|
|
495
|
-
body: ObjectSerializer.serialize(inlineObject67, "InlineObject67")
|
|
496
|
-
};
|
|
497
|
-
|
|
498
|
-
let authenticationPromise = Promise.resolve();
|
|
499
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
500
|
-
|
|
501
|
-
let interceptorPromise = authenticationPromise;
|
|
502
|
-
for (const interceptor of this.interceptors) {
|
|
503
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
return interceptorPromise.then(() => {
|
|
507
|
-
if (Object.keys(localVarFormParams).length) {
|
|
508
|
-
if (localVarUseFormData) {
|
|
509
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
510
|
-
} else {
|
|
511
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
515
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
516
|
-
if (error) {
|
|
517
|
-
reject(error);
|
|
518
|
-
} else {
|
|
519
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
520
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
521
|
-
resolve({ response: response, body: body });
|
|
522
|
-
} else {
|
|
523
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
*
|
|
532
|
-
* @summary Fetch payment object with token NOTE: This route exists because a token can completely change the dataset returned to the client. A simple fetch just logs the token with the request, but a fetchWithToken request can have a very different object returned to the client.
|
|
533
|
-
* @param inlineObject66
|
|
534
|
-
*/
|
|
535
|
-
public async fetchWalletPaymentObjectWithToken (inlineObject66: InlineObject66, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
536
|
-
const localVarPath = this.basePath + '/wallet/paymentObject/token';
|
|
537
|
-
let localVarQueryParameters: any = {};
|
|
538
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
539
|
-
const produces = ['application/json'];
|
|
540
|
-
// give precedence to 'application/json'
|
|
541
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
542
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
543
|
-
} else {
|
|
544
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
545
|
-
}
|
|
546
|
-
let localVarFormParams: any = {};
|
|
547
|
-
|
|
548
|
-
// verify required parameter 'inlineObject66' is not null or undefined
|
|
549
|
-
if (inlineObject66 === null || inlineObject66 === undefined) {
|
|
550
|
-
throw new Error('Required parameter inlineObject66 was null or undefined when calling fetchWalletPaymentObjectWithToken.');
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
554
|
-
|
|
555
|
-
let localVarUseFormData = false;
|
|
556
|
-
|
|
557
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
558
|
-
method: 'POST',
|
|
559
|
-
qs: localVarQueryParameters,
|
|
560
|
-
headers: localVarHeaderParams,
|
|
561
|
-
uri: localVarPath,
|
|
562
|
-
useQuerystring: this._useQuerystring,
|
|
563
|
-
json: true,
|
|
564
|
-
body: ObjectSerializer.serialize(inlineObject66, "InlineObject66")
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
let authenticationPromise = Promise.resolve();
|
|
568
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
569
|
-
|
|
570
|
-
let interceptorPromise = authenticationPromise;
|
|
571
|
-
for (const interceptor of this.interceptors) {
|
|
572
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
return interceptorPromise.then(() => {
|
|
576
|
-
if (Object.keys(localVarFormParams).length) {
|
|
577
|
-
if (localVarUseFormData) {
|
|
578
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
579
|
-
} else {
|
|
580
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
584
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
585
|
-
if (error) {
|
|
586
|
-
reject(error);
|
|
587
|
-
} else {
|
|
588
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
589
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
590
|
-
resolve({ response: response, body: body });
|
|
591
|
-
} else {
|
|
592
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
*
|
|
601
|
-
* @summary Identify item
|
|
602
|
-
* @param itemID
|
|
603
|
-
* @param isRefresh
|
|
604
|
-
* @param phoneVerificationToken
|
|
605
|
-
*/
|
|
606
|
-
public async identifyItem (itemID: string, isRefresh?: boolean, phoneVerificationToken?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
607
|
-
const localVarPath = this.basePath + '/wallet/item/identify/{itemID}'
|
|
608
|
-
.replace('{' + 'itemID' + '}', encodeURIComponent(String(itemID)));
|
|
609
|
-
let localVarQueryParameters: any = {};
|
|
610
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
611
|
-
const produces = ['application/json'];
|
|
612
|
-
// give precedence to 'application/json'
|
|
613
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
614
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
615
|
-
} else {
|
|
616
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
617
|
-
}
|
|
618
|
-
let localVarFormParams: any = {};
|
|
619
|
-
|
|
620
|
-
// verify required parameter 'itemID' is not null or undefined
|
|
621
|
-
if (itemID === null || itemID === undefined) {
|
|
622
|
-
throw new Error('Required parameter itemID was null or undefined when calling identifyItem.');
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
if (isRefresh !== undefined) {
|
|
626
|
-
localVarQueryParameters['isRefresh'] = ObjectSerializer.serialize(isRefresh, "boolean");
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
if (phoneVerificationToken !== undefined) {
|
|
630
|
-
localVarQueryParameters['phoneVerificationToken'] = ObjectSerializer.serialize(phoneVerificationToken, "string");
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
634
|
-
|
|
635
|
-
let localVarUseFormData = false;
|
|
636
|
-
|
|
637
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
638
|
-
method: 'GET',
|
|
639
|
-
qs: localVarQueryParameters,
|
|
640
|
-
headers: localVarHeaderParams,
|
|
641
|
-
uri: localVarPath,
|
|
642
|
-
useQuerystring: this._useQuerystring,
|
|
643
|
-
json: true,
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
let authenticationPromise = Promise.resolve();
|
|
647
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
648
|
-
|
|
649
|
-
let interceptorPromise = authenticationPromise;
|
|
650
|
-
for (const interceptor of this.interceptors) {
|
|
651
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
return interceptorPromise.then(() => {
|
|
655
|
-
if (Object.keys(localVarFormParams).length) {
|
|
656
|
-
if (localVarUseFormData) {
|
|
657
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
658
|
-
} else {
|
|
659
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
663
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
664
|
-
if (error) {
|
|
665
|
-
reject(error);
|
|
666
|
-
} else {
|
|
667
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
668
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
669
|
-
resolve({ response: response, body: body });
|
|
670
|
-
} else {
|
|
671
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
});
|
|
675
|
-
});
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* wallet-api
|
|
3
|
+
* API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.1.6
|
|
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 { AdvertisementCreditScan } from '../model/advertisementCreditScan';
|
|
19
|
+
import { DynamicVoucher } from '../model/dynamicVoucher';
|
|
20
|
+
import { FalsumError } from '../model/falsumError';
|
|
21
|
+
import { InlineObject66 } from '../model/inlineObject66';
|
|
22
|
+
import { InlineObject67 } from '../model/inlineObject67';
|
|
23
|
+
import { InlineResponse2009 } from '../model/inlineResponse2009';
|
|
24
|
+
import { InternalServerError } from '../model/internalServerError';
|
|
25
|
+
import { Member } from '../model/member';
|
|
26
|
+
import { StaticVoucher } from '../model/staticVoucher';
|
|
27
|
+
|
|
28
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
29
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
30
|
+
|
|
31
|
+
import { HttpError, RequestFile } from './apis';
|
|
32
|
+
|
|
33
|
+
let defaultBasePath = 'https://api.wall.et';
|
|
34
|
+
|
|
35
|
+
// ===============================================
|
|
36
|
+
// This file is autogenerated - Please do not edit
|
|
37
|
+
// ===============================================
|
|
38
|
+
|
|
39
|
+
export enum InteractionsApiApiKeys {
|
|
40
|
+
api_key,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class InteractionsApi {
|
|
44
|
+
protected _basePath = defaultBasePath;
|
|
45
|
+
protected _defaultHeaders : any = {};
|
|
46
|
+
protected _useQuerystring : boolean = false;
|
|
47
|
+
|
|
48
|
+
protected authentications = {
|
|
49
|
+
'default': <Authentication>new VoidAuth(),
|
|
50
|
+
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
protected interceptors: Interceptor[] = [];
|
|
54
|
+
|
|
55
|
+
constructor(basePath?: string);
|
|
56
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
57
|
+
if (password) {
|
|
58
|
+
if (basePath) {
|
|
59
|
+
this.basePath = basePath;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
if (basePathOrUsername) {
|
|
63
|
+
this.basePath = basePathOrUsername
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
set useQuerystring(value: boolean) {
|
|
69
|
+
this._useQuerystring = value;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
set basePath(basePath: string) {
|
|
73
|
+
this._basePath = basePath;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
77
|
+
this._defaultHeaders = defaultHeaders;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
get defaultHeaders() {
|
|
81
|
+
return this._defaultHeaders;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get basePath() {
|
|
85
|
+
return this._basePath;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
89
|
+
this.authentications.default = auth;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public setApiKey(key: InteractionsApiApiKeys, value: string) {
|
|
93
|
+
(this.authentications as any)[InteractionsApiApiKeys[key]].apiKey = value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
97
|
+
this.interceptors.push(interceptor);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @summary Create ad credit scan
|
|
103
|
+
* @param adCreditID
|
|
104
|
+
*/
|
|
105
|
+
public async createAdvertisementCreditScan (adCreditID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AdvertisementCreditScan; }> {
|
|
106
|
+
const localVarPath = this.basePath + '/wallet/advertisementCredit/scan/{adCreditID}'
|
|
107
|
+
.replace('{' + 'adCreditID' + '}', encodeURIComponent(String(adCreditID)));
|
|
108
|
+
let localVarQueryParameters: any = {};
|
|
109
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
110
|
+
const produces = ['application/json'];
|
|
111
|
+
// give precedence to 'application/json'
|
|
112
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
113
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
114
|
+
} else {
|
|
115
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
116
|
+
}
|
|
117
|
+
let localVarFormParams: any = {};
|
|
118
|
+
|
|
119
|
+
// verify required parameter 'adCreditID' is not null or undefined
|
|
120
|
+
if (adCreditID === null || adCreditID === undefined) {
|
|
121
|
+
throw new Error('Required parameter adCreditID was null or undefined when calling createAdvertisementCreditScan.');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
125
|
+
|
|
126
|
+
let localVarUseFormData = false;
|
|
127
|
+
|
|
128
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
129
|
+
method: 'POST',
|
|
130
|
+
qs: localVarQueryParameters,
|
|
131
|
+
headers: localVarHeaderParams,
|
|
132
|
+
uri: localVarPath,
|
|
133
|
+
useQuerystring: this._useQuerystring,
|
|
134
|
+
json: true,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
let authenticationPromise = Promise.resolve();
|
|
138
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
139
|
+
|
|
140
|
+
let interceptorPromise = authenticationPromise;
|
|
141
|
+
for (const interceptor of this.interceptors) {
|
|
142
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return interceptorPromise.then(() => {
|
|
146
|
+
if (Object.keys(localVarFormParams).length) {
|
|
147
|
+
if (localVarUseFormData) {
|
|
148
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
149
|
+
} else {
|
|
150
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return new Promise<{ response: http.IncomingMessage; body: AdvertisementCreditScan; }>((resolve, reject) => {
|
|
154
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
155
|
+
if (error) {
|
|
156
|
+
reject(error);
|
|
157
|
+
} else {
|
|
158
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
159
|
+
body = ObjectSerializer.deserialize(body, "AdvertisementCreditScan");
|
|
160
|
+
resolve({ response: response, body: body });
|
|
161
|
+
} else {
|
|
162
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @summary Fetch a customer\'s static vouchers on the basis of a given voucher ID
|
|
172
|
+
* @param voucherID
|
|
173
|
+
*/
|
|
174
|
+
public async fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<InlineResponse2009>; }> {
|
|
175
|
+
const localVarPath = this.basePath + '/wallet/staticVoucher/all';
|
|
176
|
+
let localVarQueryParameters: any = {};
|
|
177
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
178
|
+
const produces = ['application/json'];
|
|
179
|
+
// give precedence to 'application/json'
|
|
180
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
181
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
182
|
+
} else {
|
|
183
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
184
|
+
}
|
|
185
|
+
let localVarFormParams: any = {};
|
|
186
|
+
|
|
187
|
+
// verify required parameter 'voucherID' is not null or undefined
|
|
188
|
+
if (voucherID === null || voucherID === undefined) {
|
|
189
|
+
throw new Error('Required parameter voucherID was null or undefined when calling fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID.');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (voucherID !== undefined) {
|
|
193
|
+
localVarQueryParameters['voucherID'] = ObjectSerializer.serialize(voucherID, "any");
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
197
|
+
|
|
198
|
+
let localVarUseFormData = false;
|
|
199
|
+
|
|
200
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
201
|
+
method: 'GET',
|
|
202
|
+
qs: localVarQueryParameters,
|
|
203
|
+
headers: localVarHeaderParams,
|
|
204
|
+
uri: localVarPath,
|
|
205
|
+
useQuerystring: this._useQuerystring,
|
|
206
|
+
json: true,
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
let authenticationPromise = Promise.resolve();
|
|
210
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
211
|
+
|
|
212
|
+
let interceptorPromise = authenticationPromise;
|
|
213
|
+
for (const interceptor of this.interceptors) {
|
|
214
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return interceptorPromise.then(() => {
|
|
218
|
+
if (Object.keys(localVarFormParams).length) {
|
|
219
|
+
if (localVarUseFormData) {
|
|
220
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
221
|
+
} else {
|
|
222
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<InlineResponse2009>; }>((resolve, reject) => {
|
|
226
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
227
|
+
if (error) {
|
|
228
|
+
reject(error);
|
|
229
|
+
} else {
|
|
230
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
231
|
+
body = ObjectSerializer.deserialize(body, "Array<InlineResponse2009>");
|
|
232
|
+
resolve({ response: response, body: body });
|
|
233
|
+
} else {
|
|
234
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
*
|
|
243
|
+
* @summary Fetch dynamic voucher
|
|
244
|
+
* @param voucherID
|
|
245
|
+
*/
|
|
246
|
+
public async fetchDynamicVoucherWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DynamicVoucher; }> {
|
|
247
|
+
const localVarPath = this.basePath + '/wallet/dynamicVoucher/{voucherID}'
|
|
248
|
+
.replace('{' + 'voucherID' + '}', encodeURIComponent(String(voucherID)));
|
|
249
|
+
let localVarQueryParameters: any = {};
|
|
250
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
251
|
+
const produces = ['application/json'];
|
|
252
|
+
// give precedence to 'application/json'
|
|
253
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
254
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
255
|
+
} else {
|
|
256
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
257
|
+
}
|
|
258
|
+
let localVarFormParams: any = {};
|
|
259
|
+
|
|
260
|
+
// verify required parameter 'voucherID' is not null or undefined
|
|
261
|
+
if (voucherID === null || voucherID === undefined) {
|
|
262
|
+
throw new Error('Required parameter voucherID was null or undefined when calling fetchDynamicVoucherWithVoucherID.');
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
266
|
+
|
|
267
|
+
let localVarUseFormData = false;
|
|
268
|
+
|
|
269
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
270
|
+
method: 'GET',
|
|
271
|
+
qs: localVarQueryParameters,
|
|
272
|
+
headers: localVarHeaderParams,
|
|
273
|
+
uri: localVarPath,
|
|
274
|
+
useQuerystring: this._useQuerystring,
|
|
275
|
+
json: true,
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
let authenticationPromise = Promise.resolve();
|
|
279
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
280
|
+
|
|
281
|
+
let interceptorPromise = authenticationPromise;
|
|
282
|
+
for (const interceptor of this.interceptors) {
|
|
283
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return interceptorPromise.then(() => {
|
|
287
|
+
if (Object.keys(localVarFormParams).length) {
|
|
288
|
+
if (localVarUseFormData) {
|
|
289
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
290
|
+
} else {
|
|
291
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return new Promise<{ response: http.IncomingMessage; body: DynamicVoucher; }>((resolve, reject) => {
|
|
295
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
296
|
+
if (error) {
|
|
297
|
+
reject(error);
|
|
298
|
+
} else {
|
|
299
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
300
|
+
body = ObjectSerializer.deserialize(body, "DynamicVoucher");
|
|
301
|
+
resolve({ response: response, body: body });
|
|
302
|
+
} else {
|
|
303
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
*
|
|
312
|
+
* @summary Fetch member information
|
|
313
|
+
* @param memberID
|
|
314
|
+
* @param merchantID
|
|
315
|
+
*/
|
|
316
|
+
public async fetchMemberInformation (memberID: string, merchantID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Member; }> {
|
|
317
|
+
const localVarPath = this.basePath + '/wallet/member';
|
|
318
|
+
let localVarQueryParameters: any = {};
|
|
319
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
320
|
+
const produces = ['application/json'];
|
|
321
|
+
// give precedence to 'application/json'
|
|
322
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
323
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
324
|
+
} else {
|
|
325
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
326
|
+
}
|
|
327
|
+
let localVarFormParams: any = {};
|
|
328
|
+
|
|
329
|
+
// verify required parameter 'memberID' is not null or undefined
|
|
330
|
+
if (memberID === null || memberID === undefined) {
|
|
331
|
+
throw new Error('Required parameter memberID was null or undefined when calling fetchMemberInformation.');
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// verify required parameter 'merchantID' is not null or undefined
|
|
335
|
+
if (merchantID === null || merchantID === undefined) {
|
|
336
|
+
throw new Error('Required parameter merchantID was null or undefined when calling fetchMemberInformation.');
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (memberID !== undefined) {
|
|
340
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (merchantID !== undefined) {
|
|
344
|
+
localVarQueryParameters['merchantID'] = ObjectSerializer.serialize(merchantID, "string");
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
348
|
+
|
|
349
|
+
let localVarUseFormData = false;
|
|
350
|
+
|
|
351
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
352
|
+
method: 'GET',
|
|
353
|
+
qs: localVarQueryParameters,
|
|
354
|
+
headers: localVarHeaderParams,
|
|
355
|
+
uri: localVarPath,
|
|
356
|
+
useQuerystring: this._useQuerystring,
|
|
357
|
+
json: true,
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
let authenticationPromise = Promise.resolve();
|
|
361
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
362
|
+
|
|
363
|
+
let interceptorPromise = authenticationPromise;
|
|
364
|
+
for (const interceptor of this.interceptors) {
|
|
365
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return interceptorPromise.then(() => {
|
|
369
|
+
if (Object.keys(localVarFormParams).length) {
|
|
370
|
+
if (localVarUseFormData) {
|
|
371
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
372
|
+
} else {
|
|
373
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return new Promise<{ response: http.IncomingMessage; body: Member; }>((resolve, reject) => {
|
|
377
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
378
|
+
if (error) {
|
|
379
|
+
reject(error);
|
|
380
|
+
} else {
|
|
381
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
382
|
+
body = ObjectSerializer.deserialize(body, "Member");
|
|
383
|
+
resolve({ response: response, body: body });
|
|
384
|
+
} else {
|
|
385
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
*
|
|
394
|
+
* @summary Fetch static voucher
|
|
395
|
+
* @param voucherID
|
|
396
|
+
*/
|
|
397
|
+
public async fetchStaticVoucherWithVoucherID (voucherID: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StaticVoucher; }> {
|
|
398
|
+
const localVarPath = this.basePath + '/wallet/staticVoucher/{voucherID}'
|
|
399
|
+
.replace('{' + 'voucherID' + '}', encodeURIComponent(String(voucherID)));
|
|
400
|
+
let localVarQueryParameters: any = {};
|
|
401
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
402
|
+
const produces = ['application/json'];
|
|
403
|
+
// give precedence to 'application/json'
|
|
404
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
405
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
406
|
+
} else {
|
|
407
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
408
|
+
}
|
|
409
|
+
let localVarFormParams: any = {};
|
|
410
|
+
|
|
411
|
+
// verify required parameter 'voucherID' is not null or undefined
|
|
412
|
+
if (voucherID === null || voucherID === undefined) {
|
|
413
|
+
throw new Error('Required parameter voucherID was null or undefined when calling fetchStaticVoucherWithVoucherID.');
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
417
|
+
|
|
418
|
+
let localVarUseFormData = false;
|
|
419
|
+
|
|
420
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
421
|
+
method: 'GET',
|
|
422
|
+
qs: localVarQueryParameters,
|
|
423
|
+
headers: localVarHeaderParams,
|
|
424
|
+
uri: localVarPath,
|
|
425
|
+
useQuerystring: this._useQuerystring,
|
|
426
|
+
json: true,
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
let authenticationPromise = Promise.resolve();
|
|
430
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
431
|
+
|
|
432
|
+
let interceptorPromise = authenticationPromise;
|
|
433
|
+
for (const interceptor of this.interceptors) {
|
|
434
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return interceptorPromise.then(() => {
|
|
438
|
+
if (Object.keys(localVarFormParams).length) {
|
|
439
|
+
if (localVarUseFormData) {
|
|
440
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
441
|
+
} else {
|
|
442
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return new Promise<{ response: http.IncomingMessage; body: StaticVoucher; }>((resolve, reject) => {
|
|
446
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
447
|
+
if (error) {
|
|
448
|
+
reject(error);
|
|
449
|
+
} else {
|
|
450
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
451
|
+
body = ObjectSerializer.deserialize(body, "StaticVoucher");
|
|
452
|
+
resolve({ response: response, body: body });
|
|
453
|
+
} else {
|
|
454
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
*
|
|
463
|
+
* @summary Fetch page with token NOTE: This route exists because a token can completely change the dataset returned to the client. A simple fetch just logs the token with the request, but a fetchWithToken request can have a very different object returned to the client.
|
|
464
|
+
* @param inlineObject67
|
|
465
|
+
*/
|
|
466
|
+
public async fetchWalletPageWithToken (inlineObject67: InlineObject67, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
467
|
+
const localVarPath = this.basePath + '/wallet/page/token';
|
|
468
|
+
let localVarQueryParameters: any = {};
|
|
469
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
470
|
+
const produces = ['application/json'];
|
|
471
|
+
// give precedence to 'application/json'
|
|
472
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
473
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
474
|
+
} else {
|
|
475
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
476
|
+
}
|
|
477
|
+
let localVarFormParams: any = {};
|
|
478
|
+
|
|
479
|
+
// verify required parameter 'inlineObject67' is not null or undefined
|
|
480
|
+
if (inlineObject67 === null || inlineObject67 === undefined) {
|
|
481
|
+
throw new Error('Required parameter inlineObject67 was null or undefined when calling fetchWalletPageWithToken.');
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
485
|
+
|
|
486
|
+
let localVarUseFormData = false;
|
|
487
|
+
|
|
488
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
489
|
+
method: 'POST',
|
|
490
|
+
qs: localVarQueryParameters,
|
|
491
|
+
headers: localVarHeaderParams,
|
|
492
|
+
uri: localVarPath,
|
|
493
|
+
useQuerystring: this._useQuerystring,
|
|
494
|
+
json: true,
|
|
495
|
+
body: ObjectSerializer.serialize(inlineObject67, "InlineObject67")
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
let authenticationPromise = Promise.resolve();
|
|
499
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
500
|
+
|
|
501
|
+
let interceptorPromise = authenticationPromise;
|
|
502
|
+
for (const interceptor of this.interceptors) {
|
|
503
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
return interceptorPromise.then(() => {
|
|
507
|
+
if (Object.keys(localVarFormParams).length) {
|
|
508
|
+
if (localVarUseFormData) {
|
|
509
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
510
|
+
} else {
|
|
511
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
515
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
516
|
+
if (error) {
|
|
517
|
+
reject(error);
|
|
518
|
+
} else {
|
|
519
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
520
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
521
|
+
resolve({ response: response, body: body });
|
|
522
|
+
} else {
|
|
523
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
*
|
|
532
|
+
* @summary Fetch payment object with token NOTE: This route exists because a token can completely change the dataset returned to the client. A simple fetch just logs the token with the request, but a fetchWithToken request can have a very different object returned to the client.
|
|
533
|
+
* @param inlineObject66
|
|
534
|
+
*/
|
|
535
|
+
public async fetchWalletPaymentObjectWithToken (inlineObject66: InlineObject66, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
536
|
+
const localVarPath = this.basePath + '/wallet/paymentObject/token';
|
|
537
|
+
let localVarQueryParameters: any = {};
|
|
538
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
539
|
+
const produces = ['application/json'];
|
|
540
|
+
// give precedence to 'application/json'
|
|
541
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
542
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
543
|
+
} else {
|
|
544
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
545
|
+
}
|
|
546
|
+
let localVarFormParams: any = {};
|
|
547
|
+
|
|
548
|
+
// verify required parameter 'inlineObject66' is not null or undefined
|
|
549
|
+
if (inlineObject66 === null || inlineObject66 === undefined) {
|
|
550
|
+
throw new Error('Required parameter inlineObject66 was null or undefined when calling fetchWalletPaymentObjectWithToken.');
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
554
|
+
|
|
555
|
+
let localVarUseFormData = false;
|
|
556
|
+
|
|
557
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
558
|
+
method: 'POST',
|
|
559
|
+
qs: localVarQueryParameters,
|
|
560
|
+
headers: localVarHeaderParams,
|
|
561
|
+
uri: localVarPath,
|
|
562
|
+
useQuerystring: this._useQuerystring,
|
|
563
|
+
json: true,
|
|
564
|
+
body: ObjectSerializer.serialize(inlineObject66, "InlineObject66")
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
let authenticationPromise = Promise.resolve();
|
|
568
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
569
|
+
|
|
570
|
+
let interceptorPromise = authenticationPromise;
|
|
571
|
+
for (const interceptor of this.interceptors) {
|
|
572
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
return interceptorPromise.then(() => {
|
|
576
|
+
if (Object.keys(localVarFormParams).length) {
|
|
577
|
+
if (localVarUseFormData) {
|
|
578
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
579
|
+
} else {
|
|
580
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
584
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
585
|
+
if (error) {
|
|
586
|
+
reject(error);
|
|
587
|
+
} else {
|
|
588
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
589
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
590
|
+
resolve({ response: response, body: body });
|
|
591
|
+
} else {
|
|
592
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
*
|
|
601
|
+
* @summary Identify item
|
|
602
|
+
* @param itemID
|
|
603
|
+
* @param isRefresh
|
|
604
|
+
* @param phoneVerificationToken
|
|
605
|
+
*/
|
|
606
|
+
public async identifyItem (itemID: string, isRefresh?: boolean, phoneVerificationToken?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
607
|
+
const localVarPath = this.basePath + '/wallet/item/identify/{itemID}'
|
|
608
|
+
.replace('{' + 'itemID' + '}', encodeURIComponent(String(itemID)));
|
|
609
|
+
let localVarQueryParameters: any = {};
|
|
610
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
611
|
+
const produces = ['application/json'];
|
|
612
|
+
// give precedence to 'application/json'
|
|
613
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
614
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
615
|
+
} else {
|
|
616
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
617
|
+
}
|
|
618
|
+
let localVarFormParams: any = {};
|
|
619
|
+
|
|
620
|
+
// verify required parameter 'itemID' is not null or undefined
|
|
621
|
+
if (itemID === null || itemID === undefined) {
|
|
622
|
+
throw new Error('Required parameter itemID was null or undefined when calling identifyItem.');
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (isRefresh !== undefined) {
|
|
626
|
+
localVarQueryParameters['isRefresh'] = ObjectSerializer.serialize(isRefresh, "boolean");
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (phoneVerificationToken !== undefined) {
|
|
630
|
+
localVarQueryParameters['phoneVerificationToken'] = ObjectSerializer.serialize(phoneVerificationToken, "string");
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
634
|
+
|
|
635
|
+
let localVarUseFormData = false;
|
|
636
|
+
|
|
637
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
638
|
+
method: 'GET',
|
|
639
|
+
qs: localVarQueryParameters,
|
|
640
|
+
headers: localVarHeaderParams,
|
|
641
|
+
uri: localVarPath,
|
|
642
|
+
useQuerystring: this._useQuerystring,
|
|
643
|
+
json: true,
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
let authenticationPromise = Promise.resolve();
|
|
647
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
648
|
+
|
|
649
|
+
let interceptorPromise = authenticationPromise;
|
|
650
|
+
for (const interceptor of this.interceptors) {
|
|
651
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return interceptorPromise.then(() => {
|
|
655
|
+
if (Object.keys(localVarFormParams).length) {
|
|
656
|
+
if (localVarUseFormData) {
|
|
657
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
658
|
+
} else {
|
|
659
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
663
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
664
|
+
if (error) {
|
|
665
|
+
reject(error);
|
|
666
|
+
} else {
|
|
667
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
668
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
669
|
+
resolve({ response: response, body: body });
|
|
670
|
+
} else {
|
|
671
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
}
|