@paddle/paddle-node-sdk 0.4.0 → 0.6.0

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 (396) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/entities/price/index.d.ts +0 -1
  3. package/dist/entities/price/index.js +0 -1
  4. package/dist/entities/price/price-collection.d.ts +3 -3
  5. package/dist/entities/price/price-collection.js +2 -2
  6. package/dist/entities/price/price.d.ts +9 -8
  7. package/dist/entities/price/price.js +5 -7
  8. package/dist/entities/pricing-preview/pricing-preview.d.ts +1 -2
  9. package/dist/entities/product/index.d.ts +0 -1
  10. package/dist/entities/product/index.js +0 -1
  11. package/dist/entities/product/product-collection.d.ts +3 -3
  12. package/dist/entities/product/product-collection.js +2 -2
  13. package/dist/entities/product/product.d.ts +5 -4
  14. package/dist/entities/product/product.js +1 -0
  15. package/dist/entities/subscription/index.d.ts +0 -3
  16. package/dist/entities/subscription/index.js +0 -3
  17. package/dist/entities/subscription/subscription-item.d.ts +2 -2
  18. package/dist/entities/subscription/subscription-item.js +1 -1
  19. package/dist/entities/subscription/subscription.d.ts +3 -1
  20. package/dist/entities/subscription/subscription.js +4 -0
  21. package/dist/entities/transaction/index.d.ts +0 -1
  22. package/dist/entities/transaction/index.js +0 -1
  23. package/dist/entities/transaction/transaction-collection.d.ts +3 -3
  24. package/dist/entities/transaction/transaction-collection.js +2 -2
  25. package/dist/entities/transaction/transaction-item-preview.d.ts +2 -2
  26. package/dist/entities/transaction/transaction-item-preview.js +1 -1
  27. package/dist/entities/transaction/transaction-preview.d.ts +1 -2
  28. package/dist/entities/transaction/transaction.d.ts +9 -2
  29. package/dist/entities/transaction/transaction.js +12 -0
  30. package/dist/enums/shared/index.d.ts +1 -0
  31. package/dist/enums/shared/index.js +1 -0
  32. package/dist/notifications/entities/address/address-notification.d.ts +19 -0
  33. package/dist/notifications/entities/address/address-notification.js +22 -0
  34. package/dist/notifications/entities/address/index.d.ts +1 -0
  35. package/dist/notifications/entities/address/index.js +17 -0
  36. package/dist/notifications/entities/adjustment/adjustment-item-notification.d.ts +12 -0
  37. package/dist/notifications/entities/adjustment/adjustment-item-notification.js +15 -0
  38. package/dist/notifications/entities/adjustment/adjustment-item-totals-notification.d.ts +7 -0
  39. package/dist/notifications/entities/adjustment/adjustment-item-totals-notification.js +11 -0
  40. package/dist/notifications/entities/adjustment/adjustment-notification.d.ts +20 -0
  41. package/dist/notifications/entities/adjustment/adjustment-notification.js +25 -0
  42. package/dist/notifications/entities/adjustment/adjustment-proration-notification.d.ts +7 -0
  43. package/dist/notifications/entities/adjustment/adjustment-proration-notification.js +13 -0
  44. package/dist/notifications/entities/adjustment/adjustment-time-period-notification.d.ts +6 -0
  45. package/dist/notifications/entities/adjustment/adjustment-time-period-notification.js +10 -0
  46. package/dist/notifications/entities/adjustment/index.d.ts +5 -0
  47. package/dist/notifications/entities/adjustment/index.js +21 -0
  48. package/dist/notifications/entities/business/business-notification.d.ts +17 -0
  49. package/dist/notifications/entities/business/business-notification.js +19 -0
  50. package/dist/notifications/entities/business/contacts-notification.d.ts +6 -0
  51. package/dist/notifications/entities/business/contacts-notification.js +10 -0
  52. package/dist/notifications/entities/business/index.d.ts +2 -0
  53. package/dist/notifications/entities/business/index.js +18 -0
  54. package/dist/notifications/entities/customer/customer-notification.d.ts +17 -0
  55. package/dist/notifications/entities/customer/customer-notification.js +19 -0
  56. package/dist/notifications/entities/customer/index.d.ts +1 -0
  57. package/dist/notifications/entities/customer/index.js +17 -0
  58. package/dist/notifications/entities/discount/discount-notification.d.ts +25 -0
  59. package/dist/notifications/entities/discount/discount-notification.js +28 -0
  60. package/dist/notifications/entities/discount/index.d.ts +1 -0
  61. package/dist/notifications/entities/discount/index.js +17 -0
  62. package/dist/notifications/entities/index.d.ts +12 -0
  63. package/dist/notifications/entities/index.js +28 -0
  64. package/dist/notifications/entities/payout/index.d.ts +1 -0
  65. package/dist/notifications/entities/payout/index.js +17 -0
  66. package/dist/notifications/entities/payout/payout-notification.d.ts +9 -0
  67. package/dist/notifications/entities/payout/payout-notification.js +12 -0
  68. package/dist/notifications/entities/price/index.d.ts +2 -0
  69. package/dist/notifications/entities/price/index.js +18 -0
  70. package/dist/notifications/entities/price/price-notification.d.ts +21 -0
  71. package/dist/{entities/price/price-with-includes.js → notifications/entities/price/price-notification.js} +10 -12
  72. package/dist/notifications/entities/price/price-quantity-notification.d.ts +6 -0
  73. package/dist/notifications/entities/price/price-quantity-notification.js +10 -0
  74. package/dist/notifications/entities/product/index.d.ts +1 -0
  75. package/dist/notifications/entities/product/index.js +17 -0
  76. package/dist/notifications/entities/product/product-notification.d.ts +17 -0
  77. package/dist/{entities/product/product-with-includes.js → notifications/entities/product/product-notification.js} +4 -5
  78. package/dist/notifications/entities/report/index.d.ts +2 -0
  79. package/dist/notifications/entities/report/index.js +18 -0
  80. package/dist/notifications/entities/report/report-filters-notification.d.ts +8 -0
  81. package/dist/notifications/entities/report/report-filters-notification.js +12 -0
  82. package/dist/notifications/entities/report/report-notification.d.ts +13 -0
  83. package/dist/notifications/entities/report/report-notification.js +17 -0
  84. package/dist/notifications/entities/shared/adjustment-original-amount-notification.d.ts +7 -0
  85. package/dist/notifications/entities/shared/adjustment-original-amount-notification.js +10 -0
  86. package/dist/notifications/entities/shared/billing-details-notification.d.ts +9 -0
  87. package/dist/notifications/entities/shared/billing-details-notification.js +14 -0
  88. package/dist/notifications/entities/shared/chargeback-fee-notification.d.ts +7 -0
  89. package/dist/notifications/entities/shared/chargeback-fee-notification.js +11 -0
  90. package/dist/notifications/entities/shared/import-meta-notification.d.ts +6 -0
  91. package/dist/notifications/entities/shared/import-meta-notification.js +10 -0
  92. package/dist/notifications/entities/shared/index.d.ts +20 -0
  93. package/dist/notifications/entities/shared/index.js +36 -0
  94. package/dist/notifications/entities/shared/money-notification.d.ts +7 -0
  95. package/dist/notifications/entities/shared/money-notification.js +10 -0
  96. package/dist/notifications/entities/shared/payment-card-notification.d.ts +10 -0
  97. package/dist/notifications/entities/shared/payment-card-notification.js +13 -0
  98. package/dist/notifications/entities/shared/payment-method-details-notification.d.ts +8 -0
  99. package/dist/notifications/entities/shared/payment-method-details-notification.js +11 -0
  100. package/dist/notifications/entities/shared/payout-totals-adjustment-notification.d.ts +13 -0
  101. package/dist/notifications/entities/shared/payout-totals-adjustment-notification.js +18 -0
  102. package/dist/notifications/entities/shared/tax-rates-used-notification.d.ts +7 -0
  103. package/dist/notifications/entities/shared/tax-rates-used-notification.js +11 -0
  104. package/dist/notifications/entities/shared/time-period-notification.d.ts +7 -0
  105. package/dist/notifications/entities/shared/time-period-notification.js +10 -0
  106. package/dist/notifications/entities/shared/total-adjustments-notification.d.ts +11 -0
  107. package/dist/notifications/entities/shared/total-adjustments-notification.js +14 -0
  108. package/dist/notifications/entities/shared/totals-notification.d.ts +8 -0
  109. package/dist/notifications/entities/shared/totals-notification.js +12 -0
  110. package/dist/notifications/entities/shared/transaction-checkout-notification.d.ts +5 -0
  111. package/dist/notifications/entities/shared/transaction-checkout-notification.js +9 -0
  112. package/dist/notifications/entities/shared/transaction-payment-attempt-notification.d.ts +15 -0
  113. package/dist/notifications/entities/shared/transaction-payment-attempt-notification.js +21 -0
  114. package/dist/notifications/entities/shared/transaction-payout-totals-adjusted-notification.d.ts +13 -0
  115. package/dist/notifications/entities/shared/transaction-payout-totals-adjusted-notification.js +18 -0
  116. package/dist/notifications/entities/shared/transaction-payout-totals-notification.d.ts +16 -0
  117. package/dist/notifications/entities/shared/transaction-payout-totals-notification.js +19 -0
  118. package/dist/notifications/entities/shared/transaction-totals-adjusted-notification.d.ts +12 -0
  119. package/dist/notifications/entities/shared/transaction-totals-adjusted-notification.js +15 -0
  120. package/dist/notifications/entities/shared/transaction-totals-notification.d.ts +16 -0
  121. package/dist/notifications/entities/shared/transaction-totals-notification.js +19 -0
  122. package/dist/notifications/entities/shared/unit-price-override-notification.d.ts +8 -0
  123. package/dist/notifications/entities/shared/unit-price-override-notification.js +11 -0
  124. package/dist/notifications/entities/shared/unit-totals-notification.d.ts +8 -0
  125. package/dist/notifications/entities/shared/unit-totals-notification.js +12 -0
  126. package/dist/notifications/entities/subscription/index.d.ts +6 -0
  127. package/dist/notifications/entities/subscription/index.js +22 -0
  128. package/dist/notifications/entities/subscription/subscription-discount-notification.d.ts +7 -0
  129. package/dist/notifications/entities/subscription/subscription-discount-notification.js +12 -0
  130. package/dist/notifications/entities/subscription/subscription-item-notification.d.ts +15 -0
  131. package/dist/notifications/entities/subscription/subscription-item-notification.js +20 -0
  132. package/dist/{entities → notifications/entities}/subscription/subscription-notification.d.ts +10 -9
  133. package/dist/{entities → notifications/entities}/subscription/subscription-notification.js +9 -7
  134. package/dist/notifications/entities/subscription/subscription-price-notification.d.ts +21 -0
  135. package/dist/notifications/entities/subscription/subscription-price-notification.js +27 -0
  136. package/dist/notifications/entities/subscription/subscription-scheduled-change-notification.d.ts +8 -0
  137. package/dist/notifications/entities/subscription/subscription-scheduled-change-notification.js +11 -0
  138. package/dist/notifications/entities/subscription/subscription-time-period-notification.d.ts +6 -0
  139. package/dist/notifications/entities/subscription/subscription-time-period-notification.js +10 -0
  140. package/dist/notifications/entities/transaction/index.d.ts +6 -0
  141. package/dist/notifications/entities/transaction/index.js +22 -0
  142. package/dist/notifications/entities/transaction/transaction-details-notification.d.ts +11 -0
  143. package/dist/notifications/entities/transaction/transaction-details-notification.js +21 -0
  144. package/dist/notifications/entities/transaction/transaction-item-notification.d.ts +8 -0
  145. package/dist/notifications/entities/transaction/transaction-item-notification.js +12 -0
  146. package/dist/notifications/entities/transaction/transaction-line-item-notification.d.ts +13 -0
  147. package/dist/notifications/entities/transaction/transaction-line-item-notification.js +21 -0
  148. package/dist/notifications/entities/transaction/transaction-notification.d.ts +29 -0
  149. package/dist/{entities/transaction/transaction-includes.js → notifications/entities/transaction/transaction-notification.js} +13 -21
  150. package/dist/notifications/entities/transaction/transaction-proration-notification.d.ts +7 -0
  151. package/dist/notifications/entities/transaction/transaction-proration-notification.js +13 -0
  152. package/dist/notifications/entities/transaction/transactions-time-period-notification.d.ts +6 -0
  153. package/dist/notifications/entities/transaction/transactions-time-period-notification.js +10 -0
  154. package/dist/notifications/events/address/address-created-event.d.ts +5 -4
  155. package/dist/notifications/events/address/address-created-event.js +2 -2
  156. package/dist/notifications/events/address/address-imported-event.d.ts +5 -4
  157. package/dist/notifications/events/address/address-imported-event.js +2 -2
  158. package/dist/notifications/events/address/address-updated-event.d.ts +5 -4
  159. package/dist/notifications/events/address/address-updated-event.js +2 -2
  160. package/dist/notifications/events/adjustment/adjustment-created-event.d.ts +5 -4
  161. package/dist/notifications/events/adjustment/adjustment-created-event.js +2 -2
  162. package/dist/notifications/events/adjustment/adjustment-updated-event.d.ts +5 -4
  163. package/dist/notifications/events/adjustment/adjustment-updated-event.js +2 -2
  164. package/dist/notifications/events/business/business-created-event.d.ts +5 -4
  165. package/dist/notifications/events/business/business-created-event.js +2 -2
  166. package/dist/notifications/events/business/business-imported-event.d.ts +5 -4
  167. package/dist/notifications/events/business/business-imported-event.js +2 -2
  168. package/dist/notifications/events/business/business-updated-event.d.ts +5 -4
  169. package/dist/notifications/events/business/business-updated-event.js +2 -2
  170. package/dist/notifications/events/customer/customer-created-event.d.ts +5 -4
  171. package/dist/notifications/events/customer/customer-created-event.js +2 -2
  172. package/dist/notifications/events/customer/customer-imported-event.d.ts +5 -4
  173. package/dist/notifications/events/customer/customer-imported-event.js +2 -2
  174. package/dist/notifications/events/customer/customer-updated-event.d.ts +5 -4
  175. package/dist/notifications/events/customer/customer-updated-event.js +2 -2
  176. package/dist/notifications/events/discount/discount-created-event.d.ts +5 -4
  177. package/dist/notifications/events/discount/discount-created-event.js +2 -2
  178. package/dist/notifications/events/discount/discount-imported-event.d.ts +5 -4
  179. package/dist/notifications/events/discount/discount-imported-event.js +2 -2
  180. package/dist/notifications/events/discount/discount-updated-event.d.ts +5 -4
  181. package/dist/notifications/events/discount/discount-updated-event.js +2 -2
  182. package/dist/notifications/events/payout/payout-created-event.d.ts +5 -4
  183. package/dist/notifications/events/payout/payout-created-event.js +2 -2
  184. package/dist/notifications/events/payout/payout-paid-event.d.ts +5 -4
  185. package/dist/notifications/events/payout/payout-paid-event.js +2 -2
  186. package/dist/notifications/events/price/price-created-event.d.ts +5 -4
  187. package/dist/notifications/events/price/price-created-event.js +2 -2
  188. package/dist/notifications/events/price/price-imported-event.d.ts +5 -4
  189. package/dist/notifications/events/price/price-imported-event.js +2 -2
  190. package/dist/notifications/events/price/price-updated-event.d.ts +5 -4
  191. package/dist/notifications/events/price/price-updated-event.js +2 -2
  192. package/dist/notifications/events/product/product-created-event.d.ts +5 -4
  193. package/dist/notifications/events/product/product-created-event.js +2 -2
  194. package/dist/notifications/events/product/product-imported-event.d.ts +5 -4
  195. package/dist/notifications/events/product/product-imported-event.js +2 -2
  196. package/dist/notifications/events/product/product-updated-event.d.ts +5 -4
  197. package/dist/notifications/events/product/product-updated-event.js +2 -2
  198. package/dist/notifications/events/report/report-created-event.d.ts +5 -4
  199. package/dist/notifications/events/report/report-created-event.js +2 -2
  200. package/dist/notifications/events/report/report-updated-event.d.ts +5 -4
  201. package/dist/notifications/events/report/report-updated-event.js +2 -2
  202. package/dist/notifications/events/subscription/subscription-activated-event.d.ts +3 -2
  203. package/dist/notifications/events/subscription/subscription-activated-event.js +1 -1
  204. package/dist/notifications/events/subscription/subscription-canceled-event.d.ts +3 -2
  205. package/dist/notifications/events/subscription/subscription-canceled-event.js +1 -1
  206. package/dist/notifications/events/subscription/subscription-created-event.d.ts +3 -2
  207. package/dist/notifications/events/subscription/subscription-created-event.js +1 -1
  208. package/dist/notifications/events/subscription/subscription-imported-event.d.ts +3 -2
  209. package/dist/notifications/events/subscription/subscription-imported-event.js +1 -1
  210. package/dist/notifications/events/subscription/subscription-past-due-event.d.ts +3 -2
  211. package/dist/notifications/events/subscription/subscription-past-due-event.js +1 -1
  212. package/dist/notifications/events/subscription/subscription-paused-event.d.ts +3 -2
  213. package/dist/notifications/events/subscription/subscription-paused-event.js +1 -1
  214. package/dist/notifications/events/subscription/subscription-resumed-event.d.ts +3 -2
  215. package/dist/notifications/events/subscription/subscription-resumed-event.js +1 -1
  216. package/dist/notifications/events/subscription/subscription-trialing-event.d.ts +3 -2
  217. package/dist/notifications/events/subscription/subscription-trialing-event.js +1 -1
  218. package/dist/notifications/events/subscription/subscription-updated-event.d.ts +3 -2
  219. package/dist/notifications/events/subscription/subscription-updated-event.js +1 -1
  220. package/dist/notifications/events/transaction/transaction-billed-event.d.ts +5 -4
  221. package/dist/notifications/events/transaction/transaction-billed-event.js +2 -2
  222. package/dist/notifications/events/transaction/transaction-canceled-event.d.ts +5 -4
  223. package/dist/notifications/events/transaction/transaction-canceled-event.js +2 -2
  224. package/dist/notifications/events/transaction/transaction-completed-event.d.ts +5 -4
  225. package/dist/notifications/events/transaction/transaction-completed-event.js +2 -2
  226. package/dist/notifications/events/transaction/transaction-created-event.d.ts +5 -4
  227. package/dist/notifications/events/transaction/transaction-created-event.js +2 -2
  228. package/dist/notifications/events/transaction/transaction-paid-event.d.ts +5 -4
  229. package/dist/notifications/events/transaction/transaction-paid-event.js +2 -2
  230. package/dist/notifications/events/transaction/transaction-past-due-event.d.ts +5 -4
  231. package/dist/notifications/events/transaction/transaction-past-due-event.js +2 -2
  232. package/dist/notifications/events/transaction/transaction-payment-failed-event.d.ts +5 -4
  233. package/dist/notifications/events/transaction/transaction-payment-failed-event.js +2 -2
  234. package/dist/notifications/events/transaction/transaction-ready-event.d.ts +5 -4
  235. package/dist/notifications/events/transaction/transaction-ready-event.js +2 -2
  236. package/dist/notifications/events/transaction/transaction-updated-event.d.ts +5 -4
  237. package/dist/notifications/events/transaction/transaction-updated-event.js +2 -2
  238. package/dist/notifications/index.d.ts +2 -0
  239. package/dist/notifications/index.js +2 -0
  240. package/dist/notifications/types/address/address-notification-response.d.ts +17 -0
  241. package/dist/notifications/types/address/index.d.ts +1 -0
  242. package/dist/notifications/types/address/index.js +17 -0
  243. package/dist/notifications/types/adjustment/adjustment-item-notification-response.d.ts +10 -0
  244. package/dist/notifications/types/adjustment/adjustment-notification-response.d.ts +18 -0
  245. package/dist/notifications/types/adjustment/adjustment-notification-response.js +2 -0
  246. package/dist/notifications/types/adjustment/adjustment-totals-breakdown-notification.d.ts +5 -0
  247. package/dist/notifications/types/adjustment/adjustment-totals-breakdown-notification.js +2 -0
  248. package/dist/notifications/types/adjustment/adjustment-totals-notification-response.d.ts +11 -0
  249. package/dist/notifications/types/adjustment/adjustment-totals-notification-response.js +2 -0
  250. package/dist/notifications/types/adjustment/adjustments-proration-notification-response.d.ts +5 -0
  251. package/dist/notifications/types/adjustment/adjustments-proration-notification-response.js +2 -0
  252. package/dist/notifications/types/adjustment/adjustments-time-period-notification-response.d.ts +4 -0
  253. package/dist/notifications/types/adjustment/adjustments-time-period-notification-response.js +2 -0
  254. package/dist/notifications/types/adjustment/index.d.ts +6 -0
  255. package/dist/notifications/types/adjustment/index.js +22 -0
  256. package/dist/notifications/types/business/business-notification-response.d.ts +15 -0
  257. package/dist/notifications/types/business/business-notification-response.js +2 -0
  258. package/dist/notifications/types/business/businesses-contacts-notification.d.ts +4 -0
  259. package/dist/notifications/types/business/businesses-contacts-notification.js +2 -0
  260. package/dist/notifications/types/business/index.d.ts +2 -0
  261. package/dist/notifications/types/business/index.js +18 -0
  262. package/dist/notifications/types/customer/customer-notification-response.d.ts +15 -0
  263. package/dist/notifications/types/customer/customer-notification-response.js +2 -0
  264. package/dist/notifications/types/customer/index.d.ts +1 -0
  265. package/dist/notifications/types/customer/index.js +17 -0
  266. package/dist/notifications/types/discount/discount-notification-response.d.ts +23 -0
  267. package/dist/notifications/types/discount/discount-notification-response.js +2 -0
  268. package/dist/notifications/types/discount/index.d.ts +1 -0
  269. package/dist/notifications/types/discount/index.js +17 -0
  270. package/dist/notifications/types/index.d.ts +12 -0
  271. package/dist/notifications/types/index.js +28 -0
  272. package/dist/notifications/types/payout/index.d.ts +1 -0
  273. package/dist/notifications/types/payout/index.js +17 -0
  274. package/dist/notifications/types/payout/payout-notification-response.d.ts +7 -0
  275. package/dist/notifications/types/payout/payout-notification-response.js +2 -0
  276. package/dist/notifications/types/price/index.d.ts +2 -0
  277. package/dist/notifications/types/price/index.js +18 -0
  278. package/dist/notifications/types/price/price-notification-response.d.ts +20 -0
  279. package/dist/notifications/types/price/price-notification-response.js +2 -0
  280. package/dist/notifications/types/price/price-quantity-notification.d.ts +4 -0
  281. package/dist/notifications/types/price/price-quantity-notification.js +2 -0
  282. package/dist/notifications/types/product/index.d.ts +1 -0
  283. package/dist/notifications/types/product/index.js +17 -0
  284. package/dist/notifications/types/product/product-notification-response.d.ts +16 -0
  285. package/dist/notifications/types/product/product-notification-response.js +2 -0
  286. package/dist/notifications/types/report/index.d.ts +2 -0
  287. package/dist/notifications/types/report/index.js +18 -0
  288. package/dist/notifications/types/report/report-filters-notification-response.d.ts +6 -0
  289. package/dist/notifications/types/report/report-filters-notification-response.js +2 -0
  290. package/dist/notifications/types/report/report-notification-response.d.ts +11 -0
  291. package/dist/notifications/types/report/report-notification-response.js +2 -0
  292. package/dist/notifications/types/shared/adjustment-original-amount-notification-response.d.ts +5 -0
  293. package/dist/notifications/types/shared/adjustment-original-amount-notification-response.js +2 -0
  294. package/dist/notifications/types/shared/billing-details-notification-response.d.ts +7 -0
  295. package/dist/notifications/types/shared/billing-details-notification-response.js +2 -0
  296. package/dist/notifications/types/shared/chargeback-fee.d.ts +5 -0
  297. package/dist/notifications/types/shared/chargeback-fee.js +2 -0
  298. package/dist/notifications/types/shared/import-meta-notification-response.d.ts +4 -0
  299. package/dist/notifications/types/shared/import-meta-notification-response.js +2 -0
  300. package/dist/notifications/types/shared/index.d.ts +22 -0
  301. package/dist/notifications/types/shared/index.js +38 -0
  302. package/dist/notifications/types/shared/money-notification-response.d.ts +5 -0
  303. package/dist/notifications/types/shared/money-notification-response.js +2 -0
  304. package/dist/notifications/types/shared/payment-card-notification-response.d.ts +8 -0
  305. package/dist/notifications/types/shared/payment-card-notification-response.js +2 -0
  306. package/dist/notifications/types/shared/payment-method-details.d.ts +6 -0
  307. package/dist/notifications/types/shared/payment-method-details.js +2 -0
  308. package/dist/notifications/types/shared/payout-totals-adjustment-notification-response.d.ts +11 -0
  309. package/dist/notifications/types/shared/payout-totals-adjustment-notification-response.js +2 -0
  310. package/dist/notifications/types/shared/shared-price-notification-response.d.ts +19 -0
  311. package/dist/notifications/types/shared/shared-price-notification-response.js +2 -0
  312. package/dist/notifications/types/shared/shared-product-notification-response.d.ts +15 -0
  313. package/dist/notifications/types/shared/shared-product-notification-response.js +2 -0
  314. package/dist/notifications/types/shared/tax-rates-used-notification-response.d.ts +5 -0
  315. package/dist/notifications/types/shared/tax-rates-used-notification-response.js +2 -0
  316. package/dist/notifications/types/shared/time-period-notification.d.ts +5 -0
  317. package/dist/notifications/types/shared/time-period-notification.js +2 -0
  318. package/dist/notifications/types/shared/total-adjustments-notification-response.d.ts +9 -0
  319. package/dist/notifications/types/shared/total-adjustments-notification-response.js +2 -0
  320. package/dist/notifications/types/shared/totals.d.ts +6 -0
  321. package/dist/notifications/types/shared/totals.js +2 -0
  322. package/dist/notifications/types/shared/transaction-checkout-notification.d.ts +3 -0
  323. package/dist/notifications/types/shared/transaction-checkout-notification.js +2 -0
  324. package/dist/notifications/types/shared/transaction-payment-attempt-notification-response.d.ts +13 -0
  325. package/dist/notifications/types/shared/transaction-payment-attempt-notification-response.js +2 -0
  326. package/dist/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.d.ts +11 -0
  327. package/dist/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.js +2 -0
  328. package/dist/notifications/types/shared/transaction-payout-totals-notification-response.d.ts +14 -0
  329. package/dist/notifications/types/shared/transaction-payout-totals-notification-response.js +2 -0
  330. package/dist/notifications/types/shared/transaction-totals-adjusted-notification-response.d.ts +10 -0
  331. package/dist/notifications/types/shared/transaction-totals-adjusted-notification-response.js +2 -0
  332. package/dist/notifications/types/shared/transaction-totals-notification-response.d.ts +14 -0
  333. package/dist/notifications/types/shared/transaction-totals-notification-response.js +2 -0
  334. package/dist/notifications/types/shared/unit-price-override-notification-response.d.ts +6 -0
  335. package/dist/notifications/types/shared/unit-price-override-notification-response.js +2 -0
  336. package/dist/notifications/types/shared/unit-totals.d.ts +6 -0
  337. package/dist/notifications/types/shared/unit-totals.js +2 -0
  338. package/dist/notifications/types/subscription/index.d.ts +7 -0
  339. package/dist/notifications/types/subscription/index.js +23 -0
  340. package/dist/notifications/types/subscription/subscription-discount-notification-response.d.ts +5 -0
  341. package/dist/notifications/types/subscription/subscription-discount-notification-response.js +2 -0
  342. package/dist/notifications/types/subscription/subscription-item-notification-response.d.ts +13 -0
  343. package/dist/notifications/types/subscription/subscription-item-notification-response.js +2 -0
  344. package/dist/notifications/types/subscription/subscription-notification-response.d.ts +28 -0
  345. package/dist/notifications/types/subscription/subscription-notification-response.js +2 -0
  346. package/dist/notifications/types/subscription/subscription-price-notification-response.d.ts +20 -0
  347. package/dist/notifications/types/subscription/subscription-price-notification-response.js +2 -0
  348. package/dist/notifications/types/subscription/subscription-scheduled-change-notification-response.d.ts +6 -0
  349. package/dist/notifications/types/subscription/subscription-scheduled-change-notification-response.js +2 -0
  350. package/dist/notifications/types/subscription/subscription-time-period-notification-response.d.ts +4 -0
  351. package/dist/notifications/types/subscription/subscription-time-period-notification-response.js +2 -0
  352. package/dist/notifications/types/transaction/index.d.ts +6 -0
  353. package/dist/notifications/types/transaction/index.js +22 -0
  354. package/dist/notifications/types/transaction/transaction-details-notification-response.d.ts +9 -0
  355. package/dist/notifications/types/transaction/transaction-details-notification-response.js +2 -0
  356. package/dist/notifications/types/transaction/transaction-item-notification-response.d.ts +7 -0
  357. package/dist/notifications/types/transaction/transaction-item-notification-response.js +2 -0
  358. package/dist/notifications/types/transaction/transaction-line-item-notification-response.d.ts +11 -0
  359. package/dist/notifications/types/transaction/transaction-line-item-notification-response.js +2 -0
  360. package/dist/notifications/types/transaction/transaction-notification-response.d.ts +27 -0
  361. package/dist/notifications/types/transaction/transaction-notification-response.js +2 -0
  362. package/dist/notifications/types/transaction/transaction-proration-notification-response.d.ts +5 -0
  363. package/dist/notifications/types/transaction/transaction-proration-notification-response.js +2 -0
  364. package/dist/notifications/types/transaction/transactions-time-period-notification-response.d.ts +4 -0
  365. package/dist/notifications/types/transaction/transactions-time-period-notification-response.js +2 -0
  366. package/dist/resources/prices/index.d.ts +2 -2
  367. package/dist/resources/prices/index.js +1 -1
  368. package/dist/resources/products/index.d.ts +2 -2
  369. package/dist/resources/products/index.js +1 -1
  370. package/dist/resources/subscriptions/index.d.ts +3 -3
  371. package/dist/resources/subscriptions/index.js +2 -2
  372. package/dist/resources/transactions/index.d.ts +5 -5
  373. package/dist/resources/transactions/index.js +3 -3
  374. package/dist/types/events/events-response.d.ts +34 -45
  375. package/dist/types/price/price-response.d.ts +1 -1
  376. package/dist/types/pricing-preview/pricing-preview-response.d.ts +1 -2
  377. package/dist/types/shared/shared-price-response.d.ts +4 -4
  378. package/dist/types/subscription/index.d.ts +0 -2
  379. package/dist/types/subscription/index.js +0 -2
  380. package/dist/types/subscription/subscription-item-response.d.ts +2 -2
  381. package/dist/types/transaction/transaction-preview-response.d.ts +1 -2
  382. package/dist/types/transaction/transaction-response.d.ts +1 -2
  383. package/dist/version.d.ts +1 -1
  384. package/dist/version.js +1 -1
  385. package/package.json +1 -1
  386. package/dist/entities/price/price-with-includes.d.ts +0 -21
  387. package/dist/entities/product/product-with-includes.d.ts +0 -17
  388. package/dist/entities/subscription/subscription-includes.d.ts +0 -31
  389. package/dist/entities/subscription/subscription-includes.js +0 -42
  390. package/dist/entities/subscription/subscription-price.d.ts +0 -13
  391. package/dist/entities/subscription/subscription-price.js +0 -16
  392. package/dist/entities/transaction/transaction-includes.d.ts +0 -36
  393. package/dist/types/subscription/subscription-notification-response.d.ts +0 -29
  394. package/dist/types/subscription/subscription-price-response.d.ts +0 -11
  395. /package/dist/{types/subscription/subscription-notification-response.js → notifications/types/address/address-notification-response.js} +0 -0
  396. /package/dist/{types/subscription/subscription-price-response.js → notifications/types/adjustment/adjustment-item-notification-response.js} +0 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionDiscountNotification = void 0;
