wallet 1.1.3 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +309 -309
- package/.openapi-generator-ignore +23 -23
- package/README.md +13 -1
- package/api/advertisementCreditsApi.ts +589 -589
- package/api/analyticsApi.ts +5953 -5953
- package/api/apis.ts +86 -86
- package/api/appleWalletSubscribersApi.ts +235 -235
- package/api/billingApi.ts +680 -680
- package/api/clubMembersPointsApi.ts +798 -798
- package/api/configurationApi.ts +225 -225
- package/api/countriesApi.ts +155 -155
- package/api/customerApi.ts +737 -737
- package/api/dashboardApi.ts +1553 -1553
- package/api/dynamicVouchersApi.ts +603 -603
- package/api/employeeAccessApi.ts +165 -165
- package/api/employeesApi.ts +2933 -2933
- package/api/industriesApi.ts +155 -155
- package/api/infoGenesisReportsApi.ts +2023 -2023
- package/api/integratedTerminalsApi.ts +447 -447
- package/api/interactionsApi.ts +678 -678
- package/api/linkBookApi.ts +447 -447
- package/api/linkBookSectionApi.ts +447 -447
- package/api/loginAndLogoutApi.ts +296 -296
- package/api/membershipTiersApi.ts +729 -729
- package/api/merchantApi.ts +1534 -1534
- package/api/merchantCreditsApi.ts +798 -798
- package/api/merchantURLsApi.ts +586 -586
- package/api/mobileTerminalApi.ts +323 -323
- package/api/newsApi.ts +447 -447
- package/api/paymentDesignsApi.ts +519 -519
- package/api/performancesApi.ts +447 -447
- package/api/promoCodesApi.ts +447 -447
- package/api/sMSApi.ts +1999 -1999
- package/api/settingsApi.ts +220 -220
- package/api/staticVoucherCampaignGroupsApi.ts +165 -165
- package/api/staticVoucherCampaignsApi.ts +1484 -1484
- package/api/staticVouchersApi.ts +535 -535
- package/api/systemApi.ts +604 -604
- package/api/transactionLedgerApi.ts +203 -203
- package/api/utilitiesApi.ts +157 -157
- package/api/webTerminalApi.ts +309 -309
- package/api.ts +2 -2
- package/examples/advertisementcredits.example.ts +50 -50
- package/examples/clubmembers.example.ts +50 -50
- package/examples/linkbook.example.ts +50 -50
- package/examples/membershiptiers.example.ts +49 -49
- package/examples/merchanturls.example.ts +47 -47
- package/examples/news.example.ts +51 -51
- package/examples/paymentdesigns.example.ts +56 -56
- package/git_push.sh +57 -57
- package/model/advertisementCredit.ts +103 -103
- package/model/advertisementCreditBroadcast.ts +154 -154
- package/model/advertisementCreditScan.ts +170 -170
- package/model/agreement.ts +133 -133
- package/model/alert.ts +79 -79
- package/model/announcement.ts +67 -67
- package/model/applicableTerminals.ts +30 -30
- package/model/applicableTerminalsAnyOf.ts +17 -17
- package/model/applicableTerminalsAnyOf1.ts +17 -17
- package/model/applicableTerminalsAnyOf2.ts +17 -17
- package/model/applicableTerminalsAnyOf3.ts +17 -17
- package/model/authError.ts +55 -55
- package/model/availablePhoneNumbersRequest.ts +43 -43
- package/model/clickFunnelAmount.ts +37 -37
- package/model/clickFunnelContact.ts +248 -248
- package/model/clickFunnelContactProfile.ts +235 -235
- package/model/clickFunnelEvent.ts +38 -38
- package/model/clickFunnelOriginalAmount.ts +37 -37
- package/model/clickFunnelProduct.ts +194 -194
- package/model/clickFunnelPurchase.ts +178 -178
- package/model/createStaticVoucherCampaign.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +109 -109
- package/model/dashboardWidget.ts +115 -115
- package/model/duplicateRowFound.ts +55 -55
- package/model/dynamicVoucher.ts +224 -224
- package/model/dynamicVoucherBroadcast.ts +154 -154
- package/model/employee.ts +109 -109
- package/model/employeeActivityLog.ts +67 -67
- package/model/employeeAlert.ts +79 -79
- package/model/exportDataFile.ts +85 -85
- package/model/falsumError.ts +41 -41
- package/model/falsumField.ts +55 -55
- package/model/feature.ts +79 -79
- package/model/forbiddenRequest.ts +55 -55
- package/model/foreignKeyDoesNotExist.ts +55 -55
- package/model/helpDeskRequest.ts +85 -85
- package/model/importedList.ts +73 -73
- package/model/importedListRecipient.ts +73 -73
- package/model/inlineObject.ts +31 -31
- package/model/inlineObject1.ts +31 -31
- package/model/inlineObject10.ts +37 -37
- package/model/inlineObject11.ts +37 -37
- package/model/inlineObject12.ts +37 -37
- package/model/inlineObject13.ts +37 -37
- package/model/inlineObject14.ts +37 -37
- package/model/inlineObject15.ts +67 -67
- package/model/inlineObject16.ts +61 -61
- package/model/inlineObject17.ts +55 -55
- package/model/inlineObject18.ts +61 -61
- package/model/inlineObject19.ts +55 -55
- package/model/inlineObject2.ts +31 -31
- package/model/inlineObject20.ts +61 -61
- package/model/inlineObject21.ts +73 -73
- package/model/inlineObject22.ts +31 -31
- package/model/inlineObject23.ts +31 -31
- package/model/inlineObject24.ts +43 -43
- package/model/inlineObject25.ts +55 -55
- package/model/inlineObject26.ts +31 -31
- package/model/inlineObject27.ts +31 -31
- package/model/inlineObject28.ts +43 -43
- package/model/inlineObject29.ts +49 -49
- package/model/inlineObject3.ts +31 -31
- package/model/inlineObject30.ts +43 -43
- package/model/inlineObject31.ts +31 -31
- package/model/inlineObject32.ts +31 -31
- package/model/inlineObject33.ts +31 -31
- package/model/inlineObject34.ts +43 -43
- package/model/inlineObject35.ts +43 -43
- package/model/inlineObject36.ts +43 -43
- package/model/inlineObject37.ts +43 -43
- package/model/inlineObject38.ts +43 -43
- package/model/inlineObject39.ts +43 -43
- package/model/inlineObject4.ts +37 -37
- package/model/inlineObject40.ts +43 -43
- package/model/inlineObject41.ts +43 -43
- package/model/inlineObject42.ts +43 -43
- package/model/inlineObject43.ts +43 -43
- package/model/inlineObject44.ts +43 -43
- package/model/inlineObject45.ts +43 -43
- package/model/inlineObject46.ts +43 -43
- package/model/inlineObject47.ts +43 -43
- package/model/inlineObject48.ts +43 -43
- package/model/inlineObject49.ts +43 -43
- package/model/inlineObject5.ts +31 -31
- package/model/inlineObject50.ts +43 -43
- package/model/inlineObject51.ts +97 -97
- package/model/inlineObject52.ts +31 -31
- package/model/inlineObject53.ts +97 -97
- package/model/inlineObject54.ts +97 -97
- package/model/inlineObject55.ts +91 -91
- package/model/inlineObject56.ts +37 -37
- package/model/inlineObject57.ts +37 -37
- package/model/inlineObject58.ts +37 -37
- package/model/inlineObject59.ts +43 -43
- package/model/inlineObject6.ts +31 -31
- package/model/inlineObject60.ts +43 -43
- package/model/inlineObject61.ts +43 -43
- package/model/inlineObject62.ts +37 -37
- package/model/inlineObject63.ts +37 -37
- package/model/inlineObject64.ts +37 -37
- package/model/inlineObject65.ts +205 -205
- package/model/inlineObject66.ts +49 -49
- package/model/inlineObject67.ts +49 -49
- package/model/inlineObject68.ts +37 -37
- package/model/inlineObject69.ts +121 -121
- package/model/inlineObject7.ts +31 -31
- package/model/inlineObject8.ts +43 -43
- package/model/inlineObject9.ts +37 -37
- package/model/inlineResponse200.ts +37 -37
- package/model/inlineResponse2001.ts +56 -56
- package/model/inlineResponse20010.ts +109 -109
- package/model/inlineResponse20011.ts +43 -43
- package/model/inlineResponse2002.ts +31 -31
- package/model/inlineResponse2003.ts +31 -31
- package/model/inlineResponse2004.ts +43 -43
- package/model/inlineResponse2005.ts +38 -38
- package/model/inlineResponse2006.ts +97 -97
- package/model/inlineResponse2007.ts +44 -44
- package/model/inlineResponse2008.ts +31 -31
- package/model/inlineResponse2009.ts +98 -98
- package/model/internalServerError.ts +55 -55
- package/model/ledgerEntry.ts +176 -176
- package/model/linkBook.ts +85 -85
- package/model/linkBookSection.ts +61 -61
- package/model/mSMemberHistory.ts +112 -112
- package/model/mSMemberHistoryPagination.ts +53 -53
- package/model/mSMemberRedemption.ts +109 -109
- package/model/mSMemberRedemptionPagination.ts +53 -53
- package/model/mSMembershipTierHistory.ts +106 -106
- package/model/mSMembershipTierHistoryPagination.ts +53 -53
- package/model/mSMembershipTierRedemption.ts +121 -121
- package/model/mSMembershipTierRedemptionPagination.ts +53 -53
- package/model/mSMerchantCreditHistory.ts +88 -88
- package/model/mSMerchantCreditHistoryPagination.ts +53 -53
- package/model/mSMerchantCreditRedemption.ts +109 -109
- package/model/mSMerchantCreditRedemptionPagination.ts +53 -53
- package/model/mediaFile.ts +85 -85
- package/model/member.ts +118 -118
- package/model/memberSearch.ts +61 -61
- package/model/merchant.ts +133 -133
- package/model/merchantCreditSearch.ts +61 -61
- package/model/merchantNotInitialized.ts +55 -55
- package/model/merchantURL.ts +67 -67
- package/model/message.ts +74 -74
- package/model/models.ts +1015 -1015
- package/model/moduleError.ts +157 -157
- package/model/newsArticle.ts +85 -85
- package/model/optInList.ts +121 -121
- package/model/optInListSource.ts +73 -73
- package/model/optInListSubscriber.ts +104 -104
- package/model/outboundSMS.ts +157 -157
- package/model/paginatedWTMembers.ts +53 -53
- package/model/paginatedWTMerchantCredits.ts +53 -53
- package/model/paginationRequestWithSortOptions.ts +75 -75
- package/model/paymentDesign.ts +139 -139
- package/model/performance.ts +100 -100
- package/model/phoneNumber.ts +157 -157
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +106 -106
- package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +67 -67
- package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +106 -106
- package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +43 -43
- package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +82 -82
- package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +46 -46
- package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +52 -52
- package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +100 -100
- package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeID.ts +94 -94
- package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +100 -100
- package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +46 -46
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +154 -154
- package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +137 -137
- package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +58 -58
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +106 -106
- package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +142 -142
- package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsBackgroundImageURLOrCompanyLogoURLOrEmployeeID.ts +94 -94
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +106 -106
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +167 -167
- package/model/pickWTAdvertisementCreditCreateParamsExcludeKeyofWTAdvertisementCreditCreateParamsEmployeeID.ts +58 -58
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +58 -58
- package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumber.ts +76 -76
- package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +52 -52
- package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +40 -40
- package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +58 -58
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +138 -138
- package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +112 -112
- package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +46 -46
- package/model/plan.ts +62 -62
- package/model/portalPage.ts +67 -67
- package/model/presignedPost.ts +41 -41
- package/model/presignedPostFields.ts +43 -43
- package/model/product.ts +74 -74
- package/model/promoCode.ts +97 -97
- package/model/reachPerformanceStats.ts +70 -70
- package/model/request.ts +349 -349
- package/model/response.ts +67 -67
- package/model/role.ts +117 -117
- package/model/roleAuditLog.ts +97 -97
- package/model/sSOptInSource.ts +73 -73
- package/model/simpleSMSBroadcast.ts +147 -147
- package/model/staticVoucher.ts +224 -224
- package/model/staticVoucherCampaign.ts +175 -175
- package/model/staticVoucherCampaignBroadcast.ts +142 -142
- package/model/staticVoucherCampaignGroup.ts +85 -85
- package/model/staticVoucherCampaignUpdate.ts +85 -85
- package/model/status.ts +30 -30
- package/model/statusAnyOf.ts +17 -17
- package/model/statusAnyOf1.ts +17 -17
- package/model/statusAnyOf2.ts +17 -17
- package/model/statusAnyOf3.ts +17 -17
- package/model/subscriptionFeature.ts +79 -79
- package/model/subscriptionPlan.ts +69 -69
- package/model/subscriptionProduct.ts +81 -81
- package/model/tcpa.ts +67 -67
- package/model/updateStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/vSCampaignGeneratedMessage.ts +43 -43
- package/model/vSCampaignGeneratedMessagePagination.ts +53 -53
- package/model/vSDynamicVoucherStatus.ts +28 -28
- package/model/wTAdvertisementCredit.ts +103 -103
- package/model/wTAdvertisementCreditScan.ts +170 -170
- package/model/wTAdvertisementCreditUpdateParams.ts +55 -55
- package/model/wTDynamicVoucher.ts +224 -224
- package/model/wTDynamicVoucherCreateParams.ts +103 -103
- package/model/wTDynamicVoucherRedemption.ts +164 -164
- package/model/wTDynamicVoucherSummary.ts +169 -169
- package/model/wTDynamicVoucherUpdateParams.ts +103 -103
- package/model/wTEmployee.ts +109 -109
- package/model/wTEmployeeCreate.ts +61 -61
- package/model/wTEmployeeUpdate.ts +55 -55
- package/model/wTImportedList.ts +73 -73
- package/model/wTLinkBookCreateParams.ts +55 -55
- package/model/wTLinkBookSectionCreateParams.ts +31 -31
- package/model/wTLinkBookSectionUpdateParams.ts +31 -31
- package/model/wTLinkBookUpdateParams.ts +55 -55
- package/model/wTMember.ts +118 -118
- package/model/wTMemberCreationParams.ts +73 -73
- package/model/wTMembershipTier.ts +106 -106
- package/model/wTMembershipTierCreationParams.ts +64 -64
- package/model/wTMembershipTierUpdateParams.ts +64 -64
- package/model/wTMembershipTierWithMemberCount.ts +115 -115
- package/model/wTMerchantCredit.ts +106 -106
- package/model/wTMerchantCreditCreationParams.ts +49 -49
- package/model/wTMerchantURLCreate.ts +37 -37
- package/model/wTMerchantURLUpdate.ts +37 -37
- package/model/wTNewsArticleCreateParams.ts +55 -55
- package/model/wTNewsArticleUpdateParams.ts +55 -55
- package/model/wTOptInList.ts +121 -121
- package/model/wTOptInListCreationParams.ts +91 -91
- package/model/wTPaymentDesign.ts +139 -139
- package/model/wTPaymentDesignCreateParams.ts +115 -115
- package/model/wTPaymentDesignUpdateParams.ts +115 -115
- package/model/wTPerformanceCreateParams.ts +70 -70
- package/model/wTPerformanceUpdateParams.ts +70 -70
- package/model/wTPosMachine.ts +88 -88
- package/model/wTPosMachineCreateParams.ts +58 -58
- package/model/wTPosMachineUpdateParams.ts +58 -58
- package/model/wTPromoCodeCreateParams.ts +67 -67
- package/model/wTPromoCodeUpdateParams.ts +67 -67
- package/model/wTRole.ts +116 -116
- package/model/wTStaticVoucher.ts +224 -224
- package/model/wTStaticVoucherCampaign.ts +175 -175
- package/model/wTStaticVoucherCreateParams.ts +49 -49
- package/model/wTStaticVoucherUpdateParams.ts +43 -43
- package/model/wTWalletPageView.ts +251 -251
- package/model/wTWalletPageViewGeoPoint.ts +37 -37
- package/model/walletPageView.ts +251 -251
- package/model/webpage.ts +85 -85
- package/package.json +1 -26
- package/readme-generator.py +54 -42
- package/tsconfig.json +25 -25
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function advertisementCredits() {
|
|
4
|
-
let client = new api.AdvertisementCreditsApi();
|
|
5
|
-
|
|
6
|
-
// Create a new advertisement credit
|
|
7
|
-
let adCredit = await client.createAdvertisementCredit({
|
|
8
|
-
title: "Ad Credit",
|
|
9
|
-
valueType: "percent",
|
|
10
|
-
paymentDesignID: "HUdjo93KL",
|
|
11
|
-
maxUses: 5,
|
|
12
|
-
discountValue: 5,
|
|
13
|
-
}).catch(err => {
|
|
14
|
-
throw err;
|
|
15
|
-
}).then(resp => {
|
|
16
|
-
return resp.body
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// The advertisement credit that has just been created
|
|
20
|
-
console.log(adCredit);
|
|
21
|
-
|
|
22
|
-
// Update the advertisement credit with a new maxUses count
|
|
23
|
-
adCredit = await client.updateAdvertisementCredit(adCredit.id, {
|
|
24
|
-
...adCredit,
|
|
25
|
-
maxUses: 10,
|
|
26
|
-
}).catch(err => {
|
|
27
|
-
throw err;
|
|
28
|
-
}).then(resp => {
|
|
29
|
-
return resp.body
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Archive the advertisement credit
|
|
33
|
-
adCredit = await client.archiveAdvertisementCredit(adCredit.id)
|
|
34
|
-
.catch(err => {
|
|
35
|
-
throw err;
|
|
36
|
-
}).then(resp => {
|
|
37
|
-
return resp.body
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
console.log(adCredit.isActive); // This will be false, since the advertisement credit has just been archived
|
|
41
|
-
|
|
42
|
-
// Restore the advertisement credit
|
|
43
|
-
adCredit = await client.restoreAdvertisementCredit(adCredit.id)
|
|
44
|
-
.catch(err => {
|
|
45
|
-
throw err;
|
|
46
|
-
}).then(resp => {
|
|
47
|
-
return resp.body
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
console.log(adCredit.isActive); // This will be true, since the advertisement credit has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function advertisementCredits() {
|
|
4
|
+
let client = new api.AdvertisementCreditsApi();
|
|
5
|
+
|
|
6
|
+
// Create a new advertisement credit
|
|
7
|
+
let adCredit = await client.createAdvertisementCredit({
|
|
8
|
+
title: "Ad Credit",
|
|
9
|
+
valueType: "percent",
|
|
10
|
+
paymentDesignID: "HUdjo93KL",
|
|
11
|
+
maxUses: 5,
|
|
12
|
+
discountValue: 5,
|
|
13
|
+
}).catch(err => {
|
|
14
|
+
throw err;
|
|
15
|
+
}).then(resp => {
|
|
16
|
+
return resp.body
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// The advertisement credit that has just been created
|
|
20
|
+
console.log(adCredit);
|
|
21
|
+
|
|
22
|
+
// Update the advertisement credit with a new maxUses count
|
|
23
|
+
adCredit = await client.updateAdvertisementCredit(adCredit.id, {
|
|
24
|
+
...adCredit,
|
|
25
|
+
maxUses: 10,
|
|
26
|
+
}).catch(err => {
|
|
27
|
+
throw err;
|
|
28
|
+
}).then(resp => {
|
|
29
|
+
return resp.body
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Archive the advertisement credit
|
|
33
|
+
adCredit = await client.archiveAdvertisementCredit(adCredit.id)
|
|
34
|
+
.catch(err => {
|
|
35
|
+
throw err;
|
|
36
|
+
}).then(resp => {
|
|
37
|
+
return resp.body
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
console.log(adCredit.isActive); // This will be false, since the advertisement credit has just been archived
|
|
41
|
+
|
|
42
|
+
// Restore the advertisement credit
|
|
43
|
+
adCredit = await client.restoreAdvertisementCredit(adCredit.id)
|
|
44
|
+
.catch(err => {
|
|
45
|
+
throw err;
|
|
46
|
+
}).then(resp => {
|
|
47
|
+
return resp.body
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
console.log(adCredit.isActive); // This will be true, since the advertisement credit has just been restored
|
|
51
51
|
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function clubMembers() {
|
|
4
|
-
let membersClient = new api.ClubMembersPointsApi();
|
|
5
|
-
|
|
6
|
-
// Create new club member
|
|
7
|
-
let member = await membersClient.createMember({
|
|
8
|
-
firstName: "John",
|
|
9
|
-
lastName: "Doe",
|
|
10
|
-
membershipTierID: "HDywI893LQ",
|
|
11
|
-
mobileNumber: "+1807654543",
|
|
12
|
-
pointsAccrued: 2000,
|
|
13
|
-
memberID: "MEM001"
|
|
14
|
-
}).catch(err => {
|
|
15
|
-
throw err;
|
|
16
|
-
}).then(resp => {
|
|
17
|
-
return resp.body
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// The club member that has just been created
|
|
21
|
-
console.log(member);
|
|
22
|
-
|
|
23
|
-
member = await membersClient.updateMember(member.id, {
|
|
24
|
-
...member,
|
|
25
|
-
mobileNumber: "+1809863542"
|
|
26
|
-
}).catch(err => {
|
|
27
|
-
throw err;
|
|
28
|
-
}).then(resp => {
|
|
29
|
-
return resp.body
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Archive the club member
|
|
33
|
-
member = await membersClient.archiveMember(member.id)
|
|
34
|
-
.catch(err => {
|
|
35
|
-
throw err;
|
|
36
|
-
}).then(resp => {
|
|
37
|
-
return resp.body
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
console.log(member.isActive); // This will be false, since the member has just been archived
|
|
41
|
-
|
|
42
|
-
// Restore the club member
|
|
43
|
-
member = await membersClient.restoreMember(member.id)
|
|
44
|
-
.catch(err => {
|
|
45
|
-
throw err;
|
|
46
|
-
}).then(resp => {
|
|
47
|
-
return resp.body
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
console.log(member.isActive); // This will be true, since the member has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function clubMembers() {
|
|
4
|
+
let membersClient = new api.ClubMembersPointsApi();
|
|
5
|
+
|
|
6
|
+
// Create new club member
|
|
7
|
+
let member = await membersClient.createMember({
|
|
8
|
+
firstName: "John",
|
|
9
|
+
lastName: "Doe",
|
|
10
|
+
membershipTierID: "HDywI893LQ",
|
|
11
|
+
mobileNumber: "+1807654543",
|
|
12
|
+
pointsAccrued: 2000,
|
|
13
|
+
memberID: "MEM001"
|
|
14
|
+
}).catch(err => {
|
|
15
|
+
throw err;
|
|
16
|
+
}).then(resp => {
|
|
17
|
+
return resp.body
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// The club member that has just been created
|
|
21
|
+
console.log(member);
|
|
22
|
+
|
|
23
|
+
member = await membersClient.updateMember(member.id, {
|
|
24
|
+
...member,
|
|
25
|
+
mobileNumber: "+1809863542"
|
|
26
|
+
}).catch(err => {
|
|
27
|
+
throw err;
|
|
28
|
+
}).then(resp => {
|
|
29
|
+
return resp.body
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Archive the club member
|
|
33
|
+
member = await membersClient.archiveMember(member.id)
|
|
34
|
+
.catch(err => {
|
|
35
|
+
throw err;
|
|
36
|
+
}).then(resp => {
|
|
37
|
+
return resp.body
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
console.log(member.isActive); // This will be false, since the member has just been archived
|
|
41
|
+
|
|
42
|
+
// Restore the club member
|
|
43
|
+
member = await membersClient.restoreMember(member.id)
|
|
44
|
+
.catch(err => {
|
|
45
|
+
throw err;
|
|
46
|
+
}).then(resp => {
|
|
47
|
+
return resp.body
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
console.log(member.isActive); // This will be true, since the member has just been restored
|
|
51
51
|
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function linkBook() {
|
|
4
|
-
let client = new api.LinkBookApi();
|
|
5
|
-
|
|
6
|
-
// Create a new link book link
|
|
7
|
-
let link = await client.createLinkBook({
|
|
8
|
-
title: "External Link",
|
|
9
|
-
url: "https://example.com",
|
|
10
|
-
icon: "fa-clock",
|
|
11
|
-
orderNumber: 1,
|
|
12
|
-
linkBookSectionID: "",
|
|
13
|
-
}).catch(err => {
|
|
14
|
-
throw err;
|
|
15
|
-
}).then(resp => {
|
|
16
|
-
return resp.body
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// The link book link that has just been created
|
|
20
|
-
console.log(link);
|
|
21
|
-
|
|
22
|
-
// Update the link book link with a new url
|
|
23
|
-
link = await client.updateLinkBook(link.id, {
|
|
24
|
-
...link,
|
|
25
|
-
url: "https://test.com"
|
|
26
|
-
}).catch(err => {
|
|
27
|
-
throw err;
|
|
28
|
-
}).then(resp => {
|
|
29
|
-
return resp.body
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Archive the link book link
|
|
33
|
-
link = await client.archiveLinkBook(link.id)
|
|
34
|
-
.catch(err => {
|
|
35
|
-
throw err;
|
|
36
|
-
}).then(resp => {
|
|
37
|
-
return resp.body
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
console.log(link.isActive); // This will be false, since the link book link has just been archived
|
|
41
|
-
|
|
42
|
-
// Restore the link book link
|
|
43
|
-
link = await client.restoreLinkBook(link.id)
|
|
44
|
-
.catch(err => {
|
|
45
|
-
throw err;
|
|
46
|
-
}).then(resp => {
|
|
47
|
-
return resp.body
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
console.log(link.isActive); // This will be true, since the link book link has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function linkBook() {
|
|
4
|
+
let client = new api.LinkBookApi();
|
|
5
|
+
|
|
6
|
+
// Create a new link book link
|
|
7
|
+
let link = await client.createLinkBook({
|
|
8
|
+
title: "External Link",
|
|
9
|
+
url: "https://example.com",
|
|
10
|
+
icon: "fa-clock",
|
|
11
|
+
orderNumber: 1,
|
|
12
|
+
linkBookSectionID: "",
|
|
13
|
+
}).catch(err => {
|
|
14
|
+
throw err;
|
|
15
|
+
}).then(resp => {
|
|
16
|
+
return resp.body
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// The link book link that has just been created
|
|
20
|
+
console.log(link);
|
|
21
|
+
|
|
22
|
+
// Update the link book link with a new url
|
|
23
|
+
link = await client.updateLinkBook(link.id, {
|
|
24
|
+
...link,
|
|
25
|
+
url: "https://test.com"
|
|
26
|
+
}).catch(err => {
|
|
27
|
+
throw err;
|
|
28
|
+
}).then(resp => {
|
|
29
|
+
return resp.body
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Archive the link book link
|
|
33
|
+
link = await client.archiveLinkBook(link.id)
|
|
34
|
+
.catch(err => {
|
|
35
|
+
throw err;
|
|
36
|
+
}).then(resp => {
|
|
37
|
+
return resp.body
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
console.log(link.isActive); // This will be false, since the link book link has just been archived
|
|
41
|
+
|
|
42
|
+
// Restore the link book link
|
|
43
|
+
link = await client.restoreLinkBook(link.id)
|
|
44
|
+
.catch(err => {
|
|
45
|
+
throw err;
|
|
46
|
+
}).then(resp => {
|
|
47
|
+
return resp.body
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
console.log(link.isActive); // This will be true, since the link book link has just been restored
|
|
51
51
|
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function membershipTiers() {
|
|
4
|
-
let tiersClient = new api.MembershipTiersApi();
|
|
5
|
-
|
|
6
|
-
// Create new membership tier
|
|
7
|
-
let tier = await tiersClient.createMembershipTier({
|
|
8
|
-
tierNumber: "1",
|
|
9
|
-
tierName: "GOLD",
|
|
10
|
-
tierDiscount: 20,
|
|
11
|
-
tierDesignID: "JSUilOPE98",
|
|
12
|
-
pointsDesignID: "L918AJ7356"
|
|
13
|
-
}).catch(err => {
|
|
14
|
-
throw err;
|
|
15
|
-
}).then(resp => {
|
|
16
|
-
return resp.body
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// The membership tier that has just been created
|
|
20
|
-
console.log(tier);
|
|
21
|
-
|
|
22
|
-
tier = await tiersClient.updateMembershipTier(tier.id, {
|
|
23
|
-
...tier,
|
|
24
|
-
tierName: "SILVER"
|
|
25
|
-
}).catch(err => {
|
|
26
|
-
throw err;
|
|
27
|
-
}).then(resp => {
|
|
28
|
-
return resp.body
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// Archive the membership tier
|
|
32
|
-
tier = await tiersClient.archiveMembershipTier(tier.id)
|
|
33
|
-
.catch(err => {
|
|
34
|
-
throw err;
|
|
35
|
-
}).then(resp => {
|
|
36
|
-
return resp.body
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
console.log(tier.isActive); // This will be false, since the tier has just been archived
|
|
40
|
-
|
|
41
|
-
// Restore the membership tier
|
|
42
|
-
tier = await tiersClient.restoreMembershipTier(tier.id)
|
|
43
|
-
.catch(err => {
|
|
44
|
-
throw err;
|
|
45
|
-
}).then(resp => {
|
|
46
|
-
return resp.body
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
console.log(tier.isActive); // This will be true, since the tier has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function membershipTiers() {
|
|
4
|
+
let tiersClient = new api.MembershipTiersApi();
|
|
5
|
+
|
|
6
|
+
// Create new membership tier
|
|
7
|
+
let tier = await tiersClient.createMembershipTier({
|
|
8
|
+
tierNumber: "1",
|
|
9
|
+
tierName: "GOLD",
|
|
10
|
+
tierDiscount: 20,
|
|
11
|
+
tierDesignID: "JSUilOPE98",
|
|
12
|
+
pointsDesignID: "L918AJ7356"
|
|
13
|
+
}).catch(err => {
|
|
14
|
+
throw err;
|
|
15
|
+
}).then(resp => {
|
|
16
|
+
return resp.body
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// The membership tier that has just been created
|
|
20
|
+
console.log(tier);
|
|
21
|
+
|
|
22
|
+
tier = await tiersClient.updateMembershipTier(tier.id, {
|
|
23
|
+
...tier,
|
|
24
|
+
tierName: "SILVER"
|
|
25
|
+
}).catch(err => {
|
|
26
|
+
throw err;
|
|
27
|
+
}).then(resp => {
|
|
28
|
+
return resp.body
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Archive the membership tier
|
|
32
|
+
tier = await tiersClient.archiveMembershipTier(tier.id)
|
|
33
|
+
.catch(err => {
|
|
34
|
+
throw err;
|
|
35
|
+
}).then(resp => {
|
|
36
|
+
return resp.body
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
console.log(tier.isActive); // This will be false, since the tier has just been archived
|
|
40
|
+
|
|
41
|
+
// Restore the membership tier
|
|
42
|
+
tier = await tiersClient.restoreMembershipTier(tier.id)
|
|
43
|
+
.catch(err => {
|
|
44
|
+
throw err;
|
|
45
|
+
}).then(resp => {
|
|
46
|
+
return resp.body
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
console.log(tier.isActive); // This will be true, since the tier has just been restored
|
|
50
50
|
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function merchantURLs() {
|
|
4
|
-
let client = new api.MerchantURLsApi();
|
|
5
|
-
|
|
6
|
-
// Create a new merchant URL
|
|
7
|
-
let url = await client.createMerchantURL({
|
|
8
|
-
nickname: "Instagram",
|
|
9
|
-
destinationURL: "https://instagram.com/merchant"
|
|
10
|
-
}).catch(err => {
|
|
11
|
-
throw err;
|
|
12
|
-
}).then(resp => {
|
|
13
|
-
return resp.body
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// The merchant URL that has just been created
|
|
17
|
-
console.log(url);
|
|
18
|
-
|
|
19
|
-
// Update the merchant URL with a new destination URL
|
|
20
|
-
url = await client.updateMerchantURL(url.id, {
|
|
21
|
-
...url,
|
|
22
|
-
destinationURL: "https://instagram.com/redirect/merchant"
|
|
23
|
-
}).catch(err => {
|
|
24
|
-
throw err;
|
|
25
|
-
}).then(resp => {
|
|
26
|
-
return resp.body
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// Archive the merchant URL
|
|
30
|
-
url = await client.archiveMerchantURL(url.id)
|
|
31
|
-
.catch(err => {
|
|
32
|
-
throw err;
|
|
33
|
-
}).then(resp => {
|
|
34
|
-
return resp.body
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
console.log(url.isActive); // This will be false, since the merchant URL has just been archived
|
|
38
|
-
|
|
39
|
-
// Restore the merchant URL
|
|
40
|
-
url = await client.restoreMerchantURL(url.id)
|
|
41
|
-
.catch(err => {
|
|
42
|
-
throw err;
|
|
43
|
-
}).then(resp => {
|
|
44
|
-
return resp.body
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
console.log(url.isActive); // This will be true, since the merchant URL has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function merchantURLs() {
|
|
4
|
+
let client = new api.MerchantURLsApi();
|
|
5
|
+
|
|
6
|
+
// Create a new merchant URL
|
|
7
|
+
let url = await client.createMerchantURL({
|
|
8
|
+
nickname: "Instagram",
|
|
9
|
+
destinationURL: "https://instagram.com/merchant"
|
|
10
|
+
}).catch(err => {
|
|
11
|
+
throw err;
|
|
12
|
+
}).then(resp => {
|
|
13
|
+
return resp.body
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// The merchant URL that has just been created
|
|
17
|
+
console.log(url);
|
|
18
|
+
|
|
19
|
+
// Update the merchant URL with a new destination URL
|
|
20
|
+
url = await client.updateMerchantURL(url.id, {
|
|
21
|
+
...url,
|
|
22
|
+
destinationURL: "https://instagram.com/redirect/merchant"
|
|
23
|
+
}).catch(err => {
|
|
24
|
+
throw err;
|
|
25
|
+
}).then(resp => {
|
|
26
|
+
return resp.body
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Archive the merchant URL
|
|
30
|
+
url = await client.archiveMerchantURL(url.id)
|
|
31
|
+
.catch(err => {
|
|
32
|
+
throw err;
|
|
33
|
+
}).then(resp => {
|
|
34
|
+
return resp.body
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
console.log(url.isActive); // This will be false, since the merchant URL has just been archived
|
|
38
|
+
|
|
39
|
+
// Restore the merchant URL
|
|
40
|
+
url = await client.restoreMerchantURL(url.id)
|
|
41
|
+
.catch(err => {
|
|
42
|
+
throw err;
|
|
43
|
+
}).then(resp => {
|
|
44
|
+
return resp.body
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
console.log(url.isActive); // This will be true, since the merchant URL has just been restored
|
|
48
48
|
}
|
package/examples/news.example.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import * as api from "../api";
|
|
2
|
-
|
|
3
|
-
async function news() {
|
|
4
|
-
let client = new api.NewsApi();
|
|
5
|
-
|
|
6
|
-
// Create a new news article
|
|
7
|
-
let article = await client.createNewsArticle({
|
|
8
|
-
title: "News Article",
|
|
9
|
-
orderNumber: 1,
|
|
10
|
-
body: "This is a news article related to the merchant",
|
|
11
|
-
url: "https://blog.merchant.com",
|
|
12
|
-
mediaURL: "https://example.com/image"
|
|
13
|
-
}).catch(err => {
|
|
14
|
-
throw err;
|
|
15
|
-
}).then(resp => {
|
|
16
|
-
return resp.body
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// The news article that has just been created
|
|
21
|
-
console.log(article);
|
|
22
|
-
|
|
23
|
-
// Update the news article with a new title
|
|
24
|
-
article = await client.updateNewsArticle(article.id, {
|
|
25
|
-
...article,
|
|
26
|
-
title: "News Article Updated"
|
|
27
|
-
}).catch(err => {
|
|
28
|
-
throw err;
|
|
29
|
-
}).then(resp => {
|
|
30
|
-
return resp.body
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Archive the news article
|
|
34
|
-
article = await client.archiveNewsArticle(article.id)
|
|
35
|
-
.catch(err => {
|
|
36
|
-
throw err;
|
|
37
|
-
}).then(resp => {
|
|
38
|
-
return resp.body
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
console.log(article.isActive); // This will be false, since the news article has just been archived
|
|
42
|
-
|
|
43
|
-
// Restore the news article
|
|
44
|
-
article = await client.restoreNewsArticle(article.id)
|
|
45
|
-
.catch(err => {
|
|
46
|
-
throw err;
|
|
47
|
-
}).then(resp => {
|
|
48
|
-
return resp.body
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
console.log(article.isActive); // This will be true, since the news article has just been restored
|
|
1
|
+
import * as api from "../api";
|
|
2
|
+
|
|
3
|
+
async function news() {
|
|
4
|
+
let client = new api.NewsApi();
|
|
5
|
+
|
|
6
|
+
// Create a new news article
|
|
7
|
+
let article = await client.createNewsArticle({
|
|
8
|
+
title: "News Article",
|
|
9
|
+
orderNumber: 1,
|
|
10
|
+
body: "This is a news article related to the merchant",
|
|
11
|
+
url: "https://blog.merchant.com",
|
|
12
|
+
mediaURL: "https://example.com/image"
|
|
13
|
+
}).catch(err => {
|
|
14
|
+
throw err;
|
|
15
|
+
}).then(resp => {
|
|
16
|
+
return resp.body
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// The news article that has just been created
|
|
21
|
+
console.log(article);
|
|
22
|
+
|
|
23
|
+
// Update the news article with a new title
|
|
24
|
+
article = await client.updateNewsArticle(article.id, {
|
|
25
|
+
...article,
|
|
26
|
+
title: "News Article Updated"
|
|
27
|
+
}).catch(err => {
|
|
28
|
+
throw err;
|
|
29
|
+
}).then(resp => {
|
|
30
|
+
return resp.body
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Archive the news article
|
|
34
|
+
article = await client.archiveNewsArticle(article.id)
|
|
35
|
+
.catch(err => {
|
|
36
|
+
throw err;
|
|
37
|
+
}).then(resp => {
|
|
38
|
+
return resp.body
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
console.log(article.isActive); // This will be false, since the news article has just been archived
|
|
42
|
+
|
|
43
|
+
// Restore the news article
|
|
44
|
+
article = await client.restoreNewsArticle(article.id)
|
|
45
|
+
.catch(err => {
|
|
46
|
+
throw err;
|
|
47
|
+
}).then(resp => {
|
|
48
|
+
return resp.body
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
console.log(article.isActive); // This will be true, since the news article has just been restored
|
|
52
52
|
}
|