wallet 2.1.505 → 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/.openapi-generator/FILES +45 -69
- 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 +17 -17
- package/api/clubMembersPointsApi.ts +1 -1
- package/api/configurationApi.ts +8 -8
- package/api/countriesApi.ts +1 -1
- package/api/customerApi.ts +15 -15
- package/api/dashboardApi.ts +1 -1
- package/api/dynamicVouchersApi.ts +1 -1
- package/api/employeeAPIKeysApi.ts +1 -1
- package/api/employeeAccessApi.ts +8 -8
- package/api/employeesApi.ts +114 -120
- package/api/industriesApi.ts +1 -1
- package/api/infoGenesisReportsApi.ts +143 -162
- package/api/integratedTerminalsApi.ts +1 -1
- package/api/interactionsApi.ts +14 -15
- package/api/linkBookApi.ts +1 -1
- package/api/linkBookSectionApi.ts +1 -1
- package/api/loginAndLogoutApi.ts +8 -8
- package/api/membershipTiersApi.ts +1 -1
- package/api/merchantApi.ts +84 -22
- package/api/merchantCreditsApi.ts +1 -1
- package/api/merchantURLsApi.ts +1 -1
- package/api/mobileTerminalApi.ts +8 -8
- 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 +86 -89
- package/api/settingsApi.ts +1 -1
- package/api/staticVoucherCampaignGroupsApi.ts +1 -1
- package/api/staticVoucherCampaignsApi.ts +15 -15
- package/api/staticVouchersApi.ts +1 -1
- package/api/systemApi.ts +14 -15
- package/api/transactionLedgerApi.ts +1 -1
- package/api/utilitiesApi.ts +1 -1
- package/api/webTerminalApi.ts +8 -8
- package/dist/api/billingApi.d.ts +4 -4
- package/dist/api/billingApi.js +8 -8
- package/dist/api/billingApi.js.map +1 -1
- package/dist/api/configurationApi.d.ts +2 -2
- package/dist/api/configurationApi.js +4 -4
- package/dist/api/configurationApi.js.map +1 -1
- package/dist/api/customerApi.d.ts +4 -4
- package/dist/api/customerApi.js +8 -8
- package/dist/api/customerApi.js.map +1 -1
- package/dist/api/employeeAccessApi.d.ts +2 -2
- package/dist/api/employeeAccessApi.js +4 -4
- package/dist/api/employeeAccessApi.js.map +1 -1
- package/dist/api/employeesApi.d.ts +28 -34
- package/dist/api/employeesApi.js +68 -68
- package/dist/api/employeesApi.js.map +1 -1
- package/dist/api/infoGenesisReportsApi.d.ts +27 -46
- package/dist/api/infoGenesisReportsApi.js +92 -92
- package/dist/api/infoGenesisReportsApi.js.map +1 -1
- package/dist/api/interactionsApi.d.ts +3 -4
- package/dist/api/interactionsApi.js +8 -8
- package/dist/api/interactionsApi.js.map +1 -1
- package/dist/api/loginAndLogoutApi.d.ts +2 -2
- package/dist/api/loginAndLogoutApi.js +4 -4
- package/dist/api/loginAndLogoutApi.js.map +1 -1
- package/dist/api/merchantApi.d.ts +14 -6
- package/dist/api/merchantApi.js +69 -12
- package/dist/api/merchantApi.js.map +1 -1
- package/dist/api/mobileTerminalApi.d.ts +2 -2
- package/dist/api/mobileTerminalApi.js +4 -4
- package/dist/api/mobileTerminalApi.js.map +1 -1
- package/dist/api/sMSApi.d.ts +23 -26
- package/dist/api/sMSApi.js +48 -48
- package/dist/api/sMSApi.js.map +1 -1
- package/dist/api/staticVoucherCampaignsApi.d.ts +4 -4
- package/dist/api/staticVoucherCampaignsApi.js +8 -8
- package/dist/api/staticVoucherCampaignsApi.js.map +1 -1
- package/dist/api/systemApi.d.ts +3 -4
- package/dist/api/systemApi.js +8 -8
- package/dist/api/systemApi.js.map +1 -1
- package/dist/api/webTerminalApi.d.ts +2 -2
- package/dist/api/webTerminalApi.js +4 -4
- package/dist/api/webTerminalApi.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/dashboardWidget.d.ts +1 -0
- package/dist/model/dashboardWidget.js +5 -0
- package/dist/model/dashboardWidget.js.map +1 -1
- 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/merchant.d.ts +3 -3
- package/dist/model/merchant.js +15 -15
- package/dist/model/merchant.js.map +1 -1
- package/dist/model/models.d.ts +45 -69
- package/dist/model/models.js +135 -207
- package/dist/model/models.js.map +1 -1
- package/dist/model/wTAuthenticationForgotPassword.d.ts +14 -0
- package/dist/model/wTAuthenticationForgotPassword.js +18 -0
- package/dist/model/wTAuthenticationForgotPassword.js.map +1 -0
- package/dist/model/wTAuthenticationLogin.d.ts +15 -0
- package/dist/model/wTAuthenticationLogin.js +23 -0
- package/dist/model/wTAuthenticationLogin.js.map +1 -0
- package/dist/model/wTAuthenticationRegister.d.ts +29 -0
- package/dist/model/wTAuthenticationRegister.js +93 -0
- package/dist/model/wTAuthenticationRegister.js.map +1 -0
- package/dist/model/wTAuthenticationRequestResetPassword.d.ts +14 -0
- package/dist/model/wTAuthenticationRequestResetPassword.js +18 -0
- package/dist/model/wTAuthenticationRequestResetPassword.js.map +1 -0
- package/dist/model/wTAuthenticationResetPassword.d.ts +16 -0
- package/dist/model/wTAuthenticationResetPassword.js +28 -0
- package/dist/model/wTAuthenticationResetPassword.js.map +1 -0
- package/dist/model/wTAuthenticationSSOLoginForDiscourse.d.ts +17 -0
- package/dist/model/wTAuthenticationSSOLoginForDiscourse.js +33 -0
- package/dist/model/wTAuthenticationSSOLoginForDiscourse.js.map +1 -0
- package/dist/model/wTBillingChangePlan.d.ts +14 -0
- package/dist/model/wTBillingChangePlan.js +18 -0
- package/dist/model/wTBillingChangePlan.js.map +1 -0
- package/dist/model/wTBillingSavePaymentMethod.d.ts +14 -0
- package/dist/model/wTBillingSavePaymentMethod.js +18 -0
- package/dist/model/wTBillingSavePaymentMethod.js.map +1 -0
- package/dist/model/wTCustomerSearchByMemberID.d.ts +14 -0
- package/dist/model/wTCustomerSearchByMemberID.js +18 -0
- package/dist/model/wTCustomerSearchByMemberID.js.map +1 -0
- package/dist/model/wTCustomerSearchByPhoneNumber.d.ts +14 -0
- package/dist/model/wTCustomerSearchByPhoneNumber.js +18 -0
- package/dist/model/wTCustomerSearchByPhoneNumber.js.map +1 -0
- package/dist/model/wTEmployeeCreateAlert.d.ts +15 -0
- package/dist/model/wTEmployeeCreateAlert.js +23 -0
- package/dist/model/wTEmployeeCreateAlert.js.map +1 -0
- package/dist/model/wTEmployeeCreateMediaFile.d.ts +15 -0
- package/dist/model/wTEmployeeCreateMediaFile.js +23 -0
- package/dist/model/wTEmployeeCreateMediaFile.js.map +1 -0
- package/dist/model/wTEmployeeCreateStaticVoucherCampaignGroup.d.ts +14 -0
- package/dist/model/wTEmployeeCreateStaticVoucherCampaignGroup.js +18 -0
- package/dist/model/wTEmployeeCreateStaticVoucherCampaignGroup.js.map +1 -0
- package/dist/model/wTEmployeeFileCreate.d.ts +15 -0
- package/dist/model/wTEmployeeFileCreate.js +23 -0
- package/dist/model/wTEmployeeFileCreate.js.map +1 -0
- package/dist/model/wTEmployeeImportRecords.d.ts +15 -0
- package/dist/model/wTEmployeeImportRecords.js +23 -0
- package/dist/model/wTEmployeeImportRecords.js.map +1 -0
- package/dist/model/wTEmployeePeerRoles.d.ts +14 -0
- package/dist/model/wTEmployeePeerRoles.js +18 -0
- package/dist/model/wTEmployeePeerRoles.js.map +1 -0
- package/dist/model/wTEmployeeS3FilePresign.d.ts +16 -0
- package/dist/model/wTEmployeeS3FilePresign.js +28 -0
- package/dist/model/wTEmployeeS3FilePresign.js.map +1 -0
- package/dist/model/wTEmployeeScheduleSMSCampaignBroadcast.d.ts +20 -0
- package/dist/model/wTEmployeeScheduleSMSCampaignBroadcast.js +48 -0
- package/dist/model/wTEmployeeScheduleSMSCampaignBroadcast.js.map +1 -0
- package/dist/model/wTEmployeeScheduleSimpleSMS.d.ts +19 -0
- package/dist/model/wTEmployeeScheduleSimpleSMS.js +43 -0
- package/dist/model/wTEmployeeScheduleSimpleSMS.js.map +1 -0
- package/dist/model/wTEmployeeScheduleSimpleSMSToRecipient.d.ts +18 -0
- package/dist/model/wTEmployeeScheduleSimpleSMSToRecipient.js +38 -0
- package/dist/model/wTEmployeeScheduleSimpleSMSToRecipient.js.map +1 -0
- package/dist/model/wTEmployeeSendHelpDeskResponse.d.ts +15 -0
- package/dist/model/wTEmployeeSendHelpDeskResponse.js +23 -0
- package/dist/model/wTEmployeeSendHelpDeskResponse.js.map +1 -0
- package/dist/model/wTFetchWalletPaymentObjectWithToken.d.ts +17 -0
- package/dist/model/wTFetchWalletPaymentObjectWithToken.js +33 -0
- package/dist/model/wTFetchWalletPaymentObjectWithToken.js.map +1 -0
- package/dist/model/wTInfoGenesisLookupRequestErrors.d.ts +17 -0
- package/dist/model/wTInfoGenesisLookupRequestErrors.js +33 -0
- package/dist/model/wTInfoGenesisLookupRequestErrors.js.map +1 -0
- package/dist/model/wTInfoGenesisRecordFilterParameters.d.ts +16 -0
- package/dist/model/wTInfoGenesisRecordFilterParameters.js +28 -0
- package/dist/model/wTInfoGenesisRecordFilterParameters.js.map +1 -0
- package/dist/model/wTInfoGenesisRoutingIDs.d.ts +14 -0
- package/dist/model/wTInfoGenesisRoutingIDs.js +18 -0
- package/dist/model/wTInfoGenesisRoutingIDs.js.map +1 -0
- package/dist/model/wTInfoGenesisUniquePostingIDs.d.ts +14 -0
- package/dist/model/wTInfoGenesisUniquePostingIDs.js +18 -0
- package/dist/model/wTInfoGenesisUniquePostingIDs.js.map +1 -0
- package/dist/model/wTMerchantUpdate.d.ts +21 -0
- package/dist/model/wTMerchantUpdate.js +53 -0
- package/dist/model/wTMerchantUpdate.js.map +1 -0
- package/dist/model/wTMerchantUpdateBillingContact.d.ts +14 -0
- package/dist/model/wTMerchantUpdateBillingContact.js +18 -0
- package/dist/model/wTMerchantUpdateBillingContact.js.map +1 -0
- package/dist/model/wTMerchantUpdatePOSIntegration.d.ts +14 -0
- package/dist/model/wTMerchantUpdatePOSIntegration.js +18 -0
- package/dist/model/wTMerchantUpdatePOSIntegration.js.map +1 -0
- package/dist/model/wTSMSAcquirePhoneNumber.d.ts +14 -0
- package/dist/model/wTSMSAcquirePhoneNumber.js +18 -0
- package/dist/model/wTSMSAcquirePhoneNumber.js.map +1 -0
- package/dist/model/wTSMSCreateAgreement.d.ts +25 -0
- package/dist/model/wTSMSCreateAgreement.js +73 -0
- package/dist/model/wTSMSCreateAgreement.js.map +1 -0
- package/dist/model/wTSMSImportOptInListSubscribers.d.ts +16 -0
- package/dist/model/wTSMSImportOptInListSubscribers.js +28 -0
- package/dist/model/wTSMSImportOptInListSubscribers.js.map +1 -0
- package/dist/model/wTSMSImportedListCreate.d.ts +16 -0
- package/dist/model/wTSMSImportedListCreate.js +28 -0
- package/dist/model/wTSMSImportedListCreate.js.map +1 -0
- package/dist/model/wTSMSOptInListSourceCreate.d.ts +15 -0
- package/dist/model/wTSMSOptInListSourceCreate.js +23 -0
- package/dist/model/wTSMSOptInListSourceCreate.js.map +1 -0
- package/dist/model/wTSMSUpdatePhoneNumberConfig.d.ts +25 -0
- package/dist/model/wTSMSUpdatePhoneNumberConfig.js +73 -0
- package/dist/model/wTSMSUpdatePhoneNumberConfig.js.map +1 -0
- package/dist/model/wTSettingsSetPassword.d.ts +14 -0
- package/dist/model/wTSettingsSetPassword.js +18 -0
- package/dist/model/wTSettingsSetPassword.js.map +1 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessages.d.ts +16 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessages.js +28 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessages.js.map +1 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessagesByPage.d.ts +18 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessagesByPage.js +38 -0
- package/dist/model/wTStaticVoucherCampaignPreviewMessagesByPage.js.map +1 -0
- package/dist/model/wTSystemApprovePhoneNumber.d.ts +15 -0
- package/dist/model/wTSystemApprovePhoneNumber.js +23 -0
- package/dist/model/wTSystemApprovePhoneNumber.js.map +1 -0
- package/dist/model/wTSystemRoleCreate.d.ts +15 -0
- package/dist/model/wTSystemRoleCreate.js +23 -0
- package/dist/model/wTSystemRoleCreate.js.map +1 -0
- package/dist/model/wTTCPAOpt.d.ts +16 -0
- package/dist/model/wTTCPAOpt.js +28 -0
- package/dist/model/wTTCPAOpt.js.map +1 -0
- package/dist/model/wTTwilioRequestAuthyCode.d.ts +15 -0
- package/dist/model/wTTwilioRequestAuthyCode.js +23 -0
- package/dist/model/wTTwilioRequestAuthyCode.js.map +1 -0
- package/dist/model/wTTwilioVerifyAuthyCode.d.ts +16 -0
- package/dist/model/wTTwilioVerifyAuthyCode.js +28 -0
- package/dist/model/wTTwilioVerifyAuthyCode.js.map +1 -0
- package/dist/model/wTWalletConfigurationSaveWalletRecord.d.ts +46 -0
- package/dist/model/wTWalletConfigurationSaveWalletRecord.js +178 -0
- package/dist/model/wTWalletConfigurationSaveWalletRecord.js.map +1 -0
- package/dist/model/wTWalletItemRedemption.d.ts +16 -0
- package/dist/model/wTWalletItemRedemption.js +28 -0
- package/dist/model/wTWalletItemRedemption.js.map +1 -0
- 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 +7 -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 +10 -4
- package/model/inlineObject1.ts +94 -4
- package/model/inlineObject10.ts +15 -9
- package/model/inlineObject11.ts +15 -9
- package/model/inlineObject12.ts +15 -9
- package/model/inlineObject13.ts +15 -9
- package/model/inlineObject14.ts +15 -9
- package/model/inlineObject15.ts +12 -36
- package/model/inlineObject16.ts +12 -30
- package/model/inlineObject17.ts +13 -25
- package/model/inlineObject18.ts +12 -30
- package/model/inlineObject19.ts +13 -25
- package/model/inlineObject2.ts +22 -4
- package/model/inlineObject20.ts +12 -30
- package/model/inlineObject21.ts +13 -43
- package/model/inlineObject22.ts +17 -5
- package/model/inlineObject23.ts +16 -4
- package/model/inlineObject24.ts +11 -11
- package/model/inlineObject25.ts +14 -20
- package/model/inlineObject26.ts +23 -5
- package/model/inlineObject27.ts +11 -5
- package/model/inlineObject28.ts +91 -13
- package/model/inlineObject29.ts +9 -21
- package/model/inlineObject3.ts +22 -4
- package/model/inlineObject30.ts +91 -13
- package/model/inlineObject31.ts +23 -5
- package/model/inlineObject32.ts +11 -5
- package/model/inlineObject33.ts +95 -5
- package/model/inlineObject34.ts +13 -13
- package/model/inlineObject35.ts +13 -13
- package/model/inlineObject36.ts +13 -13
- package/model/inlineObject37.ts +9 -15
- package/model/inlineObject38.ts +8 -14
- package/model/inlineObject39.ts +8 -14
- package/model/inlineObject4.ts +8 -8
- package/model/inlineObject40.ts +187 -13
- package/model/inlineObject41.ts +19 -13
- package/model/inlineObject42.ts +19 -13
- package/model/inlineObject43.ts +9 -15
- package/model/inlineObject44.ts +91 -13
- package/model/inlineObject45.ts +19 -13
- package/model/inlineObject46.ts +9 -15
- package/model/inlineObject47.ts +91 -13
- package/model/inlineObject48.ts +1 -1
- package/model/inlineObject49.ts +1 -1
- package/model/inlineObject5.ts +95 -5
- package/model/inlineObject50.ts +1 -1
- package/model/inlineObject51.ts +1 -1
- package/model/inlineObject52.ts +1 -1
- package/model/inlineObject53.ts +1 -1
- package/model/inlineObject54.ts +1 -1
- package/model/inlineObject55.ts +1 -1
- package/model/inlineObject56.ts +1 -1
- package/model/inlineObject57.ts +1 -1
- package/model/inlineObject58.ts +1 -1
- package/model/inlineObject59.ts +1 -1
- package/model/inlineObject6.ts +5 -5
- package/model/inlineObject60.ts +1 -1
- package/model/inlineObject61.ts +1 -1
- package/model/inlineObject62.ts +1 -1
- package/model/inlineObject63.ts +1 -1
- package/model/inlineObject64.ts +1 -1
- package/model/inlineObject65.ts +1 -1
- package/model/inlineObject66.ts +1 -1
- package/model/inlineObject67.ts +1 -1
- package/model/inlineObject68.ts +1 -1
- package/model/inlineObject7.ts +5 -5
- package/model/inlineObject8.ts +13 -13
- package/model/inlineObject9.ts +15 -9
- 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 +19 -19
- 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/models.ts +135 -207
- 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 +31 -0
- package/model/wTAuthenticationLogin.ts +37 -0
- package/model/wTAuthenticationRegister.ts +121 -0
- package/model/wTAuthenticationRequestResetPassword.ts +31 -0
- package/model/wTAuthenticationResetPassword.ts +43 -0
- package/model/wTAuthenticationSSOLoginForDiscourse.ts +49 -0
- package/model/wTBillingChangePlan.ts +31 -0
- package/model/wTBillingSavePaymentMethod.ts +31 -0
- package/model/wTCustomerSearchByMemberID.ts +31 -0
- package/model/wTCustomerSearchByPhoneNumber.ts +31 -0
- 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 +37 -0
- package/model/wTEmployeeCreateMediaFile.ts +37 -0
- package/model/wTEmployeeCreateStaticVoucherCampaignGroup.ts +31 -0
- package/model/wTEmployeeFileCreate.ts +37 -0
- package/model/wTEmployeeImportRecords.ts +37 -0
- package/model/wTEmployeeNotification.ts +1 -1
- package/model/wTEmployeePeerRoles.ts +31 -0
- package/model/wTEmployeeS3FilePresign.ts +43 -0
- package/model/wTEmployeeScheduleSMSCampaignBroadcast.ts +67 -0
- package/model/wTEmployeeScheduleSimpleSMS.ts +61 -0
- package/model/wTEmployeeScheduleSimpleSMSToRecipient.ts +55 -0
- package/model/wTEmployeeSendHelpDeskResponse.ts +37 -0
- package/model/wTEmployeeUpdate.ts +1 -1
- package/model/wTFetchWalletPaymentObjectWithToken.ts +49 -0
- package/model/wTImportedList.ts +1 -1
- package/model/wTInfoGenesisLookupRequestErrors.ts +49 -0
- package/model/wTInfoGenesisRecordFilterParameters.ts +43 -0
- package/model/wTInfoGenesisRoutingIDs.ts +31 -0
- package/model/wTInfoGenesisUniquePostingIDs.ts +31 -0
- 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 +73 -0
- package/model/wTMerchantUpdateBillingContact.ts +31 -0
- package/model/wTMerchantUpdatePOSIntegration.ts +31 -0
- 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 +31 -0
- package/model/wTSMSCreateAgreement.ts +97 -0
- package/model/wTSMSImportOptInListSubscribers.ts +43 -0
- package/model/wTSMSImportedListCreate.ts +43 -0
- package/model/wTSMSOptInListSourceCreate.ts +37 -0
- package/model/wTSMSUpdatePhoneNumberConfig.ts +97 -0
- package/model/wTSettingsSetPassword.ts +31 -0
- package/model/wTStaticVoucher.ts +1 -1
- package/model/wTStaticVoucherCampaign.ts +1 -1
- package/model/wTStaticVoucherCampaignPreviewMessages.ts +43 -0
- package/model/wTStaticVoucherCampaignPreviewMessagesByPage.ts +55 -0
- package/model/wTStaticVoucherCreateParams.ts +1 -1
- package/model/wTStaticVoucherUpdateParams.ts +1 -1
- package/model/wTSystemApprovePhoneNumber.ts +37 -0
- package/model/wTSystemRoleCreate.ts +37 -0
- package/model/wTTCPAOpt.ts +43 -0
- package/model/wTTwilioRequestAuthyCode.ts +37 -0
- package/model/wTTwilioVerifyAuthyCode.ts +43 -0
- package/model/wTWalletConfigurationSaveWalletRecord.ts +223 -0
- package/model/wTWalletItemRedemption.ts +43 -0
- 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
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
## Summary
|
|
7
7
|
|
|
8
|
-
This module provides a server-side SDK for integrating with the CRM & Digital Payments platform provided by Wallet Inc. For details about the Wallet
|
|
8
|
+
This module provides a server-side SDK for integrating with the CRM & Digital Payments platform provided by Wallet Inc. For details about the [Wallet Platform](https://wallet.inc), please visit https://wallet.inc
|
|
9
|
+
|
|
10
|
+
For detailed API documentation and detailed steps to create your API key for authenticated requests, please visit the [Wallet Developer Hub](https://wallet.dev) (https://wallet.dev)
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
@@ -26,7 +28,7 @@ npm install # Install ts-node to run typescript examples without transpilation
|
|
|
26
28
|
### Create and manipulate Membership Tiers
|
|
27
29
|
|
|
28
30
|
```nodejs
|
|
29
|
-
import * as api from "
|
|
31
|
+
import * as api from "wallet";
|
|
30
32
|
import * as constants from "./constants";
|
|
31
33
|
|
|
32
34
|
membershipTiers();
|
|
@@ -50,6 +52,10 @@ async function membershipTiers() {
|
|
|
50
52
|
// The membership tier that has just been created
|
|
51
53
|
console.log(tier);
|
|
52
54
|
|
|
55
|
+
// Fetch the created tier
|
|
56
|
+
tier = (await tiersClient.fetchMembershipTierById(tier.id, constants.headers)).body;
|
|
57
|
+
console.log(tier);
|
|
58
|
+
|
|
53
59
|
tier = await tiersClient.updateMembershipTier(tier.id, {
|
|
54
60
|
...tier,
|
|
55
61
|
tierName: "SILVER"
|
|
@@ -78,19 +84,40 @@ async function membershipTiers() {
|
|
|
78
84
|
});
|
|
79
85
|
|
|
80
86
|
console.log(tier.isActive); // This will be true, since the tier has just been restored
|
|
87
|
+
|
|
88
|
+
// Fetch paginated tier history logs
|
|
89
|
+
let historyLogs = (await tiersClient.fetchMembershipTierHistoryLog({
|
|
90
|
+
pageSize: 10,
|
|
91
|
+
pageNum: 1,
|
|
92
|
+
id: tier.id
|
|
93
|
+
}, constants.headers)).body;
|
|
94
|
+
|
|
95
|
+
console.log(historyLogs);
|
|
96
|
+
|
|
97
|
+
let redemptionLogs = (await tiersClient.fetchMembershipTierRedemptionLog({
|
|
98
|
+
pageSize: 10,
|
|
99
|
+
pageNum: 1,
|
|
100
|
+
id: tier.id
|
|
101
|
+
}, constants.headers)).body;
|
|
102
|
+
|
|
103
|
+
console.log(redemptionLogs);
|
|
104
|
+
|
|
105
|
+
// Fetch the list of tiers with members
|
|
106
|
+
let tiersList = ((await (tiersClient.fetchAllMembershipTiersWithMemberCount(false, constants.headers))).body);
|
|
107
|
+
console.log(tiersList);
|
|
81
108
|
}
|
|
82
109
|
```
|
|
83
110
|
|
|
84
111
|
### Create and manipulate Payment Designs
|
|
85
112
|
|
|
86
113
|
```nodejs
|
|
87
|
-
import * as api from "
|
|
114
|
+
import * as api from "wallet";
|
|
88
115
|
import * as constants from "./constants";
|
|
89
116
|
|
|
90
117
|
paymentDesigns();
|
|
91
118
|
|
|
92
119
|
async function paymentDesigns() {
|
|
93
|
-
let designClient = new api.PaymentDesignsApi();
|
|
120
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
94
121
|
|
|
95
122
|
// Create a new payment design
|
|
96
123
|
let design = await designClient.createPaymentDesign({
|
|
@@ -114,6 +141,10 @@ async function paymentDesigns() {
|
|
|
114
141
|
// The payment design that has just been created
|
|
115
142
|
console.log(design);
|
|
116
143
|
|
|
144
|
+
// Fetch the created design
|
|
145
|
+
design = (await designClient.fetchPaymentDesignById(design.id, constants.headers)).body;
|
|
146
|
+
console.log(design);
|
|
147
|
+
|
|
117
148
|
// Change the borderColor and borderSize of the payment design
|
|
118
149
|
design = await designClient.updatePaymentDesign(design.id, {
|
|
119
150
|
...design,
|
|
@@ -132,7 +163,7 @@ async function paymentDesigns() {
|
|
|
132
163
|
}).then(resp => {
|
|
133
164
|
return resp.body
|
|
134
165
|
});
|
|
135
|
-
|
|
166
|
+
|
|
136
167
|
console.log(design.isActive); // This will be false, since the design has just been archived
|
|
137
168
|
|
|
138
169
|
// Restore the payment design
|
|
@@ -143,13 +174,18 @@ async function paymentDesigns() {
|
|
|
143
174
|
return resp.body
|
|
144
175
|
});
|
|
145
176
|
console.log(design.isActive); // This will be true, since the design has just been restored
|
|
177
|
+
|
|
178
|
+
// Fetch all payment designs
|
|
179
|
+
let designs = (await designClient.fetchAllPaymentDesigns(false, constants.headers)).body;
|
|
180
|
+
console.log(designs);
|
|
146
181
|
}
|
|
147
182
|
```
|
|
148
183
|
|
|
149
184
|
### Create and manipulate Club Members
|
|
150
185
|
|
|
151
186
|
```nodejs
|
|
152
|
-
import * as api from "
|
|
187
|
+
import * as api from "wallet";
|
|
188
|
+
import { PaginationRequestWithSortOptions } from "wallet";
|
|
153
189
|
import * as constants from "./constants";
|
|
154
190
|
|
|
155
191
|
clubMembers();
|
|
@@ -174,6 +210,10 @@ async function clubMembers() {
|
|
|
174
210
|
// The club member that has just been created
|
|
175
211
|
console.log(member);
|
|
176
212
|
|
|
213
|
+
// Fetch the created member
|
|
214
|
+
member = (await membersClient.fetchMemberById(member.id, constants.headers)).body;
|
|
215
|
+
console.log(member);
|
|
216
|
+
|
|
177
217
|
member = await membersClient.updateMember(member.id, {
|
|
178
218
|
...member,
|
|
179
219
|
mobileNumber: "+1809863542"
|
|
@@ -202,13 +242,41 @@ async function clubMembers() {
|
|
|
202
242
|
});
|
|
203
243
|
|
|
204
244
|
console.log(member.isActive); // This will be true, since the member has just been restored
|
|
245
|
+
|
|
246
|
+
// Fetch members by page
|
|
247
|
+
let members = (await membersClient.fetchMembersByPage({
|
|
248
|
+
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
249
|
+
})).body;
|
|
250
|
+
|
|
251
|
+
console.log(members);
|
|
252
|
+
|
|
253
|
+
// Fetch paginated member history logs
|
|
254
|
+
let historyLogs = (await membersClient.fetchMemberHistoryLog({
|
|
255
|
+
pageSize: 10,
|
|
256
|
+
pageNum: 1,
|
|
257
|
+
id: member.id
|
|
258
|
+
}, constants.headers)).body;
|
|
259
|
+
|
|
260
|
+
console.log(historyLogs);
|
|
261
|
+
|
|
262
|
+
let redemptionLogs = (await membersClient.fetchMemberRedemptionLog({
|
|
263
|
+
pageSize: 10,
|
|
264
|
+
pageNum: 1,
|
|
265
|
+
id: member.id
|
|
266
|
+
}, constants.headers)).body;
|
|
267
|
+
|
|
268
|
+
console.log(redemptionLogs);
|
|
269
|
+
|
|
270
|
+
// Fetch the count of members
|
|
271
|
+
let membersCount = ((await (membersClient.fetchMembersCount(constants.headers))).body).count;
|
|
272
|
+
console.log(membersCount);
|
|
205
273
|
}
|
|
206
274
|
```
|
|
207
275
|
|
|
208
276
|
### Create and manipulate Advertisement Credits
|
|
209
277
|
|
|
210
278
|
```nodejs
|
|
211
|
-
import * as api from "
|
|
279
|
+
import * as api from "wallet";
|
|
212
280
|
import * as constants from "./constants";
|
|
213
281
|
|
|
214
282
|
advertisementCredits();
|
|
@@ -234,6 +302,10 @@ async function advertisementCredits() {
|
|
|
234
302
|
// The advertisement credit that has just been created
|
|
235
303
|
console.log(adCredit);
|
|
236
304
|
|
|
305
|
+
// Fetch the advertisement credit that has just been created
|
|
306
|
+
adCredit = (await client.fetchAdvertisementCreditById(adCredit.id, constants.headers)).body;
|
|
307
|
+
console.log(adCredit);
|
|
308
|
+
|
|
237
309
|
// Update the advertisement credit with a new maxUses count
|
|
238
310
|
adCredit = await client.updateAdvertisementCredit(adCredit.id, {
|
|
239
311
|
title: `${title} Update`,
|
|
@@ -247,6 +319,10 @@ async function advertisementCredits() {
|
|
|
247
319
|
return resp.body
|
|
248
320
|
});
|
|
249
321
|
|
|
322
|
+
// Retrieve all the scans
|
|
323
|
+
let scans = (await client.fetchAdvertisementCreditScans(adCredit.id, constants.headers)).body;
|
|
324
|
+
console.log("All scans: " + JSON.stringify(scans));
|
|
325
|
+
|
|
250
326
|
// Archive the advertisement credit
|
|
251
327
|
adCredit = await client.archiveAdvertisementCredit(adCredit.id, constants.headers)
|
|
252
328
|
.catch(err => {
|
|
@@ -266,13 +342,17 @@ async function advertisementCredits() {
|
|
|
266
342
|
});
|
|
267
343
|
|
|
268
344
|
console.log(adCredit.isActive); // This will be true, since the advertisement credit has just been restored
|
|
345
|
+
|
|
346
|
+
// Fetch all the active advertisement credits
|
|
347
|
+
let adCredits = (await client.fetchAllAdvertisementCredits(false, constants.headers)).body;
|
|
348
|
+
console.log("Active advertisement credits: ", JSON.stringify(adCredit));
|
|
269
349
|
}
|
|
270
350
|
```
|
|
271
351
|
|
|
272
352
|
### Create and manipulate Link Book Links
|
|
273
353
|
|
|
274
354
|
```nodejs
|
|
275
|
-
import * as api from "
|
|
355
|
+
import * as api from "wallet";
|
|
276
356
|
import * as constants from "./constants";
|
|
277
357
|
|
|
278
358
|
linkBook();
|
|
@@ -325,13 +405,17 @@ async function linkBook() {
|
|
|
325
405
|
});
|
|
326
406
|
|
|
327
407
|
console.log(link.isActive); // This will be true, since the link book link has just been restored
|
|
408
|
+
|
|
409
|
+
// Fetch all links
|
|
410
|
+
let links = (await client.fetchAllLinkBook(false, constants.headers)).body;
|
|
411
|
+
console.log(links);
|
|
328
412
|
}
|
|
329
413
|
```
|
|
330
414
|
|
|
331
415
|
### Create and manipulate Merchant URLs
|
|
332
416
|
|
|
333
417
|
```nodejs
|
|
334
|
-
import * as api from "
|
|
418
|
+
import * as api from "wallet";
|
|
335
419
|
import * as constants from "./constants";
|
|
336
420
|
|
|
337
421
|
merchantURLs();
|
|
@@ -352,6 +436,10 @@ async function merchantURLs() {
|
|
|
352
436
|
// The merchant URL that has just been created
|
|
353
437
|
console.log(url);
|
|
354
438
|
|
|
439
|
+
// Fetch the created url
|
|
440
|
+
url = (await client.fetchMerchantURL(url.id, constants.headers)).body;
|
|
441
|
+
console.log(url);
|
|
442
|
+
|
|
355
443
|
// Update the merchant URL with a new destination URL
|
|
356
444
|
url = await client.updateMerchantURL(url.id, {
|
|
357
445
|
...url,
|
|
@@ -381,13 +469,21 @@ async function merchantURLs() {
|
|
|
381
469
|
});
|
|
382
470
|
|
|
383
471
|
console.log(url.isActive); // This will be true, since the merchant URL has just been restored
|
|
472
|
+
|
|
473
|
+
// Fetch all merchant urls
|
|
474
|
+
let urls = (await client.fetchAllMerchantURLs(false, constants.headers)).body;
|
|
475
|
+
console.log(urls);
|
|
476
|
+
|
|
477
|
+
// Fetch all the wallet page views for the given merchant url
|
|
478
|
+
let pageViews = (await (client.fetchMerchantURLRequests(url.id, constants.headers))).body;
|
|
479
|
+
console.log(pageViews);
|
|
384
480
|
}
|
|
385
481
|
```
|
|
386
482
|
|
|
387
483
|
### Create and manipulate News Articles
|
|
388
484
|
|
|
389
485
|
```nodejs
|
|
390
|
-
import * as api from "
|
|
486
|
+
import * as api from "wallet";
|
|
391
487
|
import * as constants from "./constants";
|
|
392
488
|
|
|
393
489
|
news();
|
|
@@ -441,13 +537,17 @@ async function news() {
|
|
|
441
537
|
});
|
|
442
538
|
|
|
443
539
|
console.log(article.isActive); // This will be true, since the news article has just been restored
|
|
540
|
+
|
|
541
|
+
// Fetch all articles
|
|
542
|
+
let articles = (await client.fetchAllNewsArticles(false, constants.headers)).body;
|
|
543
|
+
console.log(articles);
|
|
444
544
|
}
|
|
445
545
|
```
|
|
446
546
|
|
|
447
547
|
### Create and manipulate Performances
|
|
448
548
|
|
|
449
549
|
```nodejs
|
|
450
|
-
import * as api from "
|
|
550
|
+
import * as api from "wallet";
|
|
451
551
|
import * as constants from "./constants";
|
|
452
552
|
|
|
453
553
|
performances();
|
|
@@ -463,7 +563,8 @@ async function performances() {
|
|
|
463
563
|
price: 200,
|
|
464
564
|
url: "https://blog.merchant.com",
|
|
465
565
|
orderNumber: 1,
|
|
466
|
-
mediaURL: "https://example.com/image"
|
|
566
|
+
mediaURL: "https://example.com/image",
|
|
567
|
+
isSoldOut: false,
|
|
467
568
|
|
|
468
569
|
}, constants.headers).catch(err => {
|
|
469
570
|
throw err;
|
|
@@ -504,19 +605,23 @@ async function performances() {
|
|
|
504
605
|
});
|
|
505
606
|
|
|
506
607
|
console.log(performance.isActive); // This will be true, since the performance has just been restored
|
|
608
|
+
|
|
609
|
+
// Fetch all performances
|
|
610
|
+
let performances = (await client.fetchAllPerformances(false, constants.headers)).body;
|
|
611
|
+
console.log(performances);
|
|
507
612
|
}
|
|
508
613
|
```
|
|
509
614
|
|
|
510
615
|
### Create and manipulate Promo Codes
|
|
511
616
|
|
|
512
617
|
```nodejs
|
|
513
|
-
import * as api from "
|
|
618
|
+
import * as api from "wallet";
|
|
514
619
|
import * as constants from "./constants";
|
|
515
620
|
|
|
516
621
|
promocodes();
|
|
517
622
|
|
|
518
623
|
async function promocodes() {
|
|
519
|
-
let client = new api.PromoCodesApi();
|
|
624
|
+
let client = new api.PromoCodesApi(constants.domain);
|
|
520
625
|
|
|
521
626
|
// Create a new promocode
|
|
522
627
|
let promocode = await client.createPromoCode({
|
|
@@ -565,19 +670,24 @@ async function promocodes() {
|
|
|
565
670
|
});
|
|
566
671
|
|
|
567
672
|
console.log(promocode.isActive); // This will be true, since the promocode has just been restored
|
|
673
|
+
|
|
674
|
+
// Fetch all promocodes
|
|
675
|
+
let promocodes = (await client.fetchAllPromoCodes(false, constants.headers)).body;
|
|
676
|
+
console.log(promocodes);
|
|
568
677
|
}
|
|
569
678
|
```
|
|
570
679
|
|
|
571
680
|
### Create and manipulate Merchant Credits
|
|
572
681
|
|
|
573
682
|
```nodejs
|
|
574
|
-
import * as api from "
|
|
683
|
+
import * as api from "wallet";
|
|
684
|
+
import { PaginationRequestWithSortOptions } from "wallet";
|
|
575
685
|
import * as constants from "./constants";
|
|
576
686
|
|
|
577
687
|
merchantCredits();
|
|
578
688
|
|
|
579
689
|
async function merchantCredits() {
|
|
580
|
-
let client = new api.MerchantCreditsApi();
|
|
690
|
+
let client = new api.MerchantCreditsApi(constants.domain);
|
|
581
691
|
|
|
582
692
|
// Create a new merchant credit
|
|
583
693
|
let merchantcredit = await client.createMerchantCredit({
|
|
@@ -593,6 +703,10 @@ async function merchantCredits() {
|
|
|
593
703
|
// The merchant credit that has just been created
|
|
594
704
|
console.log(merchantcredit);
|
|
595
705
|
|
|
706
|
+
// Fetch the created merchantcredit
|
|
707
|
+
merchantcredit = (await client.fetchMerchantCreditById(merchantcredit.id, constants.headers)).body;
|
|
708
|
+
console.log(merchantcredit);
|
|
709
|
+
|
|
596
710
|
// Update the merchant credit with a new title
|
|
597
711
|
merchantcredit = await client.updateMerchantCredit(merchantcredit.id, {
|
|
598
712
|
...merchantcredit,
|
|
@@ -622,6 +736,725 @@ async function merchantCredits() {
|
|
|
622
736
|
});
|
|
623
737
|
|
|
624
738
|
console.log(merchantcredit.isActive); // This will be true, since the merchant credit has just been restored
|
|
739
|
+
|
|
740
|
+
// Fetch merchantcredits by page
|
|
741
|
+
let merchantcredits = (await client.fetchMerchantCreditsByPage({
|
|
742
|
+
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
743
|
+
})).body;
|
|
744
|
+
|
|
745
|
+
console.log(merchantcredits);
|
|
746
|
+
|
|
747
|
+
// Fetch paginated merchantcredit history logs
|
|
748
|
+
let historyLogs = (await client.fetchMerchantCreditHistoryLog({
|
|
749
|
+
pageSize: 10,
|
|
750
|
+
pageNum: 1,
|
|
751
|
+
id: merchantcredit.id
|
|
752
|
+
}, constants.headers)).body;
|
|
753
|
+
|
|
754
|
+
console.log(historyLogs);
|
|
755
|
+
|
|
756
|
+
let redemptionLogs = (await client.fetchMerchantCreditRedemptionLog({
|
|
757
|
+
pageSize: 10,
|
|
758
|
+
pageNum: 1,
|
|
759
|
+
id: merchantcredit.id
|
|
760
|
+
}, constants.headers)).body;
|
|
761
|
+
|
|
762
|
+
console.log(redemptionLogs);
|
|
763
|
+
|
|
764
|
+
// Fetch the count of merchantcredits
|
|
765
|
+
let merchantcreditsCount = ((await (client.fetchMerchantCreditCount(constants.headers))).body).count;
|
|
766
|
+
console.log(merchantcreditsCount);
|
|
767
|
+
}
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
### Create and manipulate Dynamic Vouchers
|
|
771
|
+
|
|
772
|
+
```nodejs
|
|
773
|
+
import * as api from "wallet";
|
|
774
|
+
import * as constants from "./constants";
|
|
775
|
+
|
|
776
|
+
dynamicVouchers();
|
|
777
|
+
|
|
778
|
+
async function dynamicVouchers() {
|
|
779
|
+
let client = new api.DynamicVouchersApi(constants.domain);
|
|
780
|
+
|
|
781
|
+
// Fetch payment design
|
|
782
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
783
|
+
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
784
|
+
.catch(err => {
|
|
785
|
+
throw err;
|
|
786
|
+
}).then(resp => {
|
|
787
|
+
return resp.body;
|
|
788
|
+
});
|
|
789
|
+
let selectedDesign = allDesigns[0];
|
|
790
|
+
|
|
791
|
+
let startDate = new Date();
|
|
792
|
+
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
793
|
+
|
|
794
|
+
let params: api.WTDynamicVoucherCreateParams = {
|
|
795
|
+
title: "Dynamic Voucher API Client",
|
|
796
|
+
notes: "Example notes",
|
|
797
|
+
paymentDesignID: selectedDesign.id,
|
|
798
|
+
dateTimeStart: startDate,
|
|
799
|
+
dateTimeExpiration: expiryDate,
|
|
800
|
+
startingValue: 1000, // In cents
|
|
801
|
+
maxBudget: 90000, // In cents
|
|
802
|
+
decreaseAmount: 10, // In cents
|
|
803
|
+
frequency: 10, // Every 10 units of the frequencyType
|
|
804
|
+
frequencyType: "Minute(s)", // Possible values are: "Minute(s)", "Hour(s)", "Day(s)", "Week(s)", "Second(s)"
|
|
805
|
+
isActive: true,
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
let voucher = await client.createDynamicVoucher(params, constants.headers).catch(err => {
|
|
809
|
+
throw err;
|
|
810
|
+
}).then(resp => {
|
|
811
|
+
return resp.body
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
console.log(voucher);
|
|
815
|
+
|
|
816
|
+
// Fetch dynamic voucher by id
|
|
817
|
+
voucher = await client.fetchDynamicVoucherById(voucher.id, constants.headers)
|
|
818
|
+
.catch(err => {
|
|
819
|
+
throw err;
|
|
820
|
+
}).then(resp => {
|
|
821
|
+
return resp.body;
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
console.log(voucher);
|
|
825
|
+
|
|
826
|
+
// Update dynamic voucher
|
|
827
|
+
voucher = await client.saveDynamicVoucher(voucher.id, {
|
|
828
|
+
...params,
|
|
829
|
+
title: `${voucher.title} Updated`,
|
|
830
|
+
}, constants.headers)
|
|
831
|
+
.catch(err => {
|
|
832
|
+
throw err;
|
|
833
|
+
}).then(resp => {
|
|
834
|
+
return resp.body;
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
console.log(voucher);
|
|
838
|
+
|
|
839
|
+
// Fetch all dynamic vouchers
|
|
840
|
+
let allVouchers = await client.fetchAllDynamicVouchers(false, constants.headers)
|
|
841
|
+
.catch(err => {
|
|
842
|
+
throw err;
|
|
843
|
+
}).then(resp => {
|
|
844
|
+
return resp.body;
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
console.log(allVouchers);
|
|
848
|
+
|
|
849
|
+
// Fetch all the redemptions
|
|
850
|
+
let allRedemptions = await client.fetchDynamicVoucherRedemptions(voucher.id, constants.headers)
|
|
851
|
+
.catch(err => {
|
|
852
|
+
throw err;
|
|
853
|
+
}).then(resp => {
|
|
854
|
+
return resp.body;
|
|
855
|
+
});
|
|
856
|
+
|
|
857
|
+
console.log(allRedemptions);
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
// Fetch reach stats of individual dynamic voucher
|
|
861
|
+
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualDynamicVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
862
|
+
.catch(err => {
|
|
863
|
+
throw err;
|
|
864
|
+
}).then(resp => {
|
|
865
|
+
return resp.body;
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
console.log(individualVoucherReachStats);
|
|
869
|
+
|
|
870
|
+
// Fetch reach stats of all the dynamic vouchers
|
|
871
|
+
let allVouchersReachStats = await client.fetchReachStatsOfAllDynamicVouchers(undefined, undefined, constants.headers)
|
|
872
|
+
.catch(err => {
|
|
873
|
+
throw err;
|
|
874
|
+
}).then(resp => {
|
|
875
|
+
return resp.body;
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
console.log(allVouchersReachStats);
|
|
879
|
+
}
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
### Create and manipulate Static Voucher Campaigns
|
|
883
|
+
|
|
884
|
+
```nodejs
|
|
885
|
+
import * as api from "wallet";
|
|
886
|
+
import * as constants from "./constants";
|
|
887
|
+
|
|
888
|
+
staticVoucherCampaigns();
|
|
889
|
+
|
|
890
|
+
async function staticVoucherCampaigns() {
|
|
891
|
+
let client = new api.StaticVoucherCampaignsApi(constants.domain);
|
|
892
|
+
// Fetch payment design
|
|
893
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
894
|
+
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
895
|
+
.catch(err => {
|
|
896
|
+
throw err;
|
|
897
|
+
}).then(resp => {
|
|
898
|
+
return resp.body;
|
|
899
|
+
});
|
|
900
|
+
let selectedDesign = allDesigns[0];
|
|
901
|
+
|
|
902
|
+
let startDate = new Date();
|
|
903
|
+
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
904
|
+
|
|
905
|
+
let params: api.CreateStaticVoucherCampaign = {
|
|
906
|
+
startDateTime: startDate,
|
|
907
|
+
expirationDateTime: expiryDate,
|
|
908
|
+
title: "Static Voucher Campaign API Client",
|
|
909
|
+
notes: "Example notes",
|
|
910
|
+
valueType: "currency", // percent or currency
|
|
911
|
+
displayValue: "$5 Off",
|
|
912
|
+
merchantsReferenceID: "",
|
|
913
|
+
validOnlyAtPOSRegisterIDs: [],
|
|
914
|
+
paymentDesignID: selectedDesign.id,
|
|
915
|
+
isActive: true,
|
|
916
|
+
sourceID: 0,
|
|
917
|
+
}
|
|
918
|
+
let campaign = await client.createStaticVoucherCampaign(params, constants.headers)
|
|
919
|
+
.catch(err => {
|
|
920
|
+
throw err;
|
|
921
|
+
}).then(resp => {
|
|
922
|
+
return resp.body
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
console.log(campaign);
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
// Fetch static voucher campaign by ID
|
|
929
|
+
campaign = await client.fetchStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
930
|
+
.catch(err => {
|
|
931
|
+
throw err;
|
|
932
|
+
}).then(resp => {
|
|
933
|
+
return resp.body
|
|
934
|
+
});
|
|
935
|
+
|
|
936
|
+
console.log(campaign);
|
|
937
|
+
|
|
938
|
+
// Fetch all the static voucher campaigns
|
|
939
|
+
let allCampaigns = await client.fetchStaticVoucherCampaigns(false, undefined, constants.headers)
|
|
940
|
+
.catch(err => {
|
|
941
|
+
throw err;
|
|
942
|
+
}).then(resp => {
|
|
943
|
+
return resp.body
|
|
944
|
+
});
|
|
945
|
+
|
|
946
|
+
console.log(allCampaigns);
|
|
947
|
+
|
|
948
|
+
// Fetch all vouchers within a static voucher campaign
|
|
949
|
+
let allVouchers = await client.fetchStaticVouchers(campaign.id, constants.headers)
|
|
950
|
+
.catch(err => {
|
|
951
|
+
throw err;
|
|
952
|
+
}).then(resp => {
|
|
953
|
+
return resp.body
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
console.log(allVouchers);
|
|
957
|
+
|
|
958
|
+
// Fetch vouchers within a static voucher campaign by page
|
|
959
|
+
let allVouchersByPage = await client.fetchStaticVouchersPage(campaign.id, 1, 10, constants.headers)
|
|
960
|
+
.catch(err => {
|
|
961
|
+
throw err;
|
|
962
|
+
}).then(resp => {
|
|
963
|
+
return resp.body
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
console.log(allVouchersByPage);
|
|
967
|
+
|
|
968
|
+
// Fetch performance overview
|
|
969
|
+
let performanceOverview = await client.fetchPerformanceOverview(campaign.id, constants.headers)
|
|
970
|
+
.catch(err => {
|
|
971
|
+
throw err;
|
|
972
|
+
}).then(resp => {
|
|
973
|
+
return resp.body
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
console.log(performanceOverview);
|
|
977
|
+
|
|
978
|
+
// Fetch reach stats of individual static voucher campaign
|
|
979
|
+
let individualCampaignReachStats = await client.fetchReachStatsOfIndividualStaticVoucherCampaign(campaign.id, undefined, undefined, constants.headers)
|
|
980
|
+
.catch(err => {
|
|
981
|
+
throw err;
|
|
982
|
+
}).then(resp => {
|
|
983
|
+
return resp.body
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
console.log(individualCampaignReachStats);
|
|
987
|
+
|
|
988
|
+
// Fetch reach stats of all static voucher campaigns
|
|
989
|
+
let allStaticVoucherCampaignStats = await client.fetchReachStatsOfAllStaticVoucherCampaigns(undefined, undefined, constants.headers)
|
|
990
|
+
.catch(err => {
|
|
991
|
+
throw err;
|
|
992
|
+
}).then(resp => {
|
|
993
|
+
return resp.body
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
console.log(allStaticVoucherCampaignStats);
|
|
997
|
+
|
|
998
|
+
// Fetch wallet page views of a static voucher campaign
|
|
999
|
+
let views = await client.fetchViews(campaign.id, constants.headers)
|
|
1000
|
+
.catch(err => {
|
|
1001
|
+
throw err;
|
|
1002
|
+
}).then(resp => {
|
|
1003
|
+
return resp.body
|
|
1004
|
+
});
|
|
1005
|
+
|
|
1006
|
+
console.log(views);
|
|
1007
|
+
|
|
1008
|
+
// Fetch redeemed vouchers
|
|
1009
|
+
let redeemedVouchers = await client.fetchVouchersRedeemed(campaign.id, constants.headers)
|
|
1010
|
+
.catch(err => {
|
|
1011
|
+
throw err;
|
|
1012
|
+
}).then(resp => {
|
|
1013
|
+
return resp.body
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
console.log(redeemedVouchers);
|
|
1017
|
+
|
|
1018
|
+
// Duplicate static voucher campaign
|
|
1019
|
+
let duplicatedCampaign = await client.duplicateStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
1020
|
+
.catch(err => {
|
|
1021
|
+
throw err;
|
|
1022
|
+
}).then(resp => {
|
|
1023
|
+
return resp.body
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
console.log(duplicatedCampaign);
|
|
1027
|
+
|
|
1028
|
+
// Update static voucher campaign
|
|
1029
|
+
campaign = await client.updateStaticVoucherCampaign(campaign.id, {
|
|
1030
|
+
...params,
|
|
1031
|
+
title: `${params.title} Updated`
|
|
1032
|
+
}, constants.headers)
|
|
1033
|
+
.catch(err => {
|
|
1034
|
+
throw err;
|
|
1035
|
+
}).then(resp => {
|
|
1036
|
+
return resp.body
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
console.log(campaign);
|
|
1040
|
+
|
|
1041
|
+
// Create static voucher campaign with voucher
|
|
1042
|
+
let campaignWithVoucher = await client.createStaticVoucherCampaignWithVoucher({
|
|
1043
|
+
...params,
|
|
1044
|
+
cellPhone: "+1809898787",
|
|
1045
|
+
memberID: "MEM0091",
|
|
1046
|
+
offerAmountCents: 1000
|
|
1047
|
+
}, constants.headers)
|
|
1048
|
+
.catch(err => {
|
|
1049
|
+
throw err;
|
|
1050
|
+
}).then(resp => {
|
|
1051
|
+
return resp.body
|
|
1052
|
+
});
|
|
1053
|
+
|
|
1054
|
+
console.log(campaignWithVoucher);
|
|
1055
|
+
|
|
1056
|
+
allVouchers = await client.fetchStaticVouchers(campaignWithVoucher.id, constants.headers)
|
|
1057
|
+
.catch(err => {
|
|
1058
|
+
throw err;
|
|
1059
|
+
}).then(resp => {
|
|
1060
|
+
return resp.body
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
// Update static voucher campaign
|
|
1064
|
+
campaignWithVoucher = await client.updateStaticVoucherCampaignWithVoucher(campaignWithVoucher.id, {
|
|
1065
|
+
...params,
|
|
1066
|
+
offerAmountCents: 2000,
|
|
1067
|
+
voucherID: allVouchers[0].id
|
|
1068
|
+
}, constants.headers)
|
|
1069
|
+
.catch(err => {
|
|
1070
|
+
throw err;
|
|
1071
|
+
}).then(resp => {
|
|
1072
|
+
return resp.body
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
console.log(campaignWithVoucher);
|
|
1076
|
+
}
|
|
1077
|
+
```
|
|
1078
|
+
|
|
1079
|
+
### Create and manipulate Static Vouchers
|
|
1080
|
+
|
|
1081
|
+
```nodejs
|
|
1082
|
+
import * as api from "wallet";
|
|
1083
|
+
import * as constants from "./constants";
|
|
1084
|
+
|
|
1085
|
+
staticVouchers();
|
|
1086
|
+
|
|
1087
|
+
async function staticVouchers() {
|
|
1088
|
+
let client = new api.StaticVouchersApi(constants.domain);
|
|
1089
|
+
|
|
1090
|
+
let params: api.WTStaticVoucherCreateParams = {
|
|
1091
|
+
offerAmountCents: 1000, // In cents
|
|
1092
|
+
memberID: "MEM0090",
|
|
1093
|
+
cellPhone: "+1809898787",
|
|
1094
|
+
campaignID: "",
|
|
1095
|
+
}
|
|
1096
|
+
// Create a new static voucher
|
|
1097
|
+
let voucher = await client.createStaticVoucher(params, constants.headers).catch(err => {
|
|
1098
|
+
throw err;
|
|
1099
|
+
}).then(resp => {
|
|
1100
|
+
return resp.body
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
// The static voucher that has just been created
|
|
1104
|
+
console.log(voucher);
|
|
1105
|
+
|
|
1106
|
+
// Fetch the static voucher that has just been created
|
|
1107
|
+
voucher = (await client.fetchStaticVoucher(voucher.id, constants.headers)).body;
|
|
1108
|
+
console.log(voucher);
|
|
1109
|
+
|
|
1110
|
+
// Update the static voucher with a new maxUses count
|
|
1111
|
+
voucher = await client.updateStaticVoucher(voucher.id, {
|
|
1112
|
+
...params,
|
|
1113
|
+
offerAmountCents: 2000 // In cents
|
|
1114
|
+
}, constants.headers).catch(err => {
|
|
1115
|
+
throw err;
|
|
1116
|
+
}).then(resp => {
|
|
1117
|
+
return resp.body
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
// Archive the static voucher
|
|
1121
|
+
await client.deleteStaticVoucher(voucher.id, constants.headers)
|
|
1122
|
+
.catch(err => {
|
|
1123
|
+
throw err;
|
|
1124
|
+
}).then(resp => {
|
|
1125
|
+
return resp.body
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
// Fetch reach stats of individual static voucher
|
|
1130
|
+
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualStaticVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
1131
|
+
.catch(err => {
|
|
1132
|
+
throw err;
|
|
1133
|
+
}).then(resp => {
|
|
1134
|
+
return resp.body;
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
console.log(individualVoucherReachStats);
|
|
1138
|
+
|
|
1139
|
+
// Fetch reach stats of all the static vouchers
|
|
1140
|
+
let allVouchersReachStats = await client.fetchReachStatsOfAllStaticVouchers(undefined, undefined, constants.headers)
|
|
1141
|
+
.catch(err => {
|
|
1142
|
+
throw err;
|
|
1143
|
+
}).then(resp => {
|
|
1144
|
+
return resp.body;
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
console.log(allVouchersReachStats);
|
|
1148
|
+
}
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
### Create and manipulate SMSes
|
|
1152
|
+
|
|
1153
|
+
```nodejs
|
|
1154
|
+
import * as api from "wallet";
|
|
1155
|
+
import * as constants from "./constants";
|
|
1156
|
+
|
|
1157
|
+
smsExample();
|
|
1158
|
+
|
|
1159
|
+
async function smsExample() {
|
|
1160
|
+
let client = new api.SMSApi(constants.domain);
|
|
1161
|
+
|
|
1162
|
+
// Acquire phone number
|
|
1163
|
+
let phoneNumber: api.PhoneNumber = await client.acquirePhoneNumber({
|
|
1164
|
+
phoneNumber: "+1807675656"
|
|
1165
|
+
}, constants.headers)
|
|
1166
|
+
.catch(err => {
|
|
1167
|
+
throw err;
|
|
1168
|
+
}).then(resp => {
|
|
1169
|
+
return resp.body;
|
|
1170
|
+
});
|
|
1171
|
+
|
|
1172
|
+
console.log(phoneNumber);
|
|
1173
|
+
|
|
1174
|
+
// Send phone number for verification
|
|
1175
|
+
await client.sendPhoneNumberForVerification(phoneNumber.id, {
|
|
1176
|
+
helpDeskQueueResponse: "HELPME",
|
|
1177
|
+
helpDeskKeyword: "HELP12",
|
|
1178
|
+
helpResponse: "Hello, we're here to help.",
|
|
1179
|
+
stopResponse: "We're sad to see you go",
|
|
1180
|
+
messageFooter: "Subscribe for more info!",
|
|
1181
|
+
termsOfServiceURL: "https://example.com/terms-of-service",
|
|
1182
|
+
privacyPolicyURL: "https://example.com/privacy-policy",
|
|
1183
|
+
companyName: "Fictitious Corporation"
|
|
1184
|
+
}, constants.headers)
|
|
1185
|
+
.catch(err => {
|
|
1186
|
+
throw err;
|
|
1187
|
+
}).then(resp => {
|
|
1188
|
+
return resp.body;
|
|
1189
|
+
});
|
|
1190
|
+
|
|
1191
|
+
// Archive phone number
|
|
1192
|
+
phoneNumber = await client.archivePhoneNumber(phoneNumber.id, constants.headers)
|
|
1193
|
+
.catch(err => {
|
|
1194
|
+
throw err;
|
|
1195
|
+
}).then(resp => {
|
|
1196
|
+
return resp.body;
|
|
1197
|
+
});
|
|
1198
|
+
|
|
1199
|
+
console.log(phoneNumber.isActive); // This will be false
|
|
1200
|
+
|
|
1201
|
+
// Restore phone number
|
|
1202
|
+
phoneNumber = await client.restorePhoneNumber(phoneNumber.id, constants.headers)
|
|
1203
|
+
.catch(err => {
|
|
1204
|
+
throw err;
|
|
1205
|
+
}).then(resp => {
|
|
1206
|
+
return resp.body;
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1209
|
+
console.log(phoneNumber.isActive); // This will be true
|
|
1210
|
+
|
|
1211
|
+
// Create SMS agreement
|
|
1212
|
+
let agreement = await client.createSMSAgreement({
|
|
1213
|
+
isShortCodeTimelineUnderstood: true,
|
|
1214
|
+
isPricingUnderstood: true,
|
|
1215
|
+
isShortCodeTransferUnderstood: true,
|
|
1216
|
+
isOptInOutUnderstood: true,
|
|
1217
|
+
isShortCodeUnderstood: true,
|
|
1218
|
+
isStandardsUnderstood: true,
|
|
1219
|
+
isCtiaShortCodeRead: true,
|
|
1220
|
+
isManualRead: true,
|
|
1221
|
+
isStopUnderstood: true,
|
|
1222
|
+
isTosOnWebsite: true,
|
|
1223
|
+
isPrivacyPolicyOnWebsite: true,
|
|
1224
|
+
isTwilioTermsRead: true,
|
|
1225
|
+
}, constants.headers)
|
|
1226
|
+
.catch(err => {
|
|
1227
|
+
throw err;
|
|
1228
|
+
}).then(resp => {
|
|
1229
|
+
return resp.body;
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
console.log(agreement);
|
|
1233
|
+
|
|
1234
|
+
// Fetch the agreement
|
|
1235
|
+
agreement = await client.fetchSMSAgreement(constants.headers)
|
|
1236
|
+
.catch(err => {
|
|
1237
|
+
throw err;
|
|
1238
|
+
}).then(resp => {
|
|
1239
|
+
return resp.body;
|
|
1240
|
+
});
|
|
1241
|
+
|
|
1242
|
+
console.log(agreement);
|
|
1243
|
+
|
|
1244
|
+
// Create imported list
|
|
1245
|
+
let importedList = await client.createImportedList({
|
|
1246
|
+
listName: "Imported List",
|
|
1247
|
+
isActive: true,
|
|
1248
|
+
phoneNumberID: phoneNumber.id
|
|
1249
|
+
}, constants.headers)
|
|
1250
|
+
.catch(err => {
|
|
1251
|
+
throw err;
|
|
1252
|
+
}).then(resp => {
|
|
1253
|
+
return resp.body;
|
|
1254
|
+
});
|
|
1255
|
+
|
|
1256
|
+
console.log(importedList);
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
// Create recipient in imported list
|
|
1260
|
+
let recipient = await client.createRecipientInImportedList({
|
|
1261
|
+
importedListID: importedList.id,
|
|
1262
|
+
mobilePhoneNumber: "+1805654545"
|
|
1263
|
+
}, constants.headers)
|
|
1264
|
+
.catch(err => {
|
|
1265
|
+
throw err;
|
|
1266
|
+
}).then(resp => {
|
|
1267
|
+
return resp.body;
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
console.log(recipient);
|
|
1271
|
+
|
|
1272
|
+
// Count recipients in imported list
|
|
1273
|
+
let { count } = await client.countImportedListRecipients(importedList.id, false, undefined, undefined, constants.headers)
|
|
1274
|
+
.catch(err => {
|
|
1275
|
+
throw err;
|
|
1276
|
+
}).then(resp => {
|
|
1277
|
+
return resp.body;
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
console.log(count);
|
|
1281
|
+
|
|
1282
|
+
// Fetch recipients
|
|
1283
|
+
let importedListRecipients = await client.fetchImportedListRecipients(importedList.id, constants.headers)
|
|
1284
|
+
.catch(err => {
|
|
1285
|
+
throw err;
|
|
1286
|
+
}).then(resp => {
|
|
1287
|
+
return resp.body;
|
|
1288
|
+
});
|
|
1289
|
+
|
|
1290
|
+
console.log(importedListRecipients);
|
|
1291
|
+
|
|
1292
|
+
// Fetch recipients by page
|
|
1293
|
+
let importedListRecipientByPage = await client.fetchImportedListRecipientsByPage(importedList.id, 10, 1, false, constants.headers)
|
|
1294
|
+
.catch(err => {
|
|
1295
|
+
throw err;
|
|
1296
|
+
}).then(resp => {
|
|
1297
|
+
return resp.body;
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
console.log(`Total: ${importedListRecipientByPage.total}, Length: ${importedListRecipientByPage.length}, List: ${JSON.stringify(importedListRecipientByPage.results)}`);
|
|
1301
|
+
|
|
1302
|
+
// Export recipients
|
|
1303
|
+
await client.exportImportedListRecipients(importedList.id, constants.headers)
|
|
1304
|
+
.catch(err => {
|
|
1305
|
+
throw err;
|
|
1306
|
+
}).then(resp => {
|
|
1307
|
+
return resp.body;
|
|
1308
|
+
});
|
|
1309
|
+
|
|
1310
|
+
// Create opt in list
|
|
1311
|
+
let optInList = await client.createOptInList({
|
|
1312
|
+
isActive: true,
|
|
1313
|
+
listName: "Opt In List",
|
|
1314
|
+
phoneNumberID: phoneNumber.id,
|
|
1315
|
+
estimatedMessagesPerMonth: 250,
|
|
1316
|
+
optInKeyword: "OPTIN",
|
|
1317
|
+
optOutKeyword: "OPTOUT",
|
|
1318
|
+
optInConfirmedResponse: "You've opted in",
|
|
1319
|
+
optOutConfirmedResponse: "You've opted out",
|
|
1320
|
+
optInConfirmedCustomerReceives: "You've opted in",
|
|
1321
|
+
optOutConfirmedCustomerReceives: "You've opted out",
|
|
1322
|
+
isOver21Required: false,
|
|
1323
|
+
}, constants.headers)
|
|
1324
|
+
.catch(err => {
|
|
1325
|
+
throw err;
|
|
1326
|
+
}).then(resp => {
|
|
1327
|
+
return resp.body;
|
|
1328
|
+
});
|
|
1329
|
+
|
|
1330
|
+
console.log(optInList);
|
|
1331
|
+
|
|
1332
|
+
// Count opt in list subscribers
|
|
1333
|
+
count = await client.countOptInListSubscribers(optInList.id, true, false, false, undefined, undefined, constants.headers)
|
|
1334
|
+
.catch(err => {
|
|
1335
|
+
throw err;
|
|
1336
|
+
}).then(resp => {
|
|
1337
|
+
return (resp.body).count;
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
console.log(count);
|
|
1341
|
+
|
|
1342
|
+
// Export opt in list subscribers
|
|
1343
|
+
await client.exportOptInListSubscribers(optInList.id, constants.headers)
|
|
1344
|
+
.catch(err => {
|
|
1345
|
+
throw err;
|
|
1346
|
+
}).then(resp => {
|
|
1347
|
+
return resp.body;
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1350
|
+
// Fetch subscribers
|
|
1351
|
+
let optInListRecipients = await client.fetchOptInListSubscribers(optInList.id, true, false, false, constants.headers)
|
|
1352
|
+
.catch(err => {
|
|
1353
|
+
throw err;
|
|
1354
|
+
}).then(resp => {
|
|
1355
|
+
return resp.body;
|
|
1356
|
+
});
|
|
1357
|
+
|
|
1358
|
+
console.log(optInListRecipients);
|
|
1359
|
+
|
|
1360
|
+
// Fetch subscribers by page
|
|
1361
|
+
let optInListRecipientByPage = await client.fetchOptInListSubscribersByPage(optInList.id, 10, 1, true, false, false, constants.headers)
|
|
1362
|
+
.catch(err => {
|
|
1363
|
+
throw err;
|
|
1364
|
+
}).then(resp => {
|
|
1365
|
+
return resp.body;
|
|
1366
|
+
});
|
|
1367
|
+
|
|
1368
|
+
console.log(`Total: ${optInListRecipientByPage.total}, Length: ${optInListRecipientByPage.length}, List: ${JSON.stringify(optInListRecipientByPage.results)}`);
|
|
1369
|
+
|
|
1370
|
+
// Fetch all opt in lists associated with the given phone number
|
|
1371
|
+
|
|
1372
|
+
let optInListsAssociatedWithPhoneNumber: api.OptInList[] = await client.fetchOptInListsAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1373
|
+
.catch(err => {
|
|
1374
|
+
throw err;
|
|
1375
|
+
}).then(resp => {
|
|
1376
|
+
return resp.body;
|
|
1377
|
+
});
|
|
1378
|
+
|
|
1379
|
+
console.log(optInListsAssociatedWithPhoneNumber);
|
|
1380
|
+
|
|
1381
|
+
// Create opt in source
|
|
1382
|
+
let optInSource = await client.createOptInListSource({
|
|
1383
|
+
sourceName: "Opt In Source",
|
|
1384
|
+
listID: optInList.id,
|
|
1385
|
+
}, constants.headers)
|
|
1386
|
+
.catch(err => {
|
|
1387
|
+
throw err;
|
|
1388
|
+
}).then(resp => {
|
|
1389
|
+
return resp.body;
|
|
1390
|
+
});
|
|
1391
|
+
console.log(optInSource);
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
// Count subscribers in opt in list source
|
|
1395
|
+
count = await client.countOptInSourceSubscribers(optInSource.id, true, false, false, undefined, undefined, constants.headers)
|
|
1396
|
+
.catch(err => {
|
|
1397
|
+
throw err;
|
|
1398
|
+
}).then(resp => {
|
|
1399
|
+
return (resp.body).count;
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
console.log(count);
|
|
1403
|
+
|
|
1404
|
+
let optInSourceSubscribers = await client.fetchOptInSourceSubscribers(optInSource.id, true, false, false, constants.headers)
|
|
1405
|
+
.catch(err => {
|
|
1406
|
+
throw err;
|
|
1407
|
+
}).then(resp => {
|
|
1408
|
+
return resp.body;
|
|
1409
|
+
});
|
|
1410
|
+
|
|
1411
|
+
console.log(optInSourceSubscribers);
|
|
1412
|
+
|
|
1413
|
+
let optInSourcesAssociatedWithPhoneNumber: api.OptInListSource[] = await client.fetchOptInSourcesAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1414
|
+
.catch(err => {
|
|
1415
|
+
throw err;
|
|
1416
|
+
}).then(resp => {
|
|
1417
|
+
return resp.body;
|
|
1418
|
+
});
|
|
1419
|
+
|
|
1420
|
+
console.log(optInSourcesAssociatedWithPhoneNumber);
|
|
1421
|
+
|
|
1422
|
+
// Fetch all outbound SMSes
|
|
1423
|
+
let outboundSMSes: api.OutboundSMS[] = await client.fetchOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1424
|
+
.catch(err => {
|
|
1425
|
+
throw err;
|
|
1426
|
+
}).then(resp => {
|
|
1427
|
+
return resp.body;
|
|
1428
|
+
});
|
|
1429
|
+
console.log(outboundSMSes);
|
|
1430
|
+
|
|
1431
|
+
// Fetch outbound SMSes by page
|
|
1432
|
+
let outboundSMSesByPage = await client.fetchOutboundSMSByPage(phoneNumber.id, undefined, undefined, 10, 1, constants.headers)
|
|
1433
|
+
.catch(err => {
|
|
1434
|
+
throw err;
|
|
1435
|
+
}).then(resp => {
|
|
1436
|
+
return resp.body;
|
|
1437
|
+
});
|
|
1438
|
+
console.log(`Total: ${outboundSMSesByPage.total}, Length: ${outboundSMSesByPage.length}, Messages: ${JSON.stringify(outboundSMSesByPage.results)}`);
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
// Count outbound SMSes
|
|
1442
|
+
let outboundSMSesCount = await client.countOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1443
|
+
.catch(err => {
|
|
1444
|
+
throw err;
|
|
1445
|
+
}).then(resp => {
|
|
1446
|
+
return (resp.body).count;
|
|
1447
|
+
});
|
|
1448
|
+
console.log(outboundSMSesCount);
|
|
1449
|
+
|
|
1450
|
+
// Retrieve message limits
|
|
1451
|
+
let limits = await client.retrieveSentAndMaxCountOfMessages(constants.headers)
|
|
1452
|
+
.catch(err => {
|
|
1453
|
+
throw err;
|
|
1454
|
+
}).then(resp => {
|
|
1455
|
+
return resp.body;
|
|
1456
|
+
});
|
|
1457
|
+
console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
|
|
625
1458
|
}
|
|
626
1459
|
```
|
|
627
1460
|
|