wallet 2.1.603 → 2.2.7
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/LICENSE +201 -201
- package/NOTICE +14 -0
- package/README.md +1551 -1530
- package/dist/api/aPIKeysApi.d.ts +70 -70
- package/dist/api/aPIKeysApi.js +379 -379
- package/dist/api/amenitiesApi.d.ts +69 -69
- package/dist/api/amenitiesApi.js +379 -379
- package/dist/api/apis.d.ts +126 -116
- package/dist/api/apis.js +144 -134
- package/dist/api/apis.js.map +1 -1
- package/dist/api/appToPersonA2PRegistrationApi.d.ts +60 -60
- package/dist/api/appToPersonA2PRegistrationApi.js +311 -311
- package/dist/api/appleWalletSubscribersApi.d.ts +42 -42
- package/dist/api/appleWalletSubscribersApi.js +195 -195
- package/dist/api/authenticationApi.d.ts +63 -63
- package/dist/api/authenticationApi.js +311 -311
- package/dist/api/billingPaymentsApi.d.ts +160 -152
- package/dist/api/billingPaymentsApi.js +1009 -952
- package/dist/api/billingPaymentsApi.js.map +1 -1
- package/dist/api/broadcastsApi.d.ts +129 -0
- package/dist/api/broadcastsApi.js +816 -0
- package/dist/api/broadcastsApi.js.map +1 -0
- package/dist/api/clubMembersApi.d.ts +116 -116
- package/dist/api/clubMembersApi.js +681 -681
- package/dist/api/countriesApi.d.ts +35 -35
- package/dist/api/countriesApi.js +128 -128
- package/dist/api/customerApi.d.ts +102 -102
- package/dist/api/customerApi.js +632 -632
- package/dist/api/diningApi.d.ts +69 -69
- package/dist/api/diningApi.js +379 -379
- package/dist/api/dynamicVouchersApi.d.ts +112 -104
- package/dist/api/dynamicVouchersApi.js +691 -631
- package/dist/api/dynamicVouchersApi.js.map +1 -1
- package/dist/api/emailSubscribersApi.d.ts +69 -69
- package/dist/api/emailSubscribersApi.js +385 -385
- package/dist/api/employeesApi.d.ts +155 -399
- package/dist/api/employeesApi.js +974 -2679
- package/dist/api/employeesApi.js.map +1 -1
- package/dist/api/filesDocumentsApi.d.ts +114 -0
- package/dist/api/filesDocumentsApi.js +680 -0
- package/dist/api/filesDocumentsApi.js.map +1 -0
- package/dist/api/galleryApi.d.ts +69 -69
- package/dist/api/galleryApi.js +379 -379
- package/dist/api/gamingApi.d.ts +69 -69
- package/dist/api/gamingApi.js +379 -379
- package/dist/api/helpDeskApi.d.ts +53 -0
- package/dist/api/helpDeskApi.js +258 -0
- package/dist/api/helpDeskApi.js.map +1 -0
- package/dist/api/importExportApi.d.ts +84 -0
- package/dist/api/importExportApi.js +487 -0
- package/dist/api/importExportApi.js.map +1 -0
- package/dist/api/importedListsApi.d.ts +138 -0
- package/dist/api/importedListsApi.js +890 -0
- package/dist/api/importedListsApi.js.map +1 -0
- package/dist/api/industriesApi.d.ts +52 -52
- package/dist/api/industriesApi.js +242 -242
- package/dist/api/infoGenesisReportsApi.d.ts +250 -250
- package/dist/api/infoGenesisReportsApi.js +1742 -1742
- package/dist/api/interactionsApi.d.ts +194 -194
- package/dist/api/interactionsApi.js +1263 -1263
- package/dist/api/loungeApi.d.ts +69 -69
- package/dist/api/loungeApi.js +379 -379
- package/dist/api/membershipTiersApi.d.ts +105 -105
- package/dist/api/membershipTiersApi.js +622 -622
- package/dist/api/merchantApi.d.ts +93 -258
- package/dist/api/merchantApi.js +539 -1744
- package/dist/api/merchantApi.js.map +1 -1
- package/dist/api/merchantCreditsApi.d.ts +116 -116
- package/dist/api/merchantCreditsApi.js +681 -681
- package/dist/api/newsApi.d.ts +69 -69
- package/dist/api/newsApi.js +379 -379
- package/dist/api/openAIApi.d.ts +193 -193
- package/dist/api/openAIApi.js +1245 -1245
- package/dist/api/{dashboardSummariesApi.d.ts → optInListsApi.d.ts} +178 -171
- package/dist/api/{dashboardSummariesApi.js → optInListsApi.js} +1239 -1311
- package/dist/api/optInListsApi.js.map +1 -0
- package/dist/api/paymentDesignsApi.d.ts +77 -77
- package/dist/api/paymentDesignsApi.js +440 -440
- package/dist/api/performancesApi.d.ts +140 -140
- package/dist/api/performancesApi.js +905 -905
- package/dist/api/phoneNumbersApi.d.ts +110 -0
- package/dist/api/phoneNumbersApi.js +684 -0
- package/dist/api/phoneNumbersApi.js.map +1 -0
- package/dist/api/pointOfSaleConfigurationApi.d.ts +69 -69
- package/dist/api/pointOfSaleConfigurationApi.js +379 -379
- package/dist/api/prizesApi.d.ts +86 -86
- package/dist/api/prizesApi.js +501 -501
- package/dist/api/productsApi.d.ts +69 -69
- package/dist/api/productsApi.js +379 -379
- package/dist/api/promotionCodesApi.d.ts +69 -69
- package/dist/api/promotionCodesApi.js +379 -379
- package/dist/api/qRCodeDesignsApi.d.ts +78 -78
- package/dist/api/qRCodeDesignsApi.js +440 -440
- package/dist/api/quickLinksApi.d.ts +78 -78
- package/dist/api/quickLinksApi.js +440 -440
- package/dist/api/quickLinksSectionApi.d.ts +69 -69
- package/dist/api/quickLinksSectionApi.js +379 -379
- package/dist/api/roomRatesApi.d.ts +69 -69
- package/dist/api/roomRatesApi.js +379 -379
- package/dist/api/sMSMessagesApi.d.ts +112 -0
- package/dist/api/sMSMessagesApi.js +774 -0
- package/dist/api/sMSMessagesApi.js.map +1 -0
- package/dist/api/sMSSubscribersApi.d.ts +69 -69
- package/dist/api/sMSSubscribersApi.js +385 -385
- package/dist/api/servicesApi.d.ts +69 -69
- package/dist/api/servicesApi.js +379 -379
- package/dist/api/shopifyTerminalApi.d.ts +51 -51
- package/dist/api/shopifyTerminalApi.js +258 -258
- package/dist/api/shortLinksApi.d.ts +86 -86
- package/dist/api/shortLinksApi.js +501 -501
- package/dist/api/staticVoucherCampaignsApi.d.ts +200 -200
- package/dist/api/staticVoucherCampaignsApi.js +1325 -1325
- package/dist/api/staticVouchersApi.d.ts +78 -78
- package/dist/api/staticVouchersApi.js +449 -449
- package/dist/api/systemApi.d.ts +88 -96
- package/dist/api/systemApi.js +510 -567
- package/dist/api/systemApi.js.map +1 -1
- package/dist/api/ticketsApi.d.ts +70 -70
- package/dist/api/ticketsApi.js +380 -380
- package/dist/api/videosApi.d.ts +79 -69
- package/dist/api/videosApi.js +440 -379
- package/dist/api/videosApi.js.map +1 -1
- package/dist/api/virtualBusinessCardApi.d.ts +86 -86
- package/dist/api/virtualBusinessCardApi.js +501 -501
- package/dist/api/walletConfigurationApi.d.ts +53 -53
- package/dist/api/walletConfigurationApi.js +253 -253
- package/dist/api/walletMobileTerminalApi.d.ts +52 -52
- package/dist/api/walletMobileTerminalApi.js +258 -258
- package/dist/api/walletTransactionLedgerApi.d.ts +36 -36
- package/dist/api/walletTransactionLedgerApi.js +155 -155
- package/dist/api/walletWebTerminalApi.d.ts +51 -51
- package/dist/api/walletWebTerminalApi.js +258 -258
- package/dist/api/wixTerminalApi.d.ts +51 -51
- package/dist/api/wixTerminalApi.js +258 -258
- package/dist/api/wooCommerceTerminalApi.d.ts +51 -51
- package/dist/api/wooCommerceTerminalApi.js +258 -258
- package/dist/api.d.ts +2 -2
- package/dist/api.js +18 -18
- package/dist/model/a2PApplicationSubmission.d.ts +53 -53
- package/dist/model/a2PApplicationSubmission.js +192 -192
- package/dist/model/advertisementCredit.d.ts +24 -24
- package/dist/model/advertisementCredit.js +77 -77
- package/dist/model/advertisementCreditBroadcast.d.ts +37 -37
- package/dist/model/advertisementCreditBroadcast.js +117 -117
- package/dist/model/advertisementCreditScan.d.ts +36 -36
- package/dist/model/advertisementCreditScan.js +127 -127
- package/dist/model/amenity.d.ts +21 -21
- package/dist/model/amenity.js +67 -67
- package/dist/model/amenityId.d.ts +13 -13
- package/dist/model/amenityId.js +11 -11
- package/dist/model/announcement.d.ts +16 -16
- package/dist/model/announcement.js +47 -47
- package/dist/model/applicableTerminals.d.ts +13 -13
- package/dist/model/applicableTerminals.js +11 -11
- package/dist/model/assistant.d.ts +25 -25
- package/dist/model/assistant.js +87 -87
- package/dist/model/authError.d.ts +14 -14
- package/dist/model/authError.js +37 -37
- package/dist/model/availablePhoneNumbersRequest.d.ts +11 -11
- package/dist/model/availablePhoneNumbersRequest.js +22 -22
- package/dist/model/browserDetails.d.ts +14 -14
- package/dist/model/browserDetails.js +37 -37
- package/dist/model/businessClassification.d.ts +6 -6
- package/dist/model/businessClassification.js +10 -10
- package/dist/model/businessIndustry.d.ts +35 -35
- package/dist/model/businessIndustry.js +39 -39
- package/dist/model/businessRegionsOfOperation.d.ts +8 -8
- package/dist/model/businessRegionsOfOperation.js +12 -12
- package/dist/model/businessRegistrationIdentifier.d.ts +12 -12
- package/dist/model/businessRegistrationIdentifier.js +16 -16
- package/dist/model/businessStockExchanges.d.ts +29 -29
- package/dist/model/businessStockExchanges.js +33 -33
- package/dist/model/businessType.d.ts +8 -8
- package/dist/model/businessType.js +12 -12
- package/dist/model/chatCompletionAudio.d.ts +13 -13
- package/dist/model/chatCompletionAudio.js +32 -32
- package/dist/model/chatCompletionMessage.d.ts +22 -22
- package/dist/model/chatCompletionMessage.js +48 -48
- package/dist/model/chatCompletionMessageAudio.d.ts +17 -17
- package/dist/model/chatCompletionMessageAudio.js +32 -32
- package/dist/model/chatCompletionMessageFunctionCall.d.ts +15 -15
- package/dist/model/chatCompletionMessageFunctionCall.js +22 -22
- package/dist/model/chatCompletionMessageToolCall.d.ts +18 -18
- package/dist/model/chatCompletionMessageToolCall.js +33 -33
- package/dist/model/chatCompletionMessageToolCallFunction.d.ts +11 -11
- package/dist/model/chatCompletionMessageToolCallFunction.js +22 -22
- package/dist/model/claimTicketRequest.d.ts +14 -14
- package/dist/model/claimTicketRequest.js +17 -17
- package/dist/model/clickFunnelAmount.d.ts +11 -11
- package/dist/model/clickFunnelAmount.js +22 -22
- package/dist/model/clickFunnelContact.d.ts +53 -53
- package/dist/model/clickFunnelContact.js +227 -227
- package/dist/model/clickFunnelContactProfile.d.ts +44 -44
- package/dist/model/clickFunnelContactProfile.js +187 -187
- package/dist/model/clickFunnelEvent.d.ts +12 -12
- package/dist/model/clickFunnelEvent.js +22 -22
- package/dist/model/clickFunnelOriginalAmount.d.ts +11 -11
- package/dist/model/clickFunnelOriginalAmount.js +22 -22
- package/dist/model/clickFunnelProduct.d.ts +38 -38
- package/dist/model/clickFunnelProduct.js +152 -152
- package/dist/model/clickFunnelPurchase.d.ts +38 -38
- package/dist/model/clickFunnelPurchase.js +137 -137
- package/dist/model/clickFunnelRegistration.d.ts +12 -12
- package/dist/model/clickFunnelRegistration.js +22 -22
- package/dist/model/countClaimedComps200Response.d.ts +15 -15
- package/dist/model/countClaimedComps200Response.js +22 -22
- package/dist/model/createFile200Response.d.ts +16 -16
- package/dist/model/createFile200Response.js +27 -27
- package/dist/model/createRunOnThreadRequest.d.ts +15 -15
- package/dist/model/createRunOnThreadRequest.js +22 -22
- package/dist/model/createStaticVoucherCampaign.d.ts +23 -23
- package/dist/model/createStaticVoucherCampaign.js +77 -77
- package/dist/model/createStaticVoucherCampaignWithVoucherWithCSV.d.ts +23 -23
- package/dist/model/createStaticVoucherCampaignWithVoucherWithCSV.js +77 -77
- package/dist/model/dashboardWidget.d.ts +25 -25
- package/dist/model/dashboardWidget.js +92 -92
- package/dist/model/dining.d.ts +21 -21
- package/dist/model/dining.js +67 -67
- package/dist/model/document.d.ts +19 -19
- package/dist/model/document.js +62 -62
- package/dist/model/duplicateRowFound.d.ts +14 -14
- package/dist/model/duplicateRowFound.js +37 -37
- package/dist/model/dynamicVoucher.d.ts +46 -46
- package/dist/model/dynamicVoucher.js +177 -177
- package/dist/model/dynamicVoucherBroadcast.d.ts +37 -37
- package/dist/model/dynamicVoucherBroadcast.js +117 -117
- package/dist/model/dynamicVoucherBroadcastListType.d.ts +13 -13
- package/dist/model/dynamicVoucherBroadcastListType.js +11 -11
- package/dist/model/dynamicVoucherTemporalDecreaseFrequencyType.d.ts +13 -13
- package/dist/model/dynamicVoucherTemporalDecreaseFrequencyType.js +11 -11
- package/dist/model/emailSubscriber.d.ts +18 -18
- package/dist/model/emailSubscriber.js +52 -52
- package/dist/model/employee.d.ts +43 -43
- package/dist/model/employee.js +162 -162
- package/dist/model/employeeAPIKey.d.ts +19 -19
- package/dist/model/employeeAPIKey.js +57 -57
- package/dist/model/employeeActivityLog.d.ts +16 -16
- package/dist/model/employeeActivityLog.js +47 -47
- package/dist/model/employeeAlert.d.ts +19 -19
- package/dist/model/employeeAlert.js +62 -62
- package/dist/model/employeeScheduleStartDay.d.ts +13 -13
- package/dist/model/employeeScheduleStartDay.js +11 -11
- package/dist/model/employeeScheduleStartHour.d.ts +13 -13
- package/dist/model/employeeScheduleStartHour.js +11 -11
- package/dist/model/employeeScheduleStartMeridiem.d.ts +13 -13
- package/dist/model/employeeScheduleStartMeridiem.js +11 -11
- package/dist/model/employeeScheduleStartMinute.d.ts +13 -13
- package/dist/model/employeeScheduleStartMinute.js +11 -11
- package/dist/model/entityTooLarge.d.ts +14 -14
- package/dist/model/entityTooLarge.js +37 -37
- package/dist/model/exportDataFile.d.ts +19 -19
- package/dist/model/exportDataFile.js +62 -62
- package/dist/model/falsumError.d.ts +11 -11
- package/dist/model/falsumError.js +22 -22
- package/dist/model/falsumField.d.ts +12 -12
- package/dist/model/falsumField.js +27 -27
- package/dist/model/feature.d.ts +18 -18
- package/dist/model/feature.js +57 -57
- package/dist/model/fetchAdvertisementCreditScansFromListRequest.d.ts +14 -14
- package/dist/model/fetchAdvertisementCreditScansFromListRequest.js +17 -17
- package/dist/model/fetchAllCountries200ResponseInner.d.ts +17 -17
- package/dist/model/fetchAllCountries200ResponseInner.js +32 -32
- package/dist/model/fetchAllLedgerTransactions200Response.d.ts +17 -17
- package/dist/model/fetchAllLedgerTransactions200Response.js +27 -27
- package/dist/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInner.d.ts +28 -28
- package/dist/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInner.js +77 -77
- package/dist/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInnerValueType.d.ts +13 -13
- package/dist/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInnerValueType.js +11 -11
- package/dist/model/fetchCustomerTicketsWithTokenRequest.d.ts +15 -15
- package/dist/model/fetchCustomerTicketsWithTokenRequest.js +22 -22
- package/dist/model/fetchDomainsByIndustry200Response.d.ts +20 -20
- package/dist/model/fetchDomainsByIndustry200Response.js +47 -47
- package/dist/model/fetchImportedListRecipientsByPage200Response.d.ts +17 -17
- package/dist/model/fetchImportedListRecipientsByPage200Response.js +27 -27
- package/dist/model/fetchInboundSMSByPage200Response.d.ts +17 -17
- package/dist/model/fetchInboundSMSByPage200Response.js +27 -27
- package/dist/model/fetchIndustry200Response.d.ts +19 -19
- package/dist/model/fetchIndustry200Response.js +37 -37
- package/dist/model/fetchMembersCount200Response.d.ts +14 -14
- package/dist/model/fetchMembersCount200Response.js +17 -17
- package/dist/model/fetchOptInListSubscribersByPage200Response.d.ts +17 -17
- package/dist/model/fetchOptInListSubscribersByPage200Response.js +27 -27
- package/dist/model/fetchOutboundSMSByPage200Response.d.ts +17 -17
- package/dist/model/fetchOutboundSMSByPage200Response.js +27 -27
- package/dist/model/fetchPerformanceTicketsPage200Response.d.ts +16 -16
- package/dist/model/fetchPerformanceTicketsPage200Response.js +22 -22
- package/dist/model/fetchStaticVouchersPage200Response.d.ts +16 -16
- package/dist/model/fetchStaticVouchersPage200Response.js +22 -22
- package/dist/model/forbiddenRequest.d.ts +14 -14
- package/dist/model/forbiddenRequest.js +37 -37
- package/dist/model/foreignKeyDoesNotExist.d.ts +14 -14
- package/dist/model/foreignKeyDoesNotExist.js +37 -37
- package/dist/model/gaming.d.ts +21 -21
- package/dist/model/gaming.js +67 -67
- package/dist/model/helpDeskRequest.d.ts +20 -20
- package/dist/model/helpDeskRequest.js +62 -62
- package/dist/model/imageGrid.d.ts +20 -20
- package/dist/model/imageGrid.js +62 -62
- package/dist/model/importTicketsRequest.d.ts +15 -15
- package/dist/model/importTicketsRequest.js +17 -17
- package/dist/model/importedList.d.ts +18 -18
- package/dist/model/importedList.js +52 -52
- package/dist/model/importedListRecipient.d.ts +18 -18
- package/dist/model/importedListRecipient.js +52 -52
- package/dist/model/inboundSMS.d.ts +46 -46
- package/dist/model/inboundSMS.js +192 -192
- package/dist/model/internalServerError500.d.ts +14 -14
- package/dist/model/internalServerError500.js +37 -37
- package/dist/model/jobPosition.d.ts +9 -9
- package/dist/model/jobPosition.js +13 -13
- package/dist/model/ledgerEntry.d.ts +38 -38
- package/dist/model/ledgerEntry.js +137 -137
- package/dist/model/ledgerEntryParentObjectID.d.ts +13 -13
- package/dist/model/ledgerEntryParentObjectID.js +11 -11
- package/dist/model/ledgerEntryTransactionType.d.ts +13 -13
- package/dist/model/ledgerEntryTransactionType.js +11 -11
- package/dist/model/linkBook.d.ts +21 -21
- package/dist/model/linkBook.js +62 -62
- package/dist/model/linkBookSection.d.ts +17 -17
- package/dist/model/linkBookSection.js +47 -47
- package/dist/model/loginStatus200Response.d.ts +21 -21
- package/dist/model/loginStatus200Response.js +33 -33
- package/dist/model/loginStatus200ResponseAnyOf.d.ts +15 -15
- package/dist/model/loginStatus200ResponseAnyOf.js +22 -22
- package/dist/model/lounge.d.ts +21 -21
- package/dist/model/lounge.js +67 -67
- package/dist/model/mSAnalyticsMemberCountPartitionedByDate.d.ts +11 -11
- package/dist/model/mSAnalyticsMemberCountPartitionedByDate.js +22 -22
- package/dist/model/mSAnalyticsMemberPointsRedeemedPartitionedByDate.d.ts +11 -11
- package/dist/model/mSAnalyticsMemberPointsRedeemedPartitionedByDate.js +22 -22
- package/dist/model/mSAnalyticsMemberPointsRefundedPartitionedByDate.d.ts +11 -11
- package/dist/model/mSAnalyticsMemberPointsRefundedPartitionedByDate.js +22 -22
- package/dist/model/mSAnalyticsMembershipTierAmountRedeemedPartitionedByDate.d.ts +11 -11
- package/dist/model/mSAnalyticsMembershipTierAmountRedeemedPartitionedByDate.js +22 -22
- package/dist/model/mSAnalyticsMembershipTierAmountRefundedPartitionedByDate.d.ts +11 -11
- package/dist/model/mSAnalyticsMembershipTierAmountRefundedPartitionedByDate.js +22 -22
- package/dist/model/mSMemberHistory.d.ts +22 -22
- package/dist/model/mSMemberHistory.js +77 -77
- package/dist/model/mSMemberHistoryPagination.d.ts +12 -12
- package/dist/model/mSMemberHistoryPagination.js +27 -27
- package/dist/model/mSMemberRedemption.d.ts +21 -21
- package/dist/model/mSMemberRedemption.js +62 -62
- package/dist/model/mSMemberRedemptionPagination.d.ts +12 -12
- package/dist/model/mSMemberRedemptionPagination.js +27 -27
- package/dist/model/mSMemberRedemptionRegisterID.d.ts +13 -13
- package/dist/model/mSMemberRedemptionRegisterID.js +11 -11
- package/dist/model/mSMemberRedemptionTransactionType.d.ts +13 -13
- package/dist/model/mSMemberRedemptionTransactionType.js +11 -11
- package/dist/model/mSMembershipTierHistory.d.ts +19 -19
- package/dist/model/mSMembershipTierHistory.js +62 -62
- package/dist/model/mSMembershipTierHistoryPagination.d.ts +12 -12
- package/dist/model/mSMembershipTierHistoryPagination.js +27 -27
- package/dist/model/mSMembershipTierRedemption.d.ts +22 -22
- package/dist/model/mSMembershipTierRedemption.js +67 -67
- package/dist/model/mSMembershipTierRedemptionPagination.d.ts +12 -12
- package/dist/model/mSMembershipTierRedemptionPagination.js +27 -27
- package/dist/model/mSMerchantCreditHistory.d.ts +17 -17
- package/dist/model/mSMerchantCreditHistory.js +52 -52
- package/dist/model/mSMerchantCreditHistoryPagination.d.ts +12 -12
- package/dist/model/mSMerchantCreditHistoryPagination.js +27 -27
- package/dist/model/mSMerchantCreditRedemption.d.ts +21 -21
- package/dist/model/mSMerchantCreditRedemption.js +62 -62
- package/dist/model/mSMerchantCreditRedemptionPagination.d.ts +12 -12
- package/dist/model/mSMerchantCreditRedemptionPagination.js +27 -27
- package/dist/model/mediaFile.d.ts +19 -19
- package/dist/model/mediaFile.js +62 -62
- package/dist/model/member.d.ts +23 -23
- package/dist/model/member.js +82 -82
- package/dist/model/memberSearch.d.ts +19 -19
- package/dist/model/memberSearch.js +47 -47
- package/dist/model/memberSearchSearchKey.d.ts +13 -13
- package/dist/model/memberSearchSearchKey.js +11 -11
- package/dist/model/memberSearchSortKey.d.ts +13 -13
- package/dist/model/memberSearchSortKey.js +11 -11
- package/dist/model/merchant.d.ts +36 -36
- package/dist/model/merchant.js +147 -147
- package/dist/model/merchantCreditSearch.d.ts +13 -13
- package/dist/model/merchantCreditSearch.js +32 -32
- package/dist/model/merchantNotInitialized.d.ts +14 -14
- package/dist/model/merchantNotInitialized.js +37 -37
- package/dist/model/merchantURL.d.ts +17 -17
- package/dist/model/merchantURL.js +47 -47
- package/dist/model/message.d.ts +18 -18
- package/dist/model/message.js +52 -52
- package/dist/model/models.d.ts +453 -445
- package/dist/model/models.js +1441 -1417
- package/dist/model/models.js.map +1 -1
- package/dist/model/moduleError.d.ts +31 -31
- package/dist/model/moduleError.js +122 -122
- package/dist/model/newsArticle.d.ts +21 -21
- package/dist/model/newsArticle.js +67 -67
- package/dist/model/oAIAssistantUpdateParams.d.ts +18 -18
- package/dist/model/oAIAssistantUpdateParams.js +57 -57
- package/dist/model/oAIAssistantUpdateParamsCreateParams.d.ts +18 -18
- package/dist/model/oAIAssistantUpdateParamsCreateParams.js +57 -57
- package/dist/model/optInList.d.ts +28 -28
- package/dist/model/optInList.js +102 -102
- package/dist/model/optInListSource.d.ts +18 -18
- package/dist/model/optInListSource.js +52 -52
- package/dist/model/optInListSubscriber.d.ts +27 -27
- package/dist/model/optInListSubscriber.js +87 -87
- package/dist/model/optInListSubscriberOptInSourceID.d.ts +13 -13
- package/dist/model/optInListSubscriberOptInSourceID.js +11 -11
- package/dist/model/outboundSMS.d.ts +34 -34
- package/dist/model/outboundSMS.js +122 -122
- package/dist/model/outboundSMSPaymentObjectBroadcastID.d.ts +13 -13
- package/dist/model/outboundSMSPaymentObjectBroadcastID.js +11 -11
- package/dist/model/outboundSMSStatus.d.ts +13 -13
- package/dist/model/outboundSMSStatus.js +11 -11
- package/dist/model/paginatedWTMembers.d.ts +12 -12
- package/dist/model/paginatedWTMembers.js +27 -27
- package/dist/model/paginatedWTMerchantCredits.d.ts +12 -12
- package/dist/model/paginatedWTMerchantCredits.js +27 -27
- package/dist/model/paginationRequestWithIDAndWithoutSortOptions.d.ts +12 -12
- package/dist/model/paginationRequestWithIDAndWithoutSortOptions.js +27 -27
- package/dist/model/paginationRequestWithSortOptions.d.ts +20 -20
- package/dist/model/paginationRequestWithSortOptions.js +43 -43
- package/dist/model/paginationRequestWithSortOptionsSortOrder.d.ts +13 -13
- package/dist/model/paginationRequestWithSortOptionsSortOrder.js +11 -11
- package/dist/model/paymentDesign.d.ts +30 -30
- package/dist/model/paymentDesign.js +107 -107
- package/dist/model/performance.d.ts +27 -27
- package/dist/model/performance.js +97 -97
- package/dist/model/performance.js.map +1 -1
- package/dist/model/phoneNumber.d.ts +32 -32
- package/dist/model/phoneNumber.js +122 -122
- package/dist/model/phoneNumberCapabilities.d.ts +17 -17
- package/dist/model/phoneNumberCapabilities.js +32 -32
- package/dist/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherIsActive.d.ts +27 -27
- package/dist/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherIsActive.js +77 -77
- package/dist/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.d.ts +26 -26
- package/dist/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.js +72 -72
- package/dist/model/pickMSEmployeeAPIKeyCreateParamsExcludeKeyofMSEmployeeAPIKeyCreateParamsEmployeeID.d.ts +15 -15
- package/dist/model/pickMSEmployeeAPIKeyCreateParamsExcludeKeyofMSEmployeeAPIKeyCreateParamsEmployeeID.js +22 -22
- package/dist/model/pickMSEmployeeAPIKeyUpdateParamsExcludeKeyofMSEmployeeAPIKeyUpdateParamsId.d.ts +15 -15
- package/dist/model/pickMSEmployeeAPIKeyUpdateParamsExcludeKeyofMSEmployeeAPIKeyUpdateParamsId.js +22 -22
- package/dist/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.d.ts +20 -20
- package/dist/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.js +47 -47
- package/dist/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.d.ts +25 -25
- package/dist/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.js +72 -72
- package/dist/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.d.ts +15 -15
- package/dist/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.js +22 -22
- package/dist/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.d.ts +20 -20
- package/dist/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.js +47 -47
- package/dist/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKey.d.ts +18 -18
- package/dist/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKey.js +32 -32
- package/dist/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKeySortOrder.d.ts +13 -13
- package/dist/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKeySortOrder.js +11 -11
- package/dist/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.d.ts +15 -15
- package/dist/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.js +22 -22
- package/dist/model/pickSSImportedListRecipientFromMembershipTierImportExcludeKeyofSSImportedListRecipientFromMembershipTierImportEmployeeIDOrTierID.d.ts +15 -15
- package/dist/model/pickSSImportedListRecipientFromMembershipTierImportExcludeKeyofSSImportedListRecipientFromMembershipTierImportEmployeeIDOrTierID.js +22 -22
- package/dist/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.d.ts +17 -17
- package/dist/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.js +32 -32
- package/dist/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.d.ts +25 -25
- package/dist/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.js +72 -72
- package/dist/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeIDOrOptInConfirmedMediaURLsOrOptOutConfirmedMediaURLs.d.ts +24 -24
- package/dist/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeIDOrOptInConfirmedMediaURLsOrOptOutConfirmedMediaURLs.js +67 -67
- package/dist/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCount.d.ts +22 -22
- package/dist/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCount.js +52 -52
- package/dist/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCountOptInSourceID.d.ts +13 -13
- package/dist/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCountOptInSourceID.js +11 -11
- package/dist/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.d.ts +27 -27
- package/dist/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.js +82 -82
- package/dist/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.d.ts +16 -16
- package/dist/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.js +27 -27
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.d.ts +36 -36
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.js +117 -117
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhonePaymentObjectBroadcastID.d.ts +13 -13
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhonePaymentObjectBroadcastID.js +11 -11
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhoneStatus.d.ts +13 -13
- package/dist/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhoneStatus.js +11 -11
- package/dist/model/pickVSAdvertisementCreditCreateParamsExcludeKeyofVSAdvertisementCreditCreateParamsEmployeeID.d.ts +19 -19
- package/dist/model/pickVSAdvertisementCreditCreateParamsExcludeKeyofVSAdvertisementCreditCreateParamsEmployeeID.js +37 -37
- package/dist/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.d.ts +33 -33
- package/dist/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.js +97 -97
- package/dist/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.d.ts +19 -19
- package/dist/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.js +37 -37
- package/dist/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.d.ts +26 -26
- package/dist/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.js +72 -72
- package/dist/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDateValueType.d.ts +13 -13
- package/dist/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDateValueType.js +11 -11
- package/dist/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.d.ts +32 -32
- package/dist/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.js +107 -107
- package/dist/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.d.ts +27 -27
- package/dist/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.js +77 -77
- package/dist/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.d.ts +27 -27
- package/dist/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.js +77 -77
- package/dist/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsIdBorderStyleType.d.ts +13 -13
- package/dist/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsIdBorderStyleType.js +11 -11
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.d.ts +38 -38
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.js +122 -122
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtRegisterID.d.ts +13 -13
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtRegisterID.js +11 -11
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtTransactionType.d.ts +13 -13
- package/dist/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtTransactionType.js +11 -11
- package/dist/model/pickWTEmailSubscriberUpdateParamsExcludeKeyofWTEmailSubscriberUpdateParamsId.d.ts +16 -16
- package/dist/model/pickWTEmailSubscriberUpdateParamsExcludeKeyofWTEmailSubscriberUpdateParamsId.js +27 -27
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.d.ts +33 -33
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.js +92 -92
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartDay.d.ts +13 -13
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartDay.js +11 -11
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartHour.d.ts +13 -13
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartHour.js +11 -11
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMeridiem.d.ts +13 -13
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMeridiem.js +11 -11
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMinute.d.ts +13 -13
- package/dist/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMinute.js +11 -11
- package/dist/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumberOrEmailOrBirthday.d.ts +21 -21
- package/dist/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumberOrEmailOrBirthday.js +52 -52
- package/dist/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.d.ts +16 -16
- package/dist/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.js +27 -27
- package/dist/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.d.ts +15 -15
- package/dist/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.js +22 -22
- package/dist/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.d.ts +19 -19
- package/dist/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.js +42 -42
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.d.ts +36 -36
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.js +102 -102
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDBroadcastStatus.d.ts +13 -13
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDBroadcastStatus.js +11 -11
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDPaymentObjectPrefix.d.ts +13 -13
- package/dist/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDPaymentObjectPrefix.js +11 -11
- package/dist/model/pickWTSmsSubscriberUpdateParamsExcludeKeyofWTSmsSubscriberUpdateParamsId.d.ts +14 -14
- package/dist/model/pickWTSmsSubscriberUpdateParamsExcludeKeyofWTSmsSubscriberUpdateParamsId.js +17 -17
- package/dist/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.d.ts +27 -27
- package/dist/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.js +77 -77
- package/dist/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.d.ts +16 -16
- package/dist/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.js +27 -27
- package/dist/model/plan.d.ts +15 -15
- package/dist/model/plan.js +42 -42
- package/dist/model/portalPage.d.ts +74 -74
- package/dist/model/portalPage.js +78 -78
- package/dist/model/presignedPost.d.ts +12 -12
- package/dist/model/presignedPost.js +22 -22
- package/dist/model/presignedPostFields.d.ts +11 -11
- package/dist/model/presignedPostFields.js +22 -22
- package/dist/model/product.d.ts +17 -17
- package/dist/model/product.js +52 -52
- package/dist/model/productTaxBehavior.d.ts +13 -0
- package/dist/model/productTaxBehavior.js +12 -0
- package/dist/model/productTaxBehavior.js.map +1 -0
- package/dist/model/profileStatuses.d.ts +7 -7
- package/dist/model/profileStatuses.js +11 -11
- package/dist/model/promoCode.d.ts +23 -23
- package/dist/model/promoCode.js +77 -77
- package/dist/model/qRCodeDesign.d.ts +18 -18
- package/dist/model/qRCodeDesign.js +52 -52
- package/dist/model/reachPerformanceStats.d.ts +20 -20
- package/dist/model/reachPerformanceStats.js +67 -67
- package/dist/model/request.d.ts +63 -63
- package/dist/model/request.js +282 -282
- package/dist/model/response.d.ts +16 -16
- package/dist/model/response.js +47 -47
- package/dist/model/role.d.ts +24 -24
- package/dist/model/role.js +87 -87
- package/dist/model/roleAuditLog.d.ts +21 -21
- package/dist/model/roleAuditLog.js +72 -72
- package/dist/model/roomRate.d.ts +21 -21
- package/dist/model/roomRate.js +67 -67
- package/dist/model/sSImportedListRecipientCreateParams.d.ts +11 -11
- package/dist/model/sSImportedListRecipientCreateParams.js +22 -22
- package/dist/model/sSOptInSource.d.ts +17 -17
- package/dist/model/sSOptInSource.js +52 -52
- package/dist/model/sSOutboundStatuses.d.ts +13 -13
- package/dist/model/sSOutboundStatuses.js +11 -11
- package/dist/model/saveMerchantCreditPaymentDesignRequest.d.ts +14 -14
- package/dist/model/saveMerchantCreditPaymentDesignRequest.js +17 -17
- package/dist/model/saveTicketSettingsRequest.d.ts +17 -17
- package/dist/model/saveTicketSettingsRequest.js +32 -32
- package/dist/model/service.d.ts +28 -21
- package/dist/model/service.js +97 -67
- package/dist/model/service.js.map +1 -1
- package/dist/model/setDefaultPaymentMethodRequest.d.ts +14 -14
- package/dist/model/setDefaultPaymentMethodRequest.js +17 -17
- package/dist/model/simpleSMSBroadcast.d.ts +35 -35
- package/dist/model/simpleSMSBroadcast.js +112 -112
- package/dist/model/smsSubscriber.d.ts +16 -16
- package/dist/model/smsSubscriber.js +42 -42
- package/dist/model/sortDirection.d.ts +4 -4
- package/dist/model/sortDirection.js +8 -8
- package/dist/model/staticVoucher.d.ts +45 -45
- package/dist/model/staticVoucher.js +172 -172
- package/dist/model/staticVoucherCampaign.d.ts +36 -36
- package/dist/model/staticVoucherCampaign.js +137 -137
- package/dist/model/staticVoucherCampaignBroadcast.d.ts +34 -34
- package/dist/model/staticVoucherCampaignBroadcast.js +107 -107
- package/dist/model/staticVoucherCampaignBroadcastBroadcastStatus.d.ts +13 -13
- package/dist/model/staticVoucherCampaignBroadcastBroadcastStatus.js +11 -11
- package/dist/model/staticVoucherCampaignBroadcastPaymentObjectPrefix.d.ts +13 -13
- package/dist/model/staticVoucherCampaignBroadcastPaymentObjectPrefix.js +11 -11
- package/dist/model/staticVoucherCampaignUpdate.d.ts +19 -19
- package/dist/model/staticVoucherCampaignUpdate.js +57 -57
- package/dist/model/staticVoucherCampaignValueType.d.ts +13 -13
- package/dist/model/staticVoucherCampaignValueType.js +11 -11
- package/dist/model/staticVoucherId.d.ts +13 -13
- package/dist/model/staticVoucherId.js +11 -11
- package/dist/model/status.d.ts +13 -13
- package/dist/model/status.js +11 -11
- package/dist/model/subscriptionFeature.d.ts +18 -18
- package/dist/model/subscriptionFeature.js +57 -57
- package/dist/model/subscriptionPlan.d.ts +18 -16
- package/dist/model/subscriptionPlan.js +52 -47
- package/dist/model/subscriptionPlan.js.map +1 -1
- package/dist/model/subscriptionPlanAnnual.d.ts +15 -0
- package/dist/model/subscriptionPlanAnnual.js +23 -0
- package/dist/model/subscriptionPlanAnnual.js.map +1 -0
- package/dist/model/subscriptionProduct.d.ts +21 -21
- package/dist/model/subscriptionProduct.js +72 -72
- package/dist/model/tcpa.d.ts +17 -17
- package/dist/model/tcpa.js +47 -47
- package/dist/model/thread.d.ts +16 -16
- package/dist/model/thread.js +42 -42
- package/dist/model/ticket.d.ts +30 -30
- package/dist/model/ticket.js +112 -112
- package/dist/model/ticketSortKeys.d.ts +8 -8
- package/dist/model/ticketSortKeys.js +12 -12
- package/dist/model/trustBundleStatuses.d.ts +7 -7
- package/dist/model/trustBundleStatuses.js +11 -11
- package/dist/model/updateEmailNotificationPreferenceRequest.d.ts +14 -14
- package/dist/model/updateEmailNotificationPreferenceRequest.js +17 -17
- package/dist/model/updateStaticVoucherCampaignWithVoucher.d.ts +23 -23
- package/dist/model/updateStaticVoucherCampaignWithVoucher.js +77 -77
- package/dist/model/vSCampaignGeneratedMessage.d.ts +12 -12
- package/dist/model/vSCampaignGeneratedMessage.js +27 -27
- package/dist/model/vSCampaignGeneratedMessagePagination.d.ts +12 -12
- package/dist/model/vSCampaignGeneratedMessagePagination.js +27 -27
- package/dist/model/vSDynamicVoucherStatus.d.ts +13 -13
- package/dist/model/vSDynamicVoucherStatus.js +11 -11
- package/dist/model/vectorStore.d.ts +16 -16
- package/dist/model/vectorStore.js +42 -42
- package/dist/model/video.d.ts +24 -20
- package/dist/model/video.js +72 -62
- package/dist/model/video.js.map +1 -1
- package/dist/model/videoProvider.d.ts +13 -0
- package/dist/model/videoProvider.js +12 -0
- package/dist/model/videoProvider.js.map +1 -0
- package/dist/model/virtualBusinessCard.d.ts +28 -28
- package/dist/model/virtualBusinessCard.js +102 -102
- package/dist/model/wTA2PApplicationUpdateParams.d.ts +41 -41
- package/dist/model/wTA2PApplicationUpdateParams.js +132 -132
- package/dist/model/wTAdvertisementCredit.d.ts +24 -24
- package/dist/model/wTAdvertisementCredit.js +77 -77
- package/dist/model/wTAdvertisementCreditCreateParams.d.ts +15 -15
- package/dist/model/wTAdvertisementCreditCreateParams.js +37 -37
- package/dist/model/wTAdvertisementCreditScan.d.ts +36 -36
- package/dist/model/wTAdvertisementCreditScan.js +127 -127
- package/dist/model/wTAdvertisementCreditUpdateParams.d.ts +15 -15
- package/dist/model/wTAdvertisementCreditUpdateParams.js +37 -37
- package/dist/model/wTAmenityCreateParams.d.ts +15 -15
- package/dist/model/wTAmenityCreateParams.js +42 -42
- package/dist/model/wTAmenityUpdateParams.d.ts +15 -15
- package/dist/model/wTAmenityUpdateParams.js +42 -42
- package/dist/model/wTAndroidKeystoreResponse.d.ts +11 -11
- package/dist/model/wTAndroidKeystoreResponse.js +22 -22
- package/dist/model/wTAuthenticationCheckSessionTokenStatusResponse.d.ts +15 -15
- package/dist/model/wTAuthenticationCheckSessionTokenStatusResponse.js +23 -23
- package/dist/model/wTAuthenticationForgotPassword.d.ts +10 -10
- package/dist/model/wTAuthenticationForgotPassword.js +17 -17
- package/dist/model/wTAuthenticationLoginRequest.d.ts +11 -11
- package/dist/model/wTAuthenticationLoginRequest.js +22 -22
- package/dist/model/wTAuthenticationLoginResponse.d.ts +25 -25
- package/dist/model/wTAuthenticationLoginResponse.js +92 -92
- package/dist/model/wTAuthenticationRegister.d.ts +31 -31
- package/dist/model/wTAuthenticationRegister.js +122 -122
- package/dist/model/wTAuthenticationRequestResetPassword.d.ts +10 -10
- package/dist/model/wTAuthenticationRequestResetPassword.js +17 -17
- package/dist/model/wTAuthenticationResetPassword.d.ts +12 -12
- package/dist/model/wTAuthenticationResetPassword.js +27 -27
- package/dist/model/wTAuthenticationSSOLoginForDiscourse.d.ts +13 -13
- package/dist/model/wTAuthenticationSSOLoginForDiscourse.js +32 -32
- package/dist/model/wTBillingChangePlan.d.ts +10 -10
- package/dist/model/wTBillingChangePlan.js +17 -17
- package/dist/model/wTBillingSavePaymentMethod.d.ts +10 -10
- package/dist/model/wTBillingSavePaymentMethod.js +17 -17
- package/dist/model/wTBillingVerifyPaymentMethodResponse.d.ts +12 -12
- package/dist/model/wTBillingVerifyPaymentMethodResponse.js +22 -22
- package/dist/model/wTCountResult.d.ts +10 -10
- package/dist/model/wTCountResult.js +17 -17
- package/dist/model/wTCustomerSearchByMemberID.d.ts +10 -10
- package/dist/model/wTCustomerSearchByMemberID.js +17 -17
- package/dist/model/wTCustomerSearchByPhoneNumber.d.ts +10 -10
- package/dist/model/wTCustomerSearchByPhoneNumber.js +17 -17
- package/dist/model/wTDiningCreateParams.d.ts +15 -15
- package/dist/model/wTDiningCreateParams.js +42 -42
- package/dist/model/wTDiningUpdateParams.d.ts +15 -15
- package/dist/model/wTDiningUpdateParams.js +42 -42
- package/dist/model/wTDynamicVoucher.d.ts +46 -46
- package/dist/model/wTDynamicVoucher.js +177 -177
- package/dist/model/wTDynamicVoucherCreateParams.d.ts +22 -22
- package/dist/model/wTDynamicVoucherCreateParams.js +72 -72
- package/dist/model/wTDynamicVoucherRedemption.d.ts +35 -35
- package/dist/model/wTDynamicVoucherRedemption.js +122 -122
- package/dist/model/wTDynamicVoucherRedemptionTransactionType.d.ts +13 -13
- package/dist/model/wTDynamicVoucherRedemptionTransactionType.js +11 -11
- package/dist/model/wTDynamicVoucherSummary.d.ts +34 -34
- package/dist/model/wTDynamicVoucherSummary.js +132 -132
- package/dist/model/wTDynamicVoucherSummaryStatus.d.ts +13 -13
- package/dist/model/wTDynamicVoucherSummaryStatus.js +11 -11
- package/dist/model/wTDynamicVoucherUpdateParams.d.ts +22 -22
- package/dist/model/wTDynamicVoucherUpdateParams.js +72 -72
- package/dist/model/wTEmailSubscriberCreateParams.d.ts +12 -12
- package/dist/model/wTEmailSubscriberCreateParams.js +27 -27
- package/dist/model/wTEmailSubscriberCreateParamsWalletUI.d.ts +13 -13
- package/dist/model/wTEmailSubscriberCreateParamsWalletUI.js +32 -32
- package/dist/model/wTEmailSubscriberUpdateParams.d.ts +12 -12
- package/dist/model/wTEmailSubscriberUpdateParams.js +27 -27
- package/dist/model/wTEmployee.d.ts +43 -43
- package/dist/model/wTEmployee.js +162 -162
- package/dist/model/wTEmployeeAPIKey.d.ts +19 -19
- package/dist/model/wTEmployeeAPIKey.js +57 -57
- package/dist/model/wTEmployeeAPIKeyCreateParams.d.ts +11 -11
- package/dist/model/wTEmployeeAPIKeyCreateParams.js +22 -22
- package/dist/model/wTEmployeeAPIKeyUpdateParams.d.ts +11 -11
- package/dist/model/wTEmployeeAPIKeyUpdateParams.js +22 -22
- package/dist/model/wTEmployeeCreate.d.ts +30 -30
- package/dist/model/wTEmployeeCreate.js +97 -97
- package/dist/model/wTEmployeeCreateDocument.d.ts +12 -12
- package/dist/model/wTEmployeeCreateDocument.js +27 -27
- package/dist/model/wTEmployeeCreateMediaFile.d.ts +12 -12
- package/dist/model/wTEmployeeCreateMediaFile.js +27 -27
- package/dist/model/wTEmployeeFileCreate.d.ts +11 -11
- package/dist/model/wTEmployeeFileCreate.js +22 -22
- package/dist/model/wTEmployeeImportRecords.d.ts +11 -11
- package/dist/model/wTEmployeeImportRecords.js +22 -22
- package/dist/model/wTEmployeeNotification.d.ts +14 -14
- package/dist/model/wTEmployeeNotification.js +32 -32
- package/dist/model/wTEmployeeNotificationType.d.ts +13 -13
- package/dist/model/wTEmployeeNotificationType.js +11 -11
- package/dist/model/wTEmployeePeerRoles.d.ts +10 -10
- package/dist/model/wTEmployeePeerRoles.js +17 -17
- package/dist/model/wTEmployeeS3FilePresign.d.ts +13 -13
- package/dist/model/wTEmployeeS3FilePresign.js +27 -27
- package/dist/model/wTEmployeeS3FilePresignContext.d.ts +13 -13
- package/dist/model/wTEmployeeS3FilePresignContext.js +11 -11
- package/dist/model/wTEmployeeScheduleSMSCampaignBroadcast.d.ts +16 -16
- package/dist/model/wTEmployeeScheduleSMSCampaignBroadcast.js +47 -47
- package/dist/model/wTEmployeeScheduleSimpleSMS.d.ts +16 -16
- package/dist/model/wTEmployeeScheduleSimpleSMS.js +42 -42
- package/dist/model/wTEmployeeScheduleSimpleSMSListType.d.ts +13 -13
- package/dist/model/wTEmployeeScheduleSimpleSMSListType.js +11 -11
- package/dist/model/wTEmployeeScheduleSimpleSMSToRecipient.d.ts +14 -14
- package/dist/model/wTEmployeeScheduleSimpleSMSToRecipient.js +37 -37
- package/dist/model/wTEmployeeSendHelpDeskResponse.d.ts +12 -12
- package/dist/model/wTEmployeeSendHelpDeskResponse.js +27 -27
- package/dist/model/wTEmployeeUpdate.d.ts +29 -29
- package/dist/model/wTEmployeeUpdate.js +92 -92
- package/dist/model/wTEmployeeUpdateRecords.d.ts +11 -11
- package/dist/model/wTEmployeeUpdateRecords.js +22 -22
- package/dist/model/wTFetchWalletPaymentObjectsWithToken.d.ts +14 -14
- package/dist/model/wTFetchWalletPaymentObjectsWithToken.js +37 -37
- package/dist/model/wTGamingCreateParams.d.ts +15 -15
- package/dist/model/wTGamingCreateParams.js +42 -42
- package/dist/model/wTGamingUpdateParams.d.ts +15 -15
- package/dist/model/wTGamingUpdateParams.js +42 -42
- package/dist/model/wTImageGridCreateParams.d.ts +14 -14
- package/dist/model/wTImageGridCreateParams.js +37 -37
- package/dist/model/wTImageGridUpdateParams.d.ts +14 -14
- package/dist/model/wTImageGridUpdateParams.js +37 -37
- package/dist/model/wTImportedList.d.ts +18 -18
- package/dist/model/wTImportedList.js +52 -52
- package/dist/model/wTImportedListRecipientFromMembershipTierImport.d.ts +13 -13
- package/dist/model/wTImportedListRecipientFromMembershipTierImport.js +27 -27
- package/dist/model/wTImportedListRecipientFromMembershipTierImportTierID.d.ts +13 -13
- package/dist/model/wTImportedListRecipientFromMembershipTierImportTierID.js +11 -11
- package/dist/model/wTInfoGenesisLookupRequestErrors.d.ts +13 -13
- package/dist/model/wTInfoGenesisLookupRequestErrors.js +32 -32
- package/dist/model/wTInfoGenesisRecordFilterParameters.d.ts +12 -12
- package/dist/model/wTInfoGenesisRecordFilterParameters.js +27 -27
- package/dist/model/wTInfoGenesisRoutingIDs.d.ts +10 -10
- package/dist/model/wTInfoGenesisRoutingIDs.js +17 -17
- package/dist/model/wTInfoGenesisUniquePostingIDs.d.ts +10 -10
- package/dist/model/wTInfoGenesisUniquePostingIDs.js +17 -17
- package/dist/model/wTLocalInstance.d.ts +27 -27
- package/dist/model/wTLocalInstance.js +77 -77
- package/dist/model/wTLoungeCreateParams.d.ts +15 -15
- package/dist/model/wTLoungeCreateParams.js +42 -42
- package/dist/model/wTLoungeUpdateParams.d.ts +15 -15
- package/dist/model/wTLoungeUpdateParams.js +42 -42
- package/dist/model/wTMember.d.ts +23 -23
- package/dist/model/wTMember.js +82 -82
- package/dist/model/wTMemberCreationParams.d.ts +17 -17
- package/dist/model/wTMemberCreationParams.js +52 -52
- package/dist/model/wTMembershipTier.d.ts +20 -20
- package/dist/model/wTMembershipTier.js +62 -62
- package/dist/model/wTMembershipTierCreationParams.d.ts +14 -14
- package/dist/model/wTMembershipTierCreationParams.js +37 -37
- package/dist/model/wTMembershipTierId.d.ts +13 -13
- package/dist/model/wTMembershipTierId.js +11 -11
- package/dist/model/wTMembershipTierUpdateParams.d.ts +14 -14
- package/dist/model/wTMembershipTierUpdateParams.js +37 -37
- package/dist/model/wTMembershipTierWithMemberCount.d.ts +21 -21
- package/dist/model/wTMembershipTierWithMemberCount.js +67 -67
- package/dist/model/wTMerchantCredit.d.ts +19 -19
- package/dist/model/wTMerchantCredit.js +62 -62
- package/dist/model/wTMerchantCreditCreationParams.d.ts +12 -12
- package/dist/model/wTMerchantCreditCreationParams.js +27 -27
- package/dist/model/wTMerchantURLCreate.d.ts +11 -11
- package/dist/model/wTMerchantURLCreate.js +22 -22
- package/dist/model/wTMerchantURLUpdate.d.ts +11 -11
- package/dist/model/wTMerchantURLUpdate.js +22 -22
- package/dist/model/wTMerchantUpdate.d.ts +18 -18
- package/dist/model/wTMerchantUpdate.js +57 -57
- package/dist/model/wTMerchantUpdatePOSIntegration.d.ts +10 -10
- package/dist/model/wTMerchantUpdatePOSIntegration.js +17 -17
- package/dist/model/wTMerchantUpdatePointsOfContact.d.ts +13 -13
- package/dist/model/wTMerchantUpdatePointsOfContact.js +32 -32
- package/dist/model/wTMessageInstance.d.ts +13 -13
- package/dist/model/wTMessageInstance.js +11 -11
- package/dist/model/wTNewsArticleCreateParams.d.ts +15 -15
- package/dist/model/wTNewsArticleCreateParams.js +42 -42
- package/dist/model/wTNewsArticleUpdateParams.d.ts +15 -15
- package/dist/model/wTNewsArticleUpdateParams.js +42 -42
- package/dist/model/wTOptInList.d.ts +28 -28
- package/dist/model/wTOptInList.js +102 -102
- package/dist/model/wTOptInListCreationParams.d.ts +22 -22
- package/dist/model/wTOptInListCreationParams.js +77 -77
- package/dist/model/wTPassBrandKit.d.ts +15 -15
- package/dist/model/wTPassBrandKit.js +42 -42
- package/dist/model/wTPaymentDesign.d.ts +30 -30
- package/dist/model/wTPaymentDesign.js +107 -107
- package/dist/model/wTPaymentDesignCreateParams.d.ts +23 -23
- package/dist/model/wTPaymentDesignCreateParams.js +77 -77
- package/dist/model/wTPaymentDesignUpdateParams.d.ts +23 -23
- package/dist/model/wTPaymentDesignUpdateParams.js +77 -77
- package/dist/model/wTPerformanceCreateParams.d.ts +21 -21
- package/dist/model/wTPerformanceCreateParams.js +72 -72
- package/dist/model/wTPerformanceCreateParams.js.map +1 -1
- package/dist/model/wTPerformanceUpdateParams.d.ts +21 -21
- package/dist/model/wTPerformanceUpdateParams.js +72 -72
- package/dist/model/wTPerformanceUpdateParams.js.map +1 -1
- package/dist/model/wTPosMachine.d.ts +19 -19
- package/dist/model/wTPosMachine.js +62 -62
- package/dist/model/wTPosMachine.js.map +1 -1
- package/dist/model/wTPosMachineCreateParams.d.ts +14 -14
- package/dist/model/wTPosMachineCreateParams.js +37 -37
- package/dist/model/wTPosMachineCreateParams.js.map +1 -1
- package/dist/model/wTPosMachineUpdateParams.d.ts +14 -14
- package/dist/model/wTPosMachineUpdateParams.js +37 -37
- package/dist/model/wTPosMachineUpdateParams.js.map +1 -1
- package/dist/model/wTProductCreateParams.d.ts +20 -15
- package/dist/model/wTProductCreateParams.js +62 -42
- package/dist/model/wTProductCreateParams.js.map +1 -1
- package/dist/model/wTProductUpdateParams.d.ts +20 -15
- package/dist/model/wTProductUpdateParams.js +62 -42
- package/dist/model/wTProductUpdateParams.js.map +1 -1
- package/dist/model/wTPromoCodeCreateParams.d.ts +17 -17
- package/dist/model/wTPromoCodeCreateParams.js +52 -52
- package/dist/model/wTPromoCodeUpdateParams.d.ts +17 -17
- package/dist/model/wTPromoCodeUpdateParams.js +52 -52
- package/dist/model/wTQRCodeDesign.d.ts +18 -18
- package/dist/model/wTQRCodeDesign.js +52 -52
- package/dist/model/wTQRCodeDesignCreateParams.d.ts +12 -12
- package/dist/model/wTQRCodeDesignCreateParams.js +27 -27
- package/dist/model/wTQRCodeDesignUpdateParams.d.ts +12 -12
- package/dist/model/wTQRCodeDesignUpdateParams.js +27 -27
- package/dist/model/wTQuickLink.d.ts +21 -21
- package/dist/model/wTQuickLink.js +62 -62
- package/dist/model/wTQuickLinkCreateParams.d.ts +15 -15
- package/dist/model/wTQuickLinkCreateParams.js +37 -37
- package/dist/model/wTQuickLinkLinkBookSectionID.d.ts +13 -13
- package/dist/model/wTQuickLinkLinkBookSectionID.js +11 -11
- package/dist/model/wTQuickLinkSectionCreateParams.d.ts +11 -11
- package/dist/model/wTQuickLinkSectionCreateParams.js +22 -22
- package/dist/model/wTQuickLinkSectionUpdateParams.d.ts +11 -11
- package/dist/model/wTQuickLinkSectionUpdateParams.js +22 -22
- package/dist/model/wTQuickLinkUpdateParams.d.ts +15 -15
- package/dist/model/wTQuickLinkUpdateParams.js +37 -37
- package/dist/model/wTRole.d.ts +24 -24
- package/dist/model/wTRole.js +87 -87
- package/dist/model/wTRoomRateCreateParams.d.ts +15 -15
- package/dist/model/wTRoomRateCreateParams.js +42 -42
- package/dist/model/wTRoomRateUpdateParams.d.ts +15 -15
- package/dist/model/wTRoomRateUpdateParams.js +42 -42
- package/dist/model/wTSMSAcquirePhoneNumber.d.ts +10 -10
- package/dist/model/wTSMSAcquirePhoneNumber.js +17 -17
- package/dist/model/wTSMSImportOptInListSubscribers.d.ts +12 -12
- package/dist/model/wTSMSImportOptInListSubscribers.js +27 -27
- package/dist/model/wTSMSImportedListCreate.d.ts +12 -12
- package/dist/model/wTSMSImportedListCreate.js +27 -27
- package/dist/model/wTSMSOptInListSourceCreate.d.ts +11 -11
- package/dist/model/wTSMSOptInListSourceCreate.js +22 -22
- package/dist/model/wTSMSUpdatePhoneNumberConfig.d.ts +21 -21
- package/dist/model/wTSMSUpdatePhoneNumberConfig.js +72 -72
- package/dist/model/wTServiceCreateParams.d.ts +20 -15
- package/dist/model/wTServiceCreateParams.js +62 -42
- package/dist/model/wTServiceCreateParams.js.map +1 -1
- package/dist/model/wTServiceUpdateParams.d.ts +20 -15
- package/dist/model/wTServiceUpdateParams.js +62 -42
- package/dist/model/wTServiceUpdateParams.js.map +1 -1
- package/dist/model/wTSettingsSetPassword.d.ts +10 -10
- package/dist/model/wTSettingsSetPassword.js +17 -17
- package/dist/model/wTSmsSubscriberCreateParams.d.ts +10 -10
- package/dist/model/wTSmsSubscriberCreateParams.js +17 -17
- package/dist/model/wTSmsSubscriberCreateParamsWalletUI.d.ts +11 -11
- package/dist/model/wTSmsSubscriberCreateParamsWalletUI.js +22 -22
- package/dist/model/wTSmsSubscriberUpdateParams.d.ts +10 -10
- package/dist/model/wTSmsSubscriberUpdateParams.js +17 -17
- package/dist/model/wTStaticVoucher.d.ts +45 -45
- package/dist/model/wTStaticVoucher.js +172 -172
- package/dist/model/wTStaticVoucherCampaign.d.ts +36 -36
- package/dist/model/wTStaticVoucherCampaign.js +137 -137
- package/dist/model/wTStaticVoucherCampaignPreviewMessagesByPage.d.ts +14 -14
- package/dist/model/wTStaticVoucherCampaignPreviewMessagesByPage.js +37 -37
- package/dist/model/wTStaticVoucherCreateParams.d.ts +14 -14
- package/dist/model/wTStaticVoucherCreateParams.js +32 -32
- package/dist/model/wTStaticVoucherUpdateParams.d.ts +12 -12
- package/dist/model/wTStaticVoucherUpdateParams.js +27 -27
- package/dist/model/wTSystemApprovePhoneNumber.d.ts +11 -11
- package/dist/model/wTSystemApprovePhoneNumber.js +22 -22
- package/dist/model/wTSystemRoleCreate.d.ts +11 -11
- package/dist/model/wTSystemRoleCreate.js +22 -22
- package/dist/model/wTTCPAOpt.d.ts +14 -14
- package/dist/model/wTTCPAOpt.js +27 -27
- package/dist/model/wTTCPAOptListID.d.ts +13 -13
- package/dist/model/wTTCPAOptListID.js +11 -11
- package/dist/model/wTTCPAOptSourceID.d.ts +13 -13
- package/dist/model/wTTCPAOptSourceID.js +11 -11
- package/dist/model/wTTicket.d.ts +30 -30
- package/dist/model/wTTicket.js +112 -112
- package/dist/model/wTTicketCreateParams.d.ts +15 -15
- package/dist/model/wTTicketCreateParams.js +42 -42
- package/dist/model/wTTicketUpdateParams.d.ts +14 -14
- package/dist/model/wTTicketUpdateParams.js +37 -37
- package/dist/model/wTTwilioRequestAuthyCode.d.ts +11 -11
- package/dist/model/wTTwilioRequestAuthyCode.js +22 -22
- package/dist/model/wTTwilioVerifyAuthyCode.d.ts +12 -12
- package/dist/model/wTTwilioVerifyAuthyCode.js +27 -27
- package/dist/model/wTVideoCreateParams.d.ts +16 -14
- package/dist/model/wTVideoCreateParams.js +42 -37
- package/dist/model/wTVideoCreateParams.js.map +1 -1
- package/dist/model/wTVideoPlaybackSource.d.ts +12 -0
- package/dist/model/wTVideoPlaybackSource.js +23 -0
- package/dist/model/wTVideoPlaybackSource.js.map +1 -0
- package/dist/model/wTVideoPlaybackSourceType.d.ts +13 -0
- package/dist/model/wTVideoPlaybackSourceType.js +12 -0
- package/dist/model/wTVideoPlaybackSourceType.js.map +1 -0
- package/dist/model/wTVideoUpdateParams.d.ts +13 -14
- package/dist/model/wTVideoUpdateParams.js +32 -37
- package/dist/model/wTVideoUpdateParams.js.map +1 -1
- package/dist/model/wTVideoUploadProvision.d.ts +14 -0
- package/dist/model/wTVideoUploadProvision.js +33 -0
- package/dist/model/wTVideoUploadProvision.js.map +1 -0
- package/dist/model/wTVideoUploadProvisionParams.d.ts +12 -0
- package/dist/model/wTVideoUploadProvisionParams.js +28 -0
- package/dist/model/wTVideoUploadProvisionParams.js.map +1 -0
- package/dist/model/wTVideoUploadProvisionProvider.d.ts +13 -0
- package/dist/model/wTVideoUploadProvisionProvider.js +12 -0
- package/dist/model/wTVideoUploadProvisionProvider.js.map +1 -0
- package/dist/model/wTVirtualBusinessCardCreateParams.d.ts +22 -22
- package/dist/model/wTVirtualBusinessCardCreateParams.js +77 -77
- package/dist/model/wTVirtualBusinessCardUpdateParams.d.ts +22 -22
- package/dist/model/wTVirtualBusinessCardUpdateParams.js +77 -77
- package/dist/model/wTWalletConfigurationSaveWalletRecord.d.ts +86 -86
- package/dist/model/wTWalletConfigurationSaveWalletRecord.js +387 -387
- package/dist/model/wTWalletConfigurationSaveWalletRecordPassBrandKit.d.ts +19 -19
- package/dist/model/wTWalletConfigurationSaveWalletRecordPassBrandKit.js +42 -42
- package/dist/model/wTWalletConfigurationSaveWalletRecordSmsOptInSourceID.d.ts +13 -13
- package/dist/model/wTWalletConfigurationSaveWalletRecordSmsOptInSourceID.js +11 -11
- package/dist/model/wTWalletItemRedemption.d.ts +12 -12
- package/dist/model/wTWalletItemRedemption.js +27 -27
- package/dist/model/wTWalletObjectPrefixCounts.d.ts +12 -12
- package/dist/model/wTWalletObjectPrefixCounts.js +27 -27
- package/dist/model/wTWalletObjectPrefixCounts.js.map +1 -1
- package/dist/model/wTWalletPageView.d.ts +49 -49
- package/dist/model/wTWalletPageView.js +207 -207
- package/dist/model/wTWalletPageViewCount.d.ts +13 -13
- package/dist/model/wTWalletPageViewCount.js +32 -32
- package/dist/model/wTWalletPageViewCount.js.map +1 -1
- package/dist/model/wTWalletPageViewGeoPoint.d.ts +15 -15
- package/dist/model/wTWalletPageViewGeoPoint.js +22 -22
- package/dist/model/wTWhatsAppInboundWebhook.d.ts +23 -23
- package/dist/model/wTWhatsAppInboundWebhook.js +82 -82
- package/dist/model/wTWhatsAppStatusCallback.d.ts +20 -20
- package/dist/model/wTWhatsAppStatusCallback.js +67 -67
- package/dist/model/walletConfiguration.d.ts +91 -91
- package/dist/model/walletConfiguration.js +412 -412
- package/dist/model/walletPageView.d.ts +49 -49
- package/dist/model/walletPageView.js +207 -207
- package/dist/model/webpage.d.ts +19 -19
- package/dist/model/webpage.js +62 -62
- package/package.json +1 -1
- package/.github/workflows/ci.yml +0 -163
- package/.openapi-generator/FILES +0 -460
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -27
- package/api/aPIKeysApi.ts +0 -448
- package/api/amenitiesApi.ts +0 -447
- package/api/analyticsApi.ts +0 -7516
- package/api/apis.ts +0 -118
- package/api/appToPersonA2PRegistrationApi.ts +0 -365
- package/api/appleWalletSubscribersApi.ts +0 -235
- package/api/authenticationApi.ts +0 -368
- package/api/billingPaymentsApi.ts +0 -1075
- package/api/clubMembersApi.ts +0 -797
- package/api/countriesApi.ts +0 -155
- package/api/customerApi.ts +0 -737
- package/api/dashboardSummariesApi.ts +0 -1566
- package/api/defaultApi.ts +0 -1571
- package/api/diningApi.ts +0 -447
- package/api/dynamicVouchersApi.ts +0 -742
- package/api/emailSubscribersApi.ts +0 -457
- package/api/employeesApi.ts +0 -3064
- package/api/galleryApi.ts +0 -447
- package/api/gamingApi.ts +0 -447
- package/api/industriesApi.ts +0 -280
- package/api/infoGenesisReportsApi.ts +0 -2004
- package/api/interactionsApi.ts +0 -1475
- package/api/loungeApi.ts +0 -447
- package/api/membershipTiersApi.ts +0 -728
- package/api/merchantApi.ts +0 -2012
- package/api/merchantCreditsApi.ts +0 -797
- package/api/newsApi.ts +0 -447
- package/api/openAIApi.ts +0 -1439
- package/api/paymentDesignsApi.ts +0 -519
- package/api/performancesApi.ts +0 -1070
- package/api/pointOfSaleConfigurationApi.ts +0 -447
- package/api/prizesApi.ts +0 -589
- package/api/productsApi.ts +0 -447
- package/api/promotionCodesApi.ts +0 -447
- package/api/qRCodeDesignsApi.ts +0 -520
- package/api/quickLinksApi.ts +0 -517
- package/api/quickLinksSectionApi.ts +0 -447
- package/api/roomRatesApi.ts +0 -447
- package/api/sMSOperationsApi.ts +0 -2913
- package/api/sMSSubscribersApi.ts +0 -457
- package/api/servicesApi.ts +0 -447
- package/api/shopifyTerminalApi.ts +0 -309
- package/api/shortLinksApi.ts +0 -586
- package/api/staticVoucherCampaignsApi.ts +0 -1545
- package/api/staticVouchersApi.ts +0 -535
- package/api/systemApi.ts +0 -665
- package/api/ticketsApi.ts +0 -451
- package/api/videosApi.ts +0 -447
- package/api/virtualBusinessCardApi.ts +0 -586
- package/api/walletConfigurationApi.ts +0 -302
- package/api/walletMobileTerminalApi.ts +0 -310
- package/api/walletTransactionLedgerApi.ts +0 -203
- package/api/walletWebTerminalApi.ts +0 -309
- package/api/wixTerminalApi.ts +0 -309
- package/api/wooCommerceTerminalApi.ts +0 -309
- package/api.ts +0 -3
- package/dist/api/analyticsApi.d.ts +0 -707
- package/dist/api/analyticsApi.js +0 -6182
- package/dist/api/analyticsApi.js.map +0 -1
- package/dist/api/dashboardSummariesApi.js.map +0 -1
- package/dist/api/defaultApi.d.ts +0 -253
- package/dist/api/defaultApi.js +0 -1414
- package/dist/api/defaultApi.js.map +0 -1
- package/dist/api/sMSOperationsApi.d.ts +0 -345
- package/dist/api/sMSOperationsApi.js +0 -2474
- package/dist/api/sMSOperationsApi.js.map +0 -1
- package/dist/examples/advertisementcredits.example.d.ts +0 -1
- package/dist/examples/advertisementcredits.example.js +0 -87
- package/dist/examples/advertisementcredits.example.js.map +0 -1
- package/dist/examples/clubmembers.example.d.ts +0 -1
- package/dist/examples/clubmembers.example.js +0 -96
- package/dist/examples/clubmembers.example.js.map +0 -1
- package/dist/examples/constants.d.ts +0 -6
- package/dist/examples/constants.js +0 -10
- package/dist/examples/constants.js.map +0 -1
- package/dist/examples/dynamicvouchers.example.d.ts +0 -1
- package/dist/examples/dynamicvouchers.example.js +0 -114
- package/dist/examples/dynamicvouchers.example.js.map +0 -1
- package/dist/examples/linkbook.example.d.ts +0 -1
- package/dist/examples/linkbook.example.js +0 -76
- package/dist/examples/linkbook.example.js.map +0 -1
- package/dist/examples/membershiptiers.example.d.ts +0 -1
- package/dist/examples/membershiptiers.example.js +0 -90
- package/dist/examples/membershiptiers.example.js.map +0 -1
- package/dist/examples/merchantcredits.example.d.ts +0 -1
- package/dist/examples/merchantcredits.example.js +0 -93
- package/dist/examples/merchantcredits.example.js.map +0 -1
- package/dist/examples/merchanturls.example.d.ts +0 -1
- package/dist/examples/merchanturls.example.js +0 -77
- package/dist/examples/merchanturls.example.js.map +0 -1
- package/dist/examples/news.example.d.ts +0 -1
- package/dist/examples/news.example.js +0 -76
- package/dist/examples/news.example.js.map +0 -1
- package/dist/examples/paymentdesigns.example.d.ts +0 -1
- package/dist/examples/paymentdesigns.example.js +0 -84
- package/dist/examples/paymentdesigns.example.js.map +0 -1
- package/dist/examples/performances.example.d.ts +0 -1
- package/dist/examples/performances.example.js +0 -79
- package/dist/examples/performances.example.js.map +0 -1
- package/dist/examples/promocodes.example.d.ts +0 -1
- package/dist/examples/promocodes.example.js +0 -78
- package/dist/examples/promocodes.example.js.map +0 -1
- package/dist/examples/sms.example.d.ts +0 -1
- package/dist/examples/sms.example.js +0 -268
- package/dist/examples/sms.example.js.map +0 -1
- package/dist/examples/staticvouchercampaigns.example.d.ts +0 -1
- package/dist/examples/staticvouchercampaigns.example.js +0 -170
- package/dist/examples/staticvouchercampaigns.example.js.map +0 -1
- package/dist/examples/staticvouchers.example.d.ts +0 -1
- package/dist/examples/staticvouchers.example.js +0 -82
- package/dist/examples/staticvouchers.example.js.map +0 -1
- package/examples/advertisementcredits.example.ts +0 -71
- package/examples/clubmembers.example.ts +0 -87
- package/examples/constants.ts +0 -6
- package/examples/dynamicvouchers.example.ts +0 -107
- package/examples/linkbook.example.ts +0 -58
- package/examples/membershiptiers.example.ts +0 -78
- package/examples/merchantcredits.example.ts +0 -85
- package/examples/merchanturls.example.ts +0 -63
- package/examples/news.example.ts +0 -59
- package/examples/package-lock.json +0 -2108
- package/examples/package.json +0 -18
- package/examples/paymentdesigns.example.ts +0 -68
- package/examples/performances.example.ts +0 -63
- package/examples/promocodes.example.ts +0 -60
- package/examples/sms.example.ts +0 -305
- package/examples/staticvouchercampaigns.example.ts +0 -192
- package/examples/staticvouchers.example.ts +0 -67
- package/git_push.sh +0 -57
- package/model/a2PApplicationSubmission.ts +0 -249
- package/model/advertisementCredit.ts +0 -105
- package/model/advertisementCreditBroadcast.ts +0 -158
- package/model/advertisementCreditScan.ts +0 -167
- package/model/amenity.ts +0 -92
- package/model/amenityId.ts +0 -26
- package/model/announcement.ts +0 -67
- package/model/applicableTerminals.ts +0 -26
- package/model/assistant.ts +0 -116
- package/model/authError.ts +0 -55
- package/model/availablePhoneNumbersRequest.ts +0 -43
- package/model/browserDetails.ts +0 -55
- package/model/businessClassification.ts +0 -20
- package/model/businessIndustry.ts +0 -49
- package/model/businessRegionsOfOperation.ts +0 -22
- package/model/businessRegistrationIdentifier.ts +0 -26
- package/model/businessStockExchanges.ts +0 -43
- package/model/businessType.ts +0 -22
- package/model/chatCompletionAudio.ts +0 -64
- package/model/chatCompletionMessage.ts +0 -83
- package/model/chatCompletionMessageAudio.ts +0 -65
- package/model/chatCompletionMessageFunctionCall.ts +0 -43
- package/model/chatCompletionMessageToolCall.ts +0 -58
- package/model/chatCompletionMessageToolCallFunction.ts +0 -46
- package/model/claimTicketRequest.ts +0 -31
- package/model/clickFunnelAmount.ts +0 -37
- package/model/clickFunnelContact.ts +0 -284
- package/model/clickFunnelContactProfile.ts +0 -235
- package/model/clickFunnelEvent.ts +0 -38
- package/model/clickFunnelOriginalAmount.ts +0 -37
- package/model/clickFunnelProduct.ts +0 -194
- package/model/clickFunnelPurchase.ts +0 -177
- package/model/clickFunnelRegistration.ts +0 -38
- package/model/countClaimedComps200Response.ts +0 -37
- package/model/createFile200Response.ts +0 -43
- package/model/createRunOnThreadRequest.ts +0 -37
- package/model/createStaticVoucherCampaign.ts +0 -104
- package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +0 -104
- package/model/dashboardWidget.ts +0 -121
- package/model/dining.ts +0 -92
- package/model/document.ts +0 -100
- package/model/duplicateRowFound.ts +0 -55
- package/model/dynamicVoucher.ts +0 -227
- package/model/dynamicVoucherBroadcast.ts +0 -158
- package/model/dynamicVoucherBroadcastListType.ts +0 -26
- package/model/dynamicVoucherTemporalDecreaseFrequencyType.ts +0 -26
- package/model/emailSubscriber.ts +0 -74
- package/model/employee.ts +0 -212
- package/model/employeeAPIKey.ts +0 -83
- package/model/employeeActivityLog.ts +0 -67
- package/model/employeeAlert.ts +0 -85
- package/model/employeeScheduleStartDay.ts +0 -26
- package/model/employeeScheduleStartHour.ts +0 -26
- package/model/employeeScheduleStartMeridiem.ts +0 -26
- package/model/employeeScheduleStartMinute.ts +0 -26
- package/model/entityTooLarge.ts +0 -55
- package/model/exportDataFile.ts +0 -85
- package/model/falsumError.ts +0 -40
- package/model/falsumField.ts +0 -55
- package/model/feature.ts +0 -79
- package/model/fetchAdvertisementCreditScansFromListRequest.ts +0 -31
- package/model/fetchAllCountries200ResponseInner.ts +0 -49
- package/model/fetchAllLedgerTransactions200Response.ts +0 -44
- package/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInner.ts +0 -105
- package/model/fetchAllStaticVouchersAssociatedWithCustomerWithVoucherID200ResponseInnerValueType.ts +0 -26
- package/model/fetchCustomerTicketsWithTokenRequest.ts +0 -37
- package/model/fetchDomainsByIndustry200Response.ts +0 -67
- package/model/fetchImportedListRecipientsByPage200Response.ts +0 -44
- package/model/fetchInboundSMSByPage200Response.ts +0 -44
- package/model/fetchIndustry200Response.ts +0 -56
- package/model/fetchMembersCount200Response.ts +0 -31
- package/model/fetchOptInListSubscribersByPage200Response.ts +0 -44
- package/model/fetchOutboundSMSByPage200Response.ts +0 -44
- package/model/fetchPerformanceTicketsPage200Response.ts +0 -38
- package/model/fetchStaticVouchersPage200Response.ts +0 -38
- package/model/forbiddenRequest.ts +0 -55
- package/model/foreignKeyDoesNotExist.ts +0 -55
- package/model/gaming.ts +0 -92
- package/model/helpDeskRequest.ts +0 -86
- package/model/imageGrid.ts +0 -86
- package/model/importTicketsRequest.ts +0 -32
- package/model/importedList.ts +0 -74
- package/model/importedListRecipient.ts +0 -74
- package/model/inboundSMS.ts +0 -242
- package/model/internalServerError500.ts +0 -55
- package/model/jobPosition.ts +0 -23
- package/model/ledgerEntry.ts +0 -179
- package/model/ledgerEntryParentObjectID.ts +0 -26
- package/model/ledgerEntryTransactionType.ts +0 -26
- package/model/linkBook.ts +0 -87
- package/model/linkBookSection.ts +0 -68
- package/model/loginStatus200Response.ts +0 -50
- package/model/loginStatus200ResponseAnyOf.ts +0 -37
- package/model/lounge.ts +0 -92
- package/model/mSAnalyticsMemberCountPartitionedByDate.ts +0 -43
- package/model/mSAnalyticsMemberPointsRedeemedPartitionedByDate.ts +0 -43
- package/model/mSAnalyticsMemberPointsRefundedPartitionedByDate.ts +0 -43
- package/model/mSAnalyticsMembershipTierAmountRedeemedPartitionedByDate.ts +0 -43
- package/model/mSAnalyticsMembershipTierAmountRefundedPartitionedByDate.ts +0 -43
- package/model/mSMemberHistory.ts +0 -127
- package/model/mSMemberHistoryPagination.ts +0 -52
- package/model/mSMemberRedemption.ts +0 -105
- package/model/mSMemberRedemptionPagination.ts +0 -52
- package/model/mSMemberRedemptionRegisterID.ts +0 -29
- package/model/mSMemberRedemptionTransactionType.ts +0 -29
- package/model/mSMembershipTierHistory.ts +0 -106
- package/model/mSMembershipTierHistoryPagination.ts +0 -52
- package/model/mSMembershipTierRedemption.ts +0 -117
- package/model/mSMembershipTierRedemptionPagination.ts +0 -52
- package/model/mSMerchantCreditHistory.ts +0 -88
- package/model/mSMerchantCreditHistoryPagination.ts +0 -52
- package/model/mSMerchantCreditRedemption.ts +0 -105
- package/model/mSMerchantCreditRedemptionPagination.ts +0 -52
- package/model/mediaFile.ts +0 -100
- package/model/member.ts +0 -133
- package/model/memberSearch.ts +0 -82
- package/model/memberSearchSearchKey.ts +0 -29
- package/model/memberSearchSortKey.ts +0 -29
- package/model/merchant.ts +0 -187
- package/model/merchantCreditSearch.ts +0 -61
- package/model/merchantNotInitialized.ts +0 -55
- package/model/merchantURL.ts +0 -68
- package/model/message.ts +0 -74
- package/model/models.ts +0 -1421
- package/model/moduleError.ts +0 -157
- package/model/newsArticle.ts +0 -92
- package/model/oAIAssistantUpdateParams.ts +0 -79
- package/model/oAIAssistantUpdateParamsCreateParams.ts +0 -79
- package/model/optInList.ts +0 -134
- package/model/optInListSource.ts +0 -74
- package/model/optInListSubscriber.ts +0 -118
- package/model/optInListSubscriberOptInSourceID.ts +0 -26
- package/model/outboundSMS.ts +0 -160
- package/model/outboundSMSPaymentObjectBroadcastID.ts +0 -26
- package/model/outboundSMSStatus.ts +0 -26
- package/model/paginatedWTMembers.ts +0 -52
- package/model/paginatedWTMerchantCredits.ts +0 -52
- package/model/paginationRequestWithIDAndWithoutSortOptions.ts +0 -49
- package/model/paginationRequestWithSortOptions.ts +0 -73
- package/model/paginationRequestWithSortOptionsSortOrder.ts +0 -29
- package/model/paymentDesign.ts +0 -141
- package/model/performance.ts +0 -134
- package/model/phoneNumber.ts +0 -158
- package/model/phoneNumberCapabilities.ts +0 -49
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherIsActive.ts +0 -107
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +0 -101
- package/model/pickMSEmployeeAPIKeyCreateParamsExcludeKeyofMSEmployeeAPIKeyCreateParamsEmployeeID.ts +0 -40
- package/model/pickMSEmployeeAPIKeyUpdateParamsExcludeKeyofMSEmployeeAPIKeyUpdateParamsId.ts +0 -40
- package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +0 -82
- package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +0 -121
- package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +0 -43
- package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +0 -82
- package/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKey.ts +0 -62
- package/model/pickPaginationRequestWithSortOptionsExcludeKeyofPaginationRequestWithSortOptionsSortKeySortOrder.ts +0 -29
- package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +0 -46
- package/model/pickSSImportedListRecipientFromMembershipTierImportExcludeKeyofSSImportedListRecipientFromMembershipTierImportEmployeeIDOrTierID.ts +0 -40
- package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +0 -52
- package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +0 -100
- package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeIDOrOptInConfirmedMediaURLsOrOptOutConfirmedMediaURLs.ts +0 -94
- package/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCount.ts +0 -77
- package/model/pickSSOptInListMemberUpdateParamsExcludeKeyofSSOptInListMemberUpdateParamsMerchantCreatedAtOrMaxSMSCountOptInSourceID.ts +0 -26
- package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +0 -112
- package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +0 -46
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +0 -156
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhonePaymentObjectBroadcastID.ts +0 -26
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhoneStatus.ts +0 -26
- package/model/pickVSAdvertisementCreditCreateParamsExcludeKeyofVSAdvertisementCreditCreateParamsEmployeeID.ts +0 -59
- package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +0 -133
- package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +0 -59
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +0 -101
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDateValueType.ts +0 -26
- package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +0 -142
- package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.ts +0 -107
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +0 -107
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsIdBorderStyleType.ts +0 -26
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +0 -163
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtRegisterID.ts +0 -29
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAtTransactionType.ts +0 -29
- package/model/pickWTEmailSubscriberUpdateParamsExcludeKeyofWTEmailSubscriberUpdateParamsId.ts +0 -46
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +0 -128
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartDay.ts +0 -26
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartHour.ts +0 -26
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMeridiem.ts +0 -26
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmailScheduleStartMinute.ts +0 -26
- package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumberOrEmailOrBirthday.ts +0 -91
- package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +0 -52
- package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +0 -40
- package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +0 -64
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +0 -141
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDBroadcastStatus.ts +0 -26
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListIDPaymentObjectPrefix.ts +0 -26
- package/model/pickWTSmsSubscriberUpdateParamsExcludeKeyofWTSmsSubscriberUpdateParamsId.ts +0 -34
- package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +0 -107
- package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +0 -46
- package/model/plan.ts +0 -61
- package/model/portalPage.ts +0 -88
- package/model/presignedPost.ts +0 -44
- package/model/presignedPostFields.ts +0 -43
- package/model/product.ts +0 -73
- package/model/profileStatuses.ts +0 -21
- package/model/promoCode.ts +0 -104
- package/model/qRCodeDesign.ts +0 -80
- package/model/reachPerformanceStats.ts +0 -124
- package/model/request.ts +0 -349
- package/model/response.ts +0 -67
- package/model/role.ts +0 -115
- package/model/roleAuditLog.ts +0 -97
- package/model/roomRate.ts +0 -92
- package/model/sSImportedListRecipientCreateParams.ts +0 -37
- package/model/sSOptInSource.ts +0 -73
- package/model/sSOutboundStatuses.ts +0 -26
- package/model/saveMerchantCreditPaymentDesignRequest.ts +0 -31
- package/model/saveTicketSettingsRequest.ts +0 -49
- package/model/service.ts +0 -92
- package/model/setDefaultPaymentMethodRequest.ts +0 -31
- package/model/simpleSMSBroadcast.ts +0 -151
- package/model/smsSubscriber.ts +0 -62
- package/model/sortDirection.ts +0 -18
- package/model/staticVoucher.ts +0 -221
- package/model/staticVoucherCampaign.ts +0 -177
- package/model/staticVoucherCampaignBroadcast.ts +0 -145
- package/model/staticVoucherCampaignBroadcastBroadcastStatus.ts +0 -26
- package/model/staticVoucherCampaignBroadcastPaymentObjectPrefix.ts +0 -26
- package/model/staticVoucherCampaignUpdate.ts +0 -80
- package/model/staticVoucherCampaignValueType.ts +0 -26
- package/model/staticVoucherId.ts +0 -26
- package/model/status.ts +0 -26
- package/model/subscriptionFeature.ts +0 -79
- package/model/subscriptionPlan.ts +0 -67
- package/model/subscriptionProduct.ts +0 -97
- package/model/tcpa.ts +0 -68
- package/model/thread.ts +0 -62
- package/model/ticket.ts +0 -149
- package/model/ticketSortKeys.ts +0 -22
- package/model/trustBundleStatuses.ts +0 -21
- package/model/updateEmailNotificationPreferenceRequest.ts +0 -31
- package/model/updateStaticVoucherCampaignWithVoucher.ts +0 -104
- package/model/vSCampaignGeneratedMessage.ts +0 -43
- package/model/vSCampaignGeneratedMessagePagination.ts +0 -52
- package/model/vSDynamicVoucherStatus.ts +0 -26
- package/model/vectorStore.ts +0 -62
- package/model/video.ts +0 -86
- package/model/virtualBusinessCard.ts +0 -134
- package/model/wTA2PApplicationUpdateParams.ts +0 -177
- package/model/wTAdvertisementCredit.ts +0 -105
- package/model/wTAdvertisementCreditCreateParams.ts +0 -56
- package/model/wTAdvertisementCreditScan.ts +0 -167
- package/model/wTAdvertisementCreditUpdateParams.ts +0 -56
- package/model/wTAmenityCreateParams.ts +0 -61
- package/model/wTAmenityUpdateParams.ts +0 -61
- package/model/wTAndroidKeystoreResponse.ts +0 -37
- package/model/wTAuthenticationCheckSessionTokenStatusResponse.ts +0 -36
- package/model/wTAuthenticationForgotPassword.ts +0 -31
- package/model/wTAuthenticationLoginRequest.ts +0 -37
- package/model/wTAuthenticationLoginResponse.ts +0 -121
- package/model/wTAuthenticationRegister.ts +0 -157
- package/model/wTAuthenticationRequestResetPassword.ts +0 -31
- package/model/wTAuthenticationResetPassword.ts +0 -43
- package/model/wTAuthenticationSSOLoginForDiscourse.ts +0 -49
- package/model/wTBillingChangePlan.ts +0 -31
- package/model/wTBillingSavePaymentMethod.ts +0 -31
- package/model/wTBillingVerifyPaymentMethodResponse.ts +0 -38
- package/model/wTCountResult.ts +0 -31
- package/model/wTCustomerSearchByMemberID.ts +0 -31
- package/model/wTCustomerSearchByPhoneNumber.ts +0 -31
- package/model/wTDiningCreateParams.ts +0 -61
- package/model/wTDiningUpdateParams.ts +0 -61
- package/model/wTDynamicVoucher.ts +0 -227
- package/model/wTDynamicVoucherCreateParams.ts +0 -98
- package/model/wTDynamicVoucherRedemption.ts +0 -161
- package/model/wTDynamicVoucherRedemptionTransactionType.ts +0 -29
- package/model/wTDynamicVoucherSummary.ts +0 -170
- package/model/wTDynamicVoucherSummaryStatus.ts +0 -26
- package/model/wTDynamicVoucherUpdateParams.ts +0 -98
- package/model/wTEmailSubscriberCreateParams.ts +0 -43
- package/model/wTEmailSubscriberCreateParamsWalletUI.ts +0 -49
- package/model/wTEmailSubscriberUpdateParams.ts +0 -43
- package/model/wTEmployee.ts +0 -212
- package/model/wTEmployeeAPIKey.ts +0 -83
- package/model/wTEmployeeAPIKeyCreateParams.ts +0 -37
- package/model/wTEmployeeAPIKeyUpdateParams.ts +0 -37
- package/model/wTEmployeeCreate.ts +0 -131
- package/model/wTEmployeeCreateDocument.ts +0 -43
- package/model/wTEmployeeCreateMediaFile.ts +0 -43
- package/model/wTEmployeeFileCreate.ts +0 -37
- package/model/wTEmployeeImportRecords.ts +0 -37
- package/model/wTEmployeeNotification.ts +0 -50
- package/model/wTEmployeeNotificationType.ts +0 -26
- package/model/wTEmployeePeerRoles.ts +0 -31
- package/model/wTEmployeeS3FilePresign.ts +0 -44
- package/model/wTEmployeeS3FilePresignContext.ts +0 -26
- package/model/wTEmployeeScheduleSMSCampaignBroadcast.ts +0 -67
- package/model/wTEmployeeScheduleSimpleSMS.ts +0 -62
- package/model/wTEmployeeScheduleSimpleSMSListType.ts +0 -26
- package/model/wTEmployeeScheduleSimpleSMSToRecipient.ts +0 -55
- package/model/wTEmployeeSendHelpDeskResponse.ts +0 -43
- package/model/wTEmployeeUpdate.ts +0 -125
- package/model/wTEmployeeUpdateRecords.ts +0 -37
- package/model/wTFetchWalletPaymentObjectsWithToken.ts +0 -55
- package/model/wTGamingCreateParams.ts +0 -61
- package/model/wTGamingUpdateParams.ts +0 -61
- package/model/wTImageGridCreateParams.ts +0 -55
- package/model/wTImageGridUpdateParams.ts +0 -55
- package/model/wTImportedList.ts +0 -74
- package/model/wTImportedListRecipientFromMembershipTierImport.ts +0 -44
- package/model/wTImportedListRecipientFromMembershipTierImportTierID.ts +0 -26
- package/model/wTInfoGenesisLookupRequestErrors.ts +0 -49
- package/model/wTInfoGenesisRecordFilterParameters.ts +0 -43
- package/model/wTInfoGenesisRoutingIDs.ts +0 -31
- package/model/wTInfoGenesisUniquePostingIDs.ts +0 -31
- package/model/wTLocalInstance.ts +0 -107
- package/model/wTLoungeCreateParams.ts +0 -61
- package/model/wTLoungeUpdateParams.ts +0 -61
- package/model/wTMember.ts +0 -133
- package/model/wTMemberCreationParams.ts +0 -88
- package/model/wTMembershipTier.ts +0 -104
- package/model/wTMembershipTierCreationParams.ts +0 -64
- package/model/wTMembershipTierId.ts +0 -29
- package/model/wTMembershipTierUpdateParams.ts +0 -64
- package/model/wTMembershipTierWithMemberCount.ts +0 -113
- package/model/wTMerchantCredit.ts +0 -106
- package/model/wTMerchantCreditCreationParams.ts +0 -49
- package/model/wTMerchantURLCreate.ts +0 -37
- package/model/wTMerchantURLUpdate.ts +0 -37
- package/model/wTMerchantUpdate.ts +0 -79
- package/model/wTMerchantUpdatePOSIntegration.ts +0 -31
- package/model/wTMerchantUpdatePointsOfContact.ts +0 -49
- package/model/wTMessageInstance.ts +0 -26
- package/model/wTNewsArticleCreateParams.ts +0 -61
- package/model/wTNewsArticleUpdateParams.ts +0 -61
- package/model/wTOptInList.ts +0 -134
- package/model/wTOptInListCreationParams.ts +0 -103
- package/model/wTPassBrandKit.ts +0 -61
- package/model/wTPaymentDesign.ts +0 -141
- package/model/wTPaymentDesignCreateParams.ts +0 -104
- package/model/wTPaymentDesignUpdateParams.ts +0 -104
- package/model/wTPerformanceCreateParams.ts +0 -103
- package/model/wTPerformanceUpdateParams.ts +0 -103
- package/model/wTPosMachine.ts +0 -88
- package/model/wTPosMachineCreateParams.ts +0 -58
- package/model/wTPosMachineUpdateParams.ts +0 -58
- package/model/wTProductCreateParams.ts +0 -61
- package/model/wTProductUpdateParams.ts +0 -61
- package/model/wTPromoCodeCreateParams.ts +0 -73
- package/model/wTPromoCodeUpdateParams.ts +0 -73
- package/model/wTQRCodeDesign.ts +0 -80
- package/model/wTQRCodeDesignCreateParams.ts +0 -49
- package/model/wTQRCodeDesignUpdateParams.ts +0 -49
- package/model/wTQuickLink.ts +0 -87
- package/model/wTQuickLinkCreateParams.ts +0 -56
- package/model/wTQuickLinkLinkBookSectionID.ts +0 -26
- package/model/wTQuickLinkSectionCreateParams.ts +0 -37
- package/model/wTQuickLinkSectionUpdateParams.ts +0 -37
- package/model/wTQuickLinkUpdateParams.ts +0 -56
- package/model/wTRole.ts +0 -115
- package/model/wTRoomRateCreateParams.ts +0 -61
- package/model/wTRoomRateUpdateParams.ts +0 -61
- package/model/wTSMSAcquirePhoneNumber.ts +0 -31
- package/model/wTSMSImportOptInListSubscribers.ts +0 -43
- package/model/wTSMSImportedListCreate.ts +0 -43
- package/model/wTSMSOptInListSourceCreate.ts +0 -37
- package/model/wTSMSUpdatePhoneNumberConfig.ts +0 -97
- package/model/wTServiceCreateParams.ts +0 -61
- package/model/wTServiceUpdateParams.ts +0 -61
- package/model/wTSettingsSetPassword.ts +0 -31
- package/model/wTSmsSubscriberCreateParams.ts +0 -31
- package/model/wTSmsSubscriberCreateParamsWalletUI.ts +0 -37
- package/model/wTSmsSubscriberUpdateParams.ts +0 -31
- package/model/wTStaticVoucher.ts +0 -221
- package/model/wTStaticVoucherCampaign.ts +0 -177
- package/model/wTStaticVoucherCampaignPreviewMessagesByPage.ts +0 -55
- package/model/wTStaticVoucherCreateParams.ts +0 -50
- package/model/wTStaticVoucherUpdateParams.ts +0 -43
- package/model/wTSystemApprovePhoneNumber.ts +0 -37
- package/model/wTSystemRoleCreate.ts +0 -37
- package/model/wTTCPAOpt.ts +0 -45
- package/model/wTTCPAOptListID.ts +0 -26
- package/model/wTTCPAOptSourceID.ts +0 -26
- package/model/wTTicket.ts +0 -149
- package/model/wTTicketCreateParams.ts +0 -64
- package/model/wTTicketUpdateParams.ts +0 -58
- package/model/wTTwilioRequestAuthyCode.ts +0 -37
- package/model/wTTwilioVerifyAuthyCode.ts +0 -43
- package/model/wTVideoCreateParams.ts +0 -55
- package/model/wTVideoUpdateParams.ts +0 -55
- package/model/wTVirtualBusinessCardCreateParams.ts +0 -103
- package/model/wTVirtualBusinessCardUpdateParams.ts +0 -103
- package/model/wTWalletConfigurationSaveWalletRecord.ts +0 -477
- package/model/wTWalletConfigurationSaveWalletRecordPassBrandKit.ts +0 -62
- package/model/wTWalletConfigurationSaveWalletRecordSmsOptInSourceID.ts +0 -26
- package/model/wTWalletItemRedemption.ts +0 -43
- package/model/wTWalletObjectPrefixCounts.ts +0 -43
- package/model/wTWalletPageView.ts +0 -263
- package/model/wTWalletPageViewCount.ts +0 -49
- package/model/wTWalletPageViewGeoPoint.ts +0 -37
- package/model/wTWhatsAppInboundWebhook.ts +0 -109
- package/model/wTWhatsAppStatusCallback.ts +0 -91
- package/model/walletConfiguration.ts +0 -510
- package/model/walletPageView.ts +0 -263
- package/model/webpage.ts +0 -85
- package/openapitools.json +0 -7
- package/readme-generator.py +0 -107
- package/scripts/failure.py +0 -67
- package/scripts/slack.py +0 -94
- package/tsconfig.json +0 -25
package/README.md
CHANGED
|
@@ -1,1530 +1,1551 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
# Wallet SDK for Node.js
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/wallet)
|
|
6
|
-
[](https://www.npmjs.com/package/wallet)
|
|
7
|
-
|
|
8
|
-
The official server-side TypeScript / Node.js SDK for the [Wallet Inc](https://wallet.inc) CRM & Digital Payments platform. Create and manage membership tiers, club members, vouchers, promotions, store credit, payment designs, SMS/MMS, and more.
|
|
9
|
-
|
|
10
|
-
> **Access note:** this module is currently restricted to Wallet Inc customers. Need access or a hand getting started? Join us on [Discord](https://discord.gg/xzwhcNCjcQ).
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install wallet
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Quickstart
|
|
19
|
-
|
|
20
|
-
Each resource has its own API client, constructed with your API domain. Every call takes an options object carrying your API key as an `access-token` header. Create your key in the [Wallet Developer Hub](https://wallet.dev).
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
import * as api from "wallet";
|
|
24
|
-
|
|
25
|
-
const domain = "https://api.wall.et";
|
|
26
|
-
const options = {
|
|
27
|
-
headers: {
|
|
28
|
-
"access-token": "YOUR_API_KEY",
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// Create a membership tier
|
|
33
|
-
const membershipTiers = new api.MembershipTiersApi(domain);
|
|
34
|
-
const { body: tier } = await membershipTiers.createMembershipTier(
|
|
35
|
-
{ tierNumber: "1", tierName: "GOLD", tierDiscount: 20 },
|
|
36
|
-
options
|
|
37
|
-
);
|
|
38
|
-
console.log(tier);
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The runnable examples below import shared `domain` and `headers` from a local `./constants` file (see [`examples/constants.ts`](examples/constants.ts)); swap in your own domain and API key. To run them:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
cd examples
|
|
45
|
-
npm install # installs ts-node to run the TypeScript examples directly
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Documentation
|
|
49
|
-
|
|
50
|
-
Full API reference and guides live in the [Wallet Developer Hub](https://wallet.dev).
|
|
51
|
-
|
|
52
|
-
## Examples
|
|
53
|
-
|
|
54
|
-
Click any example to expand the full runnable snippet.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<details>
|
|
58
|
-
<summary><b>Create and manipulate Membership Tiers</b></summary>
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
import * as api from "wallet";
|
|
62
|
-
import * as constants from "./constants";
|
|
63
|
-
|
|
64
|
-
membershipTiers();
|
|
65
|
-
|
|
66
|
-
async function membershipTiers() {
|
|
67
|
-
let tiersClient = new api.MembershipTiersApi(constants.domain);
|
|
68
|
-
|
|
69
|
-
// Create new membership tier
|
|
70
|
-
let tier = await tiersClient.createMembershipTier({
|
|
71
|
-
tierNumber: "1",
|
|
72
|
-
tierName: "GOLD",
|
|
73
|
-
tierDiscount: 20,
|
|
74
|
-
tierDesignID: "JSUilOPE98",
|
|
75
|
-
pointsDesignID: "L918AJ7356"
|
|
76
|
-
}, constants.headers).catch(err => {
|
|
77
|
-
throw err;
|
|
78
|
-
}).then(resp => {
|
|
79
|
-
return resp.body
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// The membership tier that has just been created
|
|
83
|
-
console.log(tier);
|
|
84
|
-
|
|
85
|
-
// Fetch the created tier
|
|
86
|
-
tier = (await tiersClient.fetchMembershipTierById(tier.id, constants.headers)).body;
|
|
87
|
-
console.log(tier);
|
|
88
|
-
|
|
89
|
-
tier = await tiersClient.updateMembershipTier(tier.id, {
|
|
90
|
-
...tier,
|
|
91
|
-
tierName: "SILVER"
|
|
92
|
-
}, constants.headers).catch(err => {
|
|
93
|
-
throw err;
|
|
94
|
-
}).then(resp => {
|
|
95
|
-
return resp.body
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// Archive the membership tier
|
|
99
|
-
tier = await tiersClient.archiveMembershipTier(tier.id, constants.headers)
|
|
100
|
-
.catch(err => {
|
|
101
|
-
throw err;
|
|
102
|
-
}).then(resp => {
|
|
103
|
-
return resp.body
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
console.log(tier.isActive); // This will be false, since the tier has just been archived
|
|
107
|
-
|
|
108
|
-
// Restore the membership tier
|
|
109
|
-
tier = await tiersClient.restoreMembershipTier(tier.id, constants.headers)
|
|
110
|
-
.catch(err => {
|
|
111
|
-
throw err;
|
|
112
|
-
}).then(resp => {
|
|
113
|
-
return resp.body
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
console.log(tier.isActive); // This will be true, since the tier has just been restored
|
|
117
|
-
|
|
118
|
-
// Fetch paginated tier history logs
|
|
119
|
-
let historyLogs = (await tiersClient.fetchMembershipTierHistoryLog({
|
|
120
|
-
pageSize: 10,
|
|
121
|
-
pageNum: 1,
|
|
122
|
-
id: tier.id
|
|
123
|
-
}, constants.headers)).body;
|
|
124
|
-
|
|
125
|
-
console.log(historyLogs);
|
|
126
|
-
|
|
127
|
-
let redemptionLogs = (await tiersClient.fetchMembershipTierRedemptionLog({
|
|
128
|
-
pageSize: 10,
|
|
129
|
-
pageNum: 1,
|
|
130
|
-
id: tier.id
|
|
131
|
-
}, constants.headers)).body;
|
|
132
|
-
|
|
133
|
-
console.log(redemptionLogs);
|
|
134
|
-
|
|
135
|
-
// Fetch the list of tiers with members
|
|
136
|
-
let tiersList = ((await (tiersClient.fetchAllMembershipTiersWithMemberCount(false, constants.headers))).body);
|
|
137
|
-
console.log(tiersList);
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
</details>
|
|
142
|
-
|
|
143
|
-
<details>
|
|
144
|
-
<summary><b>Create and manipulate Payment Designs</b></summary>
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
import * as api from "wallet";
|
|
148
|
-
import * as constants from "./constants";
|
|
149
|
-
|
|
150
|
-
paymentDesigns();
|
|
151
|
-
|
|
152
|
-
async function paymentDesigns() {
|
|
153
|
-
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
154
|
-
|
|
155
|
-
// Create a new payment design
|
|
156
|
-
let design = await designClient.createPaymentDesign({
|
|
157
|
-
borderColor: "#f0f0f0",
|
|
158
|
-
borderStyleType: "Dashed",
|
|
159
|
-
borderSize: "4px",
|
|
160
|
-
borderRadius: 2,
|
|
161
|
-
fontColor: "#777777",
|
|
162
|
-
fontType: "Arial",
|
|
163
|
-
abbreviation: "ABBR",
|
|
164
|
-
acronym: "AR",
|
|
165
|
-
icon: "fa-anchor",
|
|
166
|
-
designName: "Thanksgiving Design",
|
|
167
|
-
displayName: "Decorator",
|
|
168
|
-
}, constants.headers).catch(err => {
|
|
169
|
-
throw err;
|
|
170
|
-
}).then(resp => {
|
|
171
|
-
return resp.body
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// The payment design that has just been created
|
|
175
|
-
console.log(design);
|
|
176
|
-
|
|
177
|
-
// Fetch the created design
|
|
178
|
-
design = (await designClient.fetchPaymentDesignById(design.id, constants.headers)).body;
|
|
179
|
-
console.log(design);
|
|
180
|
-
|
|
181
|
-
// Change the borderColor and borderSize of the payment design
|
|
182
|
-
design = await designClient.updatePaymentDesign(design.id, {
|
|
183
|
-
...design,
|
|
184
|
-
borderColor: "#050505",
|
|
185
|
-
borderSize: "6px",
|
|
186
|
-
}, constants.headers).catch(err => {
|
|
187
|
-
throw err;
|
|
188
|
-
}).then(resp => {
|
|
189
|
-
return resp.body
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// Archive the payment design
|
|
193
|
-
design = await designClient.archivePaymentDesign(design.id, constants.headers)
|
|
194
|
-
.catch(err => {
|
|
195
|
-
throw err;
|
|
196
|
-
}).then(resp => {
|
|
197
|
-
return resp.body
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
console.log(design.isActive); // This will be false, since the design has just been archived
|
|
201
|
-
|
|
202
|
-
// Restore the payment design
|
|
203
|
-
design = await designClient.restorePaymentDesign(design.id, constants.headers)
|
|
204
|
-
.catch(err => {
|
|
205
|
-
throw err;
|
|
206
|
-
}).then(resp => {
|
|
207
|
-
return resp.body
|
|
208
|
-
});
|
|
209
|
-
console.log(design.isActive); // This will be true, since the design has just been restored
|
|
210
|
-
|
|
211
|
-
// Fetch all payment designs
|
|
212
|
-
let designs = (await designClient.fetchAllPaymentDesigns(false, constants.headers)).body;
|
|
213
|
-
console.log(designs);
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
</details>
|
|
218
|
-
|
|
219
|
-
<details>
|
|
220
|
-
<summary><b>Create and manipulate Club Members</b></summary>
|
|
221
|
-
|
|
222
|
-
```typescript
|
|
223
|
-
import * as api from "wallet";
|
|
224
|
-
import { PaginationRequestWithSortOptions } from "wallet";
|
|
225
|
-
import * as constants from "./constants";
|
|
226
|
-
|
|
227
|
-
clubMembers();
|
|
228
|
-
|
|
229
|
-
async function clubMembers() {
|
|
230
|
-
let membersClient = new api.ClubMembersPointsApi(constants.domain);
|
|
231
|
-
|
|
232
|
-
// Create new club member
|
|
233
|
-
let member = await membersClient.createMember({
|
|
234
|
-
firstName: "John",
|
|
235
|
-
lastName: "Doe",
|
|
236
|
-
membershipTierID: "HDywI893LQ",
|
|
237
|
-
mobileNumber: "+1807654543",
|
|
238
|
-
pointsAccrued: 2000,
|
|
239
|
-
memberID: "MEM001"
|
|
240
|
-
}, constants.headers).catch(err => {
|
|
241
|
-
throw err;
|
|
242
|
-
}).then(resp => {
|
|
243
|
-
return resp.body
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
// The club member that has just been created
|
|
247
|
-
console.log(member);
|
|
248
|
-
|
|
249
|
-
// Fetch the created member
|
|
250
|
-
member = (await membersClient.fetchMemberById(member.id, constants.headers)).body;
|
|
251
|
-
console.log(member);
|
|
252
|
-
|
|
253
|
-
member = await membersClient.updateMember(member.id, {
|
|
254
|
-
...member,
|
|
255
|
-
mobileNumber: "+1809863542"
|
|
256
|
-
}, constants.headers).catch(err => {
|
|
257
|
-
throw err;
|
|
258
|
-
}).then(resp => {
|
|
259
|
-
return resp.body
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
// Archive the club member
|
|
263
|
-
member = await membersClient.archiveMember(member.id, constants.headers)
|
|
264
|
-
.catch(err => {
|
|
265
|
-
throw err;
|
|
266
|
-
}).then(resp => {
|
|
267
|
-
return resp.body
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
console.log(member.isActive); // This will be false, since the member has just been archived
|
|
271
|
-
|
|
272
|
-
// Restore the club member
|
|
273
|
-
member = await membersClient.restoreMember(member.id, constants.headers)
|
|
274
|
-
.catch(err => {
|
|
275
|
-
throw err;
|
|
276
|
-
}).then(resp => {
|
|
277
|
-
return resp.body
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
console.log(member.isActive); // This will be true, since the member has just been restored
|
|
281
|
-
|
|
282
|
-
// Fetch members by page
|
|
283
|
-
let members = (await membersClient.fetchMembersByPage({
|
|
284
|
-
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
285
|
-
})).body;
|
|
286
|
-
|
|
287
|
-
console.log(members);
|
|
288
|
-
|
|
289
|
-
// Fetch paginated member history logs
|
|
290
|
-
let historyLogs = (await membersClient.fetchMemberHistoryLog({
|
|
291
|
-
pageSize: 10,
|
|
292
|
-
pageNum: 1,
|
|
293
|
-
id: member.id
|
|
294
|
-
}, constants.headers)).body;
|
|
295
|
-
|
|
296
|
-
console.log(historyLogs);
|
|
297
|
-
|
|
298
|
-
let redemptionLogs = (await membersClient.fetchMemberRedemptionLog({
|
|
299
|
-
pageSize: 10,
|
|
300
|
-
pageNum: 1,
|
|
301
|
-
id: member.id
|
|
302
|
-
}, constants.headers)).body;
|
|
303
|
-
|
|
304
|
-
console.log(redemptionLogs);
|
|
305
|
-
|
|
306
|
-
// Fetch the count of members
|
|
307
|
-
let membersCount = ((await (membersClient.fetchMembersCount(constants.headers))).body).count;
|
|
308
|
-
console.log(membersCount);
|
|
309
|
-
}
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
</details>
|
|
313
|
-
|
|
314
|
-
<details>
|
|
315
|
-
<summary><b>Create and manipulate Advertisement Credits</b></summary>
|
|
316
|
-
|
|
317
|
-
```typescript
|
|
318
|
-
import * as api from "wallet";
|
|
319
|
-
import * as constants from "./constants";
|
|
320
|
-
|
|
321
|
-
advertisementCredits();
|
|
322
|
-
|
|
323
|
-
async function advertisementCredits() {
|
|
324
|
-
let client = new api.AdvertisementCreditsApi(constants.domain);
|
|
325
|
-
|
|
326
|
-
let title = "Ad Credit API Client (New Headers)";
|
|
327
|
-
|
|
328
|
-
// Create a new advertisement credit
|
|
329
|
-
let adCredit = await client.createAdvertisementCredit({
|
|
330
|
-
title: title,
|
|
331
|
-
valueType: "percent",
|
|
332
|
-
paymentDesignID: "jbkVgPTgoo",
|
|
333
|
-
maxUses: 5,
|
|
334
|
-
discountValue: 500,
|
|
335
|
-
}, constants.headers).catch(err => {
|
|
336
|
-
throw err;
|
|
337
|
-
}).then(resp => {
|
|
338
|
-
return resp.body
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
// The advertisement credit that has just been created
|
|
342
|
-
console.log(adCredit);
|
|
343
|
-
|
|
344
|
-
// Fetch the advertisement credit that has just been created
|
|
345
|
-
adCredit = (await client.fetchAdvertisementCreditById(adCredit.id, constants.headers)).body;
|
|
346
|
-
console.log(adCredit);
|
|
347
|
-
|
|
348
|
-
// Update the advertisement credit with a new maxUses count
|
|
349
|
-
adCredit = await client.updateAdvertisementCredit(adCredit.id, {
|
|
350
|
-
title: `${title} Update`,
|
|
351
|
-
valueType: "percent",
|
|
352
|
-
paymentDesignID: "jbkVgPTgoo",
|
|
353
|
-
maxUses: 10,
|
|
354
|
-
discountValue: 1000,
|
|
355
|
-
}, constants.headers).catch(err => {
|
|
356
|
-
throw err;
|
|
357
|
-
}).then(resp => {
|
|
358
|
-
return resp.body
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
// Retrieve all the scans
|
|
362
|
-
let scans = (await client.fetchAdvertisementCreditScans(adCredit.id, constants.headers)).body;
|
|
363
|
-
console.log("All scans: " + JSON.stringify(scans));
|
|
364
|
-
|
|
365
|
-
// Archive the advertisement credit
|
|
366
|
-
adCredit = await client.archiveAdvertisementCredit(adCredit.id, constants.headers)
|
|
367
|
-
.catch(err => {
|
|
368
|
-
throw err;
|
|
369
|
-
}).then(resp => {
|
|
370
|
-
return resp.body
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
console.log(adCredit.isActive); // This will be false, since the advertisement credit has just been archived
|
|
374
|
-
|
|
375
|
-
// Restore the advertisement credit
|
|
376
|
-
adCredit = await client.restoreAdvertisementCredit(adCredit.id, constants.headers)
|
|
377
|
-
.catch(err => {
|
|
378
|
-
throw err;
|
|
379
|
-
}).then(resp => {
|
|
380
|
-
return resp.body
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
console.log(adCredit.isActive); // This will be true, since the advertisement credit has just been restored
|
|
384
|
-
|
|
385
|
-
// Fetch all the active advertisement credits
|
|
386
|
-
let adCredits = (await client.fetchAllAdvertisementCredits(false, constants.headers)).body;
|
|
387
|
-
console.log("Active advertisement credits: ", JSON.stringify(adCredit));
|
|
388
|
-
}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
</details>
|
|
392
|
-
|
|
393
|
-
<details>
|
|
394
|
-
<summary><b>Create and manipulate Link Book Links</b></summary>
|
|
395
|
-
|
|
396
|
-
```typescript
|
|
397
|
-
import * as api from "wallet";
|
|
398
|
-
import * as constants from "./constants";
|
|
399
|
-
|
|
400
|
-
linkBook();
|
|
401
|
-
|
|
402
|
-
async function linkBook() {
|
|
403
|
-
let client = new api.LinkBookApi(constants.domain);
|
|
404
|
-
|
|
405
|
-
// Create a new link book link
|
|
406
|
-
let link = await client.createLinkBook({
|
|
407
|
-
title: "External Link",
|
|
408
|
-
url: "https://example.com",
|
|
409
|
-
icon: "fa-clock",
|
|
410
|
-
orderNumber: 1,
|
|
411
|
-
linkBookSectionID: "",
|
|
412
|
-
}, constants.headers).catch(err => {
|
|
413
|
-
throw err;
|
|
414
|
-
}).then(resp => {
|
|
415
|
-
return resp.body
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
// The link book link that has just been created
|
|
419
|
-
console.log(link);
|
|
420
|
-
|
|
421
|
-
// Update the link book link with a new url
|
|
422
|
-
link = await client.updateLinkBook(link.id, {
|
|
423
|
-
...link,
|
|
424
|
-
url: "https://test.com"
|
|
425
|
-
}, constants.headers).catch(err => {
|
|
426
|
-
throw err;
|
|
427
|
-
}).then(resp => {
|
|
428
|
-
return resp.body
|
|
429
|
-
});
|
|
430
|
-
|
|
431
|
-
// Archive the link book link
|
|
432
|
-
link = await client.archiveLinkBook(link.id, constants.headers)
|
|
433
|
-
.catch(err => {
|
|
434
|
-
throw err;
|
|
435
|
-
}).then(resp => {
|
|
436
|
-
return resp.body
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
console.log(link.isActive); // This will be false, since the link book link has just been archived
|
|
440
|
-
|
|
441
|
-
// Restore the link book link
|
|
442
|
-
link = await client.restoreLinkBook(link.id, constants.headers)
|
|
443
|
-
.catch(err => {
|
|
444
|
-
throw err;
|
|
445
|
-
}).then(resp => {
|
|
446
|
-
return resp.body
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
console.log(link.isActive); // This will be true, since the link book link has just been restored
|
|
450
|
-
|
|
451
|
-
// Fetch all links
|
|
452
|
-
let links = (await client.fetchAllLinkBook(false, constants.headers)).body;
|
|
453
|
-
console.log(links);
|
|
454
|
-
}
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
</details>
|
|
458
|
-
|
|
459
|
-
<details>
|
|
460
|
-
<summary><b>Create and manipulate Merchant URLs</b></summary>
|
|
461
|
-
|
|
462
|
-
```typescript
|
|
463
|
-
import * as api from "wallet";
|
|
464
|
-
import * as constants from "./constants";
|
|
465
|
-
|
|
466
|
-
merchantURLs();
|
|
467
|
-
|
|
468
|
-
async function merchantURLs() {
|
|
469
|
-
let client = new api.MerchantURLsApi(constants.domain);
|
|
470
|
-
|
|
471
|
-
// Create a new merchant URL
|
|
472
|
-
let url = await client.createMerchantURL({
|
|
473
|
-
nickname: "Instagram",
|
|
474
|
-
destinationURL: "https://instagram.com/merchant"
|
|
475
|
-
}, constants.headers).catch(err => {
|
|
476
|
-
throw err;
|
|
477
|
-
}).then(resp => {
|
|
478
|
-
return resp.body
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
// The merchant URL that has just been created
|
|
482
|
-
console.log(url);
|
|
483
|
-
|
|
484
|
-
// Fetch the created url
|
|
485
|
-
url = (await client.fetchMerchantURL(url.id, constants.headers)).body;
|
|
486
|
-
console.log(url);
|
|
487
|
-
|
|
488
|
-
// Update the merchant URL with a new destination URL
|
|
489
|
-
url = await client.updateMerchantURL(url.id, {
|
|
490
|
-
...url,
|
|
491
|
-
destinationURL: "https://instagram.com/redirect/merchant"
|
|
492
|
-
}, constants.headers).catch(err => {
|
|
493
|
-
throw err;
|
|
494
|
-
}).then(resp => {
|
|
495
|
-
return resp.body
|
|
496
|
-
});
|
|
497
|
-
|
|
498
|
-
// Archive the merchant URL
|
|
499
|
-
url = await client.archiveMerchantURL(url.id, constants.headers)
|
|
500
|
-
.catch(err => {
|
|
501
|
-
throw err;
|
|
502
|
-
}).then(resp => {
|
|
503
|
-
return resp.body
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
console.log(url.isActive); // This will be false, since the merchant URL has just been archived
|
|
507
|
-
|
|
508
|
-
// Restore the merchant URL
|
|
509
|
-
url = await client.restoreMerchantURL(url.id, constants.headers)
|
|
510
|
-
.catch(err => {
|
|
511
|
-
throw err;
|
|
512
|
-
}).then(resp => {
|
|
513
|
-
return resp.body
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
console.log(url.isActive); // This will be true, since the merchant URL has just been restored
|
|
517
|
-
|
|
518
|
-
// Fetch all merchant urls
|
|
519
|
-
let urls = (await client.fetchAllMerchantURLs(false, constants.headers)).body;
|
|
520
|
-
console.log(urls);
|
|
521
|
-
|
|
522
|
-
// Fetch all the wallet page views for the given merchant url
|
|
523
|
-
let pageViews = (await (client.fetchMerchantURLRequests(url.id, constants.headers))).body;
|
|
524
|
-
console.log(pageViews);
|
|
525
|
-
}
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
</details>
|
|
529
|
-
|
|
530
|
-
<details>
|
|
531
|
-
<summary><b>Create and manipulate News Articles</b></summary>
|
|
532
|
-
|
|
533
|
-
```typescript
|
|
534
|
-
import * as api from "wallet";
|
|
535
|
-
import * as constants from "./constants";
|
|
536
|
-
|
|
537
|
-
news();
|
|
538
|
-
|
|
539
|
-
async function news() {
|
|
540
|
-
let client = new api.NewsApi(constants.domain);
|
|
541
|
-
|
|
542
|
-
// Create a new news article
|
|
543
|
-
let article = await client.createNewsArticle({
|
|
544
|
-
title: "News Article",
|
|
545
|
-
orderNumber: 1,
|
|
546
|
-
body: "This is a news article related to the merchant",
|
|
547
|
-
url: "https://blog.merchant.com",
|
|
548
|
-
mediaURL: "https://example.com/image"
|
|
549
|
-
}, constants.headers).catch(err => {
|
|
550
|
-
throw err;
|
|
551
|
-
}).then(resp => {
|
|
552
|
-
return resp.body
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
// The news article that has just been created
|
|
557
|
-
console.log(article);
|
|
558
|
-
|
|
559
|
-
// Update the news article with a new title
|
|
560
|
-
article = await client.updateNewsArticle(article.id, {
|
|
561
|
-
...article,
|
|
562
|
-
title: "News Article Updated"
|
|
563
|
-
}, constants.headers).catch(err => {
|
|
564
|
-
throw err;
|
|
565
|
-
}).then(resp => {
|
|
566
|
-
return resp.body
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
// Archive the news article
|
|
570
|
-
article = await client.archiveNewsArticle(article.id, constants.headers)
|
|
571
|
-
.catch(err => {
|
|
572
|
-
throw err;
|
|
573
|
-
}).then(resp => {
|
|
574
|
-
return resp.body
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
console.log(article.isActive); // This will be false, since the news article has just been archived
|
|
578
|
-
|
|
579
|
-
// Restore the news article
|
|
580
|
-
article = await client.restoreNewsArticle(article.id, constants.headers)
|
|
581
|
-
.catch(err => {
|
|
582
|
-
throw err;
|
|
583
|
-
}).then(resp => {
|
|
584
|
-
return resp.body
|
|
585
|
-
});
|
|
586
|
-
|
|
587
|
-
console.log(article.isActive); // This will be true, since the news article has just been restored
|
|
588
|
-
|
|
589
|
-
// Fetch all articles
|
|
590
|
-
let articles = (await client.fetchAllNewsArticles(false, constants.headers)).body;
|
|
591
|
-
console.log(articles);
|
|
592
|
-
}
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
</details>
|
|
596
|
-
|
|
597
|
-
<details>
|
|
598
|
-
<summary><b>Create and manipulate Performances</b></summary>
|
|
599
|
-
|
|
600
|
-
```typescript
|
|
601
|
-
import * as api from "wallet";
|
|
602
|
-
import * as constants from "./constants";
|
|
603
|
-
|
|
604
|
-
performances();
|
|
605
|
-
|
|
606
|
-
async function performances() {
|
|
607
|
-
let client = new api.PerformancesApi(constants.domain);
|
|
608
|
-
|
|
609
|
-
// Create a new performance
|
|
610
|
-
let performance = await client.createPerformance({
|
|
611
|
-
title: "Performance",
|
|
612
|
-
body: "Details related to the performance",
|
|
613
|
-
startDateTime: new Date(),
|
|
614
|
-
price: 200,
|
|
615
|
-
url: "https://blog.merchant.com",
|
|
616
|
-
orderNumber: 1,
|
|
617
|
-
mediaURL: "https://example.com/image",
|
|
618
|
-
isSoldOut: false,
|
|
619
|
-
|
|
620
|
-
}, constants.headers).catch(err => {
|
|
621
|
-
throw err;
|
|
622
|
-
}).then(resp => {
|
|
623
|
-
return resp.body
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
// The performance that has just been created
|
|
628
|
-
console.log(performance);
|
|
629
|
-
|
|
630
|
-
// Update the performance with a new title
|
|
631
|
-
performance = await client.updatePerformance(performance.id, {
|
|
632
|
-
...performance,
|
|
633
|
-
title: "performance Updated"
|
|
634
|
-
}, constants.headers).catch(err => {
|
|
635
|
-
throw err;
|
|
636
|
-
}).then(resp => {
|
|
637
|
-
return resp.body
|
|
638
|
-
});
|
|
639
|
-
|
|
640
|
-
// Archive the performance
|
|
641
|
-
performance = await client.archivePerformance(performance.id, constants.headers)
|
|
642
|
-
.catch(err => {
|
|
643
|
-
throw err;
|
|
644
|
-
}).then(resp => {
|
|
645
|
-
return resp.body
|
|
646
|
-
});
|
|
647
|
-
|
|
648
|
-
console.log(performance.isActive); // This will be false, since the performance has just been archived
|
|
649
|
-
|
|
650
|
-
// Restore the performance
|
|
651
|
-
performance = await client.restorePerformance(performance.id, constants.headers)
|
|
652
|
-
.catch(err => {
|
|
653
|
-
throw err;
|
|
654
|
-
}).then(resp => {
|
|
655
|
-
return resp.body
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
console.log(performance.isActive); // This will be true, since the performance has just been restored
|
|
659
|
-
|
|
660
|
-
// Fetch all performances
|
|
661
|
-
let performances = (await client.fetchAllPerformances(false, constants.headers)).body;
|
|
662
|
-
console.log(performances);
|
|
663
|
-
}
|
|
664
|
-
```
|
|
665
|
-
|
|
666
|
-
</details>
|
|
667
|
-
|
|
668
|
-
<details>
|
|
669
|
-
<summary><b>Create and manipulate Promo Codes</b></summary>
|
|
670
|
-
|
|
671
|
-
```typescript
|
|
672
|
-
import * as api from "wallet";
|
|
673
|
-
import * as constants from "./constants";
|
|
674
|
-
|
|
675
|
-
promocodes();
|
|
676
|
-
|
|
677
|
-
async function promocodes() {
|
|
678
|
-
let client = new api.PromoCodesApi(constants.domain);
|
|
679
|
-
|
|
680
|
-
// Create a new promocode
|
|
681
|
-
let promocode = await client.createPromoCode({
|
|
682
|
-
title: "Promo Code",
|
|
683
|
-
description: "Description about Promo Code",
|
|
684
|
-
promoCode: "MON50OFF",
|
|
685
|
-
displayValue: "50OFF",
|
|
686
|
-
orderNumber: 1,
|
|
687
|
-
startDate: new Date(),
|
|
688
|
-
expirationDate: new Date(new Date().getTime() + (5 * 24 * 60 * 60 * 1000))
|
|
689
|
-
}, constants.headers).catch(err => {
|
|
690
|
-
throw err;
|
|
691
|
-
}).then(resp => {
|
|
692
|
-
return resp.body
|
|
693
|
-
});
|
|
694
|
-
|
|
695
|
-
// The promocode that has just been created
|
|
696
|
-
console.log(promocode);
|
|
697
|
-
|
|
698
|
-
// Update the promocode with a new title
|
|
699
|
-
promocode = await client.updatePromoCode(promocode.id, {
|
|
700
|
-
...promocode,
|
|
701
|
-
title: "promocode Updated"
|
|
702
|
-
}, constants.headers).catch(err => {
|
|
703
|
-
throw err;
|
|
704
|
-
}).then(resp => {
|
|
705
|
-
return resp.body
|
|
706
|
-
});
|
|
707
|
-
|
|
708
|
-
// Archive the promocode
|
|
709
|
-
promocode = await client.archivePromoCode(promocode.id, constants.headers)
|
|
710
|
-
.catch(err => {
|
|
711
|
-
throw err;
|
|
712
|
-
}).then(resp => {
|
|
713
|
-
return resp.body
|
|
714
|
-
});
|
|
715
|
-
|
|
716
|
-
console.log(promocode.isActive); // This will be false, since the promocode has just been archived
|
|
717
|
-
|
|
718
|
-
// Restore the promocode
|
|
719
|
-
promocode = await client.restorePromoCode(promocode.id, constants.headers)
|
|
720
|
-
.catch(err => {
|
|
721
|
-
throw err;
|
|
722
|
-
}).then(resp => {
|
|
723
|
-
return resp.body
|
|
724
|
-
});
|
|
725
|
-
|
|
726
|
-
console.log(promocode.isActive); // This will be true, since the promocode has just been restored
|
|
727
|
-
|
|
728
|
-
// Fetch all promocodes
|
|
729
|
-
let promocodes = (await client.fetchAllPromoCodes(false, constants.headers)).body;
|
|
730
|
-
console.log(promocodes);
|
|
731
|
-
}
|
|
732
|
-
```
|
|
733
|
-
|
|
734
|
-
</details>
|
|
735
|
-
|
|
736
|
-
<details>
|
|
737
|
-
<summary><b>Create and manipulate Merchant Credits</b></summary>
|
|
738
|
-
|
|
739
|
-
```typescript
|
|
740
|
-
import * as api from "wallet";
|
|
741
|
-
import { PaginationRequestWithSortOptions } from "wallet";
|
|
742
|
-
import * as constants from "./constants";
|
|
743
|
-
|
|
744
|
-
merchantCredits();
|
|
745
|
-
|
|
746
|
-
async function merchantCredits() {
|
|
747
|
-
let client = new api.MerchantCreditsApi(constants.domain);
|
|
748
|
-
|
|
749
|
-
// Create a new merchant credit
|
|
750
|
-
let merchantcredit = await client.createMerchantCredit({
|
|
751
|
-
mobileNumber: "+1808978789",
|
|
752
|
-
creditAmount: 2000, // In cents
|
|
753
|
-
memberID: "MEM001"
|
|
754
|
-
}, constants.headers).catch(err => {
|
|
755
|
-
throw err;
|
|
756
|
-
}).then(resp => {
|
|
757
|
-
return resp.body
|
|
758
|
-
});
|
|
759
|
-
|
|
760
|
-
// The merchant credit that has just been created
|
|
761
|
-
console.log(merchantcredit);
|
|
762
|
-
|
|
763
|
-
// Fetch the created merchantcredit
|
|
764
|
-
merchantcredit = (await client.fetchMerchantCreditById(merchantcredit.id, constants.headers)).body;
|
|
765
|
-
console.log(merchantcredit);
|
|
766
|
-
|
|
767
|
-
// Update the merchant credit with a new title
|
|
768
|
-
merchantcredit = await client.updateMerchantCredit(merchantcredit.id, {
|
|
769
|
-
...merchantcredit,
|
|
770
|
-
creditAmount: 1000, // In cents
|
|
771
|
-
}, constants.headers).catch(err => {
|
|
772
|
-
throw err;
|
|
773
|
-
}).then(resp => {
|
|
774
|
-
return resp.body
|
|
775
|
-
});
|
|
776
|
-
|
|
777
|
-
// Archive the merchant credit
|
|
778
|
-
merchantcredit = await client.archiveMerchantCredit(merchantcredit.id, constants.headers)
|
|
779
|
-
.catch(err => {
|
|
780
|
-
throw err;
|
|
781
|
-
}).then(resp => {
|
|
782
|
-
return resp.body
|
|
783
|
-
});
|
|
784
|
-
|
|
785
|
-
console.log(merchantcredit.isActive); // This will be false, since the merchant credit has just been archived
|
|
786
|
-
|
|
787
|
-
// Restore the merchant credit
|
|
788
|
-
merchantcredit = await client.restoreMerchantCredit(merchantcredit.id, constants.headers)
|
|
789
|
-
.catch(err => {
|
|
790
|
-
throw err;
|
|
791
|
-
}).then(resp => {
|
|
792
|
-
return resp.body
|
|
793
|
-
});
|
|
794
|
-
|
|
795
|
-
console.log(merchantcredit.isActive); // This will be true, since the merchant credit has just been restored
|
|
796
|
-
|
|
797
|
-
// Fetch merchantcredits by page
|
|
798
|
-
let merchantcredits = (await client.fetchMerchantCreditsByPage({
|
|
799
|
-
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
800
|
-
})).body;
|
|
801
|
-
|
|
802
|
-
console.log(merchantcredits);
|
|
803
|
-
|
|
804
|
-
// Fetch paginated merchantcredit history logs
|
|
805
|
-
let historyLogs = (await client.fetchMerchantCreditHistoryLog({
|
|
806
|
-
pageSize: 10,
|
|
807
|
-
pageNum: 1,
|
|
808
|
-
id: merchantcredit.id
|
|
809
|
-
}, constants.headers)).body;
|
|
810
|
-
|
|
811
|
-
console.log(historyLogs);
|
|
812
|
-
|
|
813
|
-
let redemptionLogs = (await client.fetchMerchantCreditRedemptionLog({
|
|
814
|
-
pageSize: 10,
|
|
815
|
-
pageNum: 1,
|
|
816
|
-
id: merchantcredit.id
|
|
817
|
-
}, constants.headers)).body;
|
|
818
|
-
|
|
819
|
-
console.log(redemptionLogs);
|
|
820
|
-
|
|
821
|
-
// Fetch the count of merchantcredits
|
|
822
|
-
let merchantcreditsCount = ((await (client.fetchMerchantCreditCount(constants.headers))).body).count;
|
|
823
|
-
console.log(merchantcreditsCount);
|
|
824
|
-
}
|
|
825
|
-
```
|
|
826
|
-
|
|
827
|
-
</details>
|
|
828
|
-
|
|
829
|
-
<details>
|
|
830
|
-
<summary><b>Create and manipulate Dynamic Vouchers</b></summary>
|
|
831
|
-
|
|
832
|
-
```typescript
|
|
833
|
-
import * as api from "wallet";
|
|
834
|
-
import * as constants from "./constants";
|
|
835
|
-
|
|
836
|
-
dynamicVouchers();
|
|
837
|
-
|
|
838
|
-
async function dynamicVouchers() {
|
|
839
|
-
let client = new api.DynamicVouchersApi(constants.domain);
|
|
840
|
-
|
|
841
|
-
// Fetch payment design
|
|
842
|
-
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
843
|
-
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
844
|
-
.catch(err => {
|
|
845
|
-
throw err;
|
|
846
|
-
}).then(resp => {
|
|
847
|
-
return resp.body;
|
|
848
|
-
});
|
|
849
|
-
let selectedDesign = allDesigns[0];
|
|
850
|
-
|
|
851
|
-
let startDate = new Date();
|
|
852
|
-
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
853
|
-
|
|
854
|
-
let params: api.WTDynamicVoucherCreateParams = {
|
|
855
|
-
title: "Dynamic Voucher API Client",
|
|
856
|
-
notes: "Example notes",
|
|
857
|
-
paymentDesignID: selectedDesign.id,
|
|
858
|
-
dateTimeStart: startDate,
|
|
859
|
-
dateTimeExpiration: expiryDate,
|
|
860
|
-
startingValue: 1000, // In cents
|
|
861
|
-
maxBudget: 90000, // In cents
|
|
862
|
-
decreaseAmount: 10, // In cents
|
|
863
|
-
frequency: 10, // Every 10 units of the frequencyType
|
|
864
|
-
frequencyType: "Minute(s)", // Possible values are: "Minute(s)", "Hour(s)", "Day(s)", "Week(s)", "Second(s)"
|
|
865
|
-
isActive: true,
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
let voucher = await client.createDynamicVoucher(params, constants.headers).catch(err => {
|
|
869
|
-
throw err;
|
|
870
|
-
}).then(resp => {
|
|
871
|
-
return resp.body
|
|
872
|
-
});
|
|
873
|
-
|
|
874
|
-
console.log(voucher);
|
|
875
|
-
|
|
876
|
-
// Fetch dynamic voucher by id
|
|
877
|
-
voucher = await client.fetchDynamicVoucherById(voucher.id, constants.headers)
|
|
878
|
-
.catch(err => {
|
|
879
|
-
throw err;
|
|
880
|
-
}).then(resp => {
|
|
881
|
-
return resp.body;
|
|
882
|
-
});
|
|
883
|
-
|
|
884
|
-
console.log(voucher);
|
|
885
|
-
|
|
886
|
-
// Update dynamic voucher
|
|
887
|
-
voucher = await client.saveDynamicVoucher(voucher.id, {
|
|
888
|
-
...params,
|
|
889
|
-
title: `${voucher.title} Updated`,
|
|
890
|
-
}, constants.headers)
|
|
891
|
-
.catch(err => {
|
|
892
|
-
throw err;
|
|
893
|
-
}).then(resp => {
|
|
894
|
-
return resp.body;
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
console.log(voucher);
|
|
898
|
-
|
|
899
|
-
// Fetch all dynamic vouchers
|
|
900
|
-
let allVouchers = await client.fetchAllDynamicVouchers(false, constants.headers)
|
|
901
|
-
.catch(err => {
|
|
902
|
-
throw err;
|
|
903
|
-
}).then(resp => {
|
|
904
|
-
return resp.body;
|
|
905
|
-
});
|
|
906
|
-
|
|
907
|
-
console.log(allVouchers);
|
|
908
|
-
|
|
909
|
-
// Fetch all the redemptions
|
|
910
|
-
let allRedemptions = await client.fetchDynamicVoucherRedemptions(voucher.id, constants.headers)
|
|
911
|
-
.catch(err => {
|
|
912
|
-
throw err;
|
|
913
|
-
}).then(resp => {
|
|
914
|
-
return resp.body;
|
|
915
|
-
});
|
|
916
|
-
|
|
917
|
-
console.log(allRedemptions);
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
// Fetch reach stats of individual dynamic voucher
|
|
921
|
-
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualDynamicVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
922
|
-
.catch(err => {
|
|
923
|
-
throw err;
|
|
924
|
-
}).then(resp => {
|
|
925
|
-
return resp.body;
|
|
926
|
-
});
|
|
927
|
-
|
|
928
|
-
console.log(individualVoucherReachStats);
|
|
929
|
-
|
|
930
|
-
// Fetch reach stats of all the dynamic vouchers
|
|
931
|
-
let allVouchersReachStats = await client.fetchReachStatsOfAllDynamicVouchers(undefined, undefined, constants.headers)
|
|
932
|
-
.catch(err => {
|
|
933
|
-
throw err;
|
|
934
|
-
}).then(resp => {
|
|
935
|
-
return resp.body;
|
|
936
|
-
});
|
|
937
|
-
|
|
938
|
-
console.log(allVouchersReachStats);
|
|
939
|
-
}
|
|
940
|
-
```
|
|
941
|
-
|
|
942
|
-
</details>
|
|
943
|
-
|
|
944
|
-
<details>
|
|
945
|
-
<summary><b>Create and manipulate Static Voucher Campaigns</b></summary>
|
|
946
|
-
|
|
947
|
-
```typescript
|
|
948
|
-
import * as api from "wallet";
|
|
949
|
-
import * as constants from "./constants";
|
|
950
|
-
|
|
951
|
-
staticVoucherCampaigns();
|
|
952
|
-
|
|
953
|
-
async function staticVoucherCampaigns() {
|
|
954
|
-
let client = new api.StaticVoucherCampaignsApi(constants.domain);
|
|
955
|
-
// Fetch payment design
|
|
956
|
-
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
957
|
-
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
958
|
-
.catch(err => {
|
|
959
|
-
throw err;
|
|
960
|
-
}).then(resp => {
|
|
961
|
-
return resp.body;
|
|
962
|
-
});
|
|
963
|
-
let selectedDesign = allDesigns[0];
|
|
964
|
-
|
|
965
|
-
let startDate = new Date();
|
|
966
|
-
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
967
|
-
|
|
968
|
-
let params: api.CreateStaticVoucherCampaign = {
|
|
969
|
-
startDateTime: startDate,
|
|
970
|
-
expirationDateTime: expiryDate,
|
|
971
|
-
title: "Static Voucher Campaign API Client",
|
|
972
|
-
notes: "Example notes",
|
|
973
|
-
valueType: "currency", // percent or currency
|
|
974
|
-
displayValue: "$5 Off",
|
|
975
|
-
merchantsReferenceID: "",
|
|
976
|
-
validOnlyAtPOSRegisterIDs: [],
|
|
977
|
-
paymentDesignID: selectedDesign.id,
|
|
978
|
-
isActive: true,
|
|
979
|
-
sourceID: 0,
|
|
980
|
-
}
|
|
981
|
-
let campaign = await client.createStaticVoucherCampaign(params, constants.headers)
|
|
982
|
-
.catch(err => {
|
|
983
|
-
throw err;
|
|
984
|
-
}).then(resp => {
|
|
985
|
-
return resp.body
|
|
986
|
-
});
|
|
987
|
-
|
|
988
|
-
console.log(campaign);
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
// Fetch static voucher campaign by ID
|
|
992
|
-
campaign = await client.fetchStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
993
|
-
.catch(err => {
|
|
994
|
-
throw err;
|
|
995
|
-
}).then(resp => {
|
|
996
|
-
return resp.body
|
|
997
|
-
});
|
|
998
|
-
|
|
999
|
-
console.log(campaign);
|
|
1000
|
-
|
|
1001
|
-
// Fetch all the static voucher campaigns
|
|
1002
|
-
let allCampaigns = await client.fetchStaticVoucherCampaigns(false, undefined, constants.headers)
|
|
1003
|
-
.catch(err => {
|
|
1004
|
-
throw err;
|
|
1005
|
-
}).then(resp => {
|
|
1006
|
-
return resp.body
|
|
1007
|
-
});
|
|
1008
|
-
|
|
1009
|
-
console.log(allCampaigns);
|
|
1010
|
-
|
|
1011
|
-
// Fetch all vouchers within a static voucher campaign
|
|
1012
|
-
let allVouchers = await client.fetchStaticVouchers(campaign.id, constants.headers)
|
|
1013
|
-
.catch(err => {
|
|
1014
|
-
throw err;
|
|
1015
|
-
}).then(resp => {
|
|
1016
|
-
return resp.body
|
|
1017
|
-
});
|
|
1018
|
-
|
|
1019
|
-
console.log(allVouchers);
|
|
1020
|
-
|
|
1021
|
-
// Fetch vouchers within a static voucher campaign by page
|
|
1022
|
-
let allVouchersByPage = await client.fetchStaticVouchersPage(campaign.id, 1, 10, constants.headers)
|
|
1023
|
-
.catch(err => {
|
|
1024
|
-
throw err;
|
|
1025
|
-
}).then(resp => {
|
|
1026
|
-
return resp.body
|
|
1027
|
-
});
|
|
1028
|
-
|
|
1029
|
-
console.log(allVouchersByPage);
|
|
1030
|
-
|
|
1031
|
-
// Fetch performance overview
|
|
1032
|
-
let performanceOverview = await client.fetchPerformanceOverview(campaign.id, constants.headers)
|
|
1033
|
-
.catch(err => {
|
|
1034
|
-
throw err;
|
|
1035
|
-
}).then(resp => {
|
|
1036
|
-
return resp.body
|
|
1037
|
-
});
|
|
1038
|
-
|
|
1039
|
-
console.log(performanceOverview);
|
|
1040
|
-
|
|
1041
|
-
// Fetch reach stats of individual static voucher campaign
|
|
1042
|
-
let individualCampaignReachStats = await client.fetchReachStatsOfIndividualStaticVoucherCampaign(campaign.id, undefined, undefined, constants.headers)
|
|
1043
|
-
.catch(err => {
|
|
1044
|
-
throw err;
|
|
1045
|
-
}).then(resp => {
|
|
1046
|
-
return resp.body
|
|
1047
|
-
});
|
|
1048
|
-
|
|
1049
|
-
console.log(individualCampaignReachStats);
|
|
1050
|
-
|
|
1051
|
-
// Fetch reach stats of all static voucher campaigns
|
|
1052
|
-
let allStaticVoucherCampaignStats = await client.fetchReachStatsOfAllStaticVoucherCampaigns(undefined, undefined, constants.headers)
|
|
1053
|
-
.catch(err => {
|
|
1054
|
-
throw err;
|
|
1055
|
-
}).then(resp => {
|
|
1056
|
-
return resp.body
|
|
1057
|
-
});
|
|
1058
|
-
|
|
1059
|
-
console.log(allStaticVoucherCampaignStats);
|
|
1060
|
-
|
|
1061
|
-
// Fetch wallet page views of a static voucher campaign
|
|
1062
|
-
let views = await client.fetchViews(campaign.id, constants.headers)
|
|
1063
|
-
.catch(err => {
|
|
1064
|
-
throw err;
|
|
1065
|
-
}).then(resp => {
|
|
1066
|
-
return resp.body
|
|
1067
|
-
});
|
|
1068
|
-
|
|
1069
|
-
console.log(views);
|
|
1070
|
-
|
|
1071
|
-
// Fetch redeemed vouchers
|
|
1072
|
-
let redeemedVouchers = await client.fetchVouchersRedeemed(campaign.id, constants.headers)
|
|
1073
|
-
.catch(err => {
|
|
1074
|
-
throw err;
|
|
1075
|
-
}).then(resp => {
|
|
1076
|
-
return resp.body
|
|
1077
|
-
});
|
|
1078
|
-
|
|
1079
|
-
console.log(redeemedVouchers);
|
|
1080
|
-
|
|
1081
|
-
// Duplicate static voucher campaign
|
|
1082
|
-
let duplicatedCampaign = await client.duplicateStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
1083
|
-
.catch(err => {
|
|
1084
|
-
throw err;
|
|
1085
|
-
}).then(resp => {
|
|
1086
|
-
return resp.body
|
|
1087
|
-
});
|
|
1088
|
-
|
|
1089
|
-
console.log(duplicatedCampaign);
|
|
1090
|
-
|
|
1091
|
-
// Update static voucher campaign
|
|
1092
|
-
campaign = await client.updateStaticVoucherCampaign(campaign.id, {
|
|
1093
|
-
...params,
|
|
1094
|
-
title: `${params.title} Updated`
|
|
1095
|
-
}, constants.headers)
|
|
1096
|
-
.catch(err => {
|
|
1097
|
-
throw err;
|
|
1098
|
-
}).then(resp => {
|
|
1099
|
-
return resp.body
|
|
1100
|
-
});
|
|
1101
|
-
|
|
1102
|
-
console.log(campaign);
|
|
1103
|
-
|
|
1104
|
-
// Create static voucher campaign with voucher
|
|
1105
|
-
let campaignWithVoucher = await client.createStaticVoucherCampaignWithVoucher({
|
|
1106
|
-
...params,
|
|
1107
|
-
cellPhone: "+1809898787",
|
|
1108
|
-
memberID: "MEM0091",
|
|
1109
|
-
offerAmountCents: 1000
|
|
1110
|
-
}, constants.headers)
|
|
1111
|
-
.catch(err => {
|
|
1112
|
-
throw err;
|
|
1113
|
-
}).then(resp => {
|
|
1114
|
-
return resp.body
|
|
1115
|
-
});
|
|
1116
|
-
|
|
1117
|
-
console.log(campaignWithVoucher);
|
|
1118
|
-
|
|
1119
|
-
allVouchers = await client.fetchStaticVouchers(campaignWithVoucher.id, constants.headers)
|
|
1120
|
-
.catch(err => {
|
|
1121
|
-
throw err;
|
|
1122
|
-
}).then(resp => {
|
|
1123
|
-
return resp.body
|
|
1124
|
-
});
|
|
1125
|
-
|
|
1126
|
-
// Update static voucher campaign
|
|
1127
|
-
campaignWithVoucher = await client.updateStaticVoucherCampaignWithVoucher(campaignWithVoucher.id, {
|
|
1128
|
-
...params,
|
|
1129
|
-
offerAmountCents: 2000,
|
|
1130
|
-
voucherID: allVouchers[0].id
|
|
1131
|
-
}, constants.headers)
|
|
1132
|
-
.catch(err => {
|
|
1133
|
-
throw err;
|
|
1134
|
-
}).then(resp => {
|
|
1135
|
-
return resp.body
|
|
1136
|
-
});
|
|
1137
|
-
|
|
1138
|
-
console.log(campaignWithVoucher);
|
|
1139
|
-
}
|
|
1140
|
-
```
|
|
1141
|
-
|
|
1142
|
-
</details>
|
|
1143
|
-
|
|
1144
|
-
<details>
|
|
1145
|
-
<summary><b>Create and manipulate Static Vouchers</b></summary>
|
|
1146
|
-
|
|
1147
|
-
```typescript
|
|
1148
|
-
import * as api from "wallet";
|
|
1149
|
-
import * as constants from "./constants";
|
|
1150
|
-
|
|
1151
|
-
staticVouchers();
|
|
1152
|
-
|
|
1153
|
-
async function staticVouchers() {
|
|
1154
|
-
let client = new api.StaticVouchersApi(constants.domain);
|
|
1155
|
-
|
|
1156
|
-
let params: api.WTStaticVoucherCreateParams = {
|
|
1157
|
-
offerAmountCents: 1000, // In cents
|
|
1158
|
-
memberID: "MEM0090",
|
|
1159
|
-
cellPhone: "+1809898787",
|
|
1160
|
-
campaignID: "",
|
|
1161
|
-
}
|
|
1162
|
-
// Create a new static voucher
|
|
1163
|
-
let voucher = await client.createStaticVoucher(params, constants.headers).catch(err => {
|
|
1164
|
-
throw err;
|
|
1165
|
-
}).then(resp => {
|
|
1166
|
-
return resp.body
|
|
1167
|
-
});
|
|
1168
|
-
|
|
1169
|
-
// The static voucher that has just been created
|
|
1170
|
-
console.log(voucher);
|
|
1171
|
-
|
|
1172
|
-
// Fetch the static voucher that has just been created
|
|
1173
|
-
voucher = (await client.fetchStaticVoucher(voucher.id, constants.headers)).body;
|
|
1174
|
-
console.log(voucher);
|
|
1175
|
-
|
|
1176
|
-
// Update the static voucher with a new maxUses count
|
|
1177
|
-
voucher = await client.updateStaticVoucher(voucher.id, {
|
|
1178
|
-
...params,
|
|
1179
|
-
offerAmountCents: 2000 // In cents
|
|
1180
|
-
}, constants.headers).catch(err => {
|
|
1181
|
-
throw err;
|
|
1182
|
-
}).then(resp => {
|
|
1183
|
-
return resp.body
|
|
1184
|
-
});
|
|
1185
|
-
|
|
1186
|
-
// Archive the static voucher
|
|
1187
|
-
await client.deleteStaticVoucher(voucher.id, constants.headers)
|
|
1188
|
-
.catch(err => {
|
|
1189
|
-
throw err;
|
|
1190
|
-
}).then(resp => {
|
|
1191
|
-
return resp.body
|
|
1192
|
-
});
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
// Fetch reach stats of individual static voucher
|
|
1196
|
-
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualStaticVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
1197
|
-
.catch(err => {
|
|
1198
|
-
throw err;
|
|
1199
|
-
}).then(resp => {
|
|
1200
|
-
return resp.body;
|
|
1201
|
-
});
|
|
1202
|
-
|
|
1203
|
-
console.log(individualVoucherReachStats);
|
|
1204
|
-
|
|
1205
|
-
// Fetch reach stats of all the static vouchers
|
|
1206
|
-
let allVouchersReachStats = await client.fetchReachStatsOfAllStaticVouchers(undefined, undefined, constants.headers)
|
|
1207
|
-
.catch(err => {
|
|
1208
|
-
throw err;
|
|
1209
|
-
}).then(resp => {
|
|
1210
|
-
return resp.body;
|
|
1211
|
-
});
|
|
1212
|
-
|
|
1213
|
-
console.log(allVouchersReachStats);
|
|
1214
|
-
}
|
|
1215
|
-
```
|
|
1216
|
-
|
|
1217
|
-
</details>
|
|
1218
|
-
|
|
1219
|
-
<details>
|
|
1220
|
-
<summary><b>Create and manipulate SMSes</b></summary>
|
|
1221
|
-
|
|
1222
|
-
```typescript
|
|
1223
|
-
import * as api from "wallet";
|
|
1224
|
-
import * as constants from "./constants";
|
|
1225
|
-
|
|
1226
|
-
smsExample();
|
|
1227
|
-
|
|
1228
|
-
async function smsExample() {
|
|
1229
|
-
let client = new api.SMSApi(constants.domain);
|
|
1230
|
-
|
|
1231
|
-
// Acquire phone number
|
|
1232
|
-
let phoneNumber = await client.acquirePhoneNumber({
|
|
1233
|
-
phoneNumber: "+1807675656"
|
|
1234
|
-
}, constants.headers)
|
|
1235
|
-
.catch(err => {
|
|
1236
|
-
throw err;
|
|
1237
|
-
}).then(resp => {
|
|
1238
|
-
return resp.body;
|
|
1239
|
-
});
|
|
1240
|
-
|
|
1241
|
-
console.log(phoneNumber);
|
|
1242
|
-
|
|
1243
|
-
// Send phone number for verification
|
|
1244
|
-
await client.sendPhoneNumberForVerification(phoneNumber.id, {
|
|
1245
|
-
helpDeskQueueResponse: "HELPME",
|
|
1246
|
-
helpDeskKeyword: "HELP12",
|
|
1247
|
-
helpResponse: "Hello, we're here to help.",
|
|
1248
|
-
stopResponse: "We're sad to see you go",
|
|
1249
|
-
messageFooter: "Subscribe for more info!",
|
|
1250
|
-
termsOfServiceURL: "https://example.com/terms-of-service",
|
|
1251
|
-
privacyPolicyURL: "https://example.com/privacy-policy",
|
|
1252
|
-
companyName: "Fictitious Corporation"
|
|
1253
|
-
}, constants.headers)
|
|
1254
|
-
.catch(err => {
|
|
1255
|
-
throw err;
|
|
1256
|
-
}).then(resp => {
|
|
1257
|
-
return resp.body;
|
|
1258
|
-
});
|
|
1259
|
-
|
|
1260
|
-
// Archive phone number
|
|
1261
|
-
phoneNumber = await client.archivePhoneNumber(phoneNumber.id, constants.headers)
|
|
1262
|
-
.catch(err => {
|
|
1263
|
-
throw err;
|
|
1264
|
-
}).then(resp => {
|
|
1265
|
-
return resp.body;
|
|
1266
|
-
});
|
|
1267
|
-
|
|
1268
|
-
console.log(phoneNumber.isActive); // This will be false
|
|
1269
|
-
|
|
1270
|
-
// Restore phone number
|
|
1271
|
-
phoneNumber = await client.restorePhoneNumber(phoneNumber.id, constants.headers)
|
|
1272
|
-
.catch(err => {
|
|
1273
|
-
throw err;
|
|
1274
|
-
}).then(resp => {
|
|
1275
|
-
return resp.body;
|
|
1276
|
-
});
|
|
1277
|
-
|
|
1278
|
-
console.log(phoneNumber.isActive); // This will be true
|
|
1279
|
-
|
|
1280
|
-
// Create SMS agreement
|
|
1281
|
-
let agreement = await client.createSMSAgreement({
|
|
1282
|
-
isShortCodeTimelineUnderstood: true,
|
|
1283
|
-
isPricingUnderstood: true,
|
|
1284
|
-
isShortCodeTransferUnderstood: true,
|
|
1285
|
-
isOptInOutUnderstood: true,
|
|
1286
|
-
isShortCodeUnderstood: true,
|
|
1287
|
-
isStandardsUnderstood: true,
|
|
1288
|
-
isCtiaShortCodeRead: true,
|
|
1289
|
-
isManualRead: true,
|
|
1290
|
-
isStopUnderstood: true,
|
|
1291
|
-
isTosOnWebsite: true,
|
|
1292
|
-
isPrivacyPolicyOnWebsite: true,
|
|
1293
|
-
isTwilioTermsRead: true,
|
|
1294
|
-
}, constants.headers)
|
|
1295
|
-
.catch(err => {
|
|
1296
|
-
throw err;
|
|
1297
|
-
}).then(resp => {
|
|
1298
|
-
return resp.body;
|
|
1299
|
-
});
|
|
1300
|
-
|
|
1301
|
-
console.log(agreement);
|
|
1302
|
-
|
|
1303
|
-
// Fetch the agreement
|
|
1304
|
-
agreement = await client.fetchSMSAgreement(constants.headers)
|
|
1305
|
-
.catch(err => {
|
|
1306
|
-
throw err;
|
|
1307
|
-
}).then(resp => {
|
|
1308
|
-
return resp.body;
|
|
1309
|
-
});
|
|
1310
|
-
|
|
1311
|
-
console.log(agreement);
|
|
1312
|
-
|
|
1313
|
-
// Create imported list
|
|
1314
|
-
let importedList = await client.createImportedList({
|
|
1315
|
-
listName: "Imported List",
|
|
1316
|
-
isActive: true,
|
|
1317
|
-
phoneNumberID: phoneNumber.id
|
|
1318
|
-
}, constants.headers)
|
|
1319
|
-
.catch(err => {
|
|
1320
|
-
throw err;
|
|
1321
|
-
}).then(resp => {
|
|
1322
|
-
return resp.body;
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
console.log(importedList);
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
// Create recipient in imported list
|
|
1329
|
-
let recipient = await client.createRecipientInImportedList({
|
|
1330
|
-
importedListID: importedList.id,
|
|
1331
|
-
mobilePhoneNumber: "+1805654545"
|
|
1332
|
-
}, constants.headers)
|
|
1333
|
-
.catch(err => {
|
|
1334
|
-
throw err;
|
|
1335
|
-
}).then(resp => {
|
|
1336
|
-
return resp.body;
|
|
1337
|
-
});
|
|
1338
|
-
|
|
1339
|
-
console.log(recipient);
|
|
1340
|
-
|
|
1341
|
-
// Count recipients in imported list
|
|
1342
|
-
let { count } = await client.countImportedListRecipients(importedList.id, false, undefined, undefined, constants.headers)
|
|
1343
|
-
.catch(err => {
|
|
1344
|
-
throw err;
|
|
1345
|
-
}).then(resp => {
|
|
1346
|
-
return resp.body;
|
|
1347
|
-
});
|
|
1348
|
-
|
|
1349
|
-
console.log(count);
|
|
1350
|
-
|
|
1351
|
-
// Fetch recipients
|
|
1352
|
-
let importedListRecipients = await client.fetchImportedListRecipients(importedList.id, constants.headers)
|
|
1353
|
-
.catch(err => {
|
|
1354
|
-
throw err;
|
|
1355
|
-
}).then(resp => {
|
|
1356
|
-
return resp.body;
|
|
1357
|
-
});
|
|
1358
|
-
|
|
1359
|
-
console.log(importedListRecipients);
|
|
1360
|
-
|
|
1361
|
-
// Fetch recipients by page
|
|
1362
|
-
let importedListRecipientByPage = await client.fetchImportedListRecipientsByPage(importedList.id, 10, 1, false, constants.headers)
|
|
1363
|
-
.catch(err => {
|
|
1364
|
-
throw err;
|
|
1365
|
-
}).then(resp => {
|
|
1366
|
-
return resp.body;
|
|
1367
|
-
});
|
|
1368
|
-
|
|
1369
|
-
console.log(`Total: ${importedListRecipientByPage.total}, Length: ${importedListRecipientByPage.length}, List: ${JSON.stringify(importedListRecipientByPage.results)}`);
|
|
1370
|
-
|
|
1371
|
-
// Export recipients
|
|
1372
|
-
await client.exportImportedListRecipients(importedList.id, constants.headers)
|
|
1373
|
-
.catch(err => {
|
|
1374
|
-
throw err;
|
|
1375
|
-
}).then(resp => {
|
|
1376
|
-
return resp.body;
|
|
1377
|
-
});
|
|
1378
|
-
|
|
1379
|
-
// Create opt in list
|
|
1380
|
-
let optInList = await client.createOptInList({
|
|
1381
|
-
isActive: true,
|
|
1382
|
-
listName: "Opt In List",
|
|
1383
|
-
phoneNumberID: phoneNumber.id,
|
|
1384
|
-
estimatedMessagesPerMonth: 250,
|
|
1385
|
-
optInKeyword: "OPTIN",
|
|
1386
|
-
optOutKeyword: "OPTOUT",
|
|
1387
|
-
optInConfirmedResponse: "You've opted in",
|
|
1388
|
-
optOutConfirmedResponse: "You've opted out",
|
|
1389
|
-
optInConfirmedCustomerReceives: "You've opted in",
|
|
1390
|
-
optOutConfirmedCustomerReceives: "You've opted out",
|
|
1391
|
-
isOver21Required: false,
|
|
1392
|
-
}, constants.headers)
|
|
1393
|
-
.catch(err => {
|
|
1394
|
-
throw err;
|
|
1395
|
-
}).then(resp => {
|
|
1396
|
-
return resp.body;
|
|
1397
|
-
});
|
|
1398
|
-
|
|
1399
|
-
console.log(optInList);
|
|
1400
|
-
|
|
1401
|
-
// Count opt in list subscribers
|
|
1402
|
-
count = await client.countOptInListSubscribers(optInList.id, true, false, false, undefined, undefined, constants.headers)
|
|
1403
|
-
.catch(err => {
|
|
1404
|
-
throw err;
|
|
1405
|
-
}).then(resp => {
|
|
1406
|
-
return (resp.body).count;
|
|
1407
|
-
});
|
|
1408
|
-
|
|
1409
|
-
console.log(count);
|
|
1410
|
-
|
|
1411
|
-
// Export opt in list subscribers
|
|
1412
|
-
await client.exportOptInListSubscribers(optInList.id, constants.headers)
|
|
1413
|
-
.catch(err => {
|
|
1414
|
-
throw err;
|
|
1415
|
-
}).then(resp => {
|
|
1416
|
-
return resp.body;
|
|
1417
|
-
});
|
|
1418
|
-
|
|
1419
|
-
// Fetch subscribers
|
|
1420
|
-
let optInListRecipients = await client.fetchOptInListSubscribers(optInList.id, true, false, false, constants.headers)
|
|
1421
|
-
.catch(err => {
|
|
1422
|
-
throw err;
|
|
1423
|
-
}).then(resp => {
|
|
1424
|
-
return resp.body;
|
|
1425
|
-
});
|
|
1426
|
-
|
|
1427
|
-
console.log(optInListRecipients);
|
|
1428
|
-
|
|
1429
|
-
// Fetch subscribers by page
|
|
1430
|
-
let optInListRecipientByPage = await client.fetchOptInListSubscribersByPage(optInList.id, 10, 1, true, false, false, constants.headers)
|
|
1431
|
-
.catch(err => {
|
|
1432
|
-
throw err;
|
|
1433
|
-
}).then(resp => {
|
|
1434
|
-
return resp.body;
|
|
1435
|
-
});
|
|
1436
|
-
|
|
1437
|
-
console.log(`Total: ${optInListRecipientByPage.total}, Length: ${optInListRecipientByPage.length}, List: ${JSON.stringify(optInListRecipientByPage.results)}`);
|
|
1438
|
-
|
|
1439
|
-
// Fetch all opt in lists associated with the given phone number
|
|
1440
|
-
|
|
1441
|
-
let optInListsAssociatedWithPhoneNumber = await client.fetchOptInListsAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1442
|
-
.catch(err => {
|
|
1443
|
-
throw err;
|
|
1444
|
-
}).then(resp => {
|
|
1445
|
-
return resp.body;
|
|
1446
|
-
});
|
|
1447
|
-
|
|
1448
|
-
console.log(optInListsAssociatedWithPhoneNumber);
|
|
1449
|
-
|
|
1450
|
-
// Create opt in source
|
|
1451
|
-
let optInSource = await client.createOptInListSource({
|
|
1452
|
-
sourceName: "Opt In Source",
|
|
1453
|
-
listID: optInList.id,
|
|
1454
|
-
}, constants.headers)
|
|
1455
|
-
.catch(err => {
|
|
1456
|
-
throw err;
|
|
1457
|
-
}).then(resp => {
|
|
1458
|
-
return resp.body;
|
|
1459
|
-
});
|
|
1460
|
-
console.log(optInSource);
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
// Count subscribers in opt in list source
|
|
1464
|
-
count = await client.countOptInSourceSubscribers(optInSource.id, true, false, false, undefined, undefined, constants.headers)
|
|
1465
|
-
.catch(err => {
|
|
1466
|
-
throw err;
|
|
1467
|
-
}).then(resp => {
|
|
1468
|
-
return (resp.body).count;
|
|
1469
|
-
});
|
|
1470
|
-
|
|
1471
|
-
console.log(count);
|
|
1472
|
-
|
|
1473
|
-
let optInSourceSubscribers = await client.fetchOptInSourceSubscribers(optInSource.id, true, false, false, constants.headers)
|
|
1474
|
-
.catch(err => {
|
|
1475
|
-
throw err;
|
|
1476
|
-
}).then(resp => {
|
|
1477
|
-
return resp.body;
|
|
1478
|
-
});
|
|
1479
|
-
|
|
1480
|
-
console.log(optInSourceSubscribers);
|
|
1481
|
-
|
|
1482
|
-
let optInSourcesAssociatedWithPhoneNumber = await client.fetchOptInSourcesAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1483
|
-
.catch(err => {
|
|
1484
|
-
throw err;
|
|
1485
|
-
}).then(resp => {
|
|
1486
|
-
return resp.body;
|
|
1487
|
-
});
|
|
1488
|
-
|
|
1489
|
-
console.log(optInSourcesAssociatedWithPhoneNumber);
|
|
1490
|
-
|
|
1491
|
-
// Fetch all outbound SMSes
|
|
1492
|
-
let outboundSMSes = await client.fetchOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1493
|
-
.catch(err => {
|
|
1494
|
-
throw err;
|
|
1495
|
-
}).then(resp => {
|
|
1496
|
-
return resp.body;
|
|
1497
|
-
});
|
|
1498
|
-
console.log(outboundSMSes);
|
|
1499
|
-
|
|
1500
|
-
// Fetch outbound SMSes by page
|
|
1501
|
-
let outboundSMSesByPage = await client.fetchOutboundSMSByPage(phoneNumber.id, undefined, undefined, 10, 1, constants.headers)
|
|
1502
|
-
.catch(err => {
|
|
1503
|
-
throw err;
|
|
1504
|
-
}).then(resp => {
|
|
1505
|
-
return resp.body;
|
|
1506
|
-
});
|
|
1507
|
-
console.log(`Total: ${outboundSMSesByPage.total}, Length: ${outboundSMSesByPage.length}, Messages: ${JSON.stringify(outboundSMSesByPage.results)}`);
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
// Count outbound SMSes
|
|
1511
|
-
let outboundSMSesCount = await client.countOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1512
|
-
.catch(err => {
|
|
1513
|
-
throw err;
|
|
1514
|
-
}).then(resp => {
|
|
1515
|
-
return (resp.body).count;
|
|
1516
|
-
});
|
|
1517
|
-
console.log(outboundSMSesCount);
|
|
1518
|
-
|
|
1519
|
-
// Retrieve message limits
|
|
1520
|
-
let limits = await client.retrieveSentAndMaxCountOfMessages(constants.headers)
|
|
1521
|
-
.catch(err => {
|
|
1522
|
-
throw err;
|
|
1523
|
-
}).then(resp => {
|
|
1524
|
-
return resp.body;
|
|
1525
|
-
});
|
|
1526
|
-
console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
|
|
1527
|
-
}
|
|
1528
|
-
```
|
|
1529
|
-
|
|
1530
|
-
</details>
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Wallet SDK for Node.js
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/wallet)
|
|
6
|
+
[](https://www.npmjs.com/package/wallet)
|
|
7
|
+
|
|
8
|
+
The official server-side TypeScript / Node.js SDK for the [Wallet Inc](https://wallet.inc) CRM & Digital Payments platform. Create and manage membership tiers, club members, vouchers, promotions, store credit, payment designs, SMS/MMS, and more.
|
|
9
|
+
|
|
10
|
+
> **Access note:** this module is currently restricted to Wallet Inc customers. Need access or a hand getting started? Join us on [Discord](https://discord.gg/xzwhcNCjcQ).
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install wallet
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
Each resource has its own API client, constructed with your API domain. Every call takes an options object carrying your API key as an `access-token` header. Create your key in the [Wallet Developer Hub](https://wallet.dev).
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import * as api from "wallet";
|
|
24
|
+
|
|
25
|
+
const domain = "https://api.wall.et";
|
|
26
|
+
const options = {
|
|
27
|
+
headers: {
|
|
28
|
+
"access-token": "YOUR_API_KEY",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Create a membership tier
|
|
33
|
+
const membershipTiers = new api.MembershipTiersApi(domain);
|
|
34
|
+
const { body: tier } = await membershipTiers.createMembershipTier(
|
|
35
|
+
{ tierNumber: "1", tierName: "GOLD", tierDiscount: 20 },
|
|
36
|
+
options
|
|
37
|
+
);
|
|
38
|
+
console.log(tier);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The runnable examples below import shared `domain` and `headers` from a local `./constants` file (see [`examples/constants.ts`](examples/constants.ts)); swap in your own domain and API key. To run them:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
cd examples
|
|
45
|
+
npm install # installs ts-node to run the TypeScript examples directly
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Documentation
|
|
49
|
+
|
|
50
|
+
Full API reference and guides live in the [Wallet Developer Hub](https://wallet.dev).
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
Click any example to expand the full runnable snippet.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<details>
|
|
58
|
+
<summary><b>Create and manipulate Membership Tiers</b></summary>
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import * as api from "wallet";
|
|
62
|
+
import * as constants from "./constants";
|
|
63
|
+
|
|
64
|
+
membershipTiers();
|
|
65
|
+
|
|
66
|
+
async function membershipTiers() {
|
|
67
|
+
let tiersClient = new api.MembershipTiersApi(constants.domain);
|
|
68
|
+
|
|
69
|
+
// Create new membership tier
|
|
70
|
+
let tier = await tiersClient.createMembershipTier({
|
|
71
|
+
tierNumber: "1",
|
|
72
|
+
tierName: "GOLD",
|
|
73
|
+
tierDiscount: 20,
|
|
74
|
+
tierDesignID: "JSUilOPE98",
|
|
75
|
+
pointsDesignID: "L918AJ7356"
|
|
76
|
+
}, constants.headers).catch(err => {
|
|
77
|
+
throw err;
|
|
78
|
+
}).then(resp => {
|
|
79
|
+
return resp.body
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// The membership tier that has just been created
|
|
83
|
+
console.log(tier);
|
|
84
|
+
|
|
85
|
+
// Fetch the created tier
|
|
86
|
+
tier = (await tiersClient.fetchMembershipTierById(tier.id, constants.headers)).body;
|
|
87
|
+
console.log(tier);
|
|
88
|
+
|
|
89
|
+
tier = await tiersClient.updateMembershipTier(tier.id, {
|
|
90
|
+
...tier,
|
|
91
|
+
tierName: "SILVER"
|
|
92
|
+
}, constants.headers).catch(err => {
|
|
93
|
+
throw err;
|
|
94
|
+
}).then(resp => {
|
|
95
|
+
return resp.body
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Archive the membership tier
|
|
99
|
+
tier = await tiersClient.archiveMembershipTier(tier.id, constants.headers)
|
|
100
|
+
.catch(err => {
|
|
101
|
+
throw err;
|
|
102
|
+
}).then(resp => {
|
|
103
|
+
return resp.body
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
console.log(tier.isActive); // This will be false, since the tier has just been archived
|
|
107
|
+
|
|
108
|
+
// Restore the membership tier
|
|
109
|
+
tier = await tiersClient.restoreMembershipTier(tier.id, constants.headers)
|
|
110
|
+
.catch(err => {
|
|
111
|
+
throw err;
|
|
112
|
+
}).then(resp => {
|
|
113
|
+
return resp.body
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
console.log(tier.isActive); // This will be true, since the tier has just been restored
|
|
117
|
+
|
|
118
|
+
// Fetch paginated tier history logs
|
|
119
|
+
let historyLogs = (await tiersClient.fetchMembershipTierHistoryLog({
|
|
120
|
+
pageSize: 10,
|
|
121
|
+
pageNum: 1,
|
|
122
|
+
id: tier.id
|
|
123
|
+
}, constants.headers)).body;
|
|
124
|
+
|
|
125
|
+
console.log(historyLogs);
|
|
126
|
+
|
|
127
|
+
let redemptionLogs = (await tiersClient.fetchMembershipTierRedemptionLog({
|
|
128
|
+
pageSize: 10,
|
|
129
|
+
pageNum: 1,
|
|
130
|
+
id: tier.id
|
|
131
|
+
}, constants.headers)).body;
|
|
132
|
+
|
|
133
|
+
console.log(redemptionLogs);
|
|
134
|
+
|
|
135
|
+
// Fetch the list of tiers with members
|
|
136
|
+
let tiersList = ((await (tiersClient.fetchAllMembershipTiersWithMemberCount(false, constants.headers))).body);
|
|
137
|
+
console.log(tiersList);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
<details>
|
|
144
|
+
<summary><b>Create and manipulate Payment Designs</b></summary>
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import * as api from "wallet";
|
|
148
|
+
import * as constants from "./constants";
|
|
149
|
+
|
|
150
|
+
paymentDesigns();
|
|
151
|
+
|
|
152
|
+
async function paymentDesigns() {
|
|
153
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
154
|
+
|
|
155
|
+
// Create a new payment design
|
|
156
|
+
let design = await designClient.createPaymentDesign({
|
|
157
|
+
borderColor: "#f0f0f0",
|
|
158
|
+
borderStyleType: "Dashed",
|
|
159
|
+
borderSize: "4px",
|
|
160
|
+
borderRadius: 2,
|
|
161
|
+
fontColor: "#777777",
|
|
162
|
+
fontType: "Arial",
|
|
163
|
+
abbreviation: "ABBR",
|
|
164
|
+
acronym: "AR",
|
|
165
|
+
icon: "fa-anchor",
|
|
166
|
+
designName: "Thanksgiving Design",
|
|
167
|
+
displayName: "Decorator",
|
|
168
|
+
}, constants.headers).catch(err => {
|
|
169
|
+
throw err;
|
|
170
|
+
}).then(resp => {
|
|
171
|
+
return resp.body
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// The payment design that has just been created
|
|
175
|
+
console.log(design);
|
|
176
|
+
|
|
177
|
+
// Fetch the created design
|
|
178
|
+
design = (await designClient.fetchPaymentDesignById(design.id, constants.headers)).body;
|
|
179
|
+
console.log(design);
|
|
180
|
+
|
|
181
|
+
// Change the borderColor and borderSize of the payment design
|
|
182
|
+
design = await designClient.updatePaymentDesign(design.id, {
|
|
183
|
+
...design,
|
|
184
|
+
borderColor: "#050505",
|
|
185
|
+
borderSize: "6px",
|
|
186
|
+
}, constants.headers).catch(err => {
|
|
187
|
+
throw err;
|
|
188
|
+
}).then(resp => {
|
|
189
|
+
return resp.body
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// Archive the payment design
|
|
193
|
+
design = await designClient.archivePaymentDesign(design.id, constants.headers)
|
|
194
|
+
.catch(err => {
|
|
195
|
+
throw err;
|
|
196
|
+
}).then(resp => {
|
|
197
|
+
return resp.body
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
console.log(design.isActive); // This will be false, since the design has just been archived
|
|
201
|
+
|
|
202
|
+
// Restore the payment design
|
|
203
|
+
design = await designClient.restorePaymentDesign(design.id, constants.headers)
|
|
204
|
+
.catch(err => {
|
|
205
|
+
throw err;
|
|
206
|
+
}).then(resp => {
|
|
207
|
+
return resp.body
|
|
208
|
+
});
|
|
209
|
+
console.log(design.isActive); // This will be true, since the design has just been restored
|
|
210
|
+
|
|
211
|
+
// Fetch all payment designs
|
|
212
|
+
let designs = (await designClient.fetchAllPaymentDesigns(false, constants.headers)).body;
|
|
213
|
+
console.log(designs);
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
</details>
|
|
218
|
+
|
|
219
|
+
<details>
|
|
220
|
+
<summary><b>Create and manipulate Club Members</b></summary>
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import * as api from "wallet";
|
|
224
|
+
import { PaginationRequestWithSortOptions } from "wallet";
|
|
225
|
+
import * as constants from "./constants";
|
|
226
|
+
|
|
227
|
+
clubMembers();
|
|
228
|
+
|
|
229
|
+
async function clubMembers() {
|
|
230
|
+
let membersClient = new api.ClubMembersPointsApi(constants.domain);
|
|
231
|
+
|
|
232
|
+
// Create new club member
|
|
233
|
+
let member = await membersClient.createMember({
|
|
234
|
+
firstName: "John",
|
|
235
|
+
lastName: "Doe",
|
|
236
|
+
membershipTierID: "HDywI893LQ",
|
|
237
|
+
mobileNumber: "+1807654543",
|
|
238
|
+
pointsAccrued: 2000,
|
|
239
|
+
memberID: "MEM001"
|
|
240
|
+
}, constants.headers).catch(err => {
|
|
241
|
+
throw err;
|
|
242
|
+
}).then(resp => {
|
|
243
|
+
return resp.body
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// The club member that has just been created
|
|
247
|
+
console.log(member);
|
|
248
|
+
|
|
249
|
+
// Fetch the created member
|
|
250
|
+
member = (await membersClient.fetchMemberById(member.id, constants.headers)).body;
|
|
251
|
+
console.log(member);
|
|
252
|
+
|
|
253
|
+
member = await membersClient.updateMember(member.id, {
|
|
254
|
+
...member,
|
|
255
|
+
mobileNumber: "+1809863542"
|
|
256
|
+
}, constants.headers).catch(err => {
|
|
257
|
+
throw err;
|
|
258
|
+
}).then(resp => {
|
|
259
|
+
return resp.body
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Archive the club member
|
|
263
|
+
member = await membersClient.archiveMember(member.id, constants.headers)
|
|
264
|
+
.catch(err => {
|
|
265
|
+
throw err;
|
|
266
|
+
}).then(resp => {
|
|
267
|
+
return resp.body
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
console.log(member.isActive); // This will be false, since the member has just been archived
|
|
271
|
+
|
|
272
|
+
// Restore the club member
|
|
273
|
+
member = await membersClient.restoreMember(member.id, constants.headers)
|
|
274
|
+
.catch(err => {
|
|
275
|
+
throw err;
|
|
276
|
+
}).then(resp => {
|
|
277
|
+
return resp.body
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
console.log(member.isActive); // This will be true, since the member has just been restored
|
|
281
|
+
|
|
282
|
+
// Fetch members by page
|
|
283
|
+
let members = (await membersClient.fetchMembersByPage({
|
|
284
|
+
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
285
|
+
})).body;
|
|
286
|
+
|
|
287
|
+
console.log(members);
|
|
288
|
+
|
|
289
|
+
// Fetch paginated member history logs
|
|
290
|
+
let historyLogs = (await membersClient.fetchMemberHistoryLog({
|
|
291
|
+
pageSize: 10,
|
|
292
|
+
pageNum: 1,
|
|
293
|
+
id: member.id
|
|
294
|
+
}, constants.headers)).body;
|
|
295
|
+
|
|
296
|
+
console.log(historyLogs);
|
|
297
|
+
|
|
298
|
+
let redemptionLogs = (await membersClient.fetchMemberRedemptionLog({
|
|
299
|
+
pageSize: 10,
|
|
300
|
+
pageNum: 1,
|
|
301
|
+
id: member.id
|
|
302
|
+
}, constants.headers)).body;
|
|
303
|
+
|
|
304
|
+
console.log(redemptionLogs);
|
|
305
|
+
|
|
306
|
+
// Fetch the count of members
|
|
307
|
+
let membersCount = ((await (membersClient.fetchMembersCount(constants.headers))).body).count;
|
|
308
|
+
console.log(membersCount);
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
</details>
|
|
313
|
+
|
|
314
|
+
<details>
|
|
315
|
+
<summary><b>Create and manipulate Advertisement Credits</b></summary>
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
import * as api from "wallet";
|
|
319
|
+
import * as constants from "./constants";
|
|
320
|
+
|
|
321
|
+
advertisementCredits();
|
|
322
|
+
|
|
323
|
+
async function advertisementCredits() {
|
|
324
|
+
let client = new api.AdvertisementCreditsApi(constants.domain);
|
|
325
|
+
|
|
326
|
+
let title = "Ad Credit API Client (New Headers)";
|
|
327
|
+
|
|
328
|
+
// Create a new advertisement credit
|
|
329
|
+
let adCredit = await client.createAdvertisementCredit({
|
|
330
|
+
title: title,
|
|
331
|
+
valueType: "percent",
|
|
332
|
+
paymentDesignID: "jbkVgPTgoo",
|
|
333
|
+
maxUses: 5,
|
|
334
|
+
discountValue: 500,
|
|
335
|
+
}, constants.headers).catch(err => {
|
|
336
|
+
throw err;
|
|
337
|
+
}).then(resp => {
|
|
338
|
+
return resp.body
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// The advertisement credit that has just been created
|
|
342
|
+
console.log(adCredit);
|
|
343
|
+
|
|
344
|
+
// Fetch the advertisement credit that has just been created
|
|
345
|
+
adCredit = (await client.fetchAdvertisementCreditById(adCredit.id, constants.headers)).body;
|
|
346
|
+
console.log(adCredit);
|
|
347
|
+
|
|
348
|
+
// Update the advertisement credit with a new maxUses count
|
|
349
|
+
adCredit = await client.updateAdvertisementCredit(adCredit.id, {
|
|
350
|
+
title: `${title} Update`,
|
|
351
|
+
valueType: "percent",
|
|
352
|
+
paymentDesignID: "jbkVgPTgoo",
|
|
353
|
+
maxUses: 10,
|
|
354
|
+
discountValue: 1000,
|
|
355
|
+
}, constants.headers).catch(err => {
|
|
356
|
+
throw err;
|
|
357
|
+
}).then(resp => {
|
|
358
|
+
return resp.body
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
// Retrieve all the scans
|
|
362
|
+
let scans = (await client.fetchAdvertisementCreditScans(adCredit.id, constants.headers)).body;
|
|
363
|
+
console.log("All scans: " + JSON.stringify(scans));
|
|
364
|
+
|
|
365
|
+
// Archive the advertisement credit
|
|
366
|
+
adCredit = await client.archiveAdvertisementCredit(adCredit.id, constants.headers)
|
|
367
|
+
.catch(err => {
|
|
368
|
+
throw err;
|
|
369
|
+
}).then(resp => {
|
|
370
|
+
return resp.body
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
console.log(adCredit.isActive); // This will be false, since the advertisement credit has just been archived
|
|
374
|
+
|
|
375
|
+
// Restore the advertisement credit
|
|
376
|
+
adCredit = await client.restoreAdvertisementCredit(adCredit.id, constants.headers)
|
|
377
|
+
.catch(err => {
|
|
378
|
+
throw err;
|
|
379
|
+
}).then(resp => {
|
|
380
|
+
return resp.body
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
console.log(adCredit.isActive); // This will be true, since the advertisement credit has just been restored
|
|
384
|
+
|
|
385
|
+
// Fetch all the active advertisement credits
|
|
386
|
+
let adCredits = (await client.fetchAllAdvertisementCredits(false, constants.headers)).body;
|
|
387
|
+
console.log("Active advertisement credits: ", JSON.stringify(adCredit));
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
</details>
|
|
392
|
+
|
|
393
|
+
<details>
|
|
394
|
+
<summary><b>Create and manipulate Link Book Links</b></summary>
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
import * as api from "wallet";
|
|
398
|
+
import * as constants from "./constants";
|
|
399
|
+
|
|
400
|
+
linkBook();
|
|
401
|
+
|
|
402
|
+
async function linkBook() {
|
|
403
|
+
let client = new api.LinkBookApi(constants.domain);
|
|
404
|
+
|
|
405
|
+
// Create a new link book link
|
|
406
|
+
let link = await client.createLinkBook({
|
|
407
|
+
title: "External Link",
|
|
408
|
+
url: "https://example.com",
|
|
409
|
+
icon: "fa-clock",
|
|
410
|
+
orderNumber: 1,
|
|
411
|
+
linkBookSectionID: "",
|
|
412
|
+
}, constants.headers).catch(err => {
|
|
413
|
+
throw err;
|
|
414
|
+
}).then(resp => {
|
|
415
|
+
return resp.body
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
// The link book link that has just been created
|
|
419
|
+
console.log(link);
|
|
420
|
+
|
|
421
|
+
// Update the link book link with a new url
|
|
422
|
+
link = await client.updateLinkBook(link.id, {
|
|
423
|
+
...link,
|
|
424
|
+
url: "https://test.com"
|
|
425
|
+
}, constants.headers).catch(err => {
|
|
426
|
+
throw err;
|
|
427
|
+
}).then(resp => {
|
|
428
|
+
return resp.body
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
// Archive the link book link
|
|
432
|
+
link = await client.archiveLinkBook(link.id, constants.headers)
|
|
433
|
+
.catch(err => {
|
|
434
|
+
throw err;
|
|
435
|
+
}).then(resp => {
|
|
436
|
+
return resp.body
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
console.log(link.isActive); // This will be false, since the link book link has just been archived
|
|
440
|
+
|
|
441
|
+
// Restore the link book link
|
|
442
|
+
link = await client.restoreLinkBook(link.id, constants.headers)
|
|
443
|
+
.catch(err => {
|
|
444
|
+
throw err;
|
|
445
|
+
}).then(resp => {
|
|
446
|
+
return resp.body
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
console.log(link.isActive); // This will be true, since the link book link has just been restored
|
|
450
|
+
|
|
451
|
+
// Fetch all links
|
|
452
|
+
let links = (await client.fetchAllLinkBook(false, constants.headers)).body;
|
|
453
|
+
console.log(links);
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
</details>
|
|
458
|
+
|
|
459
|
+
<details>
|
|
460
|
+
<summary><b>Create and manipulate Merchant URLs</b></summary>
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
import * as api from "wallet";
|
|
464
|
+
import * as constants from "./constants";
|
|
465
|
+
|
|
466
|
+
merchantURLs();
|
|
467
|
+
|
|
468
|
+
async function merchantURLs() {
|
|
469
|
+
let client = new api.MerchantURLsApi(constants.domain);
|
|
470
|
+
|
|
471
|
+
// Create a new merchant URL
|
|
472
|
+
let url = await client.createMerchantURL({
|
|
473
|
+
nickname: "Instagram",
|
|
474
|
+
destinationURL: "https://instagram.com/merchant"
|
|
475
|
+
}, constants.headers).catch(err => {
|
|
476
|
+
throw err;
|
|
477
|
+
}).then(resp => {
|
|
478
|
+
return resp.body
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
// The merchant URL that has just been created
|
|
482
|
+
console.log(url);
|
|
483
|
+
|
|
484
|
+
// Fetch the created url
|
|
485
|
+
url = (await client.fetchMerchantURL(url.id, constants.headers)).body;
|
|
486
|
+
console.log(url);
|
|
487
|
+
|
|
488
|
+
// Update the merchant URL with a new destination URL
|
|
489
|
+
url = await client.updateMerchantURL(url.id, {
|
|
490
|
+
...url,
|
|
491
|
+
destinationURL: "https://instagram.com/redirect/merchant"
|
|
492
|
+
}, constants.headers).catch(err => {
|
|
493
|
+
throw err;
|
|
494
|
+
}).then(resp => {
|
|
495
|
+
return resp.body
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
// Archive the merchant URL
|
|
499
|
+
url = await client.archiveMerchantURL(url.id, constants.headers)
|
|
500
|
+
.catch(err => {
|
|
501
|
+
throw err;
|
|
502
|
+
}).then(resp => {
|
|
503
|
+
return resp.body
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
console.log(url.isActive); // This will be false, since the merchant URL has just been archived
|
|
507
|
+
|
|
508
|
+
// Restore the merchant URL
|
|
509
|
+
url = await client.restoreMerchantURL(url.id, constants.headers)
|
|
510
|
+
.catch(err => {
|
|
511
|
+
throw err;
|
|
512
|
+
}).then(resp => {
|
|
513
|
+
return resp.body
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
console.log(url.isActive); // This will be true, since the merchant URL has just been restored
|
|
517
|
+
|
|
518
|
+
// Fetch all merchant urls
|
|
519
|
+
let urls = (await client.fetchAllMerchantURLs(false, constants.headers)).body;
|
|
520
|
+
console.log(urls);
|
|
521
|
+
|
|
522
|
+
// Fetch all the wallet page views for the given merchant url
|
|
523
|
+
let pageViews = (await (client.fetchMerchantURLRequests(url.id, constants.headers))).body;
|
|
524
|
+
console.log(pageViews);
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
</details>
|
|
529
|
+
|
|
530
|
+
<details>
|
|
531
|
+
<summary><b>Create and manipulate News Articles</b></summary>
|
|
532
|
+
|
|
533
|
+
```typescript
|
|
534
|
+
import * as api from "wallet";
|
|
535
|
+
import * as constants from "./constants";
|
|
536
|
+
|
|
537
|
+
news();
|
|
538
|
+
|
|
539
|
+
async function news() {
|
|
540
|
+
let client = new api.NewsApi(constants.domain);
|
|
541
|
+
|
|
542
|
+
// Create a new news article
|
|
543
|
+
let article = await client.createNewsArticle({
|
|
544
|
+
title: "News Article",
|
|
545
|
+
orderNumber: 1,
|
|
546
|
+
body: "This is a news article related to the merchant",
|
|
547
|
+
url: "https://blog.merchant.com",
|
|
548
|
+
mediaURL: "https://example.com/image"
|
|
549
|
+
}, constants.headers).catch(err => {
|
|
550
|
+
throw err;
|
|
551
|
+
}).then(resp => {
|
|
552
|
+
return resp.body
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
// The news article that has just been created
|
|
557
|
+
console.log(article);
|
|
558
|
+
|
|
559
|
+
// Update the news article with a new title
|
|
560
|
+
article = await client.updateNewsArticle(article.id, {
|
|
561
|
+
...article,
|
|
562
|
+
title: "News Article Updated"
|
|
563
|
+
}, constants.headers).catch(err => {
|
|
564
|
+
throw err;
|
|
565
|
+
}).then(resp => {
|
|
566
|
+
return resp.body
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
// Archive the news article
|
|
570
|
+
article = await client.archiveNewsArticle(article.id, constants.headers)
|
|
571
|
+
.catch(err => {
|
|
572
|
+
throw err;
|
|
573
|
+
}).then(resp => {
|
|
574
|
+
return resp.body
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
console.log(article.isActive); // This will be false, since the news article has just been archived
|
|
578
|
+
|
|
579
|
+
// Restore the news article
|
|
580
|
+
article = await client.restoreNewsArticle(article.id, constants.headers)
|
|
581
|
+
.catch(err => {
|
|
582
|
+
throw err;
|
|
583
|
+
}).then(resp => {
|
|
584
|
+
return resp.body
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
console.log(article.isActive); // This will be true, since the news article has just been restored
|
|
588
|
+
|
|
589
|
+
// Fetch all articles
|
|
590
|
+
let articles = (await client.fetchAllNewsArticles(false, constants.headers)).body;
|
|
591
|
+
console.log(articles);
|
|
592
|
+
}
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
</details>
|
|
596
|
+
|
|
597
|
+
<details>
|
|
598
|
+
<summary><b>Create and manipulate Performances</b></summary>
|
|
599
|
+
|
|
600
|
+
```typescript
|
|
601
|
+
import * as api from "wallet";
|
|
602
|
+
import * as constants from "./constants";
|
|
603
|
+
|
|
604
|
+
performances();
|
|
605
|
+
|
|
606
|
+
async function performances() {
|
|
607
|
+
let client = new api.PerformancesApi(constants.domain);
|
|
608
|
+
|
|
609
|
+
// Create a new performance
|
|
610
|
+
let performance = await client.createPerformance({
|
|
611
|
+
title: "Performance",
|
|
612
|
+
body: "Details related to the performance",
|
|
613
|
+
startDateTime: new Date(),
|
|
614
|
+
price: 200,
|
|
615
|
+
url: "https://blog.merchant.com",
|
|
616
|
+
orderNumber: 1,
|
|
617
|
+
mediaURL: "https://example.com/image",
|
|
618
|
+
isSoldOut: false,
|
|
619
|
+
|
|
620
|
+
}, constants.headers).catch(err => {
|
|
621
|
+
throw err;
|
|
622
|
+
}).then(resp => {
|
|
623
|
+
return resp.body
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
// The performance that has just been created
|
|
628
|
+
console.log(performance);
|
|
629
|
+
|
|
630
|
+
// Update the performance with a new title
|
|
631
|
+
performance = await client.updatePerformance(performance.id, {
|
|
632
|
+
...performance,
|
|
633
|
+
title: "performance Updated"
|
|
634
|
+
}, constants.headers).catch(err => {
|
|
635
|
+
throw err;
|
|
636
|
+
}).then(resp => {
|
|
637
|
+
return resp.body
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
// Archive the performance
|
|
641
|
+
performance = await client.archivePerformance(performance.id, constants.headers)
|
|
642
|
+
.catch(err => {
|
|
643
|
+
throw err;
|
|
644
|
+
}).then(resp => {
|
|
645
|
+
return resp.body
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
console.log(performance.isActive); // This will be false, since the performance has just been archived
|
|
649
|
+
|
|
650
|
+
// Restore the performance
|
|
651
|
+
performance = await client.restorePerformance(performance.id, constants.headers)
|
|
652
|
+
.catch(err => {
|
|
653
|
+
throw err;
|
|
654
|
+
}).then(resp => {
|
|
655
|
+
return resp.body
|
|
656
|
+
});
|
|
657
|
+
|
|
658
|
+
console.log(performance.isActive); // This will be true, since the performance has just been restored
|
|
659
|
+
|
|
660
|
+
// Fetch all performances
|
|
661
|
+
let performances = (await client.fetchAllPerformances(false, constants.headers)).body;
|
|
662
|
+
console.log(performances);
|
|
663
|
+
}
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
</details>
|
|
667
|
+
|
|
668
|
+
<details>
|
|
669
|
+
<summary><b>Create and manipulate Promo Codes</b></summary>
|
|
670
|
+
|
|
671
|
+
```typescript
|
|
672
|
+
import * as api from "wallet";
|
|
673
|
+
import * as constants from "./constants";
|
|
674
|
+
|
|
675
|
+
promocodes();
|
|
676
|
+
|
|
677
|
+
async function promocodes() {
|
|
678
|
+
let client = new api.PromoCodesApi(constants.domain);
|
|
679
|
+
|
|
680
|
+
// Create a new promocode
|
|
681
|
+
let promocode = await client.createPromoCode({
|
|
682
|
+
title: "Promo Code",
|
|
683
|
+
description: "Description about Promo Code",
|
|
684
|
+
promoCode: "MON50OFF",
|
|
685
|
+
displayValue: "50OFF",
|
|
686
|
+
orderNumber: 1,
|
|
687
|
+
startDate: new Date(),
|
|
688
|
+
expirationDate: new Date(new Date().getTime() + (5 * 24 * 60 * 60 * 1000))
|
|
689
|
+
}, constants.headers).catch(err => {
|
|
690
|
+
throw err;
|
|
691
|
+
}).then(resp => {
|
|
692
|
+
return resp.body
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
// The promocode that has just been created
|
|
696
|
+
console.log(promocode);
|
|
697
|
+
|
|
698
|
+
// Update the promocode with a new title
|
|
699
|
+
promocode = await client.updatePromoCode(promocode.id, {
|
|
700
|
+
...promocode,
|
|
701
|
+
title: "promocode Updated"
|
|
702
|
+
}, constants.headers).catch(err => {
|
|
703
|
+
throw err;
|
|
704
|
+
}).then(resp => {
|
|
705
|
+
return resp.body
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
// Archive the promocode
|
|
709
|
+
promocode = await client.archivePromoCode(promocode.id, constants.headers)
|
|
710
|
+
.catch(err => {
|
|
711
|
+
throw err;
|
|
712
|
+
}).then(resp => {
|
|
713
|
+
return resp.body
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
console.log(promocode.isActive); // This will be false, since the promocode has just been archived
|
|
717
|
+
|
|
718
|
+
// Restore the promocode
|
|
719
|
+
promocode = await client.restorePromoCode(promocode.id, constants.headers)
|
|
720
|
+
.catch(err => {
|
|
721
|
+
throw err;
|
|
722
|
+
}).then(resp => {
|
|
723
|
+
return resp.body
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
console.log(promocode.isActive); // This will be true, since the promocode has just been restored
|
|
727
|
+
|
|
728
|
+
// Fetch all promocodes
|
|
729
|
+
let promocodes = (await client.fetchAllPromoCodes(false, constants.headers)).body;
|
|
730
|
+
console.log(promocodes);
|
|
731
|
+
}
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
</details>
|
|
735
|
+
|
|
736
|
+
<details>
|
|
737
|
+
<summary><b>Create and manipulate Merchant Credits</b></summary>
|
|
738
|
+
|
|
739
|
+
```typescript
|
|
740
|
+
import * as api from "wallet";
|
|
741
|
+
import { PaginationRequestWithSortOptions } from "wallet";
|
|
742
|
+
import * as constants from "./constants";
|
|
743
|
+
|
|
744
|
+
merchantCredits();
|
|
745
|
+
|
|
746
|
+
async function merchantCredits() {
|
|
747
|
+
let client = new api.MerchantCreditsApi(constants.domain);
|
|
748
|
+
|
|
749
|
+
// Create a new merchant credit
|
|
750
|
+
let merchantcredit = await client.createMerchantCredit({
|
|
751
|
+
mobileNumber: "+1808978789",
|
|
752
|
+
creditAmount: 2000, // In cents
|
|
753
|
+
memberID: "MEM001"
|
|
754
|
+
}, constants.headers).catch(err => {
|
|
755
|
+
throw err;
|
|
756
|
+
}).then(resp => {
|
|
757
|
+
return resp.body
|
|
758
|
+
});
|
|
759
|
+
|
|
760
|
+
// The merchant credit that has just been created
|
|
761
|
+
console.log(merchantcredit);
|
|
762
|
+
|
|
763
|
+
// Fetch the created merchantcredit
|
|
764
|
+
merchantcredit = (await client.fetchMerchantCreditById(merchantcredit.id, constants.headers)).body;
|
|
765
|
+
console.log(merchantcredit);
|
|
766
|
+
|
|
767
|
+
// Update the merchant credit with a new title
|
|
768
|
+
merchantcredit = await client.updateMerchantCredit(merchantcredit.id, {
|
|
769
|
+
...merchantcredit,
|
|
770
|
+
creditAmount: 1000, // In cents
|
|
771
|
+
}, constants.headers).catch(err => {
|
|
772
|
+
throw err;
|
|
773
|
+
}).then(resp => {
|
|
774
|
+
return resp.body
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// Archive the merchant credit
|
|
778
|
+
merchantcredit = await client.archiveMerchantCredit(merchantcredit.id, constants.headers)
|
|
779
|
+
.catch(err => {
|
|
780
|
+
throw err;
|
|
781
|
+
}).then(resp => {
|
|
782
|
+
return resp.body
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
console.log(merchantcredit.isActive); // This will be false, since the merchant credit has just been archived
|
|
786
|
+
|
|
787
|
+
// Restore the merchant credit
|
|
788
|
+
merchantcredit = await client.restoreMerchantCredit(merchantcredit.id, constants.headers)
|
|
789
|
+
.catch(err => {
|
|
790
|
+
throw err;
|
|
791
|
+
}).then(resp => {
|
|
792
|
+
return resp.body
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
console.log(merchantcredit.isActive); // This will be true, since the merchant credit has just been restored
|
|
796
|
+
|
|
797
|
+
// Fetch merchantcredits by page
|
|
798
|
+
let merchantcredits = (await client.fetchMerchantCreditsByPage({
|
|
799
|
+
pageSize: 10, pageNum: 1, sortKey: PaginationRequestWithSortOptions.SortKeyEnum.CreatedAt
|
|
800
|
+
})).body;
|
|
801
|
+
|
|
802
|
+
console.log(merchantcredits);
|
|
803
|
+
|
|
804
|
+
// Fetch paginated merchantcredit history logs
|
|
805
|
+
let historyLogs = (await client.fetchMerchantCreditHistoryLog({
|
|
806
|
+
pageSize: 10,
|
|
807
|
+
pageNum: 1,
|
|
808
|
+
id: merchantcredit.id
|
|
809
|
+
}, constants.headers)).body;
|
|
810
|
+
|
|
811
|
+
console.log(historyLogs);
|
|
812
|
+
|
|
813
|
+
let redemptionLogs = (await client.fetchMerchantCreditRedemptionLog({
|
|
814
|
+
pageSize: 10,
|
|
815
|
+
pageNum: 1,
|
|
816
|
+
id: merchantcredit.id
|
|
817
|
+
}, constants.headers)).body;
|
|
818
|
+
|
|
819
|
+
console.log(redemptionLogs);
|
|
820
|
+
|
|
821
|
+
// Fetch the count of merchantcredits
|
|
822
|
+
let merchantcreditsCount = ((await (client.fetchMerchantCreditCount(constants.headers))).body).count;
|
|
823
|
+
console.log(merchantcreditsCount);
|
|
824
|
+
}
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
</details>
|
|
828
|
+
|
|
829
|
+
<details>
|
|
830
|
+
<summary><b>Create and manipulate Dynamic Vouchers</b></summary>
|
|
831
|
+
|
|
832
|
+
```typescript
|
|
833
|
+
import * as api from "wallet";
|
|
834
|
+
import * as constants from "./constants";
|
|
835
|
+
|
|
836
|
+
dynamicVouchers();
|
|
837
|
+
|
|
838
|
+
async function dynamicVouchers() {
|
|
839
|
+
let client = new api.DynamicVouchersApi(constants.domain);
|
|
840
|
+
|
|
841
|
+
// Fetch payment design
|
|
842
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
843
|
+
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
844
|
+
.catch(err => {
|
|
845
|
+
throw err;
|
|
846
|
+
}).then(resp => {
|
|
847
|
+
return resp.body;
|
|
848
|
+
});
|
|
849
|
+
let selectedDesign = allDesigns[0];
|
|
850
|
+
|
|
851
|
+
let startDate = new Date();
|
|
852
|
+
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
853
|
+
|
|
854
|
+
let params: api.WTDynamicVoucherCreateParams = {
|
|
855
|
+
title: "Dynamic Voucher API Client",
|
|
856
|
+
notes: "Example notes",
|
|
857
|
+
paymentDesignID: selectedDesign.id,
|
|
858
|
+
dateTimeStart: startDate,
|
|
859
|
+
dateTimeExpiration: expiryDate,
|
|
860
|
+
startingValue: 1000, // In cents
|
|
861
|
+
maxBudget: 90000, // In cents
|
|
862
|
+
decreaseAmount: 10, // In cents
|
|
863
|
+
frequency: 10, // Every 10 units of the frequencyType
|
|
864
|
+
frequencyType: "Minute(s)", // Possible values are: "Minute(s)", "Hour(s)", "Day(s)", "Week(s)", "Second(s)"
|
|
865
|
+
isActive: true,
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
let voucher = await client.createDynamicVoucher(params, constants.headers).catch(err => {
|
|
869
|
+
throw err;
|
|
870
|
+
}).then(resp => {
|
|
871
|
+
return resp.body
|
|
872
|
+
});
|
|
873
|
+
|
|
874
|
+
console.log(voucher);
|
|
875
|
+
|
|
876
|
+
// Fetch dynamic voucher by id
|
|
877
|
+
voucher = await client.fetchDynamicVoucherById(voucher.id, constants.headers)
|
|
878
|
+
.catch(err => {
|
|
879
|
+
throw err;
|
|
880
|
+
}).then(resp => {
|
|
881
|
+
return resp.body;
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
console.log(voucher);
|
|
885
|
+
|
|
886
|
+
// Update dynamic voucher
|
|
887
|
+
voucher = await client.saveDynamicVoucher(voucher.id, {
|
|
888
|
+
...params,
|
|
889
|
+
title: `${voucher.title} Updated`,
|
|
890
|
+
}, constants.headers)
|
|
891
|
+
.catch(err => {
|
|
892
|
+
throw err;
|
|
893
|
+
}).then(resp => {
|
|
894
|
+
return resp.body;
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
console.log(voucher);
|
|
898
|
+
|
|
899
|
+
// Fetch all dynamic vouchers
|
|
900
|
+
let allVouchers = await client.fetchAllDynamicVouchers(false, constants.headers)
|
|
901
|
+
.catch(err => {
|
|
902
|
+
throw err;
|
|
903
|
+
}).then(resp => {
|
|
904
|
+
return resp.body;
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
console.log(allVouchers);
|
|
908
|
+
|
|
909
|
+
// Fetch all the redemptions
|
|
910
|
+
let allRedemptions = await client.fetchDynamicVoucherRedemptions(voucher.id, constants.headers)
|
|
911
|
+
.catch(err => {
|
|
912
|
+
throw err;
|
|
913
|
+
}).then(resp => {
|
|
914
|
+
return resp.body;
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
console.log(allRedemptions);
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
// Fetch reach stats of individual dynamic voucher
|
|
921
|
+
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualDynamicVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
922
|
+
.catch(err => {
|
|
923
|
+
throw err;
|
|
924
|
+
}).then(resp => {
|
|
925
|
+
return resp.body;
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
console.log(individualVoucherReachStats);
|
|
929
|
+
|
|
930
|
+
// Fetch reach stats of all the dynamic vouchers
|
|
931
|
+
let allVouchersReachStats = await client.fetchReachStatsOfAllDynamicVouchers(undefined, undefined, constants.headers)
|
|
932
|
+
.catch(err => {
|
|
933
|
+
throw err;
|
|
934
|
+
}).then(resp => {
|
|
935
|
+
return resp.body;
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
console.log(allVouchersReachStats);
|
|
939
|
+
}
|
|
940
|
+
```
|
|
941
|
+
|
|
942
|
+
</details>
|
|
943
|
+
|
|
944
|
+
<details>
|
|
945
|
+
<summary><b>Create and manipulate Static Voucher Campaigns</b></summary>
|
|
946
|
+
|
|
947
|
+
```typescript
|
|
948
|
+
import * as api from "wallet";
|
|
949
|
+
import * as constants from "./constants";
|
|
950
|
+
|
|
951
|
+
staticVoucherCampaigns();
|
|
952
|
+
|
|
953
|
+
async function staticVoucherCampaigns() {
|
|
954
|
+
let client = new api.StaticVoucherCampaignsApi(constants.domain);
|
|
955
|
+
// Fetch payment design
|
|
956
|
+
let designClient = new api.PaymentDesignsApi(constants.domain);
|
|
957
|
+
let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
|
|
958
|
+
.catch(err => {
|
|
959
|
+
throw err;
|
|
960
|
+
}).then(resp => {
|
|
961
|
+
return resp.body;
|
|
962
|
+
});
|
|
963
|
+
let selectedDesign = allDesigns[0];
|
|
964
|
+
|
|
965
|
+
let startDate = new Date();
|
|
966
|
+
let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
|
|
967
|
+
|
|
968
|
+
let params: api.CreateStaticVoucherCampaign = {
|
|
969
|
+
startDateTime: startDate,
|
|
970
|
+
expirationDateTime: expiryDate,
|
|
971
|
+
title: "Static Voucher Campaign API Client",
|
|
972
|
+
notes: "Example notes",
|
|
973
|
+
valueType: "currency", // percent or currency
|
|
974
|
+
displayValue: "$5 Off",
|
|
975
|
+
merchantsReferenceID: "",
|
|
976
|
+
validOnlyAtPOSRegisterIDs: [],
|
|
977
|
+
paymentDesignID: selectedDesign.id,
|
|
978
|
+
isActive: true,
|
|
979
|
+
sourceID: 0,
|
|
980
|
+
}
|
|
981
|
+
let campaign = await client.createStaticVoucherCampaign(params, constants.headers)
|
|
982
|
+
.catch(err => {
|
|
983
|
+
throw err;
|
|
984
|
+
}).then(resp => {
|
|
985
|
+
return resp.body
|
|
986
|
+
});
|
|
987
|
+
|
|
988
|
+
console.log(campaign);
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
// Fetch static voucher campaign by ID
|
|
992
|
+
campaign = await client.fetchStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
993
|
+
.catch(err => {
|
|
994
|
+
throw err;
|
|
995
|
+
}).then(resp => {
|
|
996
|
+
return resp.body
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
console.log(campaign);
|
|
1000
|
+
|
|
1001
|
+
// Fetch all the static voucher campaigns
|
|
1002
|
+
let allCampaigns = await client.fetchStaticVoucherCampaigns(false, undefined, constants.headers)
|
|
1003
|
+
.catch(err => {
|
|
1004
|
+
throw err;
|
|
1005
|
+
}).then(resp => {
|
|
1006
|
+
return resp.body
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
console.log(allCampaigns);
|
|
1010
|
+
|
|
1011
|
+
// Fetch all vouchers within a static voucher campaign
|
|
1012
|
+
let allVouchers = await client.fetchStaticVouchers(campaign.id, constants.headers)
|
|
1013
|
+
.catch(err => {
|
|
1014
|
+
throw err;
|
|
1015
|
+
}).then(resp => {
|
|
1016
|
+
return resp.body
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
console.log(allVouchers);
|
|
1020
|
+
|
|
1021
|
+
// Fetch vouchers within a static voucher campaign by page
|
|
1022
|
+
let allVouchersByPage = await client.fetchStaticVouchersPage(campaign.id, 1, 10, constants.headers)
|
|
1023
|
+
.catch(err => {
|
|
1024
|
+
throw err;
|
|
1025
|
+
}).then(resp => {
|
|
1026
|
+
return resp.body
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
console.log(allVouchersByPage);
|
|
1030
|
+
|
|
1031
|
+
// Fetch performance overview
|
|
1032
|
+
let performanceOverview = await client.fetchPerformanceOverview(campaign.id, constants.headers)
|
|
1033
|
+
.catch(err => {
|
|
1034
|
+
throw err;
|
|
1035
|
+
}).then(resp => {
|
|
1036
|
+
return resp.body
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
console.log(performanceOverview);
|
|
1040
|
+
|
|
1041
|
+
// Fetch reach stats of individual static voucher campaign
|
|
1042
|
+
let individualCampaignReachStats = await client.fetchReachStatsOfIndividualStaticVoucherCampaign(campaign.id, undefined, undefined, constants.headers)
|
|
1043
|
+
.catch(err => {
|
|
1044
|
+
throw err;
|
|
1045
|
+
}).then(resp => {
|
|
1046
|
+
return resp.body
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
console.log(individualCampaignReachStats);
|
|
1050
|
+
|
|
1051
|
+
// Fetch reach stats of all static voucher campaigns
|
|
1052
|
+
let allStaticVoucherCampaignStats = await client.fetchReachStatsOfAllStaticVoucherCampaigns(undefined, undefined, constants.headers)
|
|
1053
|
+
.catch(err => {
|
|
1054
|
+
throw err;
|
|
1055
|
+
}).then(resp => {
|
|
1056
|
+
return resp.body
|
|
1057
|
+
});
|
|
1058
|
+
|
|
1059
|
+
console.log(allStaticVoucherCampaignStats);
|
|
1060
|
+
|
|
1061
|
+
// Fetch wallet page views of a static voucher campaign
|
|
1062
|
+
let views = await client.fetchViews(campaign.id, constants.headers)
|
|
1063
|
+
.catch(err => {
|
|
1064
|
+
throw err;
|
|
1065
|
+
}).then(resp => {
|
|
1066
|
+
return resp.body
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
console.log(views);
|
|
1070
|
+
|
|
1071
|
+
// Fetch redeemed vouchers
|
|
1072
|
+
let redeemedVouchers = await client.fetchVouchersRedeemed(campaign.id, constants.headers)
|
|
1073
|
+
.catch(err => {
|
|
1074
|
+
throw err;
|
|
1075
|
+
}).then(resp => {
|
|
1076
|
+
return resp.body
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
console.log(redeemedVouchers);
|
|
1080
|
+
|
|
1081
|
+
// Duplicate static voucher campaign
|
|
1082
|
+
let duplicatedCampaign = await client.duplicateStaticVoucherCampaignById(campaign.id, constants.headers)
|
|
1083
|
+
.catch(err => {
|
|
1084
|
+
throw err;
|
|
1085
|
+
}).then(resp => {
|
|
1086
|
+
return resp.body
|
|
1087
|
+
});
|
|
1088
|
+
|
|
1089
|
+
console.log(duplicatedCampaign);
|
|
1090
|
+
|
|
1091
|
+
// Update static voucher campaign
|
|
1092
|
+
campaign = await client.updateStaticVoucherCampaign(campaign.id, {
|
|
1093
|
+
...params,
|
|
1094
|
+
title: `${params.title} Updated`
|
|
1095
|
+
}, constants.headers)
|
|
1096
|
+
.catch(err => {
|
|
1097
|
+
throw err;
|
|
1098
|
+
}).then(resp => {
|
|
1099
|
+
return resp.body
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
console.log(campaign);
|
|
1103
|
+
|
|
1104
|
+
// Create static voucher campaign with voucher
|
|
1105
|
+
let campaignWithVoucher = await client.createStaticVoucherCampaignWithVoucher({
|
|
1106
|
+
...params,
|
|
1107
|
+
cellPhone: "+1809898787",
|
|
1108
|
+
memberID: "MEM0091",
|
|
1109
|
+
offerAmountCents: 1000
|
|
1110
|
+
}, constants.headers)
|
|
1111
|
+
.catch(err => {
|
|
1112
|
+
throw err;
|
|
1113
|
+
}).then(resp => {
|
|
1114
|
+
return resp.body
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
console.log(campaignWithVoucher);
|
|
1118
|
+
|
|
1119
|
+
allVouchers = await client.fetchStaticVouchers(campaignWithVoucher.id, constants.headers)
|
|
1120
|
+
.catch(err => {
|
|
1121
|
+
throw err;
|
|
1122
|
+
}).then(resp => {
|
|
1123
|
+
return resp.body
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
// Update static voucher campaign
|
|
1127
|
+
campaignWithVoucher = await client.updateStaticVoucherCampaignWithVoucher(campaignWithVoucher.id, {
|
|
1128
|
+
...params,
|
|
1129
|
+
offerAmountCents: 2000,
|
|
1130
|
+
voucherID: allVouchers[0].id
|
|
1131
|
+
}, constants.headers)
|
|
1132
|
+
.catch(err => {
|
|
1133
|
+
throw err;
|
|
1134
|
+
}).then(resp => {
|
|
1135
|
+
return resp.body
|
|
1136
|
+
});
|
|
1137
|
+
|
|
1138
|
+
console.log(campaignWithVoucher);
|
|
1139
|
+
}
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
</details>
|
|
1143
|
+
|
|
1144
|
+
<details>
|
|
1145
|
+
<summary><b>Create and manipulate Static Vouchers</b></summary>
|
|
1146
|
+
|
|
1147
|
+
```typescript
|
|
1148
|
+
import * as api from "wallet";
|
|
1149
|
+
import * as constants from "./constants";
|
|
1150
|
+
|
|
1151
|
+
staticVouchers();
|
|
1152
|
+
|
|
1153
|
+
async function staticVouchers() {
|
|
1154
|
+
let client = new api.StaticVouchersApi(constants.domain);
|
|
1155
|
+
|
|
1156
|
+
let params: api.WTStaticVoucherCreateParams = {
|
|
1157
|
+
offerAmountCents: 1000, // In cents
|
|
1158
|
+
memberID: "MEM0090",
|
|
1159
|
+
cellPhone: "+1809898787",
|
|
1160
|
+
campaignID: "",
|
|
1161
|
+
}
|
|
1162
|
+
// Create a new static voucher
|
|
1163
|
+
let voucher = await client.createStaticVoucher(params, constants.headers).catch(err => {
|
|
1164
|
+
throw err;
|
|
1165
|
+
}).then(resp => {
|
|
1166
|
+
return resp.body
|
|
1167
|
+
});
|
|
1168
|
+
|
|
1169
|
+
// The static voucher that has just been created
|
|
1170
|
+
console.log(voucher);
|
|
1171
|
+
|
|
1172
|
+
// Fetch the static voucher that has just been created
|
|
1173
|
+
voucher = (await client.fetchStaticVoucher(voucher.id, constants.headers)).body;
|
|
1174
|
+
console.log(voucher);
|
|
1175
|
+
|
|
1176
|
+
// Update the static voucher with a new maxUses count
|
|
1177
|
+
voucher = await client.updateStaticVoucher(voucher.id, {
|
|
1178
|
+
...params,
|
|
1179
|
+
offerAmountCents: 2000 // In cents
|
|
1180
|
+
}, constants.headers).catch(err => {
|
|
1181
|
+
throw err;
|
|
1182
|
+
}).then(resp => {
|
|
1183
|
+
return resp.body
|
|
1184
|
+
});
|
|
1185
|
+
|
|
1186
|
+
// Archive the static voucher
|
|
1187
|
+
await client.deleteStaticVoucher(voucher.id, constants.headers)
|
|
1188
|
+
.catch(err => {
|
|
1189
|
+
throw err;
|
|
1190
|
+
}).then(resp => {
|
|
1191
|
+
return resp.body
|
|
1192
|
+
});
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
// Fetch reach stats of individual static voucher
|
|
1196
|
+
let individualVoucherReachStats = await client.fetchReachStatsOfIndividualStaticVoucher(voucher.id, undefined, undefined, constants.headers)
|
|
1197
|
+
.catch(err => {
|
|
1198
|
+
throw err;
|
|
1199
|
+
}).then(resp => {
|
|
1200
|
+
return resp.body;
|
|
1201
|
+
});
|
|
1202
|
+
|
|
1203
|
+
console.log(individualVoucherReachStats);
|
|
1204
|
+
|
|
1205
|
+
// Fetch reach stats of all the static vouchers
|
|
1206
|
+
let allVouchersReachStats = await client.fetchReachStatsOfAllStaticVouchers(undefined, undefined, constants.headers)
|
|
1207
|
+
.catch(err => {
|
|
1208
|
+
throw err;
|
|
1209
|
+
}).then(resp => {
|
|
1210
|
+
return resp.body;
|
|
1211
|
+
});
|
|
1212
|
+
|
|
1213
|
+
console.log(allVouchersReachStats);
|
|
1214
|
+
}
|
|
1215
|
+
```
|
|
1216
|
+
|
|
1217
|
+
</details>
|
|
1218
|
+
|
|
1219
|
+
<details>
|
|
1220
|
+
<summary><b>Create and manipulate SMSes</b></summary>
|
|
1221
|
+
|
|
1222
|
+
```typescript
|
|
1223
|
+
import * as api from "wallet";
|
|
1224
|
+
import * as constants from "./constants";
|
|
1225
|
+
|
|
1226
|
+
smsExample();
|
|
1227
|
+
|
|
1228
|
+
async function smsExample() {
|
|
1229
|
+
let client = new api.SMSApi(constants.domain);
|
|
1230
|
+
|
|
1231
|
+
// Acquire phone number
|
|
1232
|
+
let phoneNumber = await client.acquirePhoneNumber({
|
|
1233
|
+
phoneNumber: "+1807675656"
|
|
1234
|
+
}, constants.headers)
|
|
1235
|
+
.catch(err => {
|
|
1236
|
+
throw err;
|
|
1237
|
+
}).then(resp => {
|
|
1238
|
+
return resp.body;
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
console.log(phoneNumber);
|
|
1242
|
+
|
|
1243
|
+
// Send phone number for verification
|
|
1244
|
+
await client.sendPhoneNumberForVerification(phoneNumber.id, {
|
|
1245
|
+
helpDeskQueueResponse: "HELPME",
|
|
1246
|
+
helpDeskKeyword: "HELP12",
|
|
1247
|
+
helpResponse: "Hello, we're here to help.",
|
|
1248
|
+
stopResponse: "We're sad to see you go",
|
|
1249
|
+
messageFooter: "Subscribe for more info!",
|
|
1250
|
+
termsOfServiceURL: "https://example.com/terms-of-service",
|
|
1251
|
+
privacyPolicyURL: "https://example.com/privacy-policy",
|
|
1252
|
+
companyName: "Fictitious Corporation"
|
|
1253
|
+
}, constants.headers)
|
|
1254
|
+
.catch(err => {
|
|
1255
|
+
throw err;
|
|
1256
|
+
}).then(resp => {
|
|
1257
|
+
return resp.body;
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
// Archive phone number
|
|
1261
|
+
phoneNumber = await client.archivePhoneNumber(phoneNumber.id, constants.headers)
|
|
1262
|
+
.catch(err => {
|
|
1263
|
+
throw err;
|
|
1264
|
+
}).then(resp => {
|
|
1265
|
+
return resp.body;
|
|
1266
|
+
});
|
|
1267
|
+
|
|
1268
|
+
console.log(phoneNumber.isActive); // This will be false
|
|
1269
|
+
|
|
1270
|
+
// Restore phone number
|
|
1271
|
+
phoneNumber = await client.restorePhoneNumber(phoneNumber.id, constants.headers)
|
|
1272
|
+
.catch(err => {
|
|
1273
|
+
throw err;
|
|
1274
|
+
}).then(resp => {
|
|
1275
|
+
return resp.body;
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
console.log(phoneNumber.isActive); // This will be true
|
|
1279
|
+
|
|
1280
|
+
// Create SMS agreement
|
|
1281
|
+
let agreement = await client.createSMSAgreement({
|
|
1282
|
+
isShortCodeTimelineUnderstood: true,
|
|
1283
|
+
isPricingUnderstood: true,
|
|
1284
|
+
isShortCodeTransferUnderstood: true,
|
|
1285
|
+
isOptInOutUnderstood: true,
|
|
1286
|
+
isShortCodeUnderstood: true,
|
|
1287
|
+
isStandardsUnderstood: true,
|
|
1288
|
+
isCtiaShortCodeRead: true,
|
|
1289
|
+
isManualRead: true,
|
|
1290
|
+
isStopUnderstood: true,
|
|
1291
|
+
isTosOnWebsite: true,
|
|
1292
|
+
isPrivacyPolicyOnWebsite: true,
|
|
1293
|
+
isTwilioTermsRead: true,
|
|
1294
|
+
}, constants.headers)
|
|
1295
|
+
.catch(err => {
|
|
1296
|
+
throw err;
|
|
1297
|
+
}).then(resp => {
|
|
1298
|
+
return resp.body;
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
console.log(agreement);
|
|
1302
|
+
|
|
1303
|
+
// Fetch the agreement
|
|
1304
|
+
agreement = await client.fetchSMSAgreement(constants.headers)
|
|
1305
|
+
.catch(err => {
|
|
1306
|
+
throw err;
|
|
1307
|
+
}).then(resp => {
|
|
1308
|
+
return resp.body;
|
|
1309
|
+
});
|
|
1310
|
+
|
|
1311
|
+
console.log(agreement);
|
|
1312
|
+
|
|
1313
|
+
// Create imported list
|
|
1314
|
+
let importedList = await client.createImportedList({
|
|
1315
|
+
listName: "Imported List",
|
|
1316
|
+
isActive: true,
|
|
1317
|
+
phoneNumberID: phoneNumber.id
|
|
1318
|
+
}, constants.headers)
|
|
1319
|
+
.catch(err => {
|
|
1320
|
+
throw err;
|
|
1321
|
+
}).then(resp => {
|
|
1322
|
+
return resp.body;
|
|
1323
|
+
});
|
|
1324
|
+
|
|
1325
|
+
console.log(importedList);
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
// Create recipient in imported list
|
|
1329
|
+
let recipient = await client.createRecipientInImportedList({
|
|
1330
|
+
importedListID: importedList.id,
|
|
1331
|
+
mobilePhoneNumber: "+1805654545"
|
|
1332
|
+
}, constants.headers)
|
|
1333
|
+
.catch(err => {
|
|
1334
|
+
throw err;
|
|
1335
|
+
}).then(resp => {
|
|
1336
|
+
return resp.body;
|
|
1337
|
+
});
|
|
1338
|
+
|
|
1339
|
+
console.log(recipient);
|
|
1340
|
+
|
|
1341
|
+
// Count recipients in imported list
|
|
1342
|
+
let { count } = await client.countImportedListRecipients(importedList.id, false, undefined, undefined, constants.headers)
|
|
1343
|
+
.catch(err => {
|
|
1344
|
+
throw err;
|
|
1345
|
+
}).then(resp => {
|
|
1346
|
+
return resp.body;
|
|
1347
|
+
});
|
|
1348
|
+
|
|
1349
|
+
console.log(count);
|
|
1350
|
+
|
|
1351
|
+
// Fetch recipients
|
|
1352
|
+
let importedListRecipients = await client.fetchImportedListRecipients(importedList.id, constants.headers)
|
|
1353
|
+
.catch(err => {
|
|
1354
|
+
throw err;
|
|
1355
|
+
}).then(resp => {
|
|
1356
|
+
return resp.body;
|
|
1357
|
+
});
|
|
1358
|
+
|
|
1359
|
+
console.log(importedListRecipients);
|
|
1360
|
+
|
|
1361
|
+
// Fetch recipients by page
|
|
1362
|
+
let importedListRecipientByPage = await client.fetchImportedListRecipientsByPage(importedList.id, 10, 1, false, constants.headers)
|
|
1363
|
+
.catch(err => {
|
|
1364
|
+
throw err;
|
|
1365
|
+
}).then(resp => {
|
|
1366
|
+
return resp.body;
|
|
1367
|
+
});
|
|
1368
|
+
|
|
1369
|
+
console.log(`Total: ${importedListRecipientByPage.total}, Length: ${importedListRecipientByPage.length}, List: ${JSON.stringify(importedListRecipientByPage.results)}`);
|
|
1370
|
+
|
|
1371
|
+
// Export recipients
|
|
1372
|
+
await client.exportImportedListRecipients(importedList.id, constants.headers)
|
|
1373
|
+
.catch(err => {
|
|
1374
|
+
throw err;
|
|
1375
|
+
}).then(resp => {
|
|
1376
|
+
return resp.body;
|
|
1377
|
+
});
|
|
1378
|
+
|
|
1379
|
+
// Create opt in list
|
|
1380
|
+
let optInList = await client.createOptInList({
|
|
1381
|
+
isActive: true,
|
|
1382
|
+
listName: "Opt In List",
|
|
1383
|
+
phoneNumberID: phoneNumber.id,
|
|
1384
|
+
estimatedMessagesPerMonth: 250,
|
|
1385
|
+
optInKeyword: "OPTIN",
|
|
1386
|
+
optOutKeyword: "OPTOUT",
|
|
1387
|
+
optInConfirmedResponse: "You've opted in",
|
|
1388
|
+
optOutConfirmedResponse: "You've opted out",
|
|
1389
|
+
optInConfirmedCustomerReceives: "You've opted in",
|
|
1390
|
+
optOutConfirmedCustomerReceives: "You've opted out",
|
|
1391
|
+
isOver21Required: false,
|
|
1392
|
+
}, constants.headers)
|
|
1393
|
+
.catch(err => {
|
|
1394
|
+
throw err;
|
|
1395
|
+
}).then(resp => {
|
|
1396
|
+
return resp.body;
|
|
1397
|
+
});
|
|
1398
|
+
|
|
1399
|
+
console.log(optInList);
|
|
1400
|
+
|
|
1401
|
+
// Count opt in list subscribers
|
|
1402
|
+
count = await client.countOptInListSubscribers(optInList.id, true, false, false, undefined, undefined, constants.headers)
|
|
1403
|
+
.catch(err => {
|
|
1404
|
+
throw err;
|
|
1405
|
+
}).then(resp => {
|
|
1406
|
+
return (resp.body).count;
|
|
1407
|
+
});
|
|
1408
|
+
|
|
1409
|
+
console.log(count);
|
|
1410
|
+
|
|
1411
|
+
// Export opt in list subscribers
|
|
1412
|
+
await client.exportOptInListSubscribers(optInList.id, constants.headers)
|
|
1413
|
+
.catch(err => {
|
|
1414
|
+
throw err;
|
|
1415
|
+
}).then(resp => {
|
|
1416
|
+
return resp.body;
|
|
1417
|
+
});
|
|
1418
|
+
|
|
1419
|
+
// Fetch subscribers
|
|
1420
|
+
let optInListRecipients = await client.fetchOptInListSubscribers(optInList.id, true, false, false, constants.headers)
|
|
1421
|
+
.catch(err => {
|
|
1422
|
+
throw err;
|
|
1423
|
+
}).then(resp => {
|
|
1424
|
+
return resp.body;
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1427
|
+
console.log(optInListRecipients);
|
|
1428
|
+
|
|
1429
|
+
// Fetch subscribers by page
|
|
1430
|
+
let optInListRecipientByPage = await client.fetchOptInListSubscribersByPage(optInList.id, 10, 1, true, false, false, constants.headers)
|
|
1431
|
+
.catch(err => {
|
|
1432
|
+
throw err;
|
|
1433
|
+
}).then(resp => {
|
|
1434
|
+
return resp.body;
|
|
1435
|
+
});
|
|
1436
|
+
|
|
1437
|
+
console.log(`Total: ${optInListRecipientByPage.total}, Length: ${optInListRecipientByPage.length}, List: ${JSON.stringify(optInListRecipientByPage.results)}`);
|
|
1438
|
+
|
|
1439
|
+
// Fetch all opt in lists associated with the given phone number
|
|
1440
|
+
|
|
1441
|
+
let optInListsAssociatedWithPhoneNumber = await client.fetchOptInListsAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1442
|
+
.catch(err => {
|
|
1443
|
+
throw err;
|
|
1444
|
+
}).then(resp => {
|
|
1445
|
+
return resp.body;
|
|
1446
|
+
});
|
|
1447
|
+
|
|
1448
|
+
console.log(optInListsAssociatedWithPhoneNumber);
|
|
1449
|
+
|
|
1450
|
+
// Create opt in source
|
|
1451
|
+
let optInSource = await client.createOptInListSource({
|
|
1452
|
+
sourceName: "Opt In Source",
|
|
1453
|
+
listID: optInList.id,
|
|
1454
|
+
}, constants.headers)
|
|
1455
|
+
.catch(err => {
|
|
1456
|
+
throw err;
|
|
1457
|
+
}).then(resp => {
|
|
1458
|
+
return resp.body;
|
|
1459
|
+
});
|
|
1460
|
+
console.log(optInSource);
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
// Count subscribers in opt in list source
|
|
1464
|
+
count = await client.countOptInSourceSubscribers(optInSource.id, true, false, false, undefined, undefined, constants.headers)
|
|
1465
|
+
.catch(err => {
|
|
1466
|
+
throw err;
|
|
1467
|
+
}).then(resp => {
|
|
1468
|
+
return (resp.body).count;
|
|
1469
|
+
});
|
|
1470
|
+
|
|
1471
|
+
console.log(count);
|
|
1472
|
+
|
|
1473
|
+
let optInSourceSubscribers = await client.fetchOptInSourceSubscribers(optInSource.id, true, false, false, constants.headers)
|
|
1474
|
+
.catch(err => {
|
|
1475
|
+
throw err;
|
|
1476
|
+
}).then(resp => {
|
|
1477
|
+
return resp.body;
|
|
1478
|
+
});
|
|
1479
|
+
|
|
1480
|
+
console.log(optInSourceSubscribers);
|
|
1481
|
+
|
|
1482
|
+
let optInSourcesAssociatedWithPhoneNumber = await client.fetchOptInSourcesAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
|
|
1483
|
+
.catch(err => {
|
|
1484
|
+
throw err;
|
|
1485
|
+
}).then(resp => {
|
|
1486
|
+
return resp.body;
|
|
1487
|
+
});
|
|
1488
|
+
|
|
1489
|
+
console.log(optInSourcesAssociatedWithPhoneNumber);
|
|
1490
|
+
|
|
1491
|
+
// Fetch all outbound SMSes
|
|
1492
|
+
let outboundSMSes = await client.fetchOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1493
|
+
.catch(err => {
|
|
1494
|
+
throw err;
|
|
1495
|
+
}).then(resp => {
|
|
1496
|
+
return resp.body;
|
|
1497
|
+
});
|
|
1498
|
+
console.log(outboundSMSes);
|
|
1499
|
+
|
|
1500
|
+
// Fetch outbound SMSes by page
|
|
1501
|
+
let outboundSMSesByPage = await client.fetchOutboundSMSByPage(phoneNumber.id, undefined, undefined, 10, 1, constants.headers)
|
|
1502
|
+
.catch(err => {
|
|
1503
|
+
throw err;
|
|
1504
|
+
}).then(resp => {
|
|
1505
|
+
return resp.body;
|
|
1506
|
+
});
|
|
1507
|
+
console.log(`Total: ${outboundSMSesByPage.total}, Length: ${outboundSMSesByPage.length}, Messages: ${JSON.stringify(outboundSMSesByPage.results)}`);
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
// Count outbound SMSes
|
|
1511
|
+
let outboundSMSesCount = await client.countOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
|
|
1512
|
+
.catch(err => {
|
|
1513
|
+
throw err;
|
|
1514
|
+
}).then(resp => {
|
|
1515
|
+
return (resp.body).count;
|
|
1516
|
+
});
|
|
1517
|
+
console.log(outboundSMSesCount);
|
|
1518
|
+
|
|
1519
|
+
// Retrieve message limits
|
|
1520
|
+
let limits = await client.retrieveSentAndMaxCountOfMessages(constants.headers)
|
|
1521
|
+
.catch(err => {
|
|
1522
|
+
throw err;
|
|
1523
|
+
}).then(resp => {
|
|
1524
|
+
return resp.body;
|
|
1525
|
+
});
|
|
1526
|
+
console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
|
|
1527
|
+
}
|
|
1528
|
+
```
|
|
1529
|
+
|
|
1530
|
+
</details>
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
## License
|
|
1534
|
+
|
|
1535
|
+
Copyright 2026 Wallet Inc.
|
|
1536
|
+
|
|
1537
|
+
This SDK is licensed under the Apache License, Version 2.0. See the `LICENSE` and
|
|
1538
|
+
`NOTICE` files for the full text. You may obtain a copy of the License at
|
|
1539
|
+
http://www.apache.org/licenses/LICENSE-2.0.
|
|
1540
|
+
|
|
1541
|
+
This SDK is auto-generated from the Wallet OpenAPI specification. Please file
|
|
1542
|
+
issues rather than submitting code pull requests: the generated sources are
|
|
1543
|
+
overwritten on each API release, so code PRs cannot be merged.
|
|
1544
|
+
|
|
1545
|
+
Your use of the Wallet platform and API is governed by the Wallet Terms of
|
|
1546
|
+
Service, not by this license. The Apache-2.0 license covers this SDK's code only;
|
|
1547
|
+
it does not grant any right to use the Wallet platform or service.
|
|
1548
|
+
|
|
1549
|
+
"Wallet", the Wallet logo, and "WALLET-IN-BIO" are trademarks of Wallet Inc.
|
|
1550
|
+
The Apache-2.0 license grants rights to the code, not to the Wallet names, logos,
|
|
1551
|
+
or trademarks (see Section 6 of the License).
|