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/customerApi.ts
CHANGED
|
@@ -1,737 +1,737 @@
|
|
|
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 { InlineObject2 } from '../model/inlineObject2';
|
|
21
|
-
import { InlineObject3 } from '../model/inlineObject3';
|
|
22
|
-
import { InternalServerError } from '../model/internalServerError';
|
|
23
|
-
import { StaticVoucher } from '../model/staticVoucher';
|
|
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 CustomerApiApiKeys {
|
|
38
|
-
api_key,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class CustomerApi {
|
|
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: CustomerApiApiKeys, value: string) {
|
|
91
|
-
(this.authentications as any)[CustomerApiApiKeys[key]].apiKey = value;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
-
this.interceptors.push(interceptor);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @summary Fetch active static vouchers
|
|
101
|
-
* @param memberID
|
|
102
|
-
* @param cellPhoneNumber
|
|
103
|
-
*/
|
|
104
|
-
public async fetchActiveVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
105
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/active';
|
|
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
|
-
if (memberID !== undefined) {
|
|
118
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (cellPhoneNumber !== undefined) {
|
|
122
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
126
|
-
|
|
127
|
-
let localVarUseFormData = false;
|
|
128
|
-
|
|
129
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
130
|
-
method: 'GET',
|
|
131
|
-
qs: localVarQueryParameters,
|
|
132
|
-
headers: localVarHeaderParams,
|
|
133
|
-
uri: localVarPath,
|
|
134
|
-
useQuerystring: this._useQuerystring,
|
|
135
|
-
json: true,
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
let authenticationPromise = Promise.resolve();
|
|
139
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
140
|
-
|
|
141
|
-
let interceptorPromise = authenticationPromise;
|
|
142
|
-
for (const interceptor of this.interceptors) {
|
|
143
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return interceptorPromise.then(() => {
|
|
147
|
-
if (Object.keys(localVarFormParams).length) {
|
|
148
|
-
if (localVarUseFormData) {
|
|
149
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
150
|
-
} else {
|
|
151
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
155
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
156
|
-
if (error) {
|
|
157
|
-
reject(error);
|
|
158
|
-
} else {
|
|
159
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
160
|
-
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
161
|
-
resolve({ response: response, body: body });
|
|
162
|
-
} else {
|
|
163
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
* @summary Fetch all static vouchers
|
|
173
|
-
* @param memberID
|
|
174
|
-
* @param cellPhoneNumber
|
|
175
|
-
*/
|
|
176
|
-
public async fetchAllVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
177
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/all';
|
|
178
|
-
let localVarQueryParameters: any = {};
|
|
179
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
180
|
-
const produces = ['application/json'];
|
|
181
|
-
// give precedence to 'application/json'
|
|
182
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
183
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
184
|
-
} else {
|
|
185
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
186
|
-
}
|
|
187
|
-
let localVarFormParams: any = {};
|
|
188
|
-
|
|
189
|
-
if (memberID !== undefined) {
|
|
190
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (cellPhoneNumber !== undefined) {
|
|
194
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
198
|
-
|
|
199
|
-
let localVarUseFormData = false;
|
|
200
|
-
|
|
201
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
202
|
-
method: 'GET',
|
|
203
|
-
qs: localVarQueryParameters,
|
|
204
|
-
headers: localVarHeaderParams,
|
|
205
|
-
uri: localVarPath,
|
|
206
|
-
useQuerystring: this._useQuerystring,
|
|
207
|
-
json: true,
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
let authenticationPromise = Promise.resolve();
|
|
211
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
212
|
-
|
|
213
|
-
let interceptorPromise = authenticationPromise;
|
|
214
|
-
for (const interceptor of this.interceptors) {
|
|
215
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return interceptorPromise.then(() => {
|
|
219
|
-
if (Object.keys(localVarFormParams).length) {
|
|
220
|
-
if (localVarUseFormData) {
|
|
221
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
222
|
-
} else {
|
|
223
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
227
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
228
|
-
if (error) {
|
|
229
|
-
reject(error);
|
|
230
|
-
} else {
|
|
231
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
232
|
-
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
233
|
-
resolve({ response: response, body: body });
|
|
234
|
-
} else {
|
|
235
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
*
|
|
244
|
-
* @summary Fetch expired static vouchers
|
|
245
|
-
* @param memberID
|
|
246
|
-
* @param cellPhoneNumber
|
|
247
|
-
*/
|
|
248
|
-
public async fetchExpiredVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
249
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/expired';
|
|
250
|
-
let localVarQueryParameters: any = {};
|
|
251
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
252
|
-
const produces = ['application/json'];
|
|
253
|
-
// give precedence to 'application/json'
|
|
254
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
255
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
256
|
-
} else {
|
|
257
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
258
|
-
}
|
|
259
|
-
let localVarFormParams: any = {};
|
|
260
|
-
|
|
261
|
-
if (memberID !== undefined) {
|
|
262
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (cellPhoneNumber !== undefined) {
|
|
266
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
270
|
-
|
|
271
|
-
let localVarUseFormData = false;
|
|
272
|
-
|
|
273
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
274
|
-
method: 'GET',
|
|
275
|
-
qs: localVarQueryParameters,
|
|
276
|
-
headers: localVarHeaderParams,
|
|
277
|
-
uri: localVarPath,
|
|
278
|
-
useQuerystring: this._useQuerystring,
|
|
279
|
-
json: true,
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
let authenticationPromise = Promise.resolve();
|
|
283
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
284
|
-
|
|
285
|
-
let interceptorPromise = authenticationPromise;
|
|
286
|
-
for (const interceptor of this.interceptors) {
|
|
287
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
return interceptorPromise.then(() => {
|
|
291
|
-
if (Object.keys(localVarFormParams).length) {
|
|
292
|
-
if (localVarUseFormData) {
|
|
293
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
294
|
-
} else {
|
|
295
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
299
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
300
|
-
if (error) {
|
|
301
|
-
reject(error);
|
|
302
|
-
} else {
|
|
303
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
304
|
-
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
305
|
-
resolve({ response: response, body: body });
|
|
306
|
-
} else {
|
|
307
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
*
|
|
316
|
-
* @summary Fetch redeemed static vouchers
|
|
317
|
-
* @param memberID
|
|
318
|
-
* @param cellPhoneNumber
|
|
319
|
-
*/
|
|
320
|
-
public async fetchRedeemedVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
321
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/redeemed';
|
|
322
|
-
let localVarQueryParameters: any = {};
|
|
323
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
324
|
-
const produces = ['application/json'];
|
|
325
|
-
// give precedence to 'application/json'
|
|
326
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
327
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
328
|
-
} else {
|
|
329
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
330
|
-
}
|
|
331
|
-
let localVarFormParams: any = {};
|
|
332
|
-
|
|
333
|
-
if (memberID !== undefined) {
|
|
334
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
if (cellPhoneNumber !== undefined) {
|
|
338
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
342
|
-
|
|
343
|
-
let localVarUseFormData = false;
|
|
344
|
-
|
|
345
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
346
|
-
method: 'GET',
|
|
347
|
-
qs: localVarQueryParameters,
|
|
348
|
-
headers: localVarHeaderParams,
|
|
349
|
-
uri: localVarPath,
|
|
350
|
-
useQuerystring: this._useQuerystring,
|
|
351
|
-
json: true,
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
let authenticationPromise = Promise.resolve();
|
|
355
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
356
|
-
|
|
357
|
-
let interceptorPromise = authenticationPromise;
|
|
358
|
-
for (const interceptor of this.interceptors) {
|
|
359
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return interceptorPromise.then(() => {
|
|
363
|
-
if (Object.keys(localVarFormParams).length) {
|
|
364
|
-
if (localVarUseFormData) {
|
|
365
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
366
|
-
} else {
|
|
367
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
371
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
372
|
-
if (error) {
|
|
373
|
-
reject(error);
|
|
374
|
-
} else {
|
|
375
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
376
|
-
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
377
|
-
resolve({ response: response, body: body });
|
|
378
|
-
} else {
|
|
379
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
*
|
|
388
|
-
* @summary Fetch refunded static vouchers
|
|
389
|
-
* @param memberID
|
|
390
|
-
* @param cellPhoneNumber
|
|
391
|
-
*/
|
|
392
|
-
public async fetchRefundedVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
393
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/refunded';
|
|
394
|
-
let localVarQueryParameters: any = {};
|
|
395
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
396
|
-
const produces = ['application/json'];
|
|
397
|
-
// give precedence to 'application/json'
|
|
398
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
399
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
400
|
-
} else {
|
|
401
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
402
|
-
}
|
|
403
|
-
let localVarFormParams: any = {};
|
|
404
|
-
|
|
405
|
-
if (memberID !== undefined) {
|
|
406
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
if (cellPhoneNumber !== undefined) {
|
|
410
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
414
|
-
|
|
415
|
-
let localVarUseFormData = false;
|
|
416
|
-
|
|
417
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
418
|
-
method: 'GET',
|
|
419
|
-
qs: localVarQueryParameters,
|
|
420
|
-
headers: localVarHeaderParams,
|
|
421
|
-
uri: localVarPath,
|
|
422
|
-
useQuerystring: this._useQuerystring,
|
|
423
|
-
json: true,
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
let authenticationPromise = Promise.resolve();
|
|
427
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
428
|
-
|
|
429
|
-
let interceptorPromise = authenticationPromise;
|
|
430
|
-
for (const interceptor of this.interceptors) {
|
|
431
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
return interceptorPromise.then(() => {
|
|
435
|
-
if (Object.keys(localVarFormParams).length) {
|
|
436
|
-
if (localVarUseFormData) {
|
|
437
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
438
|
-
} else {
|
|
439
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
443
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
444
|
-
if (error) {
|
|
445
|
-
reject(error);
|
|
446
|
-
} else {
|
|
447
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
448
|
-
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
449
|
-
resolve({ response: response, body: body });
|
|
450
|
-
} else {
|
|
451
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
});
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
*
|
|
460
|
-
* @summary Fetch upcoming static vouchers
|
|
461
|
-
* @param memberID
|
|
462
|
-
* @param cellPhoneNumber
|
|
463
|
-
*/
|
|
464
|
-
public async fetchUpcomingVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
465
|
-
const localVarPath = this.basePath + '/v1/customer/vouchers/upcoming';
|
|
466
|
-
let localVarQueryParameters: any = {};
|
|
467
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
468
|
-
const produces = ['application/json'];
|
|
469
|
-
// give precedence to 'application/json'
|
|
470
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
471
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
472
|
-
} else {
|
|
473
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
474
|
-
}
|
|
475
|
-
let localVarFormParams: any = {};
|
|
476
|
-
|
|
477
|
-
if (memberID !== undefined) {
|
|
478
|
-
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
if (cellPhoneNumber !== undefined) {
|
|
482
|
-
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
486
|
-
|
|
487
|
-
let localVarUseFormData = false;
|
|
488
|
-
|
|
489
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
490
|
-
method: 'GET',
|
|
491
|
-
qs: localVarQueryParameters,
|
|
492
|
-
headers: localVarHeaderParams,
|
|
493
|
-
uri: localVarPath,
|
|
494
|
-
useQuerystring: this._useQuerystring,
|
|
495
|
-
json: true,
|
|
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: Array<StaticVoucher>; }>((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, "Array<StaticVoucher>");
|
|
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 Wallet Views for Session
|
|
533
|
-
* @param id
|
|
534
|
-
*/
|
|
535
|
-
public async fetchWalletViewsForSession (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }> {
|
|
536
|
-
const localVarPath = this.basePath + '/v1/customer/walletViews/session/{id}'
|
|
537
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
538
|
-
let localVarQueryParameters: any = {};
|
|
539
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
540
|
-
const produces = ['application/json'];
|
|
541
|
-
// give precedence to 'application/json'
|
|
542
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
543
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
544
|
-
} else {
|
|
545
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
546
|
-
}
|
|
547
|
-
let localVarFormParams: any = {};
|
|
548
|
-
|
|
549
|
-
// verify required parameter 'id' is not null or undefined
|
|
550
|
-
if (id === null || id === undefined) {
|
|
551
|
-
throw new Error('Required parameter id was null or undefined when calling fetchWalletViewsForSession.');
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
555
|
-
|
|
556
|
-
let localVarUseFormData = false;
|
|
557
|
-
|
|
558
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
559
|
-
method: 'GET',
|
|
560
|
-
qs: localVarQueryParameters,
|
|
561
|
-
headers: localVarHeaderParams,
|
|
562
|
-
uri: localVarPath,
|
|
563
|
-
useQuerystring: this._useQuerystring,
|
|
564
|
-
json: true,
|
|
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: Array<WalletPageView>; }>((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, "Array<WalletPageView>");
|
|
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 Find members with memberID
|
|
602
|
-
* @param inlineObject3
|
|
603
|
-
*/
|
|
604
|
-
public async searchByMemberID (inlineObject3: InlineObject3, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
605
|
-
const localVarPath = this.basePath + '/v1/customer/search/memberID';
|
|
606
|
-
let localVarQueryParameters: any = {};
|
|
607
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
608
|
-
const produces = ['application/json'];
|
|
609
|
-
// give precedence to 'application/json'
|
|
610
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
611
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
612
|
-
} else {
|
|
613
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
614
|
-
}
|
|
615
|
-
let localVarFormParams: any = {};
|
|
616
|
-
|
|
617
|
-
// verify required parameter 'inlineObject3' is not null or undefined
|
|
618
|
-
if (inlineObject3 === null || inlineObject3 === undefined) {
|
|
619
|
-
throw new Error('Required parameter inlineObject3 was null or undefined when calling searchByMemberID.');
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
623
|
-
|
|
624
|
-
let localVarUseFormData = false;
|
|
625
|
-
|
|
626
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
627
|
-
method: 'POST',
|
|
628
|
-
qs: localVarQueryParameters,
|
|
629
|
-
headers: localVarHeaderParams,
|
|
630
|
-
uri: localVarPath,
|
|
631
|
-
useQuerystring: this._useQuerystring,
|
|
632
|
-
json: true,
|
|
633
|
-
body: ObjectSerializer.serialize(inlineObject3, "InlineObject3")
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
let authenticationPromise = Promise.resolve();
|
|
637
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
638
|
-
|
|
639
|
-
let interceptorPromise = authenticationPromise;
|
|
640
|
-
for (const interceptor of this.interceptors) {
|
|
641
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
return interceptorPromise.then(() => {
|
|
645
|
-
if (Object.keys(localVarFormParams).length) {
|
|
646
|
-
if (localVarUseFormData) {
|
|
647
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
648
|
-
} else {
|
|
649
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
653
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
654
|
-
if (error) {
|
|
655
|
-
reject(error);
|
|
656
|
-
} else {
|
|
657
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
658
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
659
|
-
resolve({ response: response, body: body });
|
|
660
|
-
} else {
|
|
661
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
});
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
/**
|
|
669
|
-
*
|
|
670
|
-
* @summary Find members with phone number
|
|
671
|
-
* @param inlineObject2
|
|
672
|
-
*/
|
|
673
|
-
public async searchByPhoneNumber (inlineObject2: InlineObject2, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
674
|
-
const localVarPath = this.basePath + '/v1/customer/search/phoneNumber';
|
|
675
|
-
let localVarQueryParameters: any = {};
|
|
676
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
677
|
-
const produces = ['application/json'];
|
|
678
|
-
// give precedence to 'application/json'
|
|
679
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
680
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
681
|
-
} else {
|
|
682
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
683
|
-
}
|
|
684
|
-
let localVarFormParams: any = {};
|
|
685
|
-
|
|
686
|
-
// verify required parameter 'inlineObject2' is not null or undefined
|
|
687
|
-
if (inlineObject2 === null || inlineObject2 === undefined) {
|
|
688
|
-
throw new Error('Required parameter inlineObject2 was null or undefined when calling searchByPhoneNumber.');
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
692
|
-
|
|
693
|
-
let localVarUseFormData = false;
|
|
694
|
-
|
|
695
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
696
|
-
method: 'POST',
|
|
697
|
-
qs: localVarQueryParameters,
|
|
698
|
-
headers: localVarHeaderParams,
|
|
699
|
-
uri: localVarPath,
|
|
700
|
-
useQuerystring: this._useQuerystring,
|
|
701
|
-
json: true,
|
|
702
|
-
body: ObjectSerializer.serialize(inlineObject2, "InlineObject2")
|
|
703
|
-
};
|
|
704
|
-
|
|
705
|
-
let authenticationPromise = Promise.resolve();
|
|
706
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
707
|
-
|
|
708
|
-
let interceptorPromise = authenticationPromise;
|
|
709
|
-
for (const interceptor of this.interceptors) {
|
|
710
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
return interceptorPromise.then(() => {
|
|
714
|
-
if (Object.keys(localVarFormParams).length) {
|
|
715
|
-
if (localVarUseFormData) {
|
|
716
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
717
|
-
} else {
|
|
718
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
722
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
723
|
-
if (error) {
|
|
724
|
-
reject(error);
|
|
725
|
-
} else {
|
|
726
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
727
|
-
body = ObjectSerializer.deserialize(body, "any");
|
|
728
|
-
resolve({ response: response, body: body });
|
|
729
|
-
} else {
|
|
730
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
});
|
|
734
|
-
});
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
}
|
|
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 { InlineObject2 } from '../model/inlineObject2';
|
|
21
|
+
import { InlineObject3 } from '../model/inlineObject3';
|
|
22
|
+
import { InternalServerError } from '../model/internalServerError';
|
|
23
|
+
import { StaticVoucher } from '../model/staticVoucher';
|
|
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 CustomerApiApiKeys {
|
|
38
|
+
api_key,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class CustomerApi {
|
|
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: CustomerApiApiKeys, value: string) {
|
|
91
|
+
(this.authentications as any)[CustomerApiApiKeys[key]].apiKey = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
95
|
+
this.interceptors.push(interceptor);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Fetch active static vouchers
|
|
101
|
+
* @param memberID
|
|
102
|
+
* @param cellPhoneNumber
|
|
103
|
+
*/
|
|
104
|
+
public async fetchActiveVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
105
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/active';
|
|
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
|
+
if (memberID !== undefined) {
|
|
118
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (cellPhoneNumber !== undefined) {
|
|
122
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
126
|
+
|
|
127
|
+
let localVarUseFormData = false;
|
|
128
|
+
|
|
129
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
130
|
+
method: 'GET',
|
|
131
|
+
qs: localVarQueryParameters,
|
|
132
|
+
headers: localVarHeaderParams,
|
|
133
|
+
uri: localVarPath,
|
|
134
|
+
useQuerystring: this._useQuerystring,
|
|
135
|
+
json: true,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
let authenticationPromise = Promise.resolve();
|
|
139
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
140
|
+
|
|
141
|
+
let interceptorPromise = authenticationPromise;
|
|
142
|
+
for (const interceptor of this.interceptors) {
|
|
143
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return interceptorPromise.then(() => {
|
|
147
|
+
if (Object.keys(localVarFormParams).length) {
|
|
148
|
+
if (localVarUseFormData) {
|
|
149
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
150
|
+
} else {
|
|
151
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
155
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
156
|
+
if (error) {
|
|
157
|
+
reject(error);
|
|
158
|
+
} else {
|
|
159
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
160
|
+
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
161
|
+
resolve({ response: response, body: body });
|
|
162
|
+
} else {
|
|
163
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
* @summary Fetch all static vouchers
|
|
173
|
+
* @param memberID
|
|
174
|
+
* @param cellPhoneNumber
|
|
175
|
+
*/
|
|
176
|
+
public async fetchAllVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
177
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/all';
|
|
178
|
+
let localVarQueryParameters: any = {};
|
|
179
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
180
|
+
const produces = ['application/json'];
|
|
181
|
+
// give precedence to 'application/json'
|
|
182
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
183
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
184
|
+
} else {
|
|
185
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
186
|
+
}
|
|
187
|
+
let localVarFormParams: any = {};
|
|
188
|
+
|
|
189
|
+
if (memberID !== undefined) {
|
|
190
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (cellPhoneNumber !== undefined) {
|
|
194
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
198
|
+
|
|
199
|
+
let localVarUseFormData = false;
|
|
200
|
+
|
|
201
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
202
|
+
method: 'GET',
|
|
203
|
+
qs: localVarQueryParameters,
|
|
204
|
+
headers: localVarHeaderParams,
|
|
205
|
+
uri: localVarPath,
|
|
206
|
+
useQuerystring: this._useQuerystring,
|
|
207
|
+
json: true,
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
let authenticationPromise = Promise.resolve();
|
|
211
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
212
|
+
|
|
213
|
+
let interceptorPromise = authenticationPromise;
|
|
214
|
+
for (const interceptor of this.interceptors) {
|
|
215
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return interceptorPromise.then(() => {
|
|
219
|
+
if (Object.keys(localVarFormParams).length) {
|
|
220
|
+
if (localVarUseFormData) {
|
|
221
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
222
|
+
} else {
|
|
223
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
227
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
228
|
+
if (error) {
|
|
229
|
+
reject(error);
|
|
230
|
+
} else {
|
|
231
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
232
|
+
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
233
|
+
resolve({ response: response, body: body });
|
|
234
|
+
} else {
|
|
235
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
*
|
|
244
|
+
* @summary Fetch expired static vouchers
|
|
245
|
+
* @param memberID
|
|
246
|
+
* @param cellPhoneNumber
|
|
247
|
+
*/
|
|
248
|
+
public async fetchExpiredVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
249
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/expired';
|
|
250
|
+
let localVarQueryParameters: any = {};
|
|
251
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
252
|
+
const produces = ['application/json'];
|
|
253
|
+
// give precedence to 'application/json'
|
|
254
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
255
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
256
|
+
} else {
|
|
257
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
258
|
+
}
|
|
259
|
+
let localVarFormParams: any = {};
|
|
260
|
+
|
|
261
|
+
if (memberID !== undefined) {
|
|
262
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (cellPhoneNumber !== undefined) {
|
|
266
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
270
|
+
|
|
271
|
+
let localVarUseFormData = false;
|
|
272
|
+
|
|
273
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
274
|
+
method: 'GET',
|
|
275
|
+
qs: localVarQueryParameters,
|
|
276
|
+
headers: localVarHeaderParams,
|
|
277
|
+
uri: localVarPath,
|
|
278
|
+
useQuerystring: this._useQuerystring,
|
|
279
|
+
json: true,
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
let authenticationPromise = Promise.resolve();
|
|
283
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
284
|
+
|
|
285
|
+
let interceptorPromise = authenticationPromise;
|
|
286
|
+
for (const interceptor of this.interceptors) {
|
|
287
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return interceptorPromise.then(() => {
|
|
291
|
+
if (Object.keys(localVarFormParams).length) {
|
|
292
|
+
if (localVarUseFormData) {
|
|
293
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
294
|
+
} else {
|
|
295
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
299
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
300
|
+
if (error) {
|
|
301
|
+
reject(error);
|
|
302
|
+
} else {
|
|
303
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
304
|
+
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
305
|
+
resolve({ response: response, body: body });
|
|
306
|
+
} else {
|
|
307
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @summary Fetch redeemed static vouchers
|
|
317
|
+
* @param memberID
|
|
318
|
+
* @param cellPhoneNumber
|
|
319
|
+
*/
|
|
320
|
+
public async fetchRedeemedVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
321
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/redeemed';
|
|
322
|
+
let localVarQueryParameters: any = {};
|
|
323
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
324
|
+
const produces = ['application/json'];
|
|
325
|
+
// give precedence to 'application/json'
|
|
326
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
327
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
328
|
+
} else {
|
|
329
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
330
|
+
}
|
|
331
|
+
let localVarFormParams: any = {};
|
|
332
|
+
|
|
333
|
+
if (memberID !== undefined) {
|
|
334
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (cellPhoneNumber !== undefined) {
|
|
338
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
342
|
+
|
|
343
|
+
let localVarUseFormData = false;
|
|
344
|
+
|
|
345
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
346
|
+
method: 'GET',
|
|
347
|
+
qs: localVarQueryParameters,
|
|
348
|
+
headers: localVarHeaderParams,
|
|
349
|
+
uri: localVarPath,
|
|
350
|
+
useQuerystring: this._useQuerystring,
|
|
351
|
+
json: true,
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
let authenticationPromise = Promise.resolve();
|
|
355
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
356
|
+
|
|
357
|
+
let interceptorPromise = authenticationPromise;
|
|
358
|
+
for (const interceptor of this.interceptors) {
|
|
359
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return interceptorPromise.then(() => {
|
|
363
|
+
if (Object.keys(localVarFormParams).length) {
|
|
364
|
+
if (localVarUseFormData) {
|
|
365
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
366
|
+
} else {
|
|
367
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
371
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
372
|
+
if (error) {
|
|
373
|
+
reject(error);
|
|
374
|
+
} else {
|
|
375
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
376
|
+
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
377
|
+
resolve({ response: response, body: body });
|
|
378
|
+
} else {
|
|
379
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
*
|
|
388
|
+
* @summary Fetch refunded static vouchers
|
|
389
|
+
* @param memberID
|
|
390
|
+
* @param cellPhoneNumber
|
|
391
|
+
*/
|
|
392
|
+
public async fetchRefundedVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
393
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/refunded';
|
|
394
|
+
let localVarQueryParameters: any = {};
|
|
395
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
396
|
+
const produces = ['application/json'];
|
|
397
|
+
// give precedence to 'application/json'
|
|
398
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
399
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
400
|
+
} else {
|
|
401
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
402
|
+
}
|
|
403
|
+
let localVarFormParams: any = {};
|
|
404
|
+
|
|
405
|
+
if (memberID !== undefined) {
|
|
406
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (cellPhoneNumber !== undefined) {
|
|
410
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
414
|
+
|
|
415
|
+
let localVarUseFormData = false;
|
|
416
|
+
|
|
417
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
418
|
+
method: 'GET',
|
|
419
|
+
qs: localVarQueryParameters,
|
|
420
|
+
headers: localVarHeaderParams,
|
|
421
|
+
uri: localVarPath,
|
|
422
|
+
useQuerystring: this._useQuerystring,
|
|
423
|
+
json: true,
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
let authenticationPromise = Promise.resolve();
|
|
427
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
428
|
+
|
|
429
|
+
let interceptorPromise = authenticationPromise;
|
|
430
|
+
for (const interceptor of this.interceptors) {
|
|
431
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
return interceptorPromise.then(() => {
|
|
435
|
+
if (Object.keys(localVarFormParams).length) {
|
|
436
|
+
if (localVarUseFormData) {
|
|
437
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
438
|
+
} else {
|
|
439
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }>((resolve, reject) => {
|
|
443
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
444
|
+
if (error) {
|
|
445
|
+
reject(error);
|
|
446
|
+
} else {
|
|
447
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
448
|
+
body = ObjectSerializer.deserialize(body, "Array<StaticVoucher>");
|
|
449
|
+
resolve({ response: response, body: body });
|
|
450
|
+
} else {
|
|
451
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* @summary Fetch upcoming static vouchers
|
|
461
|
+
* @param memberID
|
|
462
|
+
* @param cellPhoneNumber
|
|
463
|
+
*/
|
|
464
|
+
public async fetchUpcomingVouchers (memberID?: string, cellPhoneNumber?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<StaticVoucher>; }> {
|
|
465
|
+
const localVarPath = this.basePath + '/v1/customer/vouchers/upcoming';
|
|
466
|
+
let localVarQueryParameters: any = {};
|
|
467
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
468
|
+
const produces = ['application/json'];
|
|
469
|
+
// give precedence to 'application/json'
|
|
470
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
471
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
472
|
+
} else {
|
|
473
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
474
|
+
}
|
|
475
|
+
let localVarFormParams: any = {};
|
|
476
|
+
|
|
477
|
+
if (memberID !== undefined) {
|
|
478
|
+
localVarQueryParameters['memberID'] = ObjectSerializer.serialize(memberID, "string");
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if (cellPhoneNumber !== undefined) {
|
|
482
|
+
localVarQueryParameters['cellPhoneNumber'] = ObjectSerializer.serialize(cellPhoneNumber, "string");
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
486
|
+
|
|
487
|
+
let localVarUseFormData = false;
|
|
488
|
+
|
|
489
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
490
|
+
method: 'GET',
|
|
491
|
+
qs: localVarQueryParameters,
|
|
492
|
+
headers: localVarHeaderParams,
|
|
493
|
+
uri: localVarPath,
|
|
494
|
+
useQuerystring: this._useQuerystring,
|
|
495
|
+
json: true,
|
|
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: Array<StaticVoucher>; }>((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, "Array<StaticVoucher>");
|
|
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 Wallet Views for Session
|
|
533
|
+
* @param id
|
|
534
|
+
*/
|
|
535
|
+
public async fetchWalletViewsForSession (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<WalletPageView>; }> {
|
|
536
|
+
const localVarPath = this.basePath + '/v1/customer/walletViews/session/{id}'
|
|
537
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
538
|
+
let localVarQueryParameters: any = {};
|
|
539
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
540
|
+
const produces = ['application/json'];
|
|
541
|
+
// give precedence to 'application/json'
|
|
542
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
543
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
544
|
+
} else {
|
|
545
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
546
|
+
}
|
|
547
|
+
let localVarFormParams: any = {};
|
|
548
|
+
|
|
549
|
+
// verify required parameter 'id' is not null or undefined
|
|
550
|
+
if (id === null || id === undefined) {
|
|
551
|
+
throw new Error('Required parameter id was null or undefined when calling fetchWalletViewsForSession.');
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
555
|
+
|
|
556
|
+
let localVarUseFormData = false;
|
|
557
|
+
|
|
558
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
559
|
+
method: 'GET',
|
|
560
|
+
qs: localVarQueryParameters,
|
|
561
|
+
headers: localVarHeaderParams,
|
|
562
|
+
uri: localVarPath,
|
|
563
|
+
useQuerystring: this._useQuerystring,
|
|
564
|
+
json: true,
|
|
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: Array<WalletPageView>; }>((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, "Array<WalletPageView>");
|
|
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 Find members with memberID
|
|
602
|
+
* @param inlineObject3
|
|
603
|
+
*/
|
|
604
|
+
public async searchByMemberID (inlineObject3: InlineObject3, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
605
|
+
const localVarPath = this.basePath + '/v1/customer/search/memberID';
|
|
606
|
+
let localVarQueryParameters: any = {};
|
|
607
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
608
|
+
const produces = ['application/json'];
|
|
609
|
+
// give precedence to 'application/json'
|
|
610
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
611
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
612
|
+
} else {
|
|
613
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
614
|
+
}
|
|
615
|
+
let localVarFormParams: any = {};
|
|
616
|
+
|
|
617
|
+
// verify required parameter 'inlineObject3' is not null or undefined
|
|
618
|
+
if (inlineObject3 === null || inlineObject3 === undefined) {
|
|
619
|
+
throw new Error('Required parameter inlineObject3 was null or undefined when calling searchByMemberID.');
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
623
|
+
|
|
624
|
+
let localVarUseFormData = false;
|
|
625
|
+
|
|
626
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
627
|
+
method: 'POST',
|
|
628
|
+
qs: localVarQueryParameters,
|
|
629
|
+
headers: localVarHeaderParams,
|
|
630
|
+
uri: localVarPath,
|
|
631
|
+
useQuerystring: this._useQuerystring,
|
|
632
|
+
json: true,
|
|
633
|
+
body: ObjectSerializer.serialize(inlineObject3, "InlineObject3")
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
let authenticationPromise = Promise.resolve();
|
|
637
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
638
|
+
|
|
639
|
+
let interceptorPromise = authenticationPromise;
|
|
640
|
+
for (const interceptor of this.interceptors) {
|
|
641
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
return interceptorPromise.then(() => {
|
|
645
|
+
if (Object.keys(localVarFormParams).length) {
|
|
646
|
+
if (localVarUseFormData) {
|
|
647
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
648
|
+
} else {
|
|
649
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
653
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
654
|
+
if (error) {
|
|
655
|
+
reject(error);
|
|
656
|
+
} else {
|
|
657
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
658
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
659
|
+
resolve({ response: response, body: body });
|
|
660
|
+
} else {
|
|
661
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
*
|
|
670
|
+
* @summary Find members with phone number
|
|
671
|
+
* @param inlineObject2
|
|
672
|
+
*/
|
|
673
|
+
public async searchByPhoneNumber (inlineObject2: InlineObject2, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: any; }> {
|
|
674
|
+
const localVarPath = this.basePath + '/v1/customer/search/phoneNumber';
|
|
675
|
+
let localVarQueryParameters: any = {};
|
|
676
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
677
|
+
const produces = ['application/json'];
|
|
678
|
+
// give precedence to 'application/json'
|
|
679
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
680
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
681
|
+
} else {
|
|
682
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
683
|
+
}
|
|
684
|
+
let localVarFormParams: any = {};
|
|
685
|
+
|
|
686
|
+
// verify required parameter 'inlineObject2' is not null or undefined
|
|
687
|
+
if (inlineObject2 === null || inlineObject2 === undefined) {
|
|
688
|
+
throw new Error('Required parameter inlineObject2 was null or undefined when calling searchByPhoneNumber.');
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
692
|
+
|
|
693
|
+
let localVarUseFormData = false;
|
|
694
|
+
|
|
695
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
696
|
+
method: 'POST',
|
|
697
|
+
qs: localVarQueryParameters,
|
|
698
|
+
headers: localVarHeaderParams,
|
|
699
|
+
uri: localVarPath,
|
|
700
|
+
useQuerystring: this._useQuerystring,
|
|
701
|
+
json: true,
|
|
702
|
+
body: ObjectSerializer.serialize(inlineObject2, "InlineObject2")
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
let authenticationPromise = Promise.resolve();
|
|
706
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
707
|
+
|
|
708
|
+
let interceptorPromise = authenticationPromise;
|
|
709
|
+
for (const interceptor of this.interceptors) {
|
|
710
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
return interceptorPromise.then(() => {
|
|
714
|
+
if (Object.keys(localVarFormParams).length) {
|
|
715
|
+
if (localVarUseFormData) {
|
|
716
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
717
|
+
} else {
|
|
718
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
return new Promise<{ response: http.IncomingMessage; body: any; }>((resolve, reject) => {
|
|
722
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
723
|
+
if (error) {
|
|
724
|
+
reject(error);
|
|
725
|
+
} else {
|
|
726
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
727
|
+
body = ObjectSerializer.deserialize(body, "any");
|
|
728
|
+
resolve({ response: response, body: body });
|
|
729
|
+
} else {
|
|
730
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
}
|