4
+ class SubscriptionDiscountNotification {
5
+ constructor(subscriptionDiscount) {
6
+ var _a;
7
+ this.id = subscriptionDiscount.id;
8
+ this.startsAt = subscriptionDiscount.starts_at;
9
+ this.endsAt = (_a = subscriptionDiscount.ends_at) !== null && _a !== void 0 ? _a : null;
10
+ }
11
+ }
12
+ exports.SubscriptionDiscountNotification = SubscriptionDiscountNotification;
@@ -0,0 +1,15 @@
1
+ import { type ISubscriptionItemNotificationResponse } from '../../types';
2
+ import { SubscriptionPriceNotification, SubscriptionTimePeriodNotification } from '../index';
3
+ import { type SubscriptionItemStatus } from '../../../enums';
4
+ export declare class SubscriptionItemNotification {
5
+ readonly status: SubscriptionItemStatus;
6
+ readonly quantity: number;
7
+ readonly recurring: boolean;
8
+ readonly createdAt: string;
9
+ readonly updatedAt: string;
10
+ readonly previouslyBilledAt: string | null;
11
+ readonly nextBilledAt: string | null;
12
+ readonly trialDates: SubscriptionTimePeriodNotification | null;
13
+ readonly price: SubscriptionPriceNotification | null;
14
+ constructor(subscriptionItem: ISubscriptionItemNotificationResponse);
15
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionItemNotification = void 0;
4
+ const index_1 = require("../index");
5
+ class SubscriptionItemNotification {
6
+ constructor(subscriptionItem) {
7
+ this.status = subscriptionItem.status;
8
+ this.quantity = subscriptionItem.quantity;
9
+ this.recurring = subscriptionItem.recurring;
10
+ this.createdAt = subscriptionItem.created_at;
11
+ this.updatedAt = subscriptionItem.updated_at;
12
+ this.previouslyBilledAt = subscriptionItem.previously_billed_at ? subscriptionItem.previously_billed_at : null;
13
+ this.nextBilledAt = subscriptionItem.next_billed_at ? subscriptionItem.next_billed_at : null;
14
+ this.trialDates = subscriptionItem.trial_dates
15
+ ? new index_1.SubscriptionTimePeriodNotification(subscriptionItem.trial_dates)
16
+ : null;
17
+ this.price = subscriptionItem.price ? new index_1.SubscriptionPriceNotification(subscriptionItem.price) : null;
18
+ }
19
+ }
20
+ exports.SubscriptionItemNotification = SubscriptionItemNotification;
@@ -1,6 +1,7 @@
1
- import { BillingDetails, type CustomData, ImportMeta, SubscriptionDiscount, SubscriptionItem, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod } from '../index';
2
- import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
1
+ import { BillingDetailsNotification, ImportMetaNotification, SubscriptionDiscountNotification, SubscriptionItemNotification, SubscriptionScheduledChangeNotification, SubscriptionTimePeriodNotification, TimePeriodNotification } from '../index';
2
+ import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../../enums';
3
3
  import { type ISubscriptionNotificationResponse } from '../../types';
4
+ import { type CustomData } from '../../../entities';
4
5
  export declare class SubscriptionNotification {
5
6
  readonly id: string;
6
7
  readonly status: SubscriptionStatus;
@@ -16,14 +17,14 @@ export declare class SubscriptionNotification {
16
17
  readonly nextBilledAt: string | null;
17
18
  readonly pausedAt: string | null;
18
19
  readonly canceledAt: string | null;
19
- readonly discount: SubscriptionDiscount | null;
20
+ readonly discount: SubscriptionDiscountNotification | null;
20
21
  readonly collectionMode: CollectionMode;
21
- readonly billingDetails: BillingDetails | null;
22
- readonly currentBillingPeriod: SubscriptionTimePeriod | null;
23
- readonly billingCycle: TimePeriod;
24
- readonly scheduledChange: SubscriptionScheduledChange | null;
25
- readonly items: SubscriptionItem[];
22
+ readonly billingDetails: BillingDetailsNotification | null;
23
+ readonly currentBillingPeriod: SubscriptionTimePeriodNotification | null;
24
+ readonly billingCycle: TimePeriodNotification;
25
+ readonly scheduledChange: SubscriptionScheduledChangeNotification | null;
26
+ readonly items: SubscriptionItemNotification[];
26
27
  readonly customData: CustomData | null;
27
- readonly importMeta: ImportMeta | null;
28
+ readonly importMeta: ImportMetaNotification | null;
28
29
  constructor(subscription: ISubscriptionNotificationResponse);
29
30
  }
@@ -18,19 +18,21 @@ class SubscriptionNotification {
18
18
  this.nextBilledAt = subscription.next_billed_at ? subscription.next_billed_at : null;
19
19
  this.pausedAt = subscription.paused_at ? subscription.paused_at : null;
20
20
  this.canceledAt = subscription.canceled_at ? subscription.canceled_at : null;
21
- this.discount = subscription.discount ? new index_1.SubscriptionDiscount(subscription.discount) : null;
21
+ this.discount = subscription.discount ? new index_1.SubscriptionDiscountNotification(subscription.discount) : null;
22
22
  this.collectionMode = subscription.collection_mode;
23
- this.billingDetails = subscription.billing_details ? new index_1.BillingDetails(subscription.billing_details) : null;
23
+ this.billingDetails = subscription.billing_details
24
+ ? new index_1.BillingDetailsNotification(subscription.billing_details)
25
+ : null;
24
26
  this.currentBillingPeriod = subscription.current_billing_period
25
- ? new index_1.SubscriptionTimePeriod(subscription.current_billing_period)
27
+ ? new index_1.SubscriptionTimePeriodNotification(subscription.current_billing_period)
26
28
  : null;
27
- this.billingCycle = new index_1.TimePeriod(subscription.billing_cycle);
29
+ this.billingCycle = new index_1.TimePeriodNotification(subscription.billing_cycle);
28
30
  this.scheduledChange = subscription.scheduled_change
29
- ? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
31
+ ? new index_1.SubscriptionScheduledChangeNotification(subscription.scheduled_change)
30
32
  : null;
31
- this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
33
+ this.items = subscription.items.map((item) => new index_1.SubscriptionItemNotification(item));
32
34
  this.customData = subscription.custom_data ? subscription.custom_data : null;
33
- this.importMeta = subscription.import_meta ? new index_1.ImportMeta(subscription.import_meta) : null;
35
+ this.importMeta = subscription.import_meta ? new index_1.ImportMetaNotification(subscription.import_meta) : null;
34
36
  }
35
37
  }
36
38
  exports.SubscriptionNotification = SubscriptionNotification;
@@ -0,0 +1,21 @@
1
+ import { type ISubscriptionPriceNotificationResponse } from '../../types';
2
+ import { type ImportMetaNotification, MoneyNotification, PriceQuantityNotification, TimePeriodNotification, UnitPriceOverrideNotification } from '../index';
3
+ import { type CatalogType, type Status, type TaxMode } from '../../../enums';
4
+ import { type CustomData } from '../../../entities';
5
+ export declare class SubscriptionPriceNotification {
6
+ readonly id: string;
7
+ readonly productId: string;
8
+ readonly description: string;
9
+ readonly name: string | null;
10
+ readonly type: CatalogType | null;
11
+ readonly billingCycle: TimePeriodNotification | null;
12
+ readonly trialPeriod: TimePeriodNotification | null;
13
+ readonly taxMode: TaxMode;
14
+ readonly unitPrice: MoneyNotification | null;
15
+ readonly unitPriceOverrides: UnitPriceOverrideNotification[] | null;
16
+ readonly quantity: PriceQuantityNotification | null;
17
+ readonly status: Status | null;
18
+ readonly customData: CustomData | null;
19
+ readonly importMeta: ImportMetaNotification | null;
20
+ constructor(price: ISubscriptionPriceNotificationResponse);
21
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionPriceNotification = void 0;
4
+ const index_1 = require("../index");
5
+ const entities_1 = require("../../../entities");
6
+ class SubscriptionPriceNotification {
7
+ constructor(price) {
8
+ var _a, _b;
9
+ this.id = price.id;
10
+ this.productId = price.product_id;
11
+ this.description = price.description;
12
+ this.type = (_a = price.type) !== null && _a !== void 0 ? _a : null;
13
+ this.name = price.name ? price.name : null;
14
+ this.billingCycle = price.billing_cycle ? new index_1.TimePeriodNotification(price.billing_cycle) : null;
15
+ this.trialPeriod = price.trial_period ? new index_1.TimePeriodNotification(price.trial_period) : null;
16
+ this.taxMode = price.tax_mode;
17
+ this.unitPrice = price.unit_price ? new index_1.MoneyNotification(price.unit_price) : null;
18
+ this.unitPriceOverrides = price.unit_price_overrides
19
+ ? price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverrideNotification(unit_price_override))
20
+ : [];
21
+ this.quantity = price.quantity ? new index_1.PriceQuantityNotification(price.quantity) : null;
22
+ this.status = (_b = price.status) !== null && _b !== void 0 ? _b : null;
23
+ this.customData = price.custom_data ? price.custom_data : null;
24
+ this.importMeta = price.import_meta ? new entities_1.ImportMeta(price.import_meta) : null;
25
+ }
26
+ }
27
+ exports.SubscriptionPriceNotification = SubscriptionPriceNotification;
@@ -0,0 +1,8 @@
1
+ import { type ISubscriptionScheduledChangeNotificationResponse } from '../../types';
2
+ import { type ScheduledChangeAction } from '../../../enums';
3
+ export declare class SubscriptionScheduledChangeNotification {
4
+ readonly action: ScheduledChangeAction;
5
+ readonly effectiveAt: string;
6
+ readonly resumeAt: string | null;
7
+ constructor(subscriptionScheduledChange: ISubscriptionScheduledChangeNotificationResponse);
8
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionScheduledChangeNotification = void 0;
4
+ class SubscriptionScheduledChangeNotification {
5
+ constructor(subscriptionScheduledChange) {
6
+ this.action = subscriptionScheduledChange.action;
7
+ this.effectiveAt = subscriptionScheduledChange.effective_at;
8
+ this.resumeAt = subscriptionScheduledChange.resume_at ? subscriptionScheduledChange.resume_at : null;
9
+ }
10
+ }
11
+ exports.SubscriptionScheduledChangeNotification = SubscriptionScheduledChangeNotification;
@@ -0,0 +1,6 @@
1
+ import { type ISubscriptionTimePeriodNotificationResponse } from '../../types';
2
+ export declare class SubscriptionTimePeriodNotification {
3
+ readonly startsAt: string;
4
+ readonly endsAt: string;
5
+ constructor(subscriptionTimePeriod: ISubscriptionTimePeriodNotificationResponse);
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionTimePeriodNotification = void 0;
4
+ class SubscriptionTimePeriodNotification {
5
+ constructor(subscriptionTimePeriod) {
6
+ this.startsAt = subscriptionTimePeriod.starts_at;
7
+ this.endsAt = subscriptionTimePeriod.ends_at;
8
+ }
9
+ }
10
+ exports.SubscriptionTimePeriodNotification = SubscriptionTimePeriodNotification;
@@ -0,0 +1,6 @@
1
+ export * from './transactions-time-period-notification';
2
+ export * from './transaction-proration-notification';
3
+ export * from './transaction-item-notification';
4
+ export * from './transaction-line-item-notification';
5
+ export * from './transaction-details-notification';
6
+ export * from './transaction-notification';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./transactions-time-period-notification"), exports);
18
+ __exportStar(require("./transaction-proration-notification"), exports);
19
+ __exportStar(require("./transaction-item-notification"), exports);
20
+ __exportStar(require("./transaction-line-item-notification"), exports);
21
+ __exportStar(require("./transaction-details-notification"), exports);
22
+ __exportStar(require("./transaction-notification"), exports);
@@ -0,0 +1,11 @@
1
+ import { type ITransactionDetailsNotificationResponse } from '../../types';
2
+ import { TaxRatesUsedNotification, TransactionTotalsNotification, TransactionTotalsAdjustedNotification, TransactionPayoutTotalsNotification, TransactionPayoutTotalsAdjustedNotification, TransactionLineItemNotification } from '../index';
3
+ export declare class TransactionDetailsNotification {
4
+ readonly taxRatesUsed: TaxRatesUsedNotification[];
5
+ readonly totals: TransactionTotalsNotification | null;
6
+ readonly adjustedTotals: TransactionTotalsAdjustedNotification | null;
7
+ readonly payoutTotals: TransactionPayoutTotalsNotification | null;
8
+ readonly adjustedPayoutTotals: TransactionPayoutTotalsAdjustedNotification | null;
9
+ readonly lineItems: TransactionLineItemNotification[];
10
+ constructor(transactionDetails: ITransactionDetailsNotificationResponse);
11
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionDetailsNotification = void 0;
4
+ const index_1 = require("../index");
5
+ class TransactionDetailsNotification {
6
+ constructor(transactionDetails) {
7
+ this.taxRatesUsed = transactionDetails.tax_rates_used.map((tax_rates_used) => new index_1.TaxRatesUsedNotification(tax_rates_used));
8
+ this.totals = transactionDetails.totals ? new index_1.TransactionTotalsNotification(transactionDetails.totals) : null;
9
+ this.adjustedTotals = transactionDetails.adjusted_totals
10
+ ? new index_1.TransactionTotalsAdjustedNotification(transactionDetails.adjusted_totals)
11
+ : null;
12
+ this.payoutTotals = transactionDetails.payout_totals
13
+ ? new index_1.TransactionPayoutTotalsNotification(transactionDetails.payout_totals)
14
+ : null;
15
+ this.adjustedPayoutTotals = transactionDetails.adjusted_payout_totals
16
+ ? new index_1.TransactionPayoutTotalsAdjustedNotification(transactionDetails.adjusted_payout_totals)
17
+ : null;
18
+ this.lineItems = transactionDetails.line_items.map((line_item) => new index_1.TransactionLineItemNotification(line_item));
19
+ }
20
+ }
21
+ exports.TransactionDetailsNotification = TransactionDetailsNotification;
@@ -0,0 +1,8 @@
1
+ import { type ITransactionItemNotificationResponse } from '../../types';
2
+ import { PriceNotification, TransactionProrationNotification } from '../index';
3
+ export declare class TransactionItemNotification {
4
+ readonly price: PriceNotification | null;
5
+ readonly quantity: number;
6
+ readonly proration: TransactionProrationNotification | null;
7
+ constructor(transactionItem: ITransactionItemNotificationResponse);
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionItemNotification = void 0;
4
+ const index_1 = require("../index");
5
+ class TransactionItemNotification {
6
+ constructor(transactionItem) {
7
+ this.price = transactionItem.price ? new index_1.PriceNotification(transactionItem.price) : null;
8
+ this.quantity = transactionItem.quantity;
9
+ this.proration = transactionItem.proration ? new index_1.TransactionProrationNotification(transactionItem.proration) : null;
10
+ }
11
+ }
12
+ exports.TransactionItemNotification = TransactionItemNotification;
@@ -0,0 +1,13 @@
1
+ import { type ITransactionLineItemNotificationResponse } from '../../types';
2
+ import { TransactionProrationNotification, UnitTotalsNotification, TotalsNotification, ProductNotification } from '../index';
3
+ export declare class TransactionLineItemNotification {
4
+ readonly id: string;
5
+ readonly priceId: string;
6
+ readonly quantity: number;
7
+ readonly proration: TransactionProrationNotification | null;
8
+ readonly taxRate: string;
9
+ readonly unitTotals: UnitTotalsNotification | null;
10
+ readonly totals: TotalsNotification | null;
11
+ readonly product: ProductNotification | null;
12
+ constructor(transactionLineItem: ITransactionLineItemNotificationResponse);
13
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionLineItemNotification = void 0;
4
+ const index_1 = require("../index");
5
+ class TransactionLineItemNotification {
6
+ constructor(transactionLineItem) {
7
+ this.id = transactionLineItem.id;
8
+ this.priceId = transactionLineItem.price_id;
9
+ this.quantity = transactionLineItem.quantity;
10
+ this.proration = transactionLineItem.proration
11
+ ? new index_1.TransactionProrationNotification(transactionLineItem.proration)
12
+ : null;
13
+ this.taxRate = transactionLineItem.tax_rate;
14
+ this.unitTotals = transactionLineItem.unit_totals
15
+ ? new index_1.UnitTotalsNotification(transactionLineItem.unit_totals)
16
+ : null;
17
+ this.totals = transactionLineItem.totals ? new index_1.TotalsNotification(transactionLineItem.totals) : null;
18
+ this.product = transactionLineItem.product ? new index_1.ProductNotification(transactionLineItem.product) : null;
19
+ }
20
+ }
21
+ exports.TransactionLineItemNotification = TransactionLineItemNotification;
@@ -0,0 +1,29 @@
1
+ import { BillingDetailsNotification, TransactionsTimePeriodNotification, TransactionItemNotification, TransactionDetailsNotification, TransactionPaymentAttemptNotification, TransactionCheckoutNotification } from '../index';
2
+ import { type TransactionStatus, type CurrencyCode, type TransactionOrigin, type CollectionMode } from '../../../enums';
3
+ import { type ITransactionNotificationResponse } from '../../types';
4
+ import { type CustomData } from '../../../entities';
5
+ export declare class TransactionNotification {
6
+ readonly id: string;
7
+ readonly status: TransactionStatus;
8
+ readonly customerId: string | null;
9
+ readonly addressId: string | null;
10
+ readonly businessId: string | null;
11
+ readonly customData: CustomData | null;
12
+ readonly currencyCode: CurrencyCode;
13
+ readonly origin: TransactionOrigin;
14
+ readonly subscriptionId: string | null;
15
+ readonly invoiceId: string | null;
16
+ readonly invoiceNumber: string | null;
17
+ readonly collectionMode: CollectionMode;
18
+ readonly discountId: string | null;
19
+ readonly billingDetails: BillingDetailsNotification | null;
20
+ readonly billingPeriod: TransactionsTimePeriodNotification | null;
21
+ readonly items: TransactionItemNotification[];
22
+ readonly details: TransactionDetailsNotification | null;
23
+ readonly payments: TransactionPaymentAttemptNotification[];
24
+ readonly checkout: TransactionCheckoutNotification | null;
25
+ readonly createdAt: string;
26
+ readonly updatedAt: string;
27
+ readonly billedAt: string | null;
28
+ constructor(transaction: ITransactionNotificationResponse);
29
+ }
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionIncludes = void 0;
3
+ exports.TransactionNotification = void 0;
4
4
  const index_1 = require("../index");
5
- class TransactionIncludes {
5
+ class TransactionNotification {
6
6
  constructor(transaction) {
7
- var _a;
8
7
  this.id = transaction.id;
9
8
  this.status = transaction.status;
10
9
  this.customerId = transaction.customer_id ? transaction.customer_id : null;
@@ -18,26 +17,19 @@ class TransactionIncludes {
18
17
  this.invoiceNumber = transaction.invoice_number ? transaction.invoice_number : null;
19
18
  this.collectionMode = transaction.collection_mode;
20
19
  this.discountId = transaction.discount_id ? transaction.discount_id : null;
21
- this.billingDetails = transaction.billing_details ? new index_1.BillingDetails(transaction.billing_details) : null;
22
- this.billingPeriod = transaction.billing_period ? new index_1.TransactionsTimePeriod(transaction.billing_period) : null;
23
- this.items = transaction.items.map((item) => new index_1.TransactionItem(item));
24
- this.details = transaction.details ? new index_1.TransactionDetails(transaction.details) : null;
25
- this.payments = transaction.payments.map((payment) => new index_1.TransactionPaymentAttempt(payment));
26
- this.checkout = transaction.checkout ? new index_1.TransactionCheckout(transaction.checkout) : null;
20
+ this.billingDetails = transaction.billing_details
21
+ ? new index_1.BillingDetailsNotification(transaction.billing_details)
22
+ : null;
23
+ this.billingPeriod = transaction.billing_period
24
+ ? new index_1.TransactionsTimePeriodNotification(transaction.billing_period)
25
+ : null;
26
+ this.items = transaction.items.map((item) => new index_1.TransactionItemNotification(item));
27
+ this.details = transaction.details ? new index_1.TransactionDetailsNotification(transaction.details) : null;
28
+ this.payments = transaction.payments.map((payment) => new index_1.TransactionPaymentAttemptNotification(payment));
29
+ this.checkout = transaction.checkout ? new index_1.TransactionCheckoutNotification(transaction.checkout) : null;
27
30
  this.createdAt = transaction.created_at;
28
31
  this.updatedAt = transaction.updated_at;
29
32
  this.billedAt = transaction.billed_at ? transaction.billed_at : null;
30
- this.address = transaction.address ? new index_1.Address(transaction.address) : null;
31
- this.adjustments = transaction.adjustments
32
- ? (_a = transaction.adjustments) === null || _a === void 0 ? void 0 : _a.map((adjustment) => new index_1.TransactionAdjustment(adjustment))
33
- : null;
34
- this.adjustmentsTotals = transaction.adjustments_totals
35
- ? new index_1.AdjustmentTotals(transaction.adjustments_totals)
36
- : null;
37
- this.business = transaction.business ? new index_1.Business(transaction.business) : null;
38
- this.customer = transaction.customer ? new index_1.Customer(transaction.customer) : null;
39
- this.discount = transaction.discount ? new index_1.Discount(transaction.discount) : null;
40
- this.availablePaymentMethods = transaction.available_payment_methods ? transaction.available_payment_methods : null;
41
33
  }
42
34
  }
43
- exports.TransactionIncludes = TransactionIncludes;
35
+ exports.TransactionNotification = TransactionNotification;
@@ -0,0 +1,7 @@
1
+ import { type ITransactionProrationNotificationResponse } from '../../types';
2
+ import { TransactionsTimePeriodNotification } from '../index';
3
+ export declare class TransactionProrationNotification {
4
+ readonly rate: string;
5
+ readonly billingPeriod: TransactionsTimePeriodNotification | null;
6
+ constructor(transactionProration: ITransactionProrationNotificationResponse);
7
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionProrationNotification = void 0;
4
+ const index_1 = require("../index");
5
+ class TransactionProrationNotification {
6
+ constructor(transactionProration) {
7
+ this.rate = transactionProration.rate;
8
+ this.billingPeriod = transactionProration.billing_period
9
+ ? new index_1.TransactionsTimePeriodNotification(transactionProration.billing_period)
10
+ : null;
11
+ }
12
+ }
13
+ exports.TransactionProrationNotification = TransactionProrationNotification;
@@ -0,0 +1,6 @@
1
+ import { type ITransactionsTimePeriodNotificationResponse } from '../../types';
2
+ export declare class TransactionsTimePeriodNotification {
3
+ readonly startsAt: string;
4
+ readonly endsAt: string;
5
+ constructor(transactionsTimePeriod: ITransactionsTimePeriodNotificationResponse);
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionsTimePeriodNotification = void 0;
4
+ class TransactionsTimePeriodNotification {
5
+ constructor(transactionsTimePeriod) {
6
+ this.startsAt = transactionsTimePeriod.starts_at;
7
+ this.endsAt = transactionsTimePeriod.ends_at;
8
+ }
9
+ }
10
+ exports.TransactionsTimePeriodNotification = TransactionsTimePeriodNotification;
@@ -1,9 +1,10 @@
1
- import { Address } from '../../../entities';
2
- import { type IAddressResponse, type IEventsResponse } from '../../../types';
1
+ import { type IEventsResponse } from '../../../types';
3
2
  import { EventName } from '../../helpers';
4
3
  import { Event } from '../../../entities/events/event';
4
+ import { AddressNotification } from '../../entities';
5
+ import { type IAddressNotificationResponse } from '../../types';
5
6
  export declare class AddressCreatedEvent extends Event {
6
7
  readonly eventType = EventName.AddressCreated;
7
- readonly data: Address;
8
- constructor(response: IEventsResponse<IAddressResponse>);
8
+ readonly data: AddressNotification;
9
+ constructor(response: IEventsResponse<IAddressNotificationResponse>);
9
10
  }
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddressCreatedEvent = void 0;
4
- const entities_1 = require("../../../entities");
5
4
  const helpers_1 = require("../../helpers");
6
5
  const event_1 = require("../../../entities/events/event");
6
+ const entities_1 = require("../../entities");
7
7
  class AddressCreatedEvent extends event_1.Event {
8
8
  constructor(response) {
9
9
  super(response);
10
10
  this.eventType = helpers_1.EventName.AddressCreated;
11
- this.data = new entities_1.Address(response.data);
11
+ this.data = new entities_1.AddressNotification(response.data);
12
12
  }
13
13
  }
14
14
  exports.AddressCreatedEvent = AddressCreatedEvent;
@@ -1,9 +1,10 @@
1
1
  import { Event } from '../../../entities/events/event';
2
- import { Address } from '../../../entities';
3
- import { type IAddressResponse, type IEventsResponse } from '../../../types';
2
+ import { AddressNotification } from '../../entities';
3
+ import { type IEventsResponse } from '../../../types';
4
4
  import { EventName } from '../../helpers';
5
+ import { type IAddressNotificationResponse } from '../../types';
5
6
  export declare class AddressImportedEvent extends Event {
6
7
  readonly eventType = EventName.AddressImported;
7
- readonly data: Address;
8
- constructor(response: IEventsResponse<IAddressResponse>);
8
+ readonly data: AddressNotification;
9
+ constructor(response: IEventsResponse<IAddressNotificationResponse>);
9
10
  }
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddressImportedEvent = void 0;
4
4
  const event_1 = require("../../../entities/events/event");
5
- const entities_1 = require("../../../entities");
5
+ const entities_1 = require("../../entities");
6
6
  const helpers_1 = require("../../helpers");
7
7
  class AddressImportedEvent extends event_1.Event {
8
8
  constructor(response) {
9
9
  super(response);
10
10
  this.eventType = helpers_1.EventName.AddressImported;
11
- this.data = new entities_1.Address(response.data);
11
+ this.data = new entities_1.AddressNotification(response.data);
12
12
  }
13
13
  }
14
14
  exports.AddressImportedEvent = AddressImportedEvent;
@@ -1,9 +1,10 @@
1
1
  import { Event } from '../../../entities/events/event';
2
- import { Address } from '../../../entities';
3
- import { type IAddressResponse, type IEventsResponse } from '../../../types';
2
+ import { type IEventsResponse } from '../../../types';
4
3
  import { EventName } from '../../helpers';
4
+ import { AddressNotification } from '../../entities';
5
+ import { type IAddressNotificationResponse } from '../../types';
5
6
  export declare class AddressUpdatedEvent extends Event {
6
7
  readonly eventType = EventName.AddressUpdated;
7
- readonly data: Address;
8
- constructor(response: IEventsResponse<IAddressResponse>);
8
+ readonly data: AddressNotification;
9
+ constructor(response: IEventsResponse<IAddressNotificationResponse>);
9
10
  }
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddressUpdatedEvent = void 0;
4
4
  const event_1 = require("../../../entities/events/event");
5
- const entities_1 = require("../../../entities");
6
5
  const helpers_1 = require("../../helpers");
6
+ const entities_1 = require("../../entities");
7
7
  class AddressUpdatedEvent extends event_1.Event {
8
8
  constructor(response) {
9
9
  super(response);
10
10
  this.eventType = helpers_1.EventName.AddressUpdated;
11
- this.data = new entities_1.Address(response.data);
11
+ this.data = new entities_1.AddressNotification(response.data);
12
12
  }
13
13
  }
14
14
  exports.AddressUpdatedEvent = AddressUpdatedEvent;
@@ -1,9 +1,10 @@
1
1
  import { Event } from '../../../entities/events/event';
2
- import { Adjustment } from '../../../entities';
3
- import { type IAdjustmentResponse, type IEventsResponse } from '../../../types';
2
+ import { AdjustmentNotification } from '../../entities';
3
+ import { type IEventsResponse } from '../../../types';
4
4
  import { EventName } from '../../helpers';
5
+ import { type IAdjustmentNotificationResponse } from '../../types';
5
6
  export declare class AdjustmentCreatedEvent extends Event {
6
7
  readonly eventType = EventName.AdjustmentCreated;
7
- readonly data: Adjustment;
8
- constructor(response: IEventsResponse<IAdjustmentResponse>);
8
+ readonly data: AdjustmentNotification;
9
+ constructor(response: IEventsResponse<IAdjustmentNotificationResponse>);
9
10
  }
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdjustmentCreatedEvent = void 0;
4
4
  const event_1 = require("../../../entities/events/event");
5
- const entities_1 = require("../../../entities");
5
+ const entities_1 = require("../../entities");
6
6
  const helpers_1 = require("../../helpers");
7
7
  class AdjustmentCreatedEvent extends event_1.Event {
8
8
  constructor(response) {
9
9
  super(response);
10
10
  this.eventType = helpers_1.EventName.AdjustmentCreated;
11
- this.data = new entities_1.Adjustment(response.data);
11
+ this.data = new entities_1.AdjustmentNotification(response.data);
12
12
  }
13
13
  }
14
14
  exports.AdjustmentCreatedEvent = AdjustmentCreatedEvent;
@@ -1,9 +1,10 @@
1
1
  import { Event } from '../../../entities/events/event';
2
- import { Adjustment } from '../../../entities';
3
- import { type IAdjustmentResponse, type IEventsResponse } from '../../../types';
2
+ import { AdjustmentNotification } from '../../entities';
3
+ import { type IEventsResponse } from '../../../types';
4
4
  import { EventName } from '../../helpers';
5
+ import { type IAdjustmentNotificationResponse } from '../../types';
5
6
  export declare class AdjustmentUpdatedEvent extends Event {
6
7
  readonly eventType = EventName.AdjustmentUpdated;
7
- readonly data: Adjustment;
8
- constructor(response: IEventsResponse<IAdjustmentResponse>);
8
+ readonly data: AdjustmentNotification;
9
+ constructor(response: IEventsResponse<IAdjustmentNotificationResponse>);
9
10
  }