wallet 2.1.507 → 2.1.508

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (546) hide show
  1. package/README.md +849 -16
  2. package/api/advertisementCreditsApi.ts +1 -1
  3. package/api/analyticsApi.ts +1 -1
  4. package/api/appleWalletSubscribersApi.ts +1 -1
  5. package/api/billingApi.ts +1 -1
  6. package/api/clubMembersPointsApi.ts +1 -1
  7. package/api/configurationApi.ts +1 -1
  8. package/api/countriesApi.ts +1 -1
  9. package/api/customerApi.ts +1 -1
  10. package/api/dashboardApi.ts +1 -1
  11. package/api/dynamicVouchersApi.ts +1 -1
  12. package/api/employeeAPIKeysApi.ts +1 -1
  13. package/api/employeeAccessApi.ts +1 -1
  14. package/api/employeesApi.ts +1 -1
  15. package/api/industriesApi.ts +1 -1
  16. package/api/infoGenesisReportsApi.ts +1 -1
  17. package/api/integratedTerminalsApi.ts +1 -1
  18. package/api/interactionsApi.ts +1 -1
  19. package/api/linkBookApi.ts +1 -1
  20. package/api/linkBookSectionApi.ts +1 -1
  21. package/api/loginAndLogoutApi.ts +1 -1
  22. package/api/membershipTiersApi.ts +1 -1
  23. package/api/merchantApi.ts +63 -1
  24. package/api/merchantCreditsApi.ts +1 -1
  25. package/api/merchantURLsApi.ts +1 -1
  26. package/api/mobileTerminalApi.ts +1 -1
  27. package/api/newsApi.ts +1 -1
  28. package/api/paymentDesignsApi.ts +1 -1
  29. package/api/performancesApi.ts +1 -1
  30. package/api/promoCodesApi.ts +1 -1
  31. package/api/sMSApi.ts +1 -1
  32. package/api/settingsApi.ts +1 -1
  33. package/api/staticVoucherCampaignGroupsApi.ts +1 -1
  34. package/api/staticVoucherCampaignsApi.ts +1 -1
  35. package/api/staticVouchersApi.ts +1 -1
  36. package/api/systemApi.ts +1 -1
  37. package/api/transactionLedgerApi.ts +1 -1
  38. package/api/utilitiesApi.ts +1 -1
  39. package/api/webTerminalApi.ts +1 -1
  40. package/dist/api/merchantApi.d.ts +8 -0
  41. package/dist/api/merchantApi.js +57 -0
  42. package/dist/api/merchantApi.js.map +1 -1
  43. package/dist/examples/advertisementcredits.example.js +7 -1
  44. package/dist/examples/advertisementcredits.example.js.map +1 -1
  45. package/dist/examples/clubmembers.example.js +22 -1
  46. package/dist/examples/clubmembers.example.js.map +1 -1
  47. package/dist/examples/dynamicvouchers.example.d.ts +1 -0
  48. package/dist/examples/dynamicvouchers.example.js +110 -0
  49. package/dist/examples/dynamicvouchers.example.js.map +1 -0
  50. package/dist/examples/linkbook.example.js +3 -1
  51. package/dist/examples/linkbook.example.js.map +1 -1
  52. package/dist/examples/membershiptiers.example.js +17 -1
  53. package/dist/examples/membershiptiers.example.js.map +1 -1
  54. package/dist/examples/merchantcredits.example.js +23 -2
  55. package/dist/examples/merchantcredits.example.js.map +1 -1
  56. package/dist/examples/merchanturls.example.js +7 -1
  57. package/dist/examples/merchanturls.example.js.map +1 -1
  58. package/dist/examples/news.example.js +3 -1
  59. package/dist/examples/news.example.js.map +1 -1
  60. package/dist/examples/paymentdesigns.example.js +6 -2
  61. package/dist/examples/paymentdesigns.example.js.map +1 -1
  62. package/dist/examples/performances.example.js +5 -2
  63. package/dist/examples/performances.example.js.map +1 -1
  64. package/dist/examples/promocodes.example.js +4 -2
  65. package/dist/examples/promocodes.example.js.map +1 -1
  66. package/dist/examples/sms.example.d.ts +1 -0
  67. package/dist/examples/sms.example.js +264 -0
  68. package/dist/examples/sms.example.js.map +1 -0
  69. package/dist/examples/staticvouchercampaigns.example.d.ts +1 -0
  70. package/dist/examples/staticvouchercampaigns.example.js +166 -0
  71. package/dist/examples/staticvouchercampaigns.example.js.map +1 -0
  72. package/dist/examples/staticvouchers.example.d.ts +1 -0
  73. package/dist/examples/staticvouchers.example.js +78 -0
  74. package/dist/examples/staticvouchers.example.js.map +1 -0
  75. package/dist/model/inlineObject.d.ts +2 -1
  76. package/dist/model/inlineObject.js +7 -2
  77. package/dist/model/inlineObject.js.map +1 -1
  78. package/dist/model/inlineObject1.d.ts +16 -1
  79. package/dist/model/inlineObject1.js +77 -2
  80. package/dist/model/inlineObject1.js.map +1 -1
  81. package/dist/model/inlineObject10.d.ts +3 -2
  82. package/dist/model/inlineObject10.js +11 -6
  83. package/dist/model/inlineObject10.js.map +1 -1
  84. package/dist/model/inlineObject11.d.ts +3 -2
  85. package/dist/model/inlineObject11.js +11 -6
  86. package/dist/model/inlineObject11.js.map +1 -1
  87. package/dist/model/inlineObject12.d.ts +3 -2
  88. package/dist/model/inlineObject12.js +11 -6
  89. package/dist/model/inlineObject12.js.map +1 -1
  90. package/dist/model/inlineObject13.d.ts +3 -2
  91. package/dist/model/inlineObject13.js +11 -6
  92. package/dist/model/inlineObject13.js.map +1 -1
  93. package/dist/model/inlineObject14.d.ts +3 -2
  94. package/dist/model/inlineObject14.js +11 -6
  95. package/dist/model/inlineObject14.js.map +1 -1
  96. package/dist/model/inlineObject15.d.ts +3 -7
  97. package/dist/model/inlineObject15.js +8 -28
  98. package/dist/model/inlineObject15.js.map +1 -1
  99. package/dist/model/inlineObject16.d.ts +3 -6
  100. package/dist/model/inlineObject16.js +8 -23
  101. package/dist/model/inlineObject16.js.map +1 -1
  102. package/dist/model/inlineObject17.d.ts +3 -5
  103. package/dist/model/inlineObject17.js +9 -19
  104. package/dist/model/inlineObject17.js.map +1 -1
  105. package/dist/model/inlineObject18.d.ts +3 -6
  106. package/dist/model/inlineObject18.js +8 -23
  107. package/dist/model/inlineObject18.js.map +1 -1
  108. package/dist/model/inlineObject19.d.ts +3 -5
  109. package/dist/model/inlineObject19.js +9 -19
  110. package/dist/model/inlineObject19.js.map +1 -1
  111. package/dist/model/inlineObject2.d.ts +4 -1
  112. package/dist/model/inlineObject2.js +17 -2
  113. package/dist/model/inlineObject2.js.map +1 -1
  114. package/dist/model/inlineObject20.d.ts +3 -6
  115. package/dist/model/inlineObject20.js +8 -23
  116. package/dist/model/inlineObject20.js.map +1 -1
  117. package/dist/model/inlineObject21.d.ts +3 -8
  118. package/dist/model/inlineObject21.js +9 -34
  119. package/dist/model/inlineObject21.js.map +1 -1
  120. package/dist/model/inlineObject22.d.ts +3 -1
  121. package/dist/model/inlineObject22.js +13 -3
  122. package/dist/model/inlineObject22.js.map +1 -1
  123. package/dist/model/inlineObject23.d.ts +3 -1
  124. package/dist/model/inlineObject23.js +12 -2
  125. package/dist/model/inlineObject23.js.map +1 -1
  126. package/dist/model/inlineObject24.d.ts +3 -3
  127. package/dist/model/inlineObject24.js +7 -7
  128. package/dist/model/inlineObject24.js.map +1 -1
  129. package/dist/model/inlineObject25.d.ts +4 -5
  130. package/dist/model/inlineObject25.js +9 -14
  131. package/dist/model/inlineObject25.js.map +1 -1
  132. package/dist/model/inlineObject26.d.ts +4 -1
  133. package/dist/model/inlineObject26.js +18 -3
  134. package/dist/model/inlineObject26.js.map +1 -1
  135. package/dist/model/inlineObject27.d.ts +2 -1
  136. package/dist/model/inlineObject27.js +8 -3
  137. package/dist/model/inlineObject27.js.map +1 -1
  138. package/dist/model/inlineObject28.d.ts +16 -3
  139. package/dist/model/inlineObject28.js +74 -9
  140. package/dist/model/inlineObject28.js.map +1 -1
  141. package/dist/model/inlineObject29.d.ts +2 -4
  142. package/dist/model/inlineObject29.js +6 -16
  143. package/dist/model/inlineObject29.js.map +1 -1
  144. package/dist/model/inlineObject3.d.ts +4 -1
  145. package/dist/model/inlineObject3.js +17 -2
  146. package/dist/model/inlineObject3.js.map +1 -1
  147. package/dist/model/inlineObject30.d.ts +16 -3
  148. package/dist/model/inlineObject30.js +74 -9
  149. package/dist/model/inlineObject30.js.map +1 -1
  150. package/dist/model/inlineObject31.d.ts +4 -1
  151. package/dist/model/inlineObject31.js +18 -3
  152. package/dist/model/inlineObject31.js.map +1 -1
  153. package/dist/model/inlineObject32.d.ts +2 -1
  154. package/dist/model/inlineObject32.js +8 -3
  155. package/dist/model/inlineObject32.js.map +1 -1
  156. package/dist/model/inlineObject33.d.ts +16 -1
  157. package/dist/model/inlineObject33.js +78 -3
  158. package/dist/model/inlineObject33.js.map +1 -1
  159. package/dist/model/inlineObject34.d.ts +3 -3
  160. package/dist/model/inlineObject34.js +9 -9
  161. package/dist/model/inlineObject34.js.map +1 -1
  162. package/dist/model/inlineObject35.d.ts +3 -3
  163. package/dist/model/inlineObject35.js +9 -9
  164. package/dist/model/inlineObject35.js.map +1 -1
  165. package/dist/model/inlineObject36.d.ts +3 -3
  166. package/dist/model/inlineObject36.js +9 -9
  167. package/dist/model/inlineObject36.js.map +1 -1
  168. package/dist/model/inlineObject37.d.ts +2 -3
  169. package/dist/model/inlineObject37.js +6 -11
  170. package/dist/model/inlineObject37.js.map +1 -1
  171. package/dist/model/inlineObject38.d.ts +2 -3
  172. package/dist/model/inlineObject38.js +5 -10
  173. package/dist/model/inlineObject38.js.map +1 -1
  174. package/dist/model/inlineObject39.d.ts +2 -3
  175. package/dist/model/inlineObject39.js +5 -10
  176. package/dist/model/inlineObject39.js.map +1 -1
  177. package/dist/model/inlineObject4.d.ts +2 -2
  178. package/dist/model/inlineObject4.js +5 -5
  179. package/dist/model/inlineObject4.js.map +1 -1
  180. package/dist/model/inlineObject40.d.ts +32 -3
  181. package/dist/model/inlineObject40.js +154 -9
  182. package/dist/model/inlineObject40.js.map +1 -1
  183. package/dist/model/inlineObject41.d.ts +4 -3
  184. package/dist/model/inlineObject41.js +14 -9
  185. package/dist/model/inlineObject41.js.map +1 -1
  186. package/dist/model/inlineObject42.d.ts +4 -3
  187. package/dist/model/inlineObject42.js +14 -9
  188. package/dist/model/inlineObject42.js.map +1 -1
  189. package/dist/model/inlineObject43.d.ts +2 -3
  190. package/dist/model/inlineObject43.js +6 -11
  191. package/dist/model/inlineObject43.js.map +1 -1
  192. package/dist/model/inlineObject44.d.ts +16 -3
  193. package/dist/model/inlineObject44.js +74 -9
  194. package/dist/model/inlineObject44.js.map +1 -1
  195. package/dist/model/inlineObject45.d.ts +4 -3
  196. package/dist/model/inlineObject45.js +14 -9
  197. package/dist/model/inlineObject45.js.map +1 -1
  198. package/dist/model/inlineObject46.d.ts +2 -3
  199. package/dist/model/inlineObject46.js +6 -11
  200. package/dist/model/inlineObject46.js.map +1 -1
  201. package/dist/model/inlineObject47.d.ts +16 -3
  202. package/dist/model/inlineObject47.js +74 -9
  203. package/dist/model/inlineObject47.js.map +1 -1
  204. package/dist/model/inlineObject5.d.ts +16 -1
  205. package/dist/model/inlineObject5.js +78 -3
  206. package/dist/model/inlineObject5.js.map +1 -1
  207. package/dist/model/inlineObject6.d.ts +1 -1
  208. package/dist/model/inlineObject6.js +3 -3
  209. package/dist/model/inlineObject6.js.map +1 -1
  210. package/dist/model/inlineObject7.d.ts +1 -1
  211. package/dist/model/inlineObject7.js +3 -3
  212. package/dist/model/inlineObject7.js.map +1 -1
  213. package/dist/model/inlineObject8.d.ts +3 -3
  214. package/dist/model/inlineObject8.js +9 -9
  215. package/dist/model/inlineObject8.js.map +1 -1
  216. package/dist/model/inlineObject9.d.ts +3 -2
  217. package/dist/model/inlineObject9.js +11 -6
  218. package/dist/model/inlineObject9.js.map +1 -1
  219. package/dist/model/wTWalletConfigurationSaveWalletRecord.d.ts +1 -0
  220. package/dist/model/wTWalletConfigurationSaveWalletRecord.js +5 -0
  221. package/dist/model/wTWalletConfigurationSaveWalletRecord.js.map +1 -1
  222. package/dist/model/walletConfiguration.d.ts +4 -4
  223. package/dist/model/walletConfiguration.js +15 -15
  224. package/dist/model/walletConfiguration.js.map +1 -1
  225. package/examples/advertisementcredits.example.ts +13 -1
  226. package/examples/clubmembers.example.ts +34 -1
  227. package/examples/dynamicvouchers.example.ts +107 -0
  228. package/examples/linkbook.example.ts +5 -1
  229. package/examples/membershiptiers.example.ts +26 -1
  230. package/examples/merchantcredits.example.ts +35 -2
  231. package/examples/merchanturls.example.ts +13 -1
  232. package/examples/news.example.ts +5 -1
  233. package/examples/package-lock.json +2108 -0
  234. package/examples/package.json +18 -0
  235. package/examples/paymentdesigns.example.ts +11 -3
  236. package/examples/performances.example.ts +7 -2
  237. package/examples/promocodes.example.ts +6 -2
  238. package/examples/sms.example.ts +305 -0
  239. package/examples/staticvouchercampaigns.example.ts +192 -0
  240. package/examples/staticvouchers.example.ts +67 -0
  241. package/model/advertisementCredit.ts +1 -1
  242. package/model/advertisementCreditBroadcast.ts +1 -1
  243. package/model/advertisementCreditScan.ts +1 -1
  244. package/model/agreement.ts +1 -1
  245. package/model/alert.ts +1 -1
  246. package/model/announcement.ts +1 -1
  247. package/model/applicableTerminals.ts +1 -1
  248. package/model/applicableTerminalsAnyOf.ts +1 -1
  249. package/model/applicableTerminalsAnyOf1.ts +1 -1
  250. package/model/applicableTerminalsAnyOf2.ts +1 -1
  251. package/model/applicableTerminalsAnyOf3.ts +1 -1
  252. package/model/authError.ts +1 -1
  253. package/model/availablePhoneNumbersRequest.ts +1 -1
  254. package/model/clickFunnelAmount.ts +1 -1
  255. package/model/clickFunnelContact.ts +1 -1
  256. package/model/clickFunnelContactProfile.ts +1 -1
  257. package/model/clickFunnelEvent.ts +1 -1
  258. package/model/clickFunnelOriginalAmount.ts +1 -1
  259. package/model/clickFunnelProduct.ts +1 -1
  260. package/model/clickFunnelPurchase.ts +1 -1
  261. package/model/createStaticVoucherCampaign.ts +1 -1
  262. package/model/createStaticVoucherCampaignWithVoucher.ts +1 -1
  263. package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +1 -1
  264. package/model/dashboardWidget.ts +1 -1
  265. package/model/duplicateRowFound.ts +1 -1
  266. package/model/dynamicVoucher.ts +1 -1
  267. package/model/dynamicVoucherBroadcast.ts +1 -1
  268. package/model/employee.ts +1 -1
  269. package/model/employeeAPIKey.ts +1 -1
  270. package/model/employeeActivityLog.ts +1 -1
  271. package/model/entityTooLarge.ts +1 -1
  272. package/model/exportDataFile.ts +1 -1
  273. package/model/falsumError.ts +1 -1
  274. package/model/falsumField.ts +1 -1
  275. package/model/feature.ts +1 -1
  276. package/model/forbiddenRequest.ts +1 -1
  277. package/model/foreignKeyDoesNotExist.ts +1 -1
  278. package/model/helpDeskRequest.ts +1 -1
  279. package/model/importedList.ts +1 -1
  280. package/model/importedListRecipient.ts +1 -1
  281. package/model/inlineObject.ts +9 -3
  282. package/model/inlineObject1.ts +93 -3
  283. package/model/inlineObject10.ts +14 -8
  284. package/model/inlineObject11.ts +14 -8
  285. package/model/inlineObject12.ts +14 -8
  286. package/model/inlineObject13.ts +14 -8
  287. package/model/inlineObject14.ts +14 -8
  288. package/model/inlineObject15.ts +11 -35
  289. package/model/inlineObject16.ts +11 -29
  290. package/model/inlineObject17.ts +12 -24
  291. package/model/inlineObject18.ts +11 -29
  292. package/model/inlineObject19.ts +12 -24
  293. package/model/inlineObject2.ts +21 -3
  294. package/model/inlineObject20.ts +11 -29
  295. package/model/inlineObject21.ts +12 -42
  296. package/model/inlineObject22.ts +16 -4
  297. package/model/inlineObject23.ts +15 -3
  298. package/model/inlineObject24.ts +10 -10
  299. package/model/inlineObject25.ts +13 -19
  300. package/model/inlineObject26.ts +22 -4
  301. package/model/inlineObject27.ts +10 -4
  302. package/model/inlineObject28.ts +90 -12
  303. package/model/inlineObject29.ts +8 -20
  304. package/model/inlineObject3.ts +21 -3
  305. package/model/inlineObject30.ts +90 -12
  306. package/model/inlineObject31.ts +22 -4
  307. package/model/inlineObject32.ts +10 -4
  308. package/model/inlineObject33.ts +94 -4
  309. package/model/inlineObject34.ts +12 -12
  310. package/model/inlineObject35.ts +12 -12
  311. package/model/inlineObject36.ts +12 -12
  312. package/model/inlineObject37.ts +8 -14
  313. package/model/inlineObject38.ts +7 -13
  314. package/model/inlineObject39.ts +7 -13
  315. package/model/inlineObject4.ts +7 -7
  316. package/model/inlineObject40.ts +186 -12
  317. package/model/inlineObject41.ts +18 -12
  318. package/model/inlineObject42.ts +18 -12
  319. package/model/inlineObject43.ts +8 -14
  320. package/model/inlineObject44.ts +90 -12
  321. package/model/inlineObject45.ts +18 -12
  322. package/model/inlineObject46.ts +8 -14
  323. package/model/inlineObject47.ts +90 -12
  324. package/model/inlineObject5.ts +94 -4
  325. package/model/inlineObject6.ts +4 -4
  326. package/model/inlineObject7.ts +4 -4
  327. package/model/inlineObject8.ts +12 -12
  328. package/model/inlineObject9.ts +14 -8
  329. package/model/inlineResponse200.ts +1 -1
  330. package/model/inlineResponse2001.ts +1 -1
  331. package/model/inlineResponse20010.ts +1 -1
  332. package/model/inlineResponse20011.ts +1 -1
  333. package/model/inlineResponse20012.ts +1 -1
  334. package/model/inlineResponse20013.ts +1 -1
  335. package/model/inlineResponse20014.ts +1 -1
  336. package/model/inlineResponse2002.ts +1 -1
  337. package/model/inlineResponse2003.ts +1 -1
  338. package/model/inlineResponse2004.ts +1 -1
  339. package/model/inlineResponse2005.ts +1 -1
  340. package/model/inlineResponse2006.ts +1 -1
  341. package/model/inlineResponse2007.ts +1 -1
  342. package/model/inlineResponse2008.ts +1 -1
  343. package/model/inlineResponse2009.ts +1 -1
  344. package/model/internalServerError.ts +1 -1
  345. package/model/ledgerEntry.ts +1 -1
  346. package/model/linkBook.ts +1 -1
  347. package/model/linkBookSection.ts +1 -1
  348. package/model/mSMemberHistory.ts +1 -1
  349. package/model/mSMemberHistoryPagination.ts +1 -1
  350. package/model/mSMemberRedemption.ts +1 -1
  351. package/model/mSMemberRedemptionPagination.ts +1 -1
  352. package/model/mSMembershipTierHistory.ts +1 -1
  353. package/model/mSMembershipTierHistoryPagination.ts +1 -1
  354. package/model/mSMembershipTierRedemption.ts +1 -1
  355. package/model/mSMembershipTierRedemptionPagination.ts +1 -1
  356. package/model/mSMerchantCreditHistory.ts +1 -1
  357. package/model/mSMerchantCreditHistoryPagination.ts +1 -1
  358. package/model/mSMerchantCreditRedemption.ts +1 -1
  359. package/model/mSMerchantCreditRedemptionPagination.ts +1 -1
  360. package/model/mediaFile.ts +1 -1
  361. package/model/member.ts +1 -1
  362. package/model/memberSearch.ts +1 -1
  363. package/model/merchant.ts +1 -1
  364. package/model/merchantCreditSearch.ts +1 -1
  365. package/model/merchantNotInitialized.ts +1 -1
  366. package/model/merchantURL.ts +1 -1
  367. package/model/message.ts +1 -1
  368. package/model/moduleError.ts +1 -1
  369. package/model/newsArticle.ts +1 -1
  370. package/model/optInList.ts +1 -1
  371. package/model/optInListSource.ts +1 -1
  372. package/model/optInListSubscriber.ts +1 -1
  373. package/model/outboundSMS.ts +1 -1
  374. package/model/paginatedWTMembers.ts +1 -1
  375. package/model/paginatedWTMerchantCredits.ts +1 -1
  376. package/model/paginationRequestWithIDAndWithoutSortOptions.ts +1 -1
  377. package/model/paginationRequestWithSortOptions.ts +1 -1
  378. package/model/paymentDesign.ts +1 -1
  379. package/model/performance.ts +1 -1
  380. package/model/phoneNumber.ts +1 -1
  381. package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +1 -1
  382. package/model/pickMSEmployeeAPIKeyCreateParamsExcludeKeyofMSEmployeeAPIKeyCreateParamsEmployeeID.ts +1 -1
  383. package/model/pickMSEmployeeAPIKeyUpdateParamsExcludeKeyofMSEmployeeAPIKeyUpdateParamsId.ts +1 -1
  384. package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +1 -1
  385. package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +1 -1
  386. package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +1 -1
  387. package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +1 -1
  388. package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +1 -1
  389. package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +1 -1
  390. package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +1 -1
  391. package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeID.ts +1 -1
  392. package/model/pickSSOptInListMemberCreateParamsExcludeKeyofSSOptInListMemberCreateParamsMerchantCreatedAtOrMaxSMSCount.ts +1 -1
  393. package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +1 -1
  394. package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +1 -1
  395. package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +1 -1
  396. package/model/pickVSAdvertisementCreditCreateParamsExcludeKeyofVSAdvertisementCreditCreateParamsEmployeeID.ts +1 -1
  397. package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +1 -1
  398. package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +1 -1
  399. package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +1 -1
  400. package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +1 -1
  401. package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsBackgroundImageURLOrCompanyLogoURLOrEmployeeID.ts +1 -1
  402. package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +1 -1
  403. package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +1 -1
  404. package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +1 -1
  405. package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumber.ts +1 -1
  406. package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +1 -1
  407. package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +1 -1
  408. package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +1 -1
  409. package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +1 -1
  410. package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +1 -1
  411. package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +1 -1
  412. package/model/plan.ts +1 -1
  413. package/model/portalPage.ts +1 -1
  414. package/model/presignedPost.ts +1 -1
  415. package/model/presignedPostFields.ts +1 -1
  416. package/model/product.ts +1 -1
  417. package/model/promoCode.ts +1 -1
  418. package/model/reachPerformanceStats.ts +1 -1
  419. package/model/request.ts +1 -1
  420. package/model/response.ts +1 -1
  421. package/model/role.ts +1 -1
  422. package/model/roleAuditLog.ts +1 -1
  423. package/model/sSImportedListRecipientCreateParams.ts +1 -1
  424. package/model/sSOptInSource.ts +1 -1
  425. package/model/simpleSMSBroadcast.ts +1 -1
  426. package/model/staticVoucher.ts +1 -1
  427. package/model/staticVoucherCampaign.ts +1 -1
  428. package/model/staticVoucherCampaignBroadcast.ts +1 -1
  429. package/model/staticVoucherCampaignGroup.ts +1 -1
  430. package/model/staticVoucherCampaignUpdate.ts +1 -1
  431. package/model/status.ts +1 -1
  432. package/model/statusAnyOf.ts +1 -1
  433. package/model/statusAnyOf1.ts +1 -1
  434. package/model/statusAnyOf2.ts +1 -1
  435. package/model/statusAnyOf3.ts +1 -1
  436. package/model/subscriptionFeature.ts +1 -1
  437. package/model/subscriptionPlan.ts +1 -1
  438. package/model/subscriptionProduct.ts +1 -1
  439. package/model/tcpa.ts +1 -1
  440. package/model/updateStaticVoucherCampaignWithVoucher.ts +1 -1
  441. package/model/vSCampaignGeneratedMessage.ts +1 -1
  442. package/model/vSCampaignGeneratedMessagePagination.ts +1 -1
  443. package/model/vSDynamicVoucherStatus.ts +1 -1
  444. package/model/wTAdvertisementCredit.ts +1 -1
  445. package/model/wTAdvertisementCreditCreateParams.ts +1 -1
  446. package/model/wTAdvertisementCreditScan.ts +1 -1
  447. package/model/wTAdvertisementCreditUpdateParams.ts +1 -1
  448. package/model/wTAuthenticationForgotPassword.ts +1 -1
  449. package/model/wTAuthenticationLogin.ts +1 -1
  450. package/model/wTAuthenticationRegister.ts +1 -1
  451. package/model/wTAuthenticationRequestResetPassword.ts +1 -1
  452. package/model/wTAuthenticationResetPassword.ts +1 -1
  453. package/model/wTAuthenticationSSOLoginForDiscourse.ts +1 -1
  454. package/model/wTBillingChangePlan.ts +1 -1
  455. package/model/wTBillingSavePaymentMethod.ts +1 -1
  456. package/model/wTCustomerSearchByMemberID.ts +1 -1
  457. package/model/wTCustomerSearchByPhoneNumber.ts +1 -1
  458. package/model/wTDynamicVoucher.ts +1 -1
  459. package/model/wTDynamicVoucherCreateParams.ts +1 -1
  460. package/model/wTDynamicVoucherRedemption.ts +1 -1
  461. package/model/wTDynamicVoucherSummary.ts +1 -1
  462. package/model/wTDynamicVoucherUpdateParams.ts +1 -1
  463. package/model/wTEmployee.ts +1 -1
  464. package/model/wTEmployeeAPIKey.ts +1 -1
  465. package/model/wTEmployeeAPIKeyCreateParams.ts +1 -1
  466. package/model/wTEmployeeAPIKeyUpdateParams.ts +1 -1
  467. package/model/wTEmployeeCreate.ts +1 -1
  468. package/model/wTEmployeeCreateAlert.ts +1 -1
  469. package/model/wTEmployeeCreateMediaFile.ts +1 -1
  470. package/model/wTEmployeeCreateStaticVoucherCampaignGroup.ts +1 -1
  471. package/model/wTEmployeeFileCreate.ts +1 -1
  472. package/model/wTEmployeeImportRecords.ts +1 -1
  473. package/model/wTEmployeeNotification.ts +1 -1
  474. package/model/wTEmployeePeerRoles.ts +1 -1
  475. package/model/wTEmployeeS3FilePresign.ts +1 -1
  476. package/model/wTEmployeeScheduleSMSCampaignBroadcast.ts +1 -1
  477. package/model/wTEmployeeScheduleSimpleSMS.ts +1 -1
  478. package/model/wTEmployeeScheduleSimpleSMSToRecipient.ts +1 -1
  479. package/model/wTEmployeeSendHelpDeskResponse.ts +1 -1
  480. package/model/wTEmployeeUpdate.ts +1 -1
  481. package/model/wTFetchWalletPaymentObjectWithToken.ts +1 -1
  482. package/model/wTImportedList.ts +1 -1
  483. package/model/wTInfoGenesisLookupRequestErrors.ts +1 -1
  484. package/model/wTInfoGenesisRecordFilterParameters.ts +1 -1
  485. package/model/wTInfoGenesisRoutingIDs.ts +1 -1
  486. package/model/wTInfoGenesisUniquePostingIDs.ts +1 -1
  487. package/model/wTLinkBookCreateParams.ts +1 -1
  488. package/model/wTLinkBookSectionCreateParams.ts +1 -1
  489. package/model/wTLinkBookSectionUpdateParams.ts +1 -1
  490. package/model/wTLinkBookUpdateParams.ts +1 -1
  491. package/model/wTMember.ts +1 -1
  492. package/model/wTMemberCreationParams.ts +1 -1
  493. package/model/wTMembershipTier.ts +1 -1
  494. package/model/wTMembershipTierCreationParams.ts +1 -1
  495. package/model/wTMembershipTierUpdateParams.ts +1 -1
  496. package/model/wTMembershipTierWithMemberCount.ts +1 -1
  497. package/model/wTMerchantCredit.ts +1 -1
  498. package/model/wTMerchantCreditCreationParams.ts +1 -1
  499. package/model/wTMerchantURLCreate.ts +1 -1
  500. package/model/wTMerchantURLUpdate.ts +1 -1
  501. package/model/wTMerchantUpdate.ts +1 -1
  502. package/model/wTMerchantUpdateBillingContact.ts +1 -1
  503. package/model/wTMerchantUpdatePOSIntegration.ts +1 -1
  504. package/model/wTNewsArticleCreateParams.ts +1 -1
  505. package/model/wTNewsArticleUpdateParams.ts +1 -1
  506. package/model/wTOptInList.ts +1 -1
  507. package/model/wTOptInListCreationParams.ts +1 -1
  508. package/model/wTPaymentDesign.ts +1 -1
  509. package/model/wTPaymentDesignCreateParams.ts +1 -1
  510. package/model/wTPaymentDesignUpdateParams.ts +1 -1
  511. package/model/wTPerformanceCreateParams.ts +1 -1
  512. package/model/wTPerformanceUpdateParams.ts +1 -1
  513. package/model/wTPosMachine.ts +1 -1
  514. package/model/wTPosMachineCreateParams.ts +1 -1
  515. package/model/wTPosMachineUpdateParams.ts +1 -1
  516. package/model/wTPromoCodeCreateParams.ts +1 -1
  517. package/model/wTPromoCodeUpdateParams.ts +1 -1
  518. package/model/wTRole.ts +1 -1
  519. package/model/wTSMSAcquirePhoneNumber.ts +1 -1
  520. package/model/wTSMSCreateAgreement.ts +1 -1
  521. package/model/wTSMSImportOptInListSubscribers.ts +1 -1
  522. package/model/wTSMSImportedListCreate.ts +1 -1
  523. package/model/wTSMSOptInListSourceCreate.ts +1 -1
  524. package/model/wTSMSUpdatePhoneNumberConfig.ts +1 -1
  525. package/model/wTSettingsSetPassword.ts +1 -1
  526. package/model/wTStaticVoucher.ts +1 -1
  527. package/model/wTStaticVoucherCampaign.ts +1 -1
  528. package/model/wTStaticVoucherCampaignPreviewMessages.ts +1 -1
  529. package/model/wTStaticVoucherCampaignPreviewMessagesByPage.ts +1 -1
  530. package/model/wTStaticVoucherCreateParams.ts +1 -1
  531. package/model/wTStaticVoucherUpdateParams.ts +1 -1
  532. package/model/wTSystemApprovePhoneNumber.ts +1 -1
  533. package/model/wTSystemRoleCreate.ts +1 -1
  534. package/model/wTTCPAOpt.ts +1 -1
  535. package/model/wTTwilioRequestAuthyCode.ts +1 -1
  536. package/model/wTTwilioVerifyAuthyCode.ts +1 -1
  537. package/model/wTWalletConfigurationSaveWalletRecord.ts +7 -1
  538. package/model/wTWalletItemRedemption.ts +1 -1
  539. package/model/wTWalletPageView.ts +1 -1
  540. package/model/wTWalletPageViewGeoPoint.ts +1 -1
  541. package/model/walletConfiguration.ts +20 -23
  542. package/model/walletPageView.ts +1 -1
  543. package/model/webpage.ts +1 -1
  544. package/package.json +1 -1
  545. package/readme-generator.py +9 -3
  546. package/tsconfig.json +2 -1
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "examples",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "devDependencies": {
13
+ "ts-node": "^10.8.0"
14
+ },
15
+ "dependencies": {
16
+ "wallet": "^2.1.507"
17
+ }
18
+ }
@@ -1,10 +1,10 @@
1
- import * as api from "../api";
1
+ import * as api from "wallet";
2
2
  import * as constants from "./constants";
