wallet 2.1.507 → 2.1.508
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/README.md +849 -16
- package/api/advertisementCreditsApi.ts +1 -1
- package/api/analyticsApi.ts +1 -1
- package/api/appleWalletSubscribersApi.ts +1 -1
- package/api/billingApi.ts +1 -1
- package/api/clubMembersPointsApi.ts +1 -1
- package/api/configurationApi.ts +1 -1
- package/api/countriesApi.ts +1 -1
- package/api/customerApi.ts +1 -1
- package/api/dashboardApi.ts +1 -1
- package/api/dynamicVouchersApi.ts +1 -1
- package/api/employeeAPIKeysApi.ts +1 -1
- package/api/employeeAccessApi.ts +1 -1
- package/api/employeesApi.ts +1 -1
- package/api/industriesApi.ts +1 -1
- package/api/infoGenesisReportsApi.ts +1 -1
- package/api/integratedTerminalsApi.ts +1 -1
- package/api/interactionsApi.ts +1 -1
- package/api/linkBookApi.ts +1 -1
- package/api/linkBookSectionApi.ts +1 -1
- package/api/loginAndLogoutApi.ts +1 -1
- package/api/membershipTiersApi.ts +1 -1
- package/api/merchantApi.ts +63 -1
- package/api/merchantCreditsApi.ts +1 -1
- package/api/merchantURLsApi.ts +1 -1
- package/api/mobileTerminalApi.ts +1 -1
- package/api/newsApi.ts +1 -1
- package/api/paymentDesignsApi.ts +1 -1
- package/api/performancesApi.ts +1 -1
- package/api/promoCodesApi.ts +1 -1
- package/api/sMSApi.ts +1 -1
- package/api/settingsApi.ts +1 -1
- package/api/staticVoucherCampaignGroupsApi.ts +1 -1
- package/api/staticVoucherCampaignsApi.ts +1 -1
- package/api/staticVouchersApi.ts +1 -1
- package/api/systemApi.ts +1 -1
- package/api/transactionLedgerApi.ts +1 -1
- package/api/utilitiesApi.ts +1 -1
- package/api/webTerminalApi.ts +1 -1
- package/dist/api/merchantApi.d.ts +8 -0
- package/dist/api/merchantApi.js +57 -0
- package/dist/api/merchantApi.js.map +1 -1
- package/dist/examples/advertisementcredits.example.js +7 -1
- package/dist/examples/advertisementcredits.example.js.map +1 -1
- package/dist/examples/clubmembers.example.js +22 -1
- package/dist/examples/clubmembers.example.js.map +1 -1
- package/dist/examples/dynamicvouchers.example.d.ts +1 -0
- package/dist/examples/dynamicvouchers.example.js +110 -0
- package/dist/examples/dynamicvouchers.example.js.map +1 -0
- package/dist/examples/linkbook.example.js +3 -1
- package/dist/examples/linkbook.example.js.map +1 -1
- package/dist/examples/membershiptiers.example.js +17 -1
- package/dist/examples/membershiptiers.example.js.map +1 -1
- package/dist/examples/merchantcredits.example.js +23 -2
- package/dist/examples/merchantcredits.example.js.map +1 -1
- package/dist/examples/merchanturls.example.js +7 -1
- package/dist/examples/merchanturls.example.js.map +1 -1
- package/dist/examples/news.example.js +3 -1
- package/dist/examples/news.example.js.map +1 -1
- package/dist/examples/paymentdesigns.example.js +6 -2
- package/dist/examples/paymentdesigns.example.js.map +1 -1
- package/dist/examples/performances.example.js +5 -2
- package/dist/examples/performances.example.js.map +1 -1
- package/dist/examples/promocodes.example.js +4 -2
- package/dist/examples/promocodes.example.js.map +1 -1
- package/dist/examples/sms.example.d.ts +1 -0
- package/dist/examples/sms.example.js +264 -0
- package/dist/examples/sms.example.js.map +1 -0
- package/dist/examples/staticvouchercampaigns.example.d.ts +1 -0
- package/dist/examples/staticvouchercampaigns.example.js +166 -0
- package/dist/examples/staticvouchercampaigns.example.js.map +1 -0
- package/dist/examples/staticvouchers.example.d.ts +1 -0
- package/dist/examples/staticvouchers.example.js +78 -0
- package/dist/examples/staticvouchers.example.js.map +1 -0
- package/dist/model/inlineObject.d.ts +2 -1
- package/dist/model/inlineObject.js +7 -2
- package/dist/model/inlineObject.js.map +1 -1
- package/dist/model/inlineObject1.d.ts +16 -1
- package/dist/model/inlineObject1.js +77 -2
- package/dist/model/inlineObject1.js.map +1 -1
- package/dist/model/inlineObject10.d.ts +3 -2
- package/dist/model/inlineObject10.js +11 -6
- package/dist/model/inlineObject10.js.map +1 -1
- package/dist/model/inlineObject11.d.ts +3 -2
- package/dist/model/inlineObject11.js +11 -6
- package/dist/model/inlineObject11.js.map +1 -1
- package/dist/model/inlineObject12.d.ts +3 -2
- package/dist/model/inlineObject12.js +11 -6
- package/dist/model/inlineObject12.js.map +1 -1
- package/dist/model/inlineObject13.d.ts +3 -2
- package/dist/model/inlineObject13.js +11 -6
- package/dist/model/inlineObject13.js.map +1 -1
- package/dist/model/inlineObject14.d.ts +3 -2
- package/dist/model/inlineObject14.js +11 -6
- package/dist/model/inlineObject14.js.map +1 -1
- package/dist/model/inlineObject15.d.ts +3 -7
- package/dist/model/inlineObject15.js +8 -28
- package/dist/model/inlineObject15.js.map +1 -1
- package/dist/model/inlineObject16.d.ts +3 -6
- package/dist/model/inlineObject16.js +8 -23
- package/dist/model/inlineObject16.js.map +1 -1
- package/dist/model/inlineObject17.d.ts +3 -5
- package/dist/model/inlineObject17.js +9 -19
- package/dist/model/inlineObject17.js.map +1 -1
- package/dist/model/inlineObject18.d.ts +3 -6
- package/dist/model/inlineObject18.js +8 -23
- package/dist/model/inlineObject18.js.map +1 -1
- package/dist/model/inlineObject19.d.ts +3 -5
- package/dist/model/inlineObject19.js +9 -19
- package/dist/model/inlineObject19.js.map +1 -1
- package/dist/model/inlineObject2.d.ts +4 -1
- package/dist/model/inlineObject2.js +17 -2
- package/dist/model/inlineObject2.js.map +1 -1
- package/dist/model/inlineObject20.d.ts +3 -6
- package/dist/model/inlineObject20.js +8 -23
- package/dist/model/inlineObject20.js.map +1 -1
- package/dist/model/inlineObject21.d.ts +3 -8
- package/dist/model/inlineObject21.js +9 -34
- package/dist/model/inlineObject21.js.map +1 -1
- package/dist/model/inlineObject22.d.ts +3 -1
- package/dist/model/inlineObject22.js +13 -3
- package/dist/model/inlineObject22.js.map +1 -1
- package/dist/model/inlineObject23.d.ts +3 -1
- package/dist/model/inlineObject23.js +12 -2
- package/dist/model/inlineObject23.js.map +1 -1
- package/dist/model/inlineObject24.d.ts +3 -3
- package/dist/model/inlineObject24.js +7 -7
- package/dist/model/inlineObject24.js.map +1 -1
- package/dist/model/inlineObject25.d.ts +4 -5
- package/dist/model/inlineObject25.js +9 -14
- package/dist/model/inlineObject25.js.map +1 -1
- package/dist/model/inlineObject26.d.ts +4 -1
- package/dist/model/inlineObject26.js +18 -3
- package/dist/model/inlineObject26.js.map +1 -1
- package/dist/model/inlineObject27.d.ts +2 -1
- package/dist/model/inlineObject27.js +8 -3
- package/dist/model/inlineObject27.js.map +1 -1
- package/dist/model/inlineObject28.d.ts +16 -3
- package/dist/model/inlineObject28.js +74 -9
- package/dist/model/inlineObject28.js.map +1 -1
- package/dist/model/inlineObject29.d.ts +2 -4
- package/dist/model/inlineObject29.js +6 -16
- package/dist/model/inlineObject29.js.map +1 -1
- package/dist/model/inlineObject3.d.ts +4 -1
- package/dist/model/inlineObject3.js +17 -2
- package/dist/model/inlineObject3.js.map +1 -1
- package/dist/model/inlineObject30.d.ts +16 -3
- package/dist/model/inlineObject30.js +74 -9
- package/dist/model/inlineObject30.js.map +1 -1
- package/dist/model/inlineObject31.d.ts +4 -1
- package/dist/model/inlineObject31.js +18 -3
- package/dist/model/inlineObject31.js.map +1 -1
- package/dist/model/inlineObject32.d.ts +2 -1
- package/dist/model/inlineObject32.js +8 -3
- package/dist/model/inlineObject32.js.map +1 -1
- package/dist/model/inlineObject33.d.ts +16 -1
- package/dist/model/inlineObject33.js +78 -3
- package/dist/model/inlineObject33.js.map +1 -1
- package/dist/model/inlineObject34.d.ts +3 -3
- package/dist/model/inlineObject34.js +9 -9
- package/dist/model/inlineObject34.js.map +1 -1
- package/dist/model/inlineObject35.d.ts +3 -3
- package/dist/model/inlineObject35.js +9 -9
- package/dist/model/inlineObject35.js.map +1 -1
- package/dist/model/inlineObject36.d.ts +3 -3
- package/dist/model/inlineObject36.js +9 -9
- package/dist/model/inlineObject36.js.map +1 -1
- package/dist/model/inlineObject37.d.ts +2 -3
- package/dist/model/inlineObject37.js +6 -11
- package/dist/model/inlineObject37.js.map +1 -1
- package/dist/model/inlineObject38.d.ts +2 -3
- package/dist/model/inlineObject38.js +5 -10
- package/dist/model/inlineObject38.js.map +1 -1
- package/dist/model/inlineObject39.d.ts +2 -3
- package/dist/model/inlineObject39.js +5 -10
- package/dist/model/inlineObject39.js.map +1 -1
- package/dist/model/inlineObject4.d.ts +2 -2
- package/dist/model/inlineObject4.js +5 -5
- package/dist/model/inlineObject4.js.map +1 -1
- package/dist/model/inlineObject40.d.ts +32 -3
- package/dist/model/inlineObject40.js +154 -9
- package/dist/model/inlineObject40.js.map +1 -1
- package/dist/model/inlineObject41.d.ts +4 -3
- package/dist/model/inlineObject41.js +14 -9
- package/dist/model/inlineObject41.js.map +1 -1
- package/dist/model/inlineObject42.d.ts +4 -3
- package/dist/model/inlineObject42.js +14 -9
- package/dist/model/inlineObject42.js.map +1 -1
- package/dist/model/inlineObject43.d.ts +2 -3
- package/dist/model/inlineObject43.js +6 -11
- package/dist/model/inlineObject43.js.map +1 -1
- package/dist/model/inlineObject44.d.ts +16 -3
- package/dist/model/inlineObject44.js +74 -9
- package/dist/model/inlineObject44.js.map +1 -1
- package/dist/model/inlineObject45.d.ts +4 -3
- package/dist/model/inlineObject45.js +14 -9
- package/dist/model/inlineObject45.js.map +1 -1
- package/dist/model/inlineObject46.d.ts +2 -3
- package/dist/model/inlineObject46.js +6 -11
- package/dist/model/inlineObject46.js.map +1 -1
- package/dist/model/inlineObject47.d.ts +16 -3
- package/dist/model/inlineObject47.js +74 -9
- package/dist/model/inlineObject47.js.map +1 -1
- package/dist/model/inlineObject5.d.ts +16 -1
- package/dist/model/inlineObject5.js +78 -3
- package/dist/model/inlineObject5.js.map +1 -1
- package/dist/model/inlineObject6.d.ts +1 -1
- package/dist/model/inlineObject6.js +3 -3
- package/dist/model/inlineObject6.js.map +1 -1
- package/dist/model/inlineObject7.d.ts +1 -1
- package/dist/model/inlineObject7.js +3 -3
- package/dist/model/inlineObject7.js.map +1 -1
- package/dist/model/inlineObject8.d.ts +3 -3
- package/dist/model/inlineObject8.js +9 -9
- package/dist/model/inlineObject8.js.map +1 -1
- package/dist/model/inlineObject9.d.ts +3 -2
- package/dist/model/inlineObject9.js +11 -6
- package/dist/model/inlineObject9.js.map +1 -1
- package/dist/model/wTWalletConfigurationSaveWalletRecord.d.ts +1 -0
- package/dist/model/wTWalletConfigurationSaveWalletRecord.js +5 -0
- package/dist/model/wTWalletConfigurationSaveWalletRecord.js.map +1 -1
- package/dist/model/walletConfiguration.d.ts +4 -4
- package/dist/model/walletConfiguration.js +15 -15
- package/dist/model/walletConfiguration.js.map +1 -1
- package/examples/advertisementcredits.example.ts +13 -1
- package/examples/clubmembers.example.ts +34 -1
- package/examples/dynamicvouchers.example.ts +107 -0
- package/examples/linkbook.example.ts +5 -1
- package/examples/membershiptiers.example.ts +26 -1
- package/examples/merchantcredits.example.ts +35 -2
- package/examples/merchanturls.example.ts +13 -1
- package/examples/news.example.ts +5 -1
- package/examples/package-lock.json +2108 -0
- package/examples/package.json +18 -0
- package/examples/paymentdesigns.example.ts +11 -3
- package/examples/performances.example.ts +7 -2
- package/examples/promocodes.example.ts +6 -2
- package/examples/sms.example.ts +305 -0
- package/examples/staticvouchercampaigns.example.ts +192 -0
- package/examples/staticvouchers.example.ts +67 -0
- package/model/advertisementCredit.ts +1 -1
- package/model/advertisementCreditBroadcast.ts +1 -1
- package/model/advertisementCreditScan.ts +1 -1
- package/model/agreement.ts +1 -1
- package/model/alert.ts +1 -1
- package/model/announcement.ts +1 -1
- package/model/applicableTerminals.ts +1 -1
- package/model/applicableTerminalsAnyOf.ts +1 -1
- package/model/applicableTerminalsAnyOf1.ts +1 -1
- package/model/applicableTerminalsAnyOf2.ts +1 -1
- package/model/applicableTerminalsAnyOf3.ts +1 -1
- package/model/authError.ts +1 -1
- package/model/availablePhoneNumbersRequest.ts +1 -1
- package/model/clickFunnelAmount.ts +1 -1
- package/model/clickFunnelContact.ts +1 -1
- package/model/clickFunnelContactProfile.ts +1 -1
- package/model/clickFunnelEvent.ts +1 -1
- package/model/clickFunnelOriginalAmount.ts +1 -1
- package/model/clickFunnelProduct.ts +1 -1
- package/model/clickFunnelPurchase.ts +1 -1
- package/model/createStaticVoucherCampaign.ts +1 -1
- package/model/createStaticVoucherCampaignWithVoucher.ts +1 -1
- package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +1 -1
- package/model/dashboardWidget.ts +1 -1
- package/model/duplicateRowFound.ts +1 -1
- package/model/dynamicVoucher.ts +1 -1
- package/model/dynamicVoucherBroadcast.ts +1 -1
- package/model/employee.ts +1 -1
- package/model/employeeAPIKey.ts +1 -1
- package/model/employeeActivityLog.ts +1 -1
- package/model/entityTooLarge.ts +1 -1
- package/model/exportDataFile.ts +1 -1
- package/model/falsumError.ts +1 -1
- package/model/falsumField.ts +1 -1
- package/model/feature.ts +1 -1
- package/model/forbiddenRequest.ts +1 -1
- package/model/foreignKeyDoesNotExist.ts +1 -1
- package/model/helpDeskRequest.ts +1 -1
- package/model/importedList.ts +1 -1
- package/model/importedListRecipient.ts +1 -1
- package/model/inlineObject.ts +9 -3
- package/model/inlineObject1.ts +93 -3
- package/model/inlineObject10.ts +14 -8
- package/model/inlineObject11.ts +14 -8
- package/model/inlineObject12.ts +14 -8
- package/model/inlineObject13.ts +14 -8
- package/model/inlineObject14.ts +14 -8
- package/model/inlineObject15.ts +11 -35
- package/model/inlineObject16.ts +11 -29
- package/model/inlineObject17.ts +12 -24
- package/model/inlineObject18.ts +11 -29
- package/model/inlineObject19.ts +12 -24
- package/model/inlineObject2.ts +21 -3
- package/model/inlineObject20.ts +11 -29
- package/model/inlineObject21.ts +12 -42
- package/model/inlineObject22.ts +16 -4
- package/model/inlineObject23.ts +15 -3
- package/model/inlineObject24.ts +10 -10
- package/model/inlineObject25.ts +13 -19
- package/model/inlineObject26.ts +22 -4
- package/model/inlineObject27.ts +10 -4
- package/model/inlineObject28.ts +90 -12
- package/model/inlineObject29.ts +8 -20
- package/model/inlineObject3.ts +21 -3
- package/model/inlineObject30.ts +90 -12
- package/model/inlineObject31.ts +22 -4
- package/model/inlineObject32.ts +10 -4
- package/model/inlineObject33.ts +94 -4
- package/model/inlineObject34.ts +12 -12
- package/model/inlineObject35.ts +12 -12
- package/model/inlineObject36.ts +12 -12
- package/model/inlineObject37.ts +8 -14
- package/model/inlineObject38.ts +7 -13
- package/model/inlineObject39.ts +7 -13
- package/model/inlineObject4.ts +7 -7
- package/model/inlineObject40.ts +186 -12
- package/model/inlineObject41.ts +18 -12
- package/model/inlineObject42.ts +18 -12
- package/model/inlineObject43.ts +8 -14
- package/model/inlineObject44.ts +90 -12
- package/model/inlineObject45.ts +18 -12
- package/model/inlineObject46.ts +8 -14
- package/model/inlineObject47.ts +90 -12
- package/model/inlineObject5.ts +94 -4
- package/model/inlineObject6.ts +4 -4
- package/model/inlineObject7.ts +4 -4
- package/model/inlineObject8.ts +12 -12
- package/model/inlineObject9.ts +14 -8
- package/model/inlineResponse200.ts +1 -1
- package/model/inlineResponse2001.ts +1 -1
- package/model/inlineResponse20010.ts +1 -1
- package/model/inlineResponse20011.ts +1 -1
- package/model/inlineResponse20012.ts +1 -1
- package/model/inlineResponse20013.ts +1 -1
- package/model/inlineResponse20014.ts +1 -1
- package/model/inlineResponse2002.ts +1 -1
- package/model/inlineResponse2003.ts +1 -1
- package/model/inlineResponse2004.ts +1 -1
- package/model/inlineResponse2005.ts +1 -1
- package/model/inlineResponse2006.ts +1 -1
- package/model/inlineResponse2007.ts +1 -1
- package/model/inlineResponse2008.ts +1 -1
- package/model/inlineResponse2009.ts +1 -1
- package/model/internalServerError.ts +1 -1
- package/model/ledgerEntry.ts +1 -1
- package/model/linkBook.ts +1 -1
- package/model/linkBookSection.ts +1 -1
- package/model/mSMemberHistory.ts +1 -1
- package/model/mSMemberHistoryPagination.ts +1 -1
- package/model/mSMemberRedemption.ts +1 -1
- package/model/mSMemberRedemptionPagination.ts +1 -1
- package/model/mSMembershipTierHistory.ts +1 -1
- package/model/mSMembershipTierHistoryPagination.ts +1 -1
- package/model/mSMembershipTierRedemption.ts +1 -1
- package/model/mSMembershipTierRedemptionPagination.ts +1 -1
- package/model/mSMerchantCreditHistory.ts +1 -1
- package/model/mSMerchantCreditHistoryPagination.ts +1 -1
- package/model/mSMerchantCreditRedemption.ts +1 -1
- package/model/mSMerchantCreditRedemptionPagination.ts +1 -1
- package/model/mediaFile.ts +1 -1
- package/model/member.ts +1 -1
- package/model/memberSearch.ts +1 -1
- package/model/merchant.ts +1 -1
- package/model/merchantCreditSearch.ts +1 -1
- package/model/merchantNotInitialized.ts +1 -1
- package/model/merchantURL.ts +1 -1
- package/model/message.ts +1 -1
- package/model/moduleError.ts +1 -1
- package/model/newsArticle.ts +1 -1
- package/model/optInList.ts +1 -1
- package/model/optInListSource.ts +1 -1
- package/model/optInListSubscriber.ts +1 -1
- package/model/outboundSMS.ts +1 -1
- package/model/paginatedWTMembers.ts +1 -1
- package/model/paginatedWTMerchantCredits.ts +1 -1
- package/model/paginationRequestWithIDAndWithoutSortOptions.ts +1 -1
- package/model/paginationRequestWithSortOptions.ts +1 -1
- package/model/paymentDesign.ts +1 -1
- package/model/performance.ts +1 -1
- package/model/phoneNumber.ts +1 -1
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +1 -1
- package/model/pickMSEmployeeAPIKeyCreateParamsExcludeKeyofMSEmployeeAPIKeyCreateParamsEmployeeID.ts +1 -1
- package/model/pickMSEmployeeAPIKeyUpdateParamsExcludeKeyofMSEmployeeAPIKeyUpdateParamsId.ts +1 -1
- package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +1 -1
- package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +1 -1
- package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +1 -1
- package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +1 -1
- package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +1 -1
- package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +1 -1
- package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +1 -1
- package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeID.ts +1 -1
- package/model/pickSSOptInListMemberCreateParamsExcludeKeyofSSOptInListMemberCreateParamsMerchantCreatedAtOrMaxSMSCount.ts +1 -1
- package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +1 -1
- package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +1 -1
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +1 -1
- package/model/pickVSAdvertisementCreditCreateParamsExcludeKeyofVSAdvertisementCreditCreateParamsEmployeeID.ts +1 -1
- package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +1 -1
- package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +1 -1
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +1 -1
- package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +1 -1
- package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsBackgroundImageURLOrCompanyLogoURLOrEmployeeID.ts +1 -1
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +1 -1
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +1 -1
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +1 -1
- package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumber.ts +1 -1
- package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +1 -1
- package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +1 -1
- package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +1 -1
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +1 -1
- package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +1 -1
- package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +1 -1
- package/model/plan.ts +1 -1
- package/model/portalPage.ts +1 -1
- package/model/presignedPost.ts +1 -1
- package/model/presignedPostFields.ts +1 -1
- package/model/product.ts +1 -1
- package/model/promoCode.ts +1 -1
- package/model/reachPerformanceStats.ts +1 -1
- package/model/request.ts +1 -1
- package/model/response.ts +1 -1
- package/model/role.ts +1 -1
- package/model/roleAuditLog.ts +1 -1
- package/model/sSImportedListRecipientCreateParams.ts +1 -1
- package/model/sSOptInSource.ts +1 -1
- package/model/simpleSMSBroadcast.ts +1 -1
- package/model/staticVoucher.ts +1 -1
- package/model/staticVoucherCampaign.ts +1 -1
- package/model/staticVoucherCampaignBroadcast.ts +1 -1
- package/model/staticVoucherCampaignGroup.ts +1 -1
- package/model/staticVoucherCampaignUpdate.ts +1 -1
- package/model/status.ts +1 -1
- package/model/statusAnyOf.ts +1 -1
- package/model/statusAnyOf1.ts +1 -1
- package/model/statusAnyOf2.ts +1 -1
- package/model/statusAnyOf3.ts +1 -1
- package/model/subscriptionFeature.ts +1 -1
- package/model/subscriptionPlan.ts +1 -1
- package/model/subscriptionProduct.ts +1 -1
- package/model/tcpa.ts +1 -1
- package/model/updateStaticVoucherCampaignWithVoucher.ts +1 -1
- package/model/vSCampaignGeneratedMessage.ts +1 -1
- package/model/vSCampaignGeneratedMessagePagination.ts +1 -1
- package/model/vSDynamicVoucherStatus.ts +1 -1
- package/model/wTAdvertisementCredit.ts +1 -1
- package/model/wTAdvertisementCreditCreateParams.ts +1 -1
- package/model/wTAdvertisementCreditScan.ts +1 -1
- package/model/wTAdvertisementCreditUpdateParams.ts +1 -1
- package/model/wTAuthenticationForgotPassword.ts +1 -1
- package/model/wTAuthenticationLogin.ts +1 -1
- package/model/wTAuthenticationRegister.ts +1 -1
- package/model/wTAuthenticationRequestResetPassword.ts +1 -1
- package/model/wTAuthenticationResetPassword.ts +1 -1
- package/model/wTAuthenticationSSOLoginForDiscourse.ts +1 -1
- package/model/wTBillingChangePlan.ts +1 -1
- package/model/wTBillingSavePaymentMethod.ts +1 -1
- package/model/wTCustomerSearchByMemberID.ts +1 -1
- package/model/wTCustomerSearchByPhoneNumber.ts +1 -1
- package/model/wTDynamicVoucher.ts +1 -1
- package/model/wTDynamicVoucherCreateParams.ts +1 -1
- package/model/wTDynamicVoucherRedemption.ts +1 -1
- package/model/wTDynamicVoucherSummary.ts +1 -1
- package/model/wTDynamicVoucherUpdateParams.ts +1 -1
- package/model/wTEmployee.ts +1 -1
- package/model/wTEmployeeAPIKey.ts +1 -1
- package/model/wTEmployeeAPIKeyCreateParams.ts +1 -1
- package/model/wTEmployeeAPIKeyUpdateParams.ts +1 -1
- package/model/wTEmployeeCreate.ts +1 -1
- package/model/wTEmployeeCreateAlert.ts +1 -1
- package/model/wTEmployeeCreateMediaFile.ts +1 -1
- package/model/wTEmployeeCreateStaticVoucherCampaignGroup.ts +1 -1
- package/model/wTEmployeeFileCreate.ts +1 -1
- package/model/wTEmployeeImportRecords.ts +1 -1
- package/model/wTEmployeeNotification.ts +1 -1
- package/model/wTEmployeePeerRoles.ts +1 -1
- package/model/wTEmployeeS3FilePresign.ts +1 -1
- package/model/wTEmployeeScheduleSMSCampaignBroadcast.ts +1 -1
- package/model/wTEmployeeScheduleSimpleSMS.ts +1 -1
- package/model/wTEmployeeScheduleSimpleSMSToRecipient.ts +1 -1
- package/model/wTEmployeeSendHelpDeskResponse.ts +1 -1
- package/model/wTEmployeeUpdate.ts +1 -1
- package/model/wTFetchWalletPaymentObjectWithToken.ts +1 -1
- package/model/wTImportedList.ts +1 -1
- package/model/wTInfoGenesisLookupRequestErrors.ts +1 -1
- package/model/wTInfoGenesisRecordFilterParameters.ts +1 -1
- package/model/wTInfoGenesisRoutingIDs.ts +1 -1
- package/model/wTInfoGenesisUniquePostingIDs.ts +1 -1
- package/model/wTLinkBookCreateParams.ts +1 -1
- package/model/wTLinkBookSectionCreateParams.ts +1 -1
- package/model/wTLinkBookSectionUpdateParams.ts +1 -1
- package/model/wTLinkBookUpdateParams.ts +1 -1
- package/model/wTMember.ts +1 -1
- package/model/wTMemberCreationParams.ts +1 -1
- package/model/wTMembershipTier.ts +1 -1
- package/model/wTMembershipTierCreationParams.ts +1 -1
- package/model/wTMembershipTierUpdateParams.ts +1 -1
- package/model/wTMembershipTierWithMemberCount.ts +1 -1
- package/model/wTMerchantCredit.ts +1 -1
- package/model/wTMerchantCreditCreationParams.ts +1 -1
- package/model/wTMerchantURLCreate.ts +1 -1
- package/model/wTMerchantURLUpdate.ts +1 -1
- package/model/wTMerchantUpdate.ts +1 -1
- package/model/wTMerchantUpdateBillingContact.ts +1 -1
- package/model/wTMerchantUpdatePOSIntegration.ts +1 -1
- package/model/wTNewsArticleCreateParams.ts +1 -1
- package/model/wTNewsArticleUpdateParams.ts +1 -1
- package/model/wTOptInList.ts +1 -1
- package/model/wTOptInListCreationParams.ts +1 -1
- package/model/wTPaymentDesign.ts +1 -1
- package/model/wTPaymentDesignCreateParams.ts +1 -1
- package/model/wTPaymentDesignUpdateParams.ts +1 -1
- package/model/wTPerformanceCreateParams.ts +1 -1
- package/model/wTPerformanceUpdateParams.ts +1 -1
- package/model/wTPosMachine.ts +1 -1
- package/model/wTPosMachineCreateParams.ts +1 -1
- package/model/wTPosMachineUpdateParams.ts +1 -1
- package/model/wTPromoCodeCreateParams.ts +1 -1
- package/model/wTPromoCodeUpdateParams.ts +1 -1
- package/model/wTRole.ts +1 -1
- package/model/wTSMSAcquirePhoneNumber.ts +1 -1
- package/model/wTSMSCreateAgreement.ts +1 -1
- package/model/wTSMSImportOptInListSubscribers.ts +1 -1
- package/model/wTSMSImportedListCreate.ts +1 -1
- package/model/wTSMSOptInListSourceCreate.ts +1 -1
- package/model/wTSMSUpdatePhoneNumberConfig.ts +1 -1
- package/model/wTSettingsSetPassword.ts +1 -1
- package/model/wTStaticVoucher.ts +1 -1
- package/model/wTStaticVoucherCampaign.ts +1 -1
- package/model/wTStaticVoucherCampaignPreviewMessages.ts +1 -1
- package/model/wTStaticVoucherCampaignPreviewMessagesByPage.ts +1 -1
- package/model/wTStaticVoucherCreateParams.ts +1 -1
- package/model/wTStaticVoucherUpdateParams.ts +1 -1
- package/model/wTSystemApprovePhoneNumber.ts +1 -1
- package/model/wTSystemRoleCreate.ts +1 -1
- package/model/wTTCPAOpt.ts +1 -1
- package/model/wTTwilioRequestAuthyCode.ts +1 -1
- package/model/wTTwilioVerifyAuthyCode.ts +1 -1
- package/model/wTWalletConfigurationSaveWalletRecord.ts +7 -1
- package/model/wTWalletItemRedemption.ts +1 -1
- package/model/wTWalletPageView.ts +1 -1
- package/model/wTWalletPageViewGeoPoint.ts +1 -1
- package/model/walletConfiguration.ts +20 -23
- package/model/walletPageView.ts +1 -1
- package/model/webpage.ts +1 -1
- package/package.json +1 -1
- package/readme-generator.py +9 -3
- package/tsconfig.json +2 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "examples",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"ts-node": "^10.8.0"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"wallet": "^2.1.507"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as api from "
|
|
1
|
+
import * as api from "wallet";
|
|
2
2
|
import * as constants from "./constants";
|
|
3
3
|
|
|
4
4
|
paymentDesigns();
|
|
5
5
|
|
|
6
6
|
async function paymentDesigns() {
|
|
7
|
-
let designClient = new api.PaymentDesignsApi();
|
|
7
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
8
8
|
|
|
9
9
|
// Create a new payment design
|
|
10
10
|
let design = await designClient.createPaymentDesign({
|
|
@@ -28,6 +28,10 @@ async function paymentDesigns() {
|
|
|
28
28
|
// The payment design that has just been created
|
|
29
29
|
console.log(design);
|
|
30
30
|
|
|
31
|
+
// Fetch the created design
|
|
32
|
+
design = (await designClient.fetchPaymentDesignById(design.id, constants.headers)).body;
|
|
33
|
+
console.log(design);
|
|
34
|
+
|
|
31
35
|
// Change the borderColor and borderSize of the payment design
|
|
32
36
|
design = await designClient.updatePaymentDesign(design.id, {
|
|
33
37
|
...design,
|
|
@@ -46,7 +50,7 @@ async function paymentDesigns() {
|
|
|
46
50
|
}).then(resp => {
|
|
47
51
|
return resp.body
|
|
48
52
|
});
|
|
49
|
-
|
|
53
|
+
|
|
50
54
|
console.log(design.isActive); // This will be false, since the design has just been archived
|
|
51
55
|
|
|
52
56
|
// Restore the payment design
|
|
@@ -57,4 +61,8 @@ async function paymentDesigns() {
|
|
|
57
61
|
return resp.body
|
|
58
62
|
});
|
|
59
63
|
console.log(design.isActive); // This will be true, since the design has just been restored
|
|
64
|
+
|
|
65
|
+
// Fetch all payment designs
|
|
66
|
+
let designs = (await designClient.fetchAllPaymentDesigns(false, constants.headers)).body;
|
|
67
|
+
console.log(designs);
|
|
60
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as api from "
|
|
1
|
+
import * as api from "wallet";
|
|
2
2
|
import * as constants from "./constants";
|
|
3
3
|
|
|
4
4
|
performances();
|
|
@@ -14,7 +14,8 @@ async function performances() {
|
|
|
14
14
|
price: 200,
|
|
15
15
|
url: "https://blog.merchant.com",
|
|
16
16
|
orderNumber: 1,
|
|
17
|
-
mediaURL: "https://example.com/image"
|
|
17
|
+
mediaURL: "https://example.com/image",
|
|
18
|
+
isSoldOut: false,
|
|
18
19
|
|
|
19
20
|
}, constants.headers).catch(err => {
|
|
20
21
|
throw err;
|
|
@@ -55,4 +56,8 @@ async function performances() {
|
|
|
55
56
|
});
|
|
56
57
|
|
|
57
58
|
console.log(performance.isActive); // This will be true, since the performance has just been restored
|
|
59
|
+
|
|
60
|
+
// Fetch all performances
|
|
61
|
+
let performances = (await client.fetchAllPerformances(false, constants.headers)).body;
|
|
62
|
+
console.log(performances);
|
|
58
63
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as api from "
|
|
1
|
+
import * as api from "wallet";
|
|
2
2
|
import * as constants from "./constants";
|
|
3
3
|
|
|
4
4
|
promocodes();
|
|
5
5
|
|
|
6
6
|
async function promocodes() {
|
|
7
|
-
let client = new api.PromoCodesApi();
|
|
7
|
+
let client = new api.PromoCodesApi(constants.domain);
|
|
8
8
|
|
|
9
9
|
// Create a new promocode
|
|
10
10
|
let promocode = await client.createPromoCode({
|
|
@@ -53,4 +53,8 @@ async function promocodes() {
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
console.log(promocode.isActive); // This will be true, since the promocode has just been restored
|
|
56
|
+
|
|
57
|
+
// Fetch all promocodes
|
|
58
|
+
let promocodes = (await client.fetchAllPromoCodes(false, constants.headers)).body;
|
|
59
|
+
console.log(promocodes);
|
|
56
60
|
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import * as api from "wallet";
|
|
2
|
+
import * as constants from "./constants";
|
|
3
|
+
|
|
4
|
+
smsExample();
|
|
5
|
+
|
|
6
|
+
async function smsExample() {
|
|
7
|
+
let client = new api.SMSApi(constants.domain);
|
|
8
|
+
|
|
9
|
+
// Acquire phone number
|
|
10
|
+
let phoneNumber = await client.acquirePhoneNumber({
|
|
11
|
+
phoneNumber: "+1807675656"
|
|
12
|
+
}, constants.headers)
|
|
13
|
+
.catch(err => {
|
|
14
|
+
throw err;
|
|
15
|
+
}).then(resp => {
|
|
16
|
+
return resp.body;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
console.log(phoneNumber);
|
|
20
|
+
|
|
21
|
+
// Send phone number for verification
|
|
22
|
+
await client.sendPhoneNumberForVerification(phoneNumber.id, {
|
|
23
|
+
helpDeskQueueResponse: "HELPME",
|
|
24
|
+
helpDeskKeyword: "HELP12",
|
|
25
|
+
helpResponse: "Hello, we're here to help.",
|
|
26
|
+
stopResponse: "We're sad to see you go",
|
|
27
|
+
messageFooter: "Subscribe for more info!",
|
|
28
|
+
termsOfServiceURL: "https://example.com/terms-of-service",
|
|
29
|
+
privacyPolicyURL: "https://example.com/privacy-policy",
|
|
30
|
+
companyName: "Fictitious Corporation"
|
|
31
|
+
}, constants.headers)
|
|
32
|
+
.catch(err => {
|
|
33
|
+
throw err;
|
|
34
|
+
}).then(resp => {
|
|
35
|
+
return resp.body;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Archive phone number
|
|
39
|
+
phoneNumber = await client.archivePhoneNumber(phoneNumber.id, constants.headers)
|
|
40
|
+
.catch(err => {
|
|
41
|
+
throw err;
|
|
42
|
+
}).then(resp => {
|
|
43
|
+
return resp.body;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
console.log(phoneNumber.isActive); // This will be false
|
|
47
|
+
|
|
48
|
+
// Restore phone number
|
|
49
|
+
phoneNumber = await client.restorePhoneNumber(phoneNumber.id, constants.headers)
|
|
50
|
+
.catch(err => {
|
|
51
|
+
throw err;
|
|
52
|
+
}).then(resp => {
|
|
53
|
+
return resp.body;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
console.log(phoneNumber.isActive); // This will be true
|
|
57
|
+
|
|
58
|
+
// Create SMS agreement
|
|
59
|
+
let agreement = await client.createSMSAgreement({
|
|
60
|
+
isShortCodeTimelineUnderstood: true,
|
|
61
|
+
isPricingUnderstood: true,
|
|
62
|
+
isShortCodeTransferUnderstood: true,
|
|
63
|
+
isOptInOutUnderstood: true,
|
|
64
|
+
isShortCodeUnderstood: true,
|
|
65
|
+
isStandardsUnderstood: true,
|
|
66
|
+
isCtiaShortCodeRead: true,
|
|
67
|
+
isManualRead: true,
|
|
68
|
+
isStopUnderstood: true,
|
|
69
|
+
isTosOnWebsite: true,
|
|
70
|
+
isPrivacyPolicyOnWebsite: true,
|
|
71
|
+
isTwilioTermsRead: true,
|
|
72
|
+
}, constants.headers)
|
|
73
|
+
.catch(err => {
|
|
74
|
+
throw err;
|
|
75
|
+
}).then(resp => {
|
|
76
|
+
return resp.body;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
console.log(agreement);
|
|
80
|
+
|
|
81
|
+
// Fetch the agreement
|
|
82
|
+
agreement = await client.fetchSMSAgreement(constants.headers)
|
|
83
|
+
.catch(err => {
|
|
84
|
+
throw err;
|
|
85
|
+
}).then(resp => {
|
|
86
|
+
return resp.body;
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
console.log(agreement);
|
|
90
|
+
|
|
91
|
+
// Create imported list
|
|
92
|
+
let importedList = await client.createImportedList({
|
|
93
|
+
listName: "Imported List",
|
|
94
|
+
isActive: true,
|
|
95
|
+
phoneNumberID: phoneNumber.id
|
|
96
|
+
}, constants.headers)
|
|
97
|
+
.catch(err => {
|
|
98
|
+
throw err;
|
|
99
|
+
}).then(resp => {
|
|
100
|
+
return resp.body;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
console.log(importedList);
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
// Create recipient in imported list
|
|
107
|
+
let recipient = await client.createRecipientInImportedList({
|
|
108
|
+
importedListID: importedList.id,
|
|
109
|
+
mobilePhoneNumber: "+1805654545"
|
|
110
|
+
}, constants.headers)
|
|
111
|
+
.catch(err => {
|
|
112
|
+
throw err;
|
|
113
|
+
}).then(resp => {
|
|
114
|
+
return resp.body;
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
console.log(recipient);
|
|
118
|
+
|
|
119
|
+
// Count recipients in imported list
|
|
120
|
+
let { count } = await client.countImportedListRecipients(importedList.id, false, undefined, undefined, constants.headers)
|
|
121
|
+
.catch(err => {
|
|
122
|
+
throw err;
|
|
123
|
+
}).then(resp => {
|
|
124
|
+
return resp.body;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
console.log(count);
|
|
128
|
+
|
|
129
|
+
// Fetch recipients
|
|
130
|
+
let importedListRecipients = await client.fetchImportedListRecipients(importedList.id, constants.headers)
|
|
131
|
+
.catch(err => {
|
|
132
|
+
throw err;
|
|
133
|
+
}).then(resp => {
|
|
134
|
+
return resp.body;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
console.log(importedListRecipients);
|
|
138
|
+
|
|
139
|
+
// Fetch recipients by page
|
|
140
|
+
let importedListRecipientByPage = await client.fetchImportedListRecipientsByPage(importedList.id, 10, 1, false, constants.headers)
|
|
141
|
+
.catch(err => {
|
|
142
|
+
throw err;
|
|
143
|
+
}).then(resp => {
|
|
144
|
+
return resp.body;
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
console.log(`Total: ${importedListRecipientByPage.total}, Length: ${importedListRecipientByPage.length}, List: ${JSON.stringify(importedListRecipientByPage.results)}`);
|
|
148
|
+
|
|
149
|
+
// Export recipients
|
|
150
|
+
await client.exportImportedListRecipients(importedList.id, constants.headers)
|
|
151
|
+
.catch(err => {
|
|
152
|
+
throw err;
|
|
153
|
+
}).then(resp => {
|
|
154
|
+
return resp.body;
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// Create opt in list
|
|
158
|
+
let optInList = await client.createOptInList({
|
|
159
|
+
isActive: true,
|
|
160
|
+
listName: "Opt In List",
|
|
161
|
+
phoneNumberID: phoneNumber.id,
|
|
162
|
+
estimatedMessagesPerMonth: 250,
|
|
163
|
+
optInKeyword: "OPTIN",
|
|
164
|
+
optOutKeyword: "OPTOUT",
|
|
165
|
+
optInConfirmedResponse: "You've opted in",
|
|
166
|
+
optOutConfirmedResponse: "You've opted out",
|
|
167
|
+
optInConfirmedCustomerReceives: "You've opted in",
|
|
168
|
+
optOutConfirmedCustomerReceives: "You've opted out",
|
|
169
|
+
isOver21Required: false,
|
|
170
|
+
}, constants.headers)
|
|
171
|
+
.catch(err => {
|
|
172
|
+
throw err;
|
|
173
|
+
}).then(resp => {
|
|
174
|
+
return resp.body;
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
console.log(optInList);
|
|
178
|
+
|
|
179
|
+
// Count opt in list subscribers
|
|
180
|
+
count = await client.countOptInListSubscribers(optInList.id, true, false, false, undefined, undefined, constants.headers)
|
|
181
|
+
.catch(err => {
|
|
182
|
+
throw err;
|
|
183
|
+
}).then(resp => {
|
|
184
|
+
return (resp.body).count;
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
console.log(count);
|
|
188
|
+
|
|
189
|
+
// Export opt in list subscribers
|
|
190
|
+
await client.exportOptInListSubscribers(optInList.id, constants.headers)
|
|
191
|
+
.catch(err => {
|
|
192
|
+
throw err;
|
|
193
|
+
}).then(resp => {
|
|
194
|
+
return resp.body;
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Fetch subscribers
|
|
198
|
+
let optInListRecipients = await client.fetchOptInListSubscribers(optInList.id, true, false, false, constants.headers)
|
|
199
|
+
.catch(err => {
|
|
200
|
+
throw err;
|
|
201
|
+
}).then(resp => {
|
|
202
|
+
return resp.body;
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
console.log(optInListRecipients);
|
|
206
|
+
|
|
207
|
+
// Fetch subscribers by page
|
|
208
|
+
let optInListRecipientByPage = await client.fetchOptInListSubscribersByPage(optInList.id, 10, 1, true, false, false, constants.headers)
|
|
209
|
+
.catch(err => {
|
|
210
|
+
throw err;
|
|
211
|
+
}).then(resp => {
|
|
212
|
+
return resp.body;
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
console.log(`Total: ${optInListRecipientByPage.total}, Length: ${optInListRecipientByPage.length}, List: ${JSON.stringify(optInListRecipientByPage.results)}`);
|
|
216
|
+
|
|
217
|
+
// Fetch all opt in lists associated with the given phone number
|
|
218
|
+
|
|
219
|
+
let optInListsAssociatedWithPhoneNumber = await client.fetchOptInListsAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
220
|
+
.catch(err => {
|
|
221
|
+
throw err;
|
|
222
|
+
}).then(resp => {
|
|
223
|
+
return resp.body;
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
console.log(optInListsAssociatedWithPhoneNumber);
|
|
227
|
+
|
|
228
|
+
// Create opt in source
|
|
229
|
+
let optInSource = await client.createOptInListSource({
|
|
230
|
+
sourceName: "Opt In Source",
|
|
231
|
+
listID: optInList.id,
|
|
232
|
+
}, constants.headers)
|
|
233
|
+
.catch(err => {
|
|
234
|
+
throw err;
|
|
235
|
+
}).then(resp => {
|
|
236
|
+
return resp.body;
|
|
237
|
+
});
|
|
238
|
+
console.log(optInSource);
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
// Count subscribers in opt in list source
|
|
242
|
+
count = await client.countOptInSourceSubscribers(optInSource.id, true, false, false, undefined, undefined, constants.headers)
|
|
243
|
+
.catch(err => {
|
|
244
|
+
throw err;
|
|
245
|
+
}).then(resp => {
|
|
246
|
+
return (resp.body).count;
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
console.log(count);
|
|
250
|
+
|
|
251
|
+
let optInSourceSubscribers = await client.fetchOptInSourceSubscribers(optInSource.id, true, false, false, constants.headers)
|
|
252
|
+
.catch(err => {
|
|
253
|
+
throw err;
|
|
254
|
+
}).then(resp => {
|
|
255
|
+
return resp.body;
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
console.log(optInSourceSubscribers);
|
|
259
|
+
|
|
260
|
+
let optInSourcesAssociatedWithPhoneNumber = await client.fetchOptInSourcesAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
261
|
+
.catch(err => {
|
|
262
|
+
throw err;
|
|
263
|
+
}).then(resp => {
|
|
264
|
+
return resp.body;
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
console.log(optInSourcesAssociatedWithPhoneNumber);
|
|
268
|
+
|
|
269
|
+
// Fetch all outbound SMSes
|
|
270
|
+
let outboundSMSes = await client.fetchOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
271
|
+
.catch(err => {
|
|
272
|
+
throw err;
|
|
273
|
+
}).then(resp => {
|
|
274
|
+
return resp.body;
|
|
275
|
+
});
|
|
276
|
+
console.log(outboundSMSes);
|
|
277
|
+
|
|
278
|
+
// Fetch outbound SMSes by page
|
|
279
|
+
let outboundSMSesByPage = await client.fetchOutboundSMSByPage(phoneNumber.id, undefined, undefined, 10, 1, constants.headers)
|
|
280
|
+
.catch(err => {
|
|
281
|
+
throw err;
|
|
282
|
+
}).then(resp => {
|
|
283
|
+
return resp.body;
|
|
284
|
+
});
|
|
285
|
+
console.log(`Total: ${outboundSMSesByPage.total}, Length: ${outboundSMSesByPage.length}, Messages: ${JSON.stringify(outboundSMSesByPage.results)}`);
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
// Count outbound SMSes
|
|
289
|
+
let outboundSMSesCount = await client.countOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
290
|
+
.catch(err => {
|
|
291
|
+
throw err;
|
|
292
|
+
}).then(resp => {
|
|
293
|
+
return (resp.body).count;
|
|
294
|
+
});
|
|
295
|
+
console.log(outboundSMSesCount);
|
|
296
|
+
|
|
297
|
+
// Retrieve message limits
|
|
298
|
+
let limits = await client.retrieveSentAndMaxCountOfMessages(constants.headers)
|
|
299
|
+
.catch(err => {
|
|
300
|
+
throw err;
|
|
301
|
+
}).then(resp => {
|
|
302
|
+
return resp.body;
|
|
303
|
+
});
|
|
304
|
+
console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
|
|
305
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as api from "wallet";
|
|
2
|
+
import * as constants from "./constants";
|
|
3
|
+
|
|
4
|
+
staticVoucherCampaigns();
|
|
5
|
+
|
|
6
|
+
async function staticVoucherCampaigns() {
|
|
7
|
+
let client = new api.StaticVoucherCampaignsApi(constants.domain);
|
|
8
|
+
// Fetch payment design
|
|
9
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
10
|
+
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
11
|
+
.catch(err => {
|
|
12
|
+
throw err;
|
|
13
|
+
}).then(resp => {
|
|
14
|
+
return resp.body;
|
|
15
|
+
});
|
|
16
|
+
let selectedDesign = allDesigns[0];
|
|
17
|
+
|
|
18
|
+
let startDate = new Date();
|
|
19
|
+
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
20
|
+
|
|
21
|
+
let params: api.CreateStaticVoucherCampaign = {
|
|
22
|
+
startDateTime: startDate,
|
|
23
|
+
expirationDateTime: expiryDate,
|
|
24
|
+
title: "Static Voucher Campaign API Client",
|
|
25
|
+
notes: "Example notes",
|
|
26
|
+
valueType: "currency", // percent or currency
|
|
27
|
+
displayValue: "$5 Off",
|
|
28
|
+
merchantsReferenceID: "",
|
|
29
|
+
validOnlyAtPOSRegisterIDs: [],
|
|
30
|
+
paymentDesignID: selectedDesign.id,
|
|
31
|
+
isActive: true,
|
|
32
|
+
sourceID: 0,
|
|
33
|
+
}
|
|
34
|
+
let campaign = await client.createStaticVoucherCampaign(params, constants.headers)
|
|
35
|
+
.catch(err => {
|
|
36
|
+
throw err;
|
|
37
|
+
}).then(resp => {
|
|
38
|
+
return resp.body
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
console.log(campaign);
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// Fetch static voucher campaign by ID
|
|
45
|
+
campaign = await client.fetchStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
46
|
+
.catch(err => {
|
|
47
|
+
throw err;
|
|
48
|
+
}).then(resp => {
|
|
49
|
+
return resp.body
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log(campaign);
|
|
53
|
+
|
|
54
|
+
// Fetch all the static voucher campaigns
|
|
55
|
+
let allCampaigns = await client.fetchStaticVoucherCampaigns(false, undefined, constants.headers)
|
|
56
|
+
.catch(err => {
|
|
57
|
+
throw err;
|
|
58
|
+
}).then(resp => {
|
|
59
|
+
return resp.body
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
console.log(allCampaigns);
|
|
63
|
+
|
|
64
|
+
// Fetch all vouchers within a static voucher campaign
|
|
65
|
+
let allVouchers = await client.fetchStaticVouchers(campaign.id, constants.headers)
|
|
66
|
+
.catch(err => {
|
|
67
|
+
throw err;
|
|
68
|
+
}).then(resp => {
|
|
69
|
+
return resp.body
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
console.log(allVouchers);
|
|
73
|
+
|
|
74
|
+
// Fetch vouchers within a static voucher campaign by page
|
|
75
|
+
let allVouchersByPage = await client.fetchStaticVouchersPage(campaign.id, 1, 10, constants.headers)
|
|
76
|
+
.catch(err => {
|
|
77
|
+
throw err;
|
|
78
|
+
}).then(resp => {
|
|
79
|
+
return resp.body
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
console.log(allVouchersByPage);
|
|
83
|
+
|
|
84
|
+
// Fetch performance overview
|
|
85
|
+
let performanceOverview = await client.fetchPerformanceOverview(campaign.id, constants.headers)
|
|
86
|
+
.catch(err => {
|
|
87
|
+
throw err;
|
|
88
|
+
}).then(resp => {
|
|
89
|
+
return resp.body
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
console.log(performanceOverview);
|
|
93
|
+
|
|
94
|
+
// Fetch reach stats of individual static voucher campaign
|
|
95
|
+
let individualCampaignReachStats = await client.fetchReachStatsOfIndividualStaticVoucherCampaign(campaign.id, undefined, undefined, constants.headers)
|
|
96
|
+
.catch(err => {
|
|
97
|
+
throw err;
|
|
98
|
+
}).then(resp => {
|
|
99
|
+
return resp.body
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
console.log(individualCampaignReachStats);
|
|
103
|
+
|
|
104
|
+
// Fetch reach stats of all static voucher campaigns
|
|
105
|
+
let allStaticVoucherCampaignStats = await client.fetchReachStatsOfAllStaticVoucherCampaigns(undefined, undefined, constants.headers)
|
|
106
|
+
.catch(err => {
|
|
107
|
+
throw err;
|
|
108
|
+
}).then(resp => {
|
|
109
|
+
return resp.body
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
console.log(allStaticVoucherCampaignStats);
|
|
113
|
+
|
|
114
|
+
// Fetch wallet page views of a static voucher campaign
|
|
115
|
+
let views = await client.fetchViews(campaign.id, constants.headers)
|
|
116
|
+
.catch(err => {
|
|
117
|
+
throw err;
|
|
118
|
+
}).then(resp => {
|
|
119
|
+
return resp.body
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
console.log(views);
|
|
123
|
+
|
|
124
|
+
// Fetch redeemed vouchers
|
|
125
|
+
let redeemedVouchers = await client.fetchVouchersRedeemed(campaign.id, constants.headers)
|
|
126
|
+
.catch(err => {
|
|
127
|
+
throw err;
|
|
128
|
+
}).then(resp => {
|
|
129
|
+
return resp.body
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
console.log(redeemedVouchers);
|
|
133
|
+
|
|
134
|
+
// Duplicate static voucher campaign
|
|
135
|
+
let duplicatedCampaign = await client.duplicateStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
136
|
+
.catch(err => {
|
|
137
|
+
throw err;
|
|
138
|
+
}).then(resp => {
|
|
139
|
+
return resp.body
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
console.log(duplicatedCampaign);
|
|
143
|
+
|
|
144
|
+
// Update static voucher campaign
|
|
145
|
+
campaign = await client.updateStaticVoucherCampaign(campaign.id, {
|
|
146
|
+
...params,
|
|
147
|
+
title: `${params.title} Updated`
|
|
148
|
+
}, constants.headers)
|
|
149
|
+
.catch(err => {
|
|
150
|
+
throw err;
|
|
151
|
+
}).then(resp => {
|
|
152
|
+
return resp.body
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
console.log(campaign);
|
|
156
|
+
|
|
157
|
+
// Create static voucher campaign with voucher
|
|
158
|
+
let campaignWithVoucher = await client.createStaticVoucherCampaignWithVoucher({
|
|
159
|
+
...params,
|
|
160
|
+
cellPhone: "+1809898787",
|
|
161
|
+
memberID: "MEM0091",
|
|
162
|
+
offerAmountCents: 1000
|
|
163
|
+
}, constants.headers)
|
|
164
|
+
.catch(err => {
|
|
165
|
+
throw err;
|
|
166
|
+
}).then(resp => {
|
|
167
|
+
return resp.body
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
console.log(campaignWithVoucher);
|
|
171
|
+
|
|
172
|
+
allVouchers = await client.fetchStaticVouchers(campaignWithVoucher.id, constants.headers)
|
|
173
|
+
.catch(err => {
|
|
174
|
+
throw err;
|
|
175
|
+
}).then(resp => {
|
|
176
|
+
return resp.body
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// Update static voucher campaign
|
|
180
|
+
campaignWithVoucher = await client.updateStaticVoucherCampaignWithVoucher(campaignWithVoucher.id, {
|
|
181
|
+
...params,
|
|
182
|
+
offerAmountCents: 2000,
|
|
183
|
+
voucherID: allVouchers[0].id
|
|
184
|
+
}, constants.headers)
|
|
185
|
+
.catch(err => {
|
|
186
|
+
throw err;
|
|
187
|
+
}).then(resp => {
|
|
188
|
+
return resp.body
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
console.log(campaignWithVoucher);
|
|
192
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as api from "wallet";
|
|
2
|
+
import * as constants from "./constants";
|
|
3
|
+
|
|
4
|
+
staticVouchers();
|
|
5
|
+
|
|
6
|
+
async function staticVouchers() {
|
|
7
|
+
let client = new api.StaticVouchersApi(constants.domain);
|
|
8
|
+
|
|
9
|
+
let params: api.WTStaticVoucherCreateParams = {
|
|
10
|
+
offerAmountCents: 1000, // In cents
|
|
11
|
+
memberID: "MEM0090",
|
|
12
|
+
cellPhone: "+1809898787",
|
|
13
|
+
campaignID: "",
|
|
14
|
+
}
|
|
15
|
+
// Create a new static voucher
|
|
16
|
+
let voucher = await client.createStaticVoucher(params, constants.headers).catch(err => {
|
|
17
|
+
throw err;
|
|
18
|
+
}).then(resp => {
|
|
19
|
+
return resp.body
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// The static voucher that has just been created
|
|
23
|
+
console.log(voucher);
|
|
24
|
+
|
|
25
|
+
// Fetch the static voucher that has just been created
|
|
26
|
+
voucher = (await client.fetchStaticVoucher(voucher.id, constants.headers)).body;
|
|
27
|
+
console.log(voucher);
|
|
28
|
+
|
|
29
|
+
// Update the static voucher with a new maxUses count
|
|
30
|
+
voucher = await client.updateStaticVoucher(voucher.id, {
|
|
31
|
+
...params,
|
|
32
|
+
offerAmountCents: 2000 // In cents
|
|
33
|
+
}, constants.headers).catch(err => {
|
|
34
|
+
throw err;
|
|
35
|
+
}).then(resp => {
|
|
36
|
+
return resp.body
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Archive the static voucher
|
|
40
|
+
await client.deleteStaticVoucher(voucher.id, constants.headers)
|
|
41
|
+
.catch(err => {
|
|
42
|
+
throw err;
|
|
43
|
+
}).then(resp => {
|
|
44
|
+
return resp.body
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// Fetch reach stats of individual static voucher
|
|
49
|
+
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualStaticVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
50
|
+
.catch(err => {
|
|
51
|
+
throw err;
|
|
52
|
+
}).then(resp => {
|
|
53
|
+
return resp.body;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
console.log(individualVoucherReachStats);
|
|
57
|
+
|
|
58
|
+
// Fetch reach stats of all the static vouchers
|
|
59
|
+
let allVouchersReachStats = await client.fetchReachStatsOfAllStaticVouchers(undefined, undefined, constants.headers)
|
|
60
|
+
.catch(err => {
|
|
61
|
+
throw err;
|
|
62
|
+
}).then(resp => {
|
|
63
|
+
return resp.body;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
console.log(allVouchersReachStats);
|
|
67
|
+
}
|