3
3
 
4
4
  paymentDesigns();
5
5
 
6
6
  async function paymentDesigns() {
7
- let designClient = new api.PaymentDesignsApi();
7
+ let designClient = new api.PaymentDesignsApi(constants.domain);
8
8
 
9
9
  // Create a new payment design
10
10
  let design = await designClient.createPaymentDesign({
@@ -28,6 +28,10 @@ async function paymentDesigns() {
28
28
  // The payment design that has just been created
29
29
  console.log(design);
30
30
 
31
+ // Fetch the created design
32
+ design = (await designClient.fetchPaymentDesignById(design.id, constants.headers)).body;
33
+ console.log(design);
34
+
31
35
  // Change the borderColor and borderSize of the payment design
32
36
  design = await designClient.updatePaymentDesign(design.id, {
33
37
  ...design,
@@ -46,7 +50,7 @@ async function paymentDesigns() {
46
50
  }).then(resp => {
47
51
  return resp.body
48
52
  });
49
-
53
+
50
54
  console.log(design.isActive); // This will be false, since the design has just been archived
51
55
 
52
56
  // Restore the payment design
@@ -57,4 +61,8 @@ async function paymentDesigns() {
57
61
  return resp.body
58
62
  });
59
63
  console.log(design.isActive); // This will be true, since the design has just been restored
64
+
65
+ // Fetch all payment designs
66
+ let designs = (await designClient.fetchAllPaymentDesigns(false, constants.headers)).body;
67
+ console.log(designs);
60
68
  }
@@ -1,4 +1,4 @@
1
- import * as api from "../api";
1
+ import * as api from "wallet";
2
2
  import * as constants from "./constants";
3
3
 
4
4
  performances();
@@ -14,7 +14,8 @@ async function performances() {
14
14
  price: 200,
15
15
  url: "https://blog.merchant.com",
16
16
  orderNumber: 1,
17
- mediaURL: "https://example.com/image"
17
+ mediaURL: "https://example.com/image",
18
+ isSoldOut: false,
18
19
 
19
20
  }, constants.headers).catch(err => {
20
21
  throw err;
@@ -55,4 +56,8 @@ async function performances() {
55
56
  });
56
57
 
57
58
  console.log(performance.isActive); // This will be true, since the performance has just been restored
59
+
60
+ // Fetch all performances
61
+ let performances = (await client.fetchAllPerformances(false, constants.headers)).body;
62
+ console.log(performances);
58
63
  }
@@ -1,10 +1,10 @@
1
- import * as api from "../api";
1
+ import * as api from "wallet";
2
2
  import * as constants from "./constants";
3
3
 
4
4
  promocodes();
5
5
 
6
6
  async function promocodes() {
7
- let client = new api.PromoCodesApi();
7
+ let client = new api.PromoCodesApi(constants.domain);
8
8
 
9
9
  // Create a new promocode
10
10
  let promocode = await client.createPromoCode({
@@ -53,4 +53,8 @@ async function promocodes() {
53
53
  });
54
54
 
55
55
  console.log(promocode.isActive); // This will be true, since the promocode has just been restored
56
+
57
+ // Fetch all promocodes
58
+ let promocodes = (await client.fetchAllPromoCodes(false, constants.headers)).body;
59
+ console.log(promocodes);
56
60
  }
@@ -0,0 +1,305 @@
1
+ import * as api from "wallet";
2
+ import * as constants from "./constants";
3
+
4
+ smsExample();
5
+
6
+ async function smsExample() {
7
+ let client = new api.SMSApi(constants.domain);
8
+
9
+ // Acquire phone number
10
+ let phoneNumber = await client.acquirePhoneNumber({
11
+ phoneNumber: "+1807675656"
12
+ }, constants.headers)
13
+ .catch(err => {
14
+ throw err;
15
+ }).then(resp => {
16
+ return resp.body;
17
+ });
18
+
19
+ console.log(phoneNumber);
20
+
21
+ // Send phone number for verification
22
+ await client.sendPhoneNumberForVerification(phoneNumber.id, {
23
+ helpDeskQueueResponse: "HELPME",
24
+ helpDeskKeyword: "HELP12",
25
+ helpResponse: "Hello, we're here to help.",
26
+ stopResponse: "We're sad to see you go",
27
+ messageFooter: "Subscribe for more info!",
28
+ termsOfServiceURL: "https://example.com/terms-of-service",
29
+ privacyPolicyURL: "https://example.com/privacy-policy",
30
+ companyName: "Fictitious Corporation"
31
+ }, constants.headers)
32
+ .catch(err => {
33
+ throw err;
34
+ }).then(resp => {
35
+ return resp.body;
36
+ });
37
+
38
+ // Archive phone number
39
+ phoneNumber = await client.archivePhoneNumber(phoneNumber.id, constants.headers)
40
+ .catch(err => {
41
+ throw err;
42
+ }).then(resp => {
43
+ return resp.body;
44
+ });
45
+
46
+ console.log(phoneNumber.isActive); // This will be false
47
+
48
+ // Restore phone number
49
+ phoneNumber = await client.restorePhoneNumber(phoneNumber.id, constants.headers)
50
+ .catch(err => {
51
+ throw err;
52
+ }).then(resp => {
53
+ return resp.body;
54
+ });
55
+
56
+ console.log(phoneNumber.isActive); // This will be true
57
+
58
+ // Create SMS agreement
59
+ let agreement = await client.createSMSAgreement({
60
+ isShortCodeTimelineUnderstood: true,
61
+ isPricingUnderstood: true,
62
+ isShortCodeTransferUnderstood: true,
63
+ isOptInOutUnderstood: true,
64
+ isShortCodeUnderstood: true,
65
+ isStandardsUnderstood: true,
66
+ isCtiaShortCodeRead: true,
67
+ isManualRead: true,
68
+ isStopUnderstood: true,
69
+ isTosOnWebsite: true,
70
+ isPrivacyPolicyOnWebsite: true,
71
+ isTwilioTermsRead: true,
72
+ }, constants.headers)
73
+ .catch(err => {
74
+ throw err;
75
+ }).then(resp => {
76
+ return resp.body;
77
+ });
78
+
79
+ console.log(agreement);
80
+
81
+ // Fetch the agreement
82
+ agreement = await client.fetchSMSAgreement(constants.headers)
83
+ .catch(err => {
84
+ throw err;
85
+ }).then(resp => {
86
+ return resp.body;
87
+ });
88
+
89
+ console.log(agreement);
90
+
91
+ // Create imported list
92
+ let importedList = await client.createImportedList({
93
+ listName: "Imported List",
94
+ isActive: true,
95
+ phoneNumberID: phoneNumber.id
96
+ }, constants.headers)
97
+ .catch(err => {
98
+ throw err;
99
+ }).then(resp => {
100
+ return resp.body;
101
+ });
102
+
103
+ console.log(importedList);
104
+
105
+
106
+ // Create recipient in imported list
107
+ let recipient = await client.createRecipientInImportedList({
108
+ importedListID: importedList.id,
109
+ mobilePhoneNumber: "+1805654545"
110
+ }, constants.headers)
111
+ .catch(err => {
112
+ throw err;
113
+ }).then(resp => {
114
+ return resp.body;
115
+ });
116
+
117
+ console.log(recipient);
118
+
119
+ // Count recipients in imported list
120
+ let { count } = await client.countImportedListRecipients(importedList.id, false, undefined, undefined, constants.headers)
121
+ .catch(err => {
122
+ throw err;
123
+ }).then(resp => {
124
+ return resp.body;
125
+ });
126
+
127
+ console.log(count);
128
+
129
+ // Fetch recipients
130
+ let importedListRecipients = await client.fetchImportedListRecipients(importedList.id, constants.headers)
131
+ .catch(err => {
132
+ throw err;
133
+ }).then(resp => {
134
+ return resp.body;
135
+ });
136
+
137
+ console.log(importedListRecipients);
138
+
139
+ // Fetch recipients by page
140
+ let importedListRecipientByPage = await client.fetchImportedListRecipientsByPage(importedList.id, 10, 1, false, constants.headers)
141
+ .catch(err => {
142
+ throw err;
143
+ }).then(resp => {
144
+ return resp.body;
145
+ });
146
+
147
+ console.log(`Total: ${importedListRecipientByPage.total}, Length: ${importedListRecipientByPage.length}, List: ${JSON.stringify(importedListRecipientByPage.results)}`);
148
+
149
+ // Export recipients
150
+ await client.exportImportedListRecipients(importedList.id, constants.headers)
151
+ .catch(err => {
152
+ throw err;
153
+ }).then(resp => {
154
+ return resp.body;
155
+ });
156
+
157
+ // Create opt in list
158
+ let optInList = await client.createOptInList({
159
+ isActive: true,
160
+ listName: "Opt In List",
161
+ phoneNumberID: phoneNumber.id,
162
+ estimatedMessagesPerMonth: 250,
163
+ optInKeyword: "OPTIN",
164
+ optOutKeyword: "OPTOUT",
165
+ optInConfirmedResponse: "You've opted in",
166
+ optOutConfirmedResponse: "You've opted out",
167
+ optInConfirmedCustomerReceives: "You've opted in",
168
+ optOutConfirmedCustomerReceives: "You've opted out",
169
+ isOver21Required: false,
170
+ }, constants.headers)
171
+ .catch(err => {
172
+ throw err;
173
+ }).then(resp => {
174
+ return resp.body;
175
+ });
176
+
177
+ console.log(optInList);
178
+
179
+ // Count opt in list subscribers
180
+ count = await client.countOptInListSubscribers(optInList.id, true, false, false, undefined, undefined, constants.headers)
181
+ .catch(err => {
182
+ throw err;
183
+ }).then(resp => {
184
+ return (resp.body).count;
185
+ });
186
+
187
+ console.log(count);
188
+
189
+ // Export opt in list subscribers
190
+ await client.exportOptInListSubscribers(optInList.id, constants.headers)
191
+ .catch(err => {
192
+ throw err;
193
+ }).then(resp => {
194
+ return resp.body;
195
+ });
196
+
197
+ // Fetch subscribers
198
+ let optInListRecipients = await client.fetchOptInListSubscribers(optInList.id, true, false, false, constants.headers)
199
+ .catch(err => {
200
+ throw err;
201
+ }).then(resp => {
202
+ return resp.body;
203
+ });
204
+
205
+ console.log(optInListRecipients);
206
+
207
+ // Fetch subscribers by page
208
+ let optInListRecipientByPage = await client.fetchOptInListSubscribersByPage(optInList.id, 10, 1, true, false, false, constants.headers)
209
+ .catch(err => {
210
+ throw err;
211
+ }).then(resp => {
212
+ return resp.body;
213
+ });
214
+
215
+ console.log(`Total: ${optInListRecipientByPage.total}, Length: ${optInListRecipientByPage.length}, List: ${JSON.stringify(optInListRecipientByPage.results)}`);
216
+
217
+ // Fetch all opt in lists associated with the given phone number
218
+
219
+ let optInListsAssociatedWithPhoneNumber = await client.fetchOptInListsAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
220
+ .catch(err => {
221
+ throw err;
222
+ }).then(resp => {
223
+ return resp.body;
224
+ });
225
+
226
+ console.log(optInListsAssociatedWithPhoneNumber);
227
+
228
+ // Create opt in source
229
+ let optInSource = await client.createOptInListSource({
230
+ sourceName: "Opt In Source",
231
+ listID: optInList.id,
232
+ }, constants.headers)
233
+ .catch(err => {
234
+ throw err;
235
+ }).then(resp => {
236
+ return resp.body;
237
+ });
238
+ console.log(optInSource);
239
+
240
+
241
+ // Count subscribers in opt in list source
242
+ count = await client.countOptInSourceSubscribers(optInSource.id, true, false, false, undefined, undefined, constants.headers)
243
+ .catch(err => {
244
+ throw err;
245
+ }).then(resp => {
246
+ return (resp.body).count;
247
+ });
248
+
249
+ console.log(count);
250
+
251
+ let optInSourceSubscribers = await client.fetchOptInSourceSubscribers(optInSource.id, true, false, false, constants.headers)
252
+ .catch(err => {
253
+ throw err;
254
+ }).then(resp => {
255
+ return resp.body;
256
+ });
257
+
258
+ console.log(optInSourceSubscribers);
259
+
260
+ let optInSourcesAssociatedWithPhoneNumber = await client.fetchOptInSourcesAssociatedWithPhoneNumber(phoneNumber.id, constants.headers)
261
+ .catch(err => {
262
+ throw err;
263
+ }).then(resp => {
264
+ return resp.body;
265
+ });
266
+
267
+ console.log(optInSourcesAssociatedWithPhoneNumber);
268
+
269
+ // Fetch all outbound SMSes
270
+ let outboundSMSes = await client.fetchOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
271
+ .catch(err => {
272
+ throw err;
273
+ }).then(resp => {
274
+ return resp.body;
275
+ });
276
+ console.log(outboundSMSes);
277
+
278
+ // Fetch outbound SMSes by page
279
+ let outboundSMSesByPage = await client.fetchOutboundSMSByPage(phoneNumber.id, undefined, undefined, 10, 1, constants.headers)
280
+ .catch(err => {
281
+ throw err;
282
+ }).then(resp => {
283
+ return resp.body;
284
+ });
285
+ console.log(`Total: ${outboundSMSesByPage.total}, Length: ${outboundSMSesByPage.length}, Messages: ${JSON.stringify(outboundSMSesByPage.results)}`);
286
+
287
+
288
+ // Count outbound SMSes
289
+ let outboundSMSesCount = await client.countOutboundSMS(phoneNumber.id, undefined, undefined, undefined, constants.headers)
290
+ .catch(err => {
291
+ throw err;
292
+ }).then(resp => {
293
+ return (resp.body).count;
294
+ });
295
+ console.log(outboundSMSesCount);
296
+
297
+ // Retrieve message limits
298
+ let limits = await client.retrieveSentAndMaxCountOfMessages(constants.headers)
299
+ .catch(err => {
300
+ throw err;
301
+ }).then(resp => {
302
+ return resp.body;
303
+ });
304
+ console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
305
+ }
@@ -0,0 +1,192 @@
1
+ import * as api from "wallet";
2
+ import * as constants from "./constants";
3
+
4
+ staticVoucherCampaigns();
5
+
6
+ async function staticVoucherCampaigns() {
7
+ let client = new api.StaticVoucherCampaignsApi(constants.domain);
8
+ // Fetch payment design
9
+ let designClient = new api.PaymentDesignsApi(constants.domain);
10
+ let allDesigns = await designClient.fetchAllPaymentDesigns(false, constants.headers)
11
+ .catch(err => {
12
+ throw err;
13
+ }).then(resp => {
14
+ return resp.body;
15
+ });
16
+ let selectedDesign = allDesigns[0];
17
+
18
+ let startDate = new Date();
19
+ let expiryDate = new Date((new Date()).setDate((new Date()).getDate() + 5));
20
+
21
+ let params: api.CreateStaticVoucherCampaign = {
22
+ startDateTime: startDate,
23
+ expirationDateTime: expiryDate,
24
+ title: "Static Voucher Campaign API Client",
25
+ notes: "Example notes",
26
+ valueType: "currency", // percent or currency
27
+ displayValue: "$5 Off",
28
+ merchantsReferenceID: "",
29
+ validOnlyAtPOSRegisterIDs: [],
30
+ paymentDesignID: selectedDesign.id,
31
+ isActive: true,
32
+ sourceID: 0,
33
+ }
34
+ let campaign = await client.createStaticVoucherCampaign(params, constants.headers)
35
+ .catch(err => {
36
+ throw err;
37
+ }).then(resp => {
38
+ return resp.body
39
+ });
40
+
41
+ console.log(campaign);
42
+
43
+
44
+ // Fetch static voucher campaign by ID
45
+ campaign = await client.fetchStaticVoucherCampaignById(campaign.id, constants.headers)
46
+ .catch(err => {
47
+ throw err;
48
+ }).then(resp => {
49
+ return resp.body
50
+ });
51
+
52
+ console.log(campaign);
53
+
54
+ // Fetch all the static voucher campaigns
55
+ let allCampaigns = await client.fetchStaticVoucherCampaigns(false, undefined, constants.headers)
56
+ .catch(err => {
57
+ throw err;
58
+ }).then(resp => {
59
+ return resp.body
60
+ });
61
+
62
+ console.log(allCampaigns);
63
+
64
+ // Fetch all vouchers within a static voucher campaign
65
+ let allVouchers = await client.fetchStaticVouchers(campaign.id, constants.headers)
66
+ .catch(err => {
67
+ throw err;
68
+ }).then(resp => {
69
+ return resp.body
70
+ });
71
+
72
+ console.log(allVouchers);
73
+
74
+ // Fetch vouchers within a static voucher campaign by page
75
+ let allVouchersByPage = await client.fetchStaticVouchersPage(campaign.id, 1, 10, constants.headers)
76
+ .catch(err => {
77
+ throw err;
78
+ }).then(resp => {
79
+ return resp.body
80
+ });
81
+
82
+ console.log(allVouchersByPage);
83
+
84
+ // Fetch performance overview
85
+ let performanceOverview = await client.fetchPerformanceOverview(campaign.id, constants.headers)
86
+ .catch(err => {
87
+ throw err;
88
+ }).then(resp => {
89
+ return resp.body
90
+ });
91
+
92
+ console.log(performanceOverview);
93
+
94
+ // Fetch reach stats of individual static voucher campaign
95
+ let individualCampaignReachStats = await client.fetchReachStatsOfIndividualStaticVoucherCampaign(campaign.id, undefined, undefined, constants.headers)
96
+ .catch(err => {
97
+ throw err;
98
+ }).then(resp => {
99
+ return resp.body
100
+ });
101
+
102
+ console.log(individualCampaignReachStats);
103
+
104
+ // Fetch reach stats of all static voucher campaigns
105
+ let allStaticVoucherCampaignStats = await client.fetchReachStatsOfAllStaticVoucherCampaigns(undefined, undefined, constants.headers)
106
+ .catch(err => {
107
+ throw err;
108
+ }).then(resp => {
109
+ return resp.body
110
+ });
111
+
112
+ console.log(allStaticVoucherCampaignStats);
113
+
114
+ // Fetch wallet page views of a static voucher campaign
115
+ let views = await client.fetchViews(campaign.id, constants.headers)
116
+ .catch(err => {
117
+ throw err;
118
+ }).then(resp => {
119
+ return resp.body
120
+ });
121
+
122
+ console.log(views);
123
+
124
+ // Fetch redeemed vouchers
125
+ let redeemedVouchers = await client.fetchVouchersRedeemed(campaign.id, constants.headers)
126
+ .catch(err => {
127
+ throw err;
128
+ }).then(resp => {
129
+ return resp.body
130
+ });
131
+
132
+ console.log(redeemedVouchers);
133
+
134
+ // Duplicate static voucher campaign
135
+ let duplicatedCampaign = await client.duplicateStaticVoucherCampaignById(campaign.id, constants.headers)
136
+ .catch(err => {
137
+ throw err;
138
+ }).then(resp => {
139
+ return resp.body
140
+ });
141
+
142
+ console.log(duplicatedCampaign);
143
+
144
+ // Update static voucher campaign
145
+ campaign = await client.updateStaticVoucherCampaign(campaign.id, {
146
+ ...params,
147
+ title: `${params.title} Updated`
148
+ }, constants.headers)
149
+ .catch(err => {
150
+ throw err;
151
+ }).then(resp => {
152
+ return resp.body
153
+ });
154
+
155
+ console.log(campaign);
156
+
157
+ // Create static voucher campaign with voucher
158
+ let campaignWithVoucher = await client.createStaticVoucherCampaignWithVoucher({
159
+ ...params,
160
+ cellPhone: "+1809898787",
161
+ memberID: "MEM0091",
162
+ offerAmountCents: 1000
163
+ }, constants.headers)
164
+ .catch(err => {
165
+ throw err;
166
+ }).then(resp => {
167
+ return resp.body
168
+ });
169
+
170
+ console.log(campaignWithVoucher);
171
+
172
+ allVouchers = await client.fetchStaticVouchers(campaignWithVoucher.id, constants.headers)
173
+ .catch(err => {
174
+ throw err;
175
+ }).then(resp => {
176
+ return resp.body
177
+ });
178
+
179
+ // Update static voucher campaign
180
+ campaignWithVoucher = await client.updateStaticVoucherCampaignWithVoucher(campaignWithVoucher.id, {
181
+ ...params,
182
+ offerAmountCents: 2000,
183
+ voucherID: allVouchers[0].id
184
+ }, constants.headers)
185
+ .catch(err => {
186
+ throw err;
187
+ }).then(resp => {
188
+ return resp.body
189
+ });
190
+
191
+ console.log(campaignWithVoucher);
192
+ }
@@ -0,0 +1,67 @@
1
+ import * as api from "wallet";
2
+ import * as constants from "./constants";
3
+
4
+ staticVouchers();
5
+
6
+ async function staticVouchers() {
7
+ let client = new api.StaticVouchersApi(constants.domain);
8
+
9
+ let params: api.WTStaticVoucherCreateParams = {
10
+ offerAmountCents: 1000, // In cents
11
+ memberID: "MEM0090",
12
+ cellPhone: "+1809898787",
13
+ campaignID: "",
14
+ }
15
+ // Create a new static voucher
16
+ let voucher = await client.createStaticVoucher(params, constants.headers).catch(err => {
17
+ throw err;
18
+ }).then(resp => {
19
+ return resp.body
20
+ });
21
+
22
+ // The static voucher that has just been created
23
+ console.log(voucher);
24
+
25
+ // Fetch the static voucher that has just been created
26
+ voucher = (await client.fetchStaticVoucher(voucher.id, constants.headers)).body;
27
+ console.log(voucher);
28
+
29
+ // Update the static voucher with a new maxUses count
30
+ voucher = await client.updateStaticVoucher(voucher.id, {
31
+ ...params,
32
+ offerAmountCents: 2000 // In cents
33
+ }, constants.headers).catch(err => {
34
+ throw err;
35
+ }).then(resp => {
36
+ return resp.body
37
+ });
38
+
39
+ // Archive the static voucher
40
+ await client.deleteStaticVoucher(voucher.id, constants.headers)
41
+ .catch(err => {
42
+ throw err;
43
+ }).then(resp => {
44
+ return resp.body
45
+ });
46
+
47
+
48
+ // Fetch reach stats of individual static voucher
49
+ let individualVoucherReachStats = await client.fetchReachStatsOfIndividualStaticVoucher(voucher.id, undefined, undefined, constants.headers)
50
+ .catch(err => {
51
+ throw err;
52
+ }).then(resp => {
53
+ return resp.body;
54
+ });
55
+
56
+ console.log(individualVoucherReachStats);
57
+
58
+ // Fetch reach stats of all the static vouchers
59
+ let allVouchersReachStats = await client.fetchReachStatsOfAllStaticVouchers(undefined, undefined, constants.headers)
60
+ .catch(err => {
61
+ throw err;
62
+ }).then(resp => {
63
+ return resp.body;
64
+ });
65
+
66
+ console.log(allVouchersReachStats);
67
+ }
@@ -2,7 +2,7 @@
2
2
  * wallet-api
3
3
  * API
4
4
  *
5
- * The version of the OpenAPI document: 2.1.507
5
+ * The version of the OpenAPI document: 2.1.508
6
6
  * Contact: development@wallet.inc
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * wallet-api
3
3
  * API
4
4
  *
5
- * The version of the OpenAPI document: 2.1.507
5
+ * The version of the OpenAPI document: 2.1.508
6
6
  * Contact: development@wallet.inc
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * wallet-api
3
3
  * API
4
4
  *
5
- * The version of the OpenAPI document: 2.1.507
5
+ * The version of the OpenAPI document: 2.1.508
6
6
  * Contact: development@wallet.inc
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).