@commercelayer/sdk 4.48.0 → 4.49.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 (547) hide show
  1. package/lib/cjs/api.d.ts +1 -126
  2. package/lib/cjs/api.js +1 -394
  3. package/lib/cjs/client.d.ts +1 -31
  4. package/lib/cjs/client.js +1 -123
  5. package/lib/cjs/commercelayer.d.ts +1 -152
  6. package/lib/cjs/commercelayer.js +1 -243
  7. package/lib/cjs/common.d.ts +1 -4
  8. package/lib/cjs/common.js +1 -14
  9. package/lib/cjs/config.d.ts +1 -11
  10. package/lib/cjs/config.js +1 -13
  11. package/lib/cjs/debug.d.ts +1 -3
  12. package/lib/cjs/debug.js +1 -42
  13. package/lib/cjs/error.d.ts +1 -28
  14. package/lib/cjs/error.js +1 -43
  15. package/lib/cjs/index.d.ts +1 -7
  16. package/lib/cjs/index.js +1 -29
  17. package/lib/cjs/interceptor.d.ts +1 -21
  18. package/lib/cjs/interceptor.js +1 -2
  19. package/lib/cjs/jsonapi.d.ts +1 -5
  20. package/lib/cjs/jsonapi.js +1 -82
  21. package/lib/cjs/model.d.ts +1 -124
  22. package/lib/cjs/model.js +1 -3
  23. package/lib/cjs/query.d.ts +1 -23
  24. package/lib/cjs/query.js +1 -51
  25. package/lib/cjs/resource.d.ts +1 -75
  26. package/lib/cjs/resource.js +1 -145
  27. package/lib/cjs/resources/addresses.d.ts +1 -102
  28. package/lib/cjs/resources/addresses.js +1 -49
  29. package/lib/cjs/resources/adjustments.d.ts +1 -41
  30. package/lib/cjs/resources/adjustments.js +1 -37
  31. package/lib/cjs/resources/adyen_gateways.d.ts +1 -59
  32. package/lib/cjs/resources/adyen_gateways.js +1 -45
  33. package/lib/cjs/resources/adyen_payments.d.ts +1 -49
  34. package/lib/cjs/resources/adyen_payments.js +1 -45
  35. package/lib/cjs/resources/application.d.ts +1 -21
  36. package/lib/cjs/resources/application.js +1 -21
  37. package/lib/cjs/resources/attachments.d.ts +1 -156
  38. package/lib/cjs/resources/attachments.js +1 -33
  39. package/lib/cjs/resources/authorizations.d.ts +1 -66
  40. package/lib/cjs/resources/authorizations.js +1 -51
  41. package/lib/cjs/resources/avalara_accounts.d.ts +1 -58
  42. package/lib/cjs/resources/avalara_accounts.js +1 -49
  43. package/lib/cjs/resources/axerve_gateways.d.ts +1 -47
  44. package/lib/cjs/resources/axerve_gateways.js +1 -45
  45. package/lib/cjs/resources/axerve_payments.d.ts +1 -52
  46. package/lib/cjs/resources/axerve_payments.js +1 -45
  47. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -38
  48. package/lib/cjs/resources/billing_info_validation_rules.js +1 -45
  49. package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
  50. package/lib/cjs/resources/bing_geocoders.js +1 -41
  51. package/lib/cjs/resources/braintree_gateways.d.ts +1 -59
  52. package/lib/cjs/resources/braintree_gateways.js +1 -45
  53. package/lib/cjs/resources/braintree_payments.d.ts +1 -51
  54. package/lib/cjs/resources/braintree_payments.js +1 -45
  55. package/lib/cjs/resources/bundles.d.ts +1 -90
  56. package/lib/cjs/resources/bundles.js +1 -61
  57. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -134
  58. package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -81
  59. package/lib/cjs/resources/captures.d.ts +1 -57
  60. package/lib/cjs/resources/captures.js +1 -51
  61. package/lib/cjs/resources/carrier_accounts.d.ts +1 -29
  62. package/lib/cjs/resources/carrier_accounts.js +1 -36
  63. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -48
  64. package/lib/cjs/resources/checkout_com_gateways.js +1 -45
  65. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -62
  66. package/lib/cjs/resources/checkout_com_payments.js +1 -45
  67. package/lib/cjs/resources/cleanups.d.ts +1 -39
  68. package/lib/cjs/resources/cleanups.js +1 -38
  69. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -66
  70. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -41
  71. package/lib/cjs/resources/coupon_recipients.d.ts +1 -47
  72. package/lib/cjs/resources/coupon_recipients.js +1 -45
  73. package/lib/cjs/resources/coupons.d.ts +1 -70
  74. package/lib/cjs/resources/coupons.js +1 -53
  75. package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -61
  76. package/lib/cjs/resources/custom_promotion_rules.js +1 -37
  77. package/lib/cjs/resources/customer_addresses.d.ts +1 -49
  78. package/lib/cjs/resources/customer_addresses.js +1 -49
  79. package/lib/cjs/resources/customer_groups.d.ts +1 -39
  80. package/lib/cjs/resources/customer_groups.js +1 -49
  81. package/lib/cjs/resources/customer_password_resets.d.ts +1 -36
  82. package/lib/cjs/resources/customer_password_resets.js +1 -41
  83. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -85
  84. package/lib/cjs/resources/customer_payment_sources.js +1 -45
  85. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -34
  86. package/lib/cjs/resources/customer_subscriptions.js +1 -45
  87. package/lib/cjs/resources/customers.d.ts +1 -75
  88. package/lib/cjs/resources/customers.js +1 -77
  89. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -54
  90. package/lib/cjs/resources/delivery_lead_times.js +1 -49
  91. package/lib/cjs/resources/event_callbacks.d.ts +1 -24
  92. package/lib/cjs/resources/event_callbacks.js +1 -28
  93. package/lib/cjs/resources/events.d.ts +1 -24
  94. package/lib/cjs/resources/events.js +1 -32
  95. package/lib/cjs/resources/exports.d.ts +1 -40
  96. package/lib/cjs/resources/exports.js +1 -34
  97. package/lib/cjs/resources/external_gateways.d.ts +1 -55
  98. package/lib/cjs/resources/external_gateways.js +1 -45
  99. package/lib/cjs/resources/external_payments.d.ts +1 -47
  100. package/lib/cjs/resources/external_payments.js +1 -49
  101. package/lib/cjs/resources/external_promotions.d.ts +1 -132
  102. package/lib/cjs/resources/external_promotions.js +1 -81
  103. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -43
  104. package/lib/cjs/resources/external_tax_calculators.js +1 -45
  105. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -130
  106. package/lib/cjs/resources/fixed_amount_promotions.js +1 -81
  107. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -130
  108. package/lib/cjs/resources/fixed_price_promotions.js +1 -81
  109. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -128
  110. package/lib/cjs/resources/free_gift_promotions.js +1 -81
  111. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -122
  112. package/lib/cjs/resources/free_shipping_promotions.js +1 -77
  113. package/lib/cjs/resources/geocoders.d.ts +1 -24
  114. package/lib/cjs/resources/geocoders.js +1 -32
  115. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -47
  116. package/lib/cjs/resources/gift_card_recipients.js +1 -45
  117. package/lib/cjs/resources/gift_cards.d.ts +1 -99
  118. package/lib/cjs/resources/gift_cards.js +1 -57
  119. package/lib/cjs/resources/google_geocoders.d.ts +1 -35
  120. package/lib/cjs/resources/google_geocoders.js +1 -41
  121. package/lib/cjs/resources/imports.d.ts +1 -43
  122. package/lib/cjs/resources/imports.js +1 -34
  123. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -65
  124. package/lib/cjs/resources/in_stock_subscriptions.js +1 -53
  125. package/lib/cjs/resources/inventory_models.d.ts +1 -54
  126. package/lib/cjs/resources/inventory_models.js +1 -49
  127. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -46
  128. package/lib/cjs/resources/inventory_return_locations.js +1 -45
  129. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -49
  130. package/lib/cjs/resources/inventory_stock_locations.js +1 -45
  131. package/lib/cjs/resources/klarna_gateways.d.ts +1 -47
  132. package/lib/cjs/resources/klarna_gateways.js +1 -45
  133. package/lib/cjs/resources/klarna_payments.d.ts +1 -46
  134. package/lib/cjs/resources/klarna_payments.js +1 -45
  135. package/lib/cjs/resources/line_item_options.d.ts +1 -68
  136. package/lib/cjs/resources/line_item_options.js +1 -49
  137. package/lib/cjs/resources/line_items.d.ts +1 -166
  138. package/lib/cjs/resources/line_items.js +1 -65
  139. package/lib/cjs/resources/manual_gateways.d.ts +1 -33
  140. package/lib/cjs/resources/manual_gateways.js +1 -41
  141. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -44
  142. package/lib/cjs/resources/manual_tax_calculators.js +1 -49
  143. package/lib/cjs/resources/markets.d.ts +1 -104
  144. package/lib/cjs/resources/markets.js +1 -65
  145. package/lib/cjs/resources/merchants.d.ts +1 -41
  146. package/lib/cjs/resources/merchants.js +1 -45
  147. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -66
  148. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -37
  149. package/lib/cjs/resources/order_copies.d.ts +1 -50
  150. package/lib/cjs/resources/order_copies.js +1 -49
  151. package/lib/cjs/resources/order_factories.d.ts +1 -33
  152. package/lib/cjs/resources/order_factories.js +1 -36
  153. package/lib/cjs/resources/order_subscription_items.d.ts +1 -71
  154. package/lib/cjs/resources/order_subscription_items.js +1 -41
  155. package/lib/cjs/resources/order_subscriptions.d.ts +1 -94
  156. package/lib/cjs/resources/order_subscriptions.js +1 -77
  157. package/lib/cjs/resources/order_validation_rules.d.ts +1 -26
  158. package/lib/cjs/resources/order_validation_rules.js +1 -36
  159. package/lib/cjs/resources/orders.d.ts +1 -359
  160. package/lib/cjs/resources/orders.js +1 -157
  161. package/lib/cjs/resources/organization.d.ts +1 -33
  162. package/lib/cjs/resources/organization.js +1 -21
  163. package/lib/cjs/resources/packages.d.ts +1 -59
  164. package/lib/cjs/resources/packages.js +1 -49
  165. package/lib/cjs/resources/parcel_line_items.d.ts +1 -46
  166. package/lib/cjs/resources/parcel_line_items.js +1 -45
  167. package/lib/cjs/resources/parcels.d.ts +1 -125
  168. package/lib/cjs/resources/parcels.js +1 -57
  169. package/lib/cjs/resources/payment_gateways.d.ts +1 -24
  170. package/lib/cjs/resources/payment_gateways.js +1 -32
  171. package/lib/cjs/resources/payment_methods.d.ts +1 -80
  172. package/lib/cjs/resources/payment_methods.js +1 -49
  173. package/lib/cjs/resources/payment_options.d.ts +1 -43
  174. package/lib/cjs/resources/payment_options.js +1 -41
  175. package/lib/cjs/resources/paypal_gateways.d.ts +1 -40
  176. package/lib/cjs/resources/paypal_gateways.js +1 -45
  177. package/lib/cjs/resources/paypal_payments.d.ts +1 -52
  178. package/lib/cjs/resources/paypal_payments.js +1 -45
  179. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -128
  180. package/lib/cjs/resources/percentage_discount_promotions.js +1 -81
  181. package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -52
  182. package/lib/cjs/resources/price_frequency_tiers.js +1 -49
  183. package/lib/cjs/resources/price_lists.d.ts +1 -45
  184. package/lib/cjs/resources/price_lists.js +1 -45
  185. package/lib/cjs/resources/price_tiers.d.ts +1 -31
  186. package/lib/cjs/resources/price_tiers.js +1 -36
  187. package/lib/cjs/resources/price_volume_tiers.d.ts +1 -52
  188. package/lib/cjs/resources/price_volume_tiers.js +1 -49
  189. package/lib/cjs/resources/prices.d.ts +1 -83
  190. package/lib/cjs/resources/prices.js +1 -73
  191. package/lib/cjs/resources/promotion_rules.d.ts +1 -28
  192. package/lib/cjs/resources/promotion_rules.js +1 -28
  193. package/lib/cjs/resources/promotions.d.ts +1 -62
  194. package/lib/cjs/resources/promotions.js +1 -68
  195. package/lib/cjs/resources/recurring_order_copies.d.ts +1 -52
  196. package/lib/cjs/resources/recurring_order_copies.js +1 -49
  197. package/lib/cjs/resources/refunds.d.ts +1 -43
  198. package/lib/cjs/resources/refunds.js +1 -44
  199. package/lib/cjs/resources/reserved_stocks.d.ts +1 -27
  200. package/lib/cjs/resources/reserved_stocks.js +1 -36
  201. package/lib/cjs/resources/resource_errors.d.ts +1 -22
  202. package/lib/cjs/resources/resource_errors.js +1 -24
  203. package/lib/cjs/resources/return_line_items.d.ts +1 -50
  204. package/lib/cjs/resources/return_line_items.js +1 -41
  205. package/lib/cjs/resources/returns.d.ts +1 -86
  206. package/lib/cjs/resources/returns.js +1 -73
  207. package/lib/cjs/resources/satispay_gateways.d.ts +1 -45
  208. package/lib/cjs/resources/satispay_gateways.js +1 -45
  209. package/lib/cjs/resources/satispay_payments.d.ts +1 -48
  210. package/lib/cjs/resources/satispay_payments.js +1 -45
  211. package/lib/cjs/resources/shipments.d.ts +1 -139
  212. package/lib/cjs/resources/shipments.js +1 -105
  213. package/lib/cjs/resources/shipping_categories.d.ts +1 -39
  214. package/lib/cjs/resources/shipping_categories.js +1 -45
  215. package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -31
  216. package/lib/cjs/resources/shipping_method_tiers.js +1 -36
  217. package/lib/cjs/resources/shipping_methods.d.ts +1 -121
  218. package/lib/cjs/resources/shipping_methods.js +1 -69
  219. package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -49
  220. package/lib/cjs/resources/shipping_weight_tiers.js +1 -45
  221. package/lib/cjs/resources/shipping_zones.d.ts +1 -51
  222. package/lib/cjs/resources/shipping_zones.js +1 -41
  223. package/lib/cjs/resources/sku_list_items.d.ts +1 -50
  224. package/lib/cjs/resources/sku_list_items.js +1 -45
  225. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -75
  226. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -45
  227. package/lib/cjs/resources/sku_lists.d.ts +1 -63
  228. package/lib/cjs/resources/sku_lists.js +1 -57
  229. package/lib/cjs/resources/sku_options.d.ts +1 -70
  230. package/lib/cjs/resources/sku_options.js +1 -53
  231. package/lib/cjs/resources/skus.d.ts +1 -95
  232. package/lib/cjs/resources/skus.js +1 -73
  233. package/lib/cjs/resources/stock_items.d.ts +1 -59
  234. package/lib/cjs/resources/stock_items.js +1 -57
  235. package/lib/cjs/resources/stock_line_items.d.ts +1 -69
  236. package/lib/cjs/resources/stock_line_items.js +1 -53
  237. package/lib/cjs/resources/stock_locations.d.ts +1 -63
  238. package/lib/cjs/resources/stock_locations.js +1 -61
  239. package/lib/cjs/resources/stock_reservations.d.ts +1 -49
  240. package/lib/cjs/resources/stock_reservations.js +1 -53
  241. package/lib/cjs/resources/stock_transfers.d.ts +1 -79
  242. package/lib/cjs/resources/stock_transfers.js +1 -61
  243. package/lib/cjs/resources/stripe_gateways.d.ts +1 -44
  244. package/lib/cjs/resources/stripe_gateways.js +1 -45
  245. package/lib/cjs/resources/stripe_payments.d.ts +1 -56
  246. package/lib/cjs/resources/stripe_payments.js +1 -45
  247. package/lib/cjs/resources/subscription_models.d.ts +1 -48
  248. package/lib/cjs/resources/subscription_models.js +1 -45
  249. package/lib/cjs/resources/tags.d.ts +1 -27
  250. package/lib/cjs/resources/tags.js +1 -33
  251. package/lib/cjs/resources/tax_calculators.d.ts +1 -27
  252. package/lib/cjs/resources/tax_calculators.js +1 -36
  253. package/lib/cjs/resources/tax_categories.d.ts +1 -62
  254. package/lib/cjs/resources/tax_categories.js +1 -45
  255. package/lib/cjs/resources/tax_rules.d.ts +1 -72
  256. package/lib/cjs/resources/tax_rules.js +1 -41
  257. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -46
  258. package/lib/cjs/resources/taxjar_accounts.js +1 -49
  259. package/lib/cjs/resources/transactions.d.ts +1 -40
  260. package/lib/cjs/resources/transactions.js +1 -40
  261. package/lib/cjs/resources/versions.d.ts +1 -22
  262. package/lib/cjs/resources/versions.js +1 -24
  263. package/lib/cjs/resources/voids.d.ts +1 -43
  264. package/lib/cjs/resources/voids.js +1 -44
  265. package/lib/cjs/resources/webhooks.d.ts +1 -51
  266. package/lib/cjs/resources/webhooks.js +1 -41
  267. package/lib/cjs/resources/wire_transfers.d.ts +1 -36
  268. package/lib/cjs/resources/wire_transfers.js +1 -41
  269. package/lib/cjs/static.d.ts +1 -9
  270. package/lib/cjs/static.js +1 -45
  271. package/lib/cjs/util.d.ts +1 -6
  272. package/lib/cjs/util.js +1 -15
  273. package/lib/esm/api.d.ts +1 -126
  274. package/lib/esm/api.js +1 -265
  275. package/lib/esm/client.d.ts +1 -31
  276. package/lib/esm/client.js +1 -118
  277. package/lib/esm/commercelayer.d.ts +1 -152
  278. package/lib/esm/commercelayer.js +1 -214
  279. package/lib/esm/common.d.ts +1 -4
  280. package/lib/esm/common.js +1 -10
  281. package/lib/esm/config.d.ts +1 -11
  282. package/lib/esm/config.js +1 -11
  283. package/lib/esm/debug.d.ts +1 -3
  284. package/lib/esm/debug.js +1 -40
  285. package/lib/esm/error.d.ts +1 -28
  286. package/lib/esm/error.js +1 -38
  287. package/lib/esm/index.d.ts +1 -7
  288. package/lib/esm/index.js +1 -6
  289. package/lib/esm/interceptor.d.ts +1 -21
  290. package/lib/esm/interceptor.js +1 -1
  291. package/lib/esm/jsonapi.d.ts +1 -5
  292. package/lib/esm/jsonapi.js +1 -75
  293. package/lib/esm/model.d.ts +1 -124
  294. package/lib/esm/model.js +1 -2
  295. package/lib/esm/query.d.ts +1 -23
  296. package/lib/esm/query.js +1 -45
  297. package/lib/esm/resource.d.ts +1 -75
  298. package/lib/esm/resource.js +1 -139
  299. package/lib/esm/resources/addresses.d.ts +1 -102
  300. package/lib/esm/resources/addresses.js +1 -47
  301. package/lib/esm/resources/adjustments.d.ts +1 -41
  302. package/lib/esm/resources/adjustments.js +1 -35
  303. package/lib/esm/resources/adyen_gateways.d.ts +1 -59
  304. package/lib/esm/resources/adyen_gateways.js +1 -43
  305. package/lib/esm/resources/adyen_payments.d.ts +1 -49
  306. package/lib/esm/resources/adyen_payments.js +1 -43
  307. package/lib/esm/resources/application.d.ts +1 -21
  308. package/lib/esm/resources/application.js +1 -19
  309. package/lib/esm/resources/attachments.d.ts +1 -156
  310. package/lib/esm/resources/attachments.js +1 -31
  311. package/lib/esm/resources/authorizations.d.ts +1 -66
  312. package/lib/esm/resources/authorizations.js +1 -49
  313. package/lib/esm/resources/avalara_accounts.d.ts +1 -58
  314. package/lib/esm/resources/avalara_accounts.js +1 -47
  315. package/lib/esm/resources/axerve_gateways.d.ts +1 -47
  316. package/lib/esm/resources/axerve_gateways.js +1 -43
  317. package/lib/esm/resources/axerve_payments.d.ts +1 -52
  318. package/lib/esm/resources/axerve_payments.js +1 -43
  319. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -38
  320. package/lib/esm/resources/billing_info_validation_rules.js +1 -43
  321. package/lib/esm/resources/bing_geocoders.d.ts +1 -35
  322. package/lib/esm/resources/bing_geocoders.js +1 -39
  323. package/lib/esm/resources/braintree_gateways.d.ts +1 -59
  324. package/lib/esm/resources/braintree_gateways.js +1 -43
  325. package/lib/esm/resources/braintree_payments.d.ts +1 -51
  326. package/lib/esm/resources/braintree_payments.js +1 -43
  327. package/lib/esm/resources/bundles.d.ts +1 -90
  328. package/lib/esm/resources/bundles.js +1 -59
  329. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -134
  330. package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -79
  331. package/lib/esm/resources/captures.d.ts +1 -57
  332. package/lib/esm/resources/captures.js +1 -49
  333. package/lib/esm/resources/carrier_accounts.d.ts +1 -29
  334. package/lib/esm/resources/carrier_accounts.js +1 -34
  335. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -48
  336. package/lib/esm/resources/checkout_com_gateways.js +1 -43
  337. package/lib/esm/resources/checkout_com_payments.d.ts +1 -62
  338. package/lib/esm/resources/checkout_com_payments.js +1 -43
  339. package/lib/esm/resources/cleanups.d.ts +1 -39
  340. package/lib/esm/resources/cleanups.js +1 -36
  341. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -66
  342. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -39
  343. package/lib/esm/resources/coupon_recipients.d.ts +1 -47
  344. package/lib/esm/resources/coupon_recipients.js +1 -43
  345. package/lib/esm/resources/coupons.d.ts +1 -70
  346. package/lib/esm/resources/coupons.js +1 -51
  347. package/lib/esm/resources/custom_promotion_rules.d.ts +1 -61
  348. package/lib/esm/resources/custom_promotion_rules.js +1 -35
  349. package/lib/esm/resources/customer_addresses.d.ts +1 -49
  350. package/lib/esm/resources/customer_addresses.js +1 -47
  351. package/lib/esm/resources/customer_groups.d.ts +1 -39
  352. package/lib/esm/resources/customer_groups.js +1 -47
  353. package/lib/esm/resources/customer_password_resets.d.ts +1 -36
  354. package/lib/esm/resources/customer_password_resets.js +1 -39
  355. package/lib/esm/resources/customer_payment_sources.d.ts +1 -85
  356. package/lib/esm/resources/customer_payment_sources.js +1 -43
  357. package/lib/esm/resources/customer_subscriptions.d.ts +1 -34
  358. package/lib/esm/resources/customer_subscriptions.js +1 -43
  359. package/lib/esm/resources/customers.d.ts +1 -75
  360. package/lib/esm/resources/customers.js +1 -75
  361. package/lib/esm/resources/delivery_lead_times.d.ts +1 -54
  362. package/lib/esm/resources/delivery_lead_times.js +1 -47
  363. package/lib/esm/resources/event_callbacks.d.ts +1 -24
  364. package/lib/esm/resources/event_callbacks.js +1 -26
  365. package/lib/esm/resources/events.d.ts +1 -24
  366. package/lib/esm/resources/events.js +1 -30
  367. package/lib/esm/resources/exports.d.ts +1 -40
  368. package/lib/esm/resources/exports.js +1 -32
  369. package/lib/esm/resources/external_gateways.d.ts +1 -55
  370. package/lib/esm/resources/external_gateways.js +1 -43
  371. package/lib/esm/resources/external_payments.d.ts +1 -47
  372. package/lib/esm/resources/external_payments.js +1 -47
  373. package/lib/esm/resources/external_promotions.d.ts +1 -132
  374. package/lib/esm/resources/external_promotions.js +1 -79
  375. package/lib/esm/resources/external_tax_calculators.d.ts +1 -43
  376. package/lib/esm/resources/external_tax_calculators.js +1 -43
  377. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -130
  378. package/lib/esm/resources/fixed_amount_promotions.js +1 -79
  379. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -130
  380. package/lib/esm/resources/fixed_price_promotions.js +1 -79
  381. package/lib/esm/resources/free_gift_promotions.d.ts +1 -128
  382. package/lib/esm/resources/free_gift_promotions.js +1 -79
  383. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -122
  384. package/lib/esm/resources/free_shipping_promotions.js +1 -75
  385. package/lib/esm/resources/geocoders.d.ts +1 -24
  386. package/lib/esm/resources/geocoders.js +1 -30
  387. package/lib/esm/resources/gift_card_recipients.d.ts +1 -47
  388. package/lib/esm/resources/gift_card_recipients.js +1 -43
  389. package/lib/esm/resources/gift_cards.d.ts +1 -99
  390. package/lib/esm/resources/gift_cards.js +1 -55
  391. package/lib/esm/resources/google_geocoders.d.ts +1 -35
  392. package/lib/esm/resources/google_geocoders.js +1 -39
  393. package/lib/esm/resources/imports.d.ts +1 -43
  394. package/lib/esm/resources/imports.js +1 -32
  395. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -65
  396. package/lib/esm/resources/in_stock_subscriptions.js +1 -51
  397. package/lib/esm/resources/inventory_models.d.ts +1 -54
  398. package/lib/esm/resources/inventory_models.js +1 -47
  399. package/lib/esm/resources/inventory_return_locations.d.ts +1 -46
  400. package/lib/esm/resources/inventory_return_locations.js +1 -43
  401. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -49
  402. package/lib/esm/resources/inventory_stock_locations.js +1 -43
  403. package/lib/esm/resources/klarna_gateways.d.ts +1 -47
  404. package/lib/esm/resources/klarna_gateways.js +1 -43
  405. package/lib/esm/resources/klarna_payments.d.ts +1 -46
  406. package/lib/esm/resources/klarna_payments.js +1 -43
  407. package/lib/esm/resources/line_item_options.d.ts +1 -68
  408. package/lib/esm/resources/line_item_options.js +1 -47
  409. package/lib/esm/resources/line_items.d.ts +1 -166
  410. package/lib/esm/resources/line_items.js +1 -63
  411. package/lib/esm/resources/manual_gateways.d.ts +1 -33
  412. package/lib/esm/resources/manual_gateways.js +1 -39
  413. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -44
  414. package/lib/esm/resources/manual_tax_calculators.js +1 -47
  415. package/lib/esm/resources/markets.d.ts +1 -104
  416. package/lib/esm/resources/markets.js +1 -63
  417. package/lib/esm/resources/merchants.d.ts +1 -41
  418. package/lib/esm/resources/merchants.js +1 -43
  419. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -66
  420. package/lib/esm/resources/order_amount_promotion_rules.js +1 -35
  421. package/lib/esm/resources/order_copies.d.ts +1 -50
  422. package/lib/esm/resources/order_copies.js +1 -47
  423. package/lib/esm/resources/order_factories.d.ts +1 -33
  424. package/lib/esm/resources/order_factories.js +1 -34
  425. package/lib/esm/resources/order_subscription_items.d.ts +1 -71
  426. package/lib/esm/resources/order_subscription_items.js +1 -39
  427. package/lib/esm/resources/order_subscriptions.d.ts +1 -94
  428. package/lib/esm/resources/order_subscriptions.js +1 -75
  429. package/lib/esm/resources/order_validation_rules.d.ts +1 -26
  430. package/lib/esm/resources/order_validation_rules.js +1 -34
  431. package/lib/esm/resources/orders.d.ts +1 -359
  432. package/lib/esm/resources/orders.js +1 -155
  433. package/lib/esm/resources/organization.d.ts +1 -33
  434. package/lib/esm/resources/organization.js +1 -19
  435. package/lib/esm/resources/packages.d.ts +1 -59
  436. package/lib/esm/resources/packages.js +1 -47
  437. package/lib/esm/resources/parcel_line_items.d.ts +1 -46
  438. package/lib/esm/resources/parcel_line_items.js +1 -43
  439. package/lib/esm/resources/parcels.d.ts +1 -125
  440. package/lib/esm/resources/parcels.js +1 -55
  441. package/lib/esm/resources/payment_gateways.d.ts +1 -24
  442. package/lib/esm/resources/payment_gateways.js +1 -30
  443. package/lib/esm/resources/payment_methods.d.ts +1 -80
  444. package/lib/esm/resources/payment_methods.js +1 -47
  445. package/lib/esm/resources/payment_options.d.ts +1 -43
  446. package/lib/esm/resources/payment_options.js +1 -39
  447. package/lib/esm/resources/paypal_gateways.d.ts +1 -40
  448. package/lib/esm/resources/paypal_gateways.js +1 -43
  449. package/lib/esm/resources/paypal_payments.d.ts +1 -52
  450. package/lib/esm/resources/paypal_payments.js +1 -43
  451. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -128
  452. package/lib/esm/resources/percentage_discount_promotions.js +1 -79
  453. package/lib/esm/resources/price_frequency_tiers.d.ts +1 -52
  454. package/lib/esm/resources/price_frequency_tiers.js +1 -47
  455. package/lib/esm/resources/price_lists.d.ts +1 -45
  456. package/lib/esm/resources/price_lists.js +1 -43
  457. package/lib/esm/resources/price_tiers.d.ts +1 -31
  458. package/lib/esm/resources/price_tiers.js +1 -34
  459. package/lib/esm/resources/price_volume_tiers.d.ts +1 -52
  460. package/lib/esm/resources/price_volume_tiers.js +1 -47
  461. package/lib/esm/resources/prices.d.ts +1 -83
  462. package/lib/esm/resources/prices.js +1 -71
  463. package/lib/esm/resources/promotion_rules.d.ts +1 -28
  464. package/lib/esm/resources/promotion_rules.js +1 -26
  465. package/lib/esm/resources/promotions.d.ts +1 -62
  466. package/lib/esm/resources/promotions.js +1 -66
  467. package/lib/esm/resources/recurring_order_copies.d.ts +1 -52
  468. package/lib/esm/resources/recurring_order_copies.js +1 -47
  469. package/lib/esm/resources/refunds.d.ts +1 -43
  470. package/lib/esm/resources/refunds.js +1 -42
  471. package/lib/esm/resources/reserved_stocks.d.ts +1 -27
  472. package/lib/esm/resources/reserved_stocks.js +1 -34
  473. package/lib/esm/resources/resource_errors.d.ts +1 -22
  474. package/lib/esm/resources/resource_errors.js +1 -22
  475. package/lib/esm/resources/return_line_items.d.ts +1 -50
  476. package/lib/esm/resources/return_line_items.js +1 -39
  477. package/lib/esm/resources/returns.d.ts +1 -86
  478. package/lib/esm/resources/returns.js +1 -71
  479. package/lib/esm/resources/satispay_gateways.d.ts +1 -45
  480. package/lib/esm/resources/satispay_gateways.js +1 -43
  481. package/lib/esm/resources/satispay_payments.d.ts +1 -48
  482. package/lib/esm/resources/satispay_payments.js +1 -43
  483. package/lib/esm/resources/shipments.d.ts +1 -139
  484. package/lib/esm/resources/shipments.js +1 -103
  485. package/lib/esm/resources/shipping_categories.d.ts +1 -39
  486. package/lib/esm/resources/shipping_categories.js +1 -43
  487. package/lib/esm/resources/shipping_method_tiers.d.ts +1 -31
  488. package/lib/esm/resources/shipping_method_tiers.js +1 -34
  489. package/lib/esm/resources/shipping_methods.d.ts +1 -121
  490. package/lib/esm/resources/shipping_methods.js +1 -67
  491. package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -49
  492. package/lib/esm/resources/shipping_weight_tiers.js +1 -43
  493. package/lib/esm/resources/shipping_zones.d.ts +1 -51
  494. package/lib/esm/resources/shipping_zones.js +1 -39
  495. package/lib/esm/resources/sku_list_items.d.ts +1 -50
  496. package/lib/esm/resources/sku_list_items.js +1 -43
  497. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -75
  498. package/lib/esm/resources/sku_list_promotion_rules.js +1 -43
  499. package/lib/esm/resources/sku_lists.d.ts +1 -63
  500. package/lib/esm/resources/sku_lists.js +1 -55
  501. package/lib/esm/resources/sku_options.d.ts +1 -70
  502. package/lib/esm/resources/sku_options.js +1 -51
  503. package/lib/esm/resources/skus.d.ts +1 -95
  504. package/lib/esm/resources/skus.js +1 -71
  505. package/lib/esm/resources/stock_items.d.ts +1 -59
  506. package/lib/esm/resources/stock_items.js +1 -55
  507. package/lib/esm/resources/stock_line_items.d.ts +1 -69
  508. package/lib/esm/resources/stock_line_items.js +1 -51
  509. package/lib/esm/resources/stock_locations.d.ts +1 -63
  510. package/lib/esm/resources/stock_locations.js +1 -59
  511. package/lib/esm/resources/stock_reservations.d.ts +1 -49
  512. package/lib/esm/resources/stock_reservations.js +1 -51
  513. package/lib/esm/resources/stock_transfers.d.ts +1 -79
  514. package/lib/esm/resources/stock_transfers.js +1 -59
  515. package/lib/esm/resources/stripe_gateways.d.ts +1 -44
  516. package/lib/esm/resources/stripe_gateways.js +1 -43
  517. package/lib/esm/resources/stripe_payments.d.ts +1 -56
  518. package/lib/esm/resources/stripe_payments.js +1 -43
  519. package/lib/esm/resources/subscription_models.d.ts +1 -48
  520. package/lib/esm/resources/subscription_models.js +1 -43
  521. package/lib/esm/resources/tags.d.ts +1 -27
  522. package/lib/esm/resources/tags.js +1 -31
  523. package/lib/esm/resources/tax_calculators.d.ts +1 -27
  524. package/lib/esm/resources/tax_calculators.js +1 -34
  525. package/lib/esm/resources/tax_categories.d.ts +1 -62
  526. package/lib/esm/resources/tax_categories.js +1 -43
  527. package/lib/esm/resources/tax_rules.d.ts +1 -72
  528. package/lib/esm/resources/tax_rules.js +1 -39
  529. package/lib/esm/resources/taxjar_accounts.d.ts +1 -46
  530. package/lib/esm/resources/taxjar_accounts.js +1 -47
  531. package/lib/esm/resources/transactions.d.ts +1 -40
  532. package/lib/esm/resources/transactions.js +1 -38
  533. package/lib/esm/resources/versions.d.ts +1 -22
  534. package/lib/esm/resources/versions.js +1 -22
  535. package/lib/esm/resources/voids.d.ts +1 -43
  536. package/lib/esm/resources/voids.js +1 -42
  537. package/lib/esm/resources/webhooks.d.ts +1 -51
  538. package/lib/esm/resources/webhooks.js +1 -39
  539. package/lib/esm/resources/wire_transfers.d.ts +1 -36
  540. package/lib/esm/resources/wire_transfers.js +1 -39
  541. package/lib/esm/static.d.ts +1 -9
  542. package/lib/esm/static.js +1 -19
  543. package/lib/esm/util.d.ts +1 -6
  544. package/lib/esm/util.js +1 -11
  545. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  546. package/lib/tsconfig.tsbuildinfo +1 -1
  547. package/package.json +1 -1
@@ -1,71 +1 @@
1
- import { ApiResource } from '../resource';
2
- class Returns extends ApiResource {
3
- // static readonly PATH = 'returns'
4
- async list(params, options) {
5
- return this.resources.list({ type: Returns.TYPE }, params, options);
6
- }
7
- async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Returns.TYPE }), params, options);
9
- }
10
- async retrieve(id, params, options) {
11
- return this.resources.retrieve({ type: Returns.TYPE, id }, params, options);
12
- }
13
- async update(resource, params, options) {
14
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Returns.TYPE }), params, options);
15
- }
16
- async delete(id, options) {
17
- await this.resources.delete({ type: Returns.TYPE, id }, options);
18
- }
19
- async order(returnId, params, options) {
20
- const _returnId = returnId.id || returnId;
21
- return this.resources.fetch({ type: 'orders' }, `returns/${_returnId}/order`, params, options);
22
- }
23
- async customer(returnId, params, options) {
24
- const _returnId = returnId.id || returnId;
25
- return this.resources.fetch({ type: 'customers' }, `returns/${_returnId}/customer`, params, options);
26
- }
27
- async stock_location(returnId, params, options) {
28
- const _returnId = returnId.id || returnId;
29
- return this.resources.fetch({ type: 'stock_locations' }, `returns/${_returnId}/stock_location`, params, options);
30
- }
31
- async origin_address(returnId, params, options) {
32
- const _returnId = returnId.id || returnId;
33
- return this.resources.fetch({ type: 'addresses' }, `returns/${_returnId}/origin_address`, params, options);
34
- }
35
- async destination_address(returnId, params, options) {
36
- const _returnId = returnId.id || returnId;
37
- return this.resources.fetch({ type: 'addresses' }, `returns/${_returnId}/destination_address`, params, options);
38
- }
39
- async return_line_items(returnId, params, options) {
40
- const _returnId = returnId.id || returnId;
41
- return this.resources.fetch({ type: 'return_line_items' }, `returns/${_returnId}/return_line_items`, params, options);
42
- }
43
- async attachments(returnId, params, options) {
44
- const _returnId = returnId.id || returnId;
45
- return this.resources.fetch({ type: 'attachments' }, `returns/${_returnId}/attachments`, params, options);
46
- }
47
- async events(returnId, params, options) {
48
- const _returnId = returnId.id || returnId;
49
- return this.resources.fetch({ type: 'events' }, `returns/${_returnId}/events`, params, options);
50
- }
51
- async tags(returnId, params, options) {
52
- const _returnId = returnId.id || returnId;
53
- return this.resources.fetch({ type: 'tags' }, `returns/${_returnId}/tags`, params, options);
54
- }
55
- async versions(returnId, params, options) {
56
- const _returnId = returnId.id || returnId;
57
- return this.resources.fetch({ type: 'versions' }, `returns/${_returnId}/versions`, params, options);
58
- }
59
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
60
- isReturn(resource) {
61
- return resource.type && (resource.type === Returns.TYPE);
62
- }
63
- relationship(id) {
64
- return ((id === null) || (typeof id === 'string')) ? { id, type: Returns.TYPE } : { id: id.id, type: Returns.TYPE };
65
- }
66
- type() {
67
- return Returns.TYPE;
68
- }
69
- }
70
- Returns.TYPE = 'returns';
71
- export default Returns;
1
+ import{ApiResource as c}from"../resource";class n extends c{async list(e,s){return this.resources.list({type:n.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:n.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:n.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:n.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:n.TYPE,id:e},s)}async order(e,s,t){const r=e.id||e;return this.resources.fetch({type:"orders"},`returns/${r}/order`,s,t)}async customer(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customers"},`returns/${r}/customer`,s,t)}async stock_location(e,s,t){const r=e.id||e;return this.resources.fetch({type:"stock_locations"},`returns/${r}/stock_location`,s,t)}async origin_address(e,s,t){const r=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${r}/origin_address`,s,t)}async destination_address(e,s,t){const r=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${r}/destination_address`,s,t)}async return_line_items(e,s,t){const r=e.id||e;return this.resources.fetch({type:"return_line_items"},`returns/${r}/return_line_items`,s,t)}async attachments(e,s,t){const r=e.id||e;return this.resources.fetch({type:"attachments"},`returns/${r}/attachments`,s,t)}async events(e,s,t){const r=e.id||e;return this.resources.fetch({type:"events"},`returns/${r}/events`,s,t)}async tags(e,s,t){const r=e.id||e;return this.resources.fetch({type:"tags"},`returns/${r}/tags`,s,t)}async versions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"versions"},`returns/${r}/versions`,s,t)}isReturn(e){return e.type&&e.type===n.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:n.TYPE}:{id:e.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="returns";export default n;
@@ -1,45 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { PaymentMethod } from './payment_methods';
4
- import type { Version } from './versions';
5
- import type { SatispayPayment } from './satispay_payments';
6
- type SatispayGatewayRel = ResourceRel & {
7
- type: typeof SatispayGateways.TYPE;
8
- };
9
- type SatispayPaymentRel = ResourceRel & {
10
- type: 'satispay_payments';
11
- };
12
- interface SatispayGateway extends Resource {
13
- name?: string;
14
- token?: string;
15
- key_id?: string;
16
- webhook_endpoint_url?: string;
17
- payment_methods?: PaymentMethod[];
18
- versions?: Version[];
19
- satispay_payments?: SatispayPayment[];
20
- }
21
- interface SatispayGatewayCreate extends ResourceCreate {
22
- name: string;
23
- token: string;
24
- satispay_payments?: SatispayPaymentRel[];
25
- }
26
- interface SatispayGatewayUpdate extends ResourceUpdate {
27
- name?: string;
28
- satispay_payments?: SatispayPaymentRel[];
29
- }
30
- declare class SatispayGateways extends ApiResource {
31
- static readonly TYPE: 'satispay_gateways';
32
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayGateway>>;
33
- create(resource: SatispayGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
34
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
35
- update(resource: SatispayGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
36
- delete(id: string, options?: ResourcesConfig): Promise<void>;
37
- payment_methods(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
38
- versions(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
39
- satispay_payments(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
40
- isSatispayGateway(resource: any): resource is SatispayGateway;
41
- relationship(id: string | ResourceId | null): SatispayGatewayRel;
42
- type(): string;
43
- }
44
- export default SatispayGateways;
45
- export { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';import type{SatispayPayment}from'./satispay_payments';type SatispayGatewayRel=ResourceRel&{type:typeof SatispayGateways.TYPE;};type SatispayPaymentRel=ResourceRel&{type:'satispay_payments';};interface SatispayGateway extends Resource{name?:string;token?:string;key_id?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];versions?:Version[];satispay_payments?:SatispayPayment[];}interface SatispayGatewayCreate extends ResourceCreate{name:string;token:string;satispay_payments?:SatispayPaymentRel[];}interface SatispayGatewayUpdate extends ResourceUpdate{name?:string;satispay_payments?:SatispayPaymentRel[];}declare class SatispayGateways extends ApiResource{static readonly TYPE:'satispay_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayGateway>>;create(resource:SatispayGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;update(resource:SatispayGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;satispay_payments(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayPayment>>;isSatispayGateway(resource:any):resource is SatispayGateway;relationship(id:string|ResourceId|null):SatispayGatewayRel;type():string;}export default SatispayGateways;export{SatispayGateway,SatispayGatewayCreate,SatispayGatewayUpdate};
@@ -1,43 +1 @@
1
- import { ApiResource } from '../resource';
2
- class SatispayGateways extends ApiResource {
3
- // static readonly PATH = 'satispay_gateways'
4
- async list(params, options) {
5
- return this.resources.list({ type: SatispayGateways.TYPE }, params, options);
6
- }
7
- async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
9
- }
10
- async retrieve(id, params, options) {
11
- return this.resources.retrieve({ type: SatispayGateways.TYPE, id }, params, options);
12
- }
13
- async update(resource, params, options) {
14
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
15
- }
16
- async delete(id, options) {
17
- await this.resources.delete({ type: SatispayGateways.TYPE, id }, options);
18
- }
19
- async payment_methods(satispayGatewayId, params, options) {
20
- const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
21
- return this.resources.fetch({ type: 'payment_methods' }, `satispay_gateways/${_satispayGatewayId}/payment_methods`, params, options);
22
- }
23
- async versions(satispayGatewayId, params, options) {
24
- const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
25
- return this.resources.fetch({ type: 'versions' }, `satispay_gateways/${_satispayGatewayId}/versions`, params, options);
26
- }
27
- async satispay_payments(satispayGatewayId, params, options) {
28
- const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
29
- return this.resources.fetch({ type: 'satispay_payments' }, `satispay_gateways/${_satispayGatewayId}/satispay_payments`, params, options);
30
- }
31
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
32
- isSatispayGateway(resource) {
33
- return resource.type && (resource.type === SatispayGateways.TYPE);
34
- }
35
- relationship(id) {
36
- return ((id === null) || (typeof id === 'string')) ? { id, type: SatispayGateways.TYPE } : { id: id.id, type: SatispayGateways.TYPE };
37
- }
38
- type() {
39
- return SatispayGateways.TYPE;
40
- }
41
- }
42
- SatispayGateways.TYPE = 'satispay_gateways';
43
- export default SatispayGateways;
1
+ import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async payment_methods(e,s,r){const n=e.id||e;return this.resources.fetch({type:"payment_methods"},`satispay_gateways/${n}/payment_methods`,s,r)}async versions(e,s,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`satispay_gateways/${n}/versions`,s,r)}async satispay_payments(e,s,r){const n=e.id||e;return this.resources.fetch({type:"satispay_payments"},`satispay_gateways/${n}/satispay_payments`,s,r)}isSatispayGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="satispay_gateways";export default t;
@@ -1,48 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- import type { PaymentGateway } from './payment_gateways';
5
- import type { Version } from './versions';
6
- type SatispayPaymentRel = ResourceRel & {
7
- type: typeof SatispayPayments.TYPE;
8
- };
9
- type OrderRel = ResourceRel & {
10
- type: 'orders';
11
- };
12
- interface SatispayPayment extends Resource {
13
- payment_id?: string;
14
- flow?: string;
15
- status?: string;
16
- redirect_url?: string;
17
- payment_url?: string;
18
- payment_response?: object;
19
- order?: Order;
20
- payment_gateway?: PaymentGateway;
21
- versions?: Version[];
22
- }
23
- interface SatispayPaymentCreate extends ResourceCreate {
24
- flow?: string;
25
- redirect_url?: string;
26
- order: OrderRel;
27
- }
28
- interface SatispayPaymentUpdate extends ResourceUpdate {
29
- redirect_url?: string;
30
- _refresh?: boolean;
31
- order?: OrderRel;
32
- }
33
- declare class SatispayPayments extends ApiResource {
34
- static readonly TYPE: 'satispay_payments';
35
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
36
- create(resource: SatispayPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
37
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
38
- update(resource: SatispayPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
39
- delete(id: string, options?: ResourcesConfig): Promise<void>;
40
- order(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
41
- payment_gateway(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
42
- versions(satispayPaymentId: string | SatispayPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
- isSatispayPayment(resource: any): resource is SatispayPayment;
44
- relationship(id: string | ResourceId | null): SatispayPaymentRel;
45
- type(): string;
46
- }
47
- export default SatispayPayments;
48
- export { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type SatispayPaymentRel=ResourceRel&{type:typeof SatispayPayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface SatispayPayment extends Resource{payment_id?:string;flow?:string;status?:string;redirect_url?:string;payment_url?:string;payment_response?:object;order?:Order;payment_gateway?:PaymentGateway;versions?:Version[];}interface SatispayPaymentCreate extends ResourceCreate{flow?:string;redirect_url?:string;order:OrderRel;}interface SatispayPaymentUpdate extends ResourceUpdate{redirect_url?:string;_refresh?:boolean;order?:OrderRel;}declare class SatispayPayments extends ApiResource{static readonly TYPE:'satispay_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayPayment>>;create(resource:SatispayPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;update(resource:SatispayPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(satispayPaymentId:string|SatispayPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSatispayPayment(resource:any):resource is SatispayPayment;relationship(id:string|ResourceId|null):SatispayPaymentRel;type():string;}export default SatispayPayments;export{SatispayPayment,SatispayPaymentCreate,SatispayPaymentUpdate};
@@ -1,43 +1 @@
1
- import { ApiResource } from '../resource';
2
- class SatispayPayments extends ApiResource {
3
- // static readonly PATH = 'satispay_payments'
4
- async list(params, options) {
5
- return this.resources.list({ type: SatispayPayments.TYPE }, params, options);
6
- }
7
- async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: SatispayPayments.TYPE }), params, options);
9
- }
10
- async retrieve(id, params, options) {
11
- return this.resources.retrieve({ type: SatispayPayments.TYPE, id }, params, options);
12
- }
13
- async update(resource, params, options) {
14
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: SatispayPayments.TYPE }), params, options);
15
- }
16
- async delete(id, options) {
17
- await this.resources.delete({ type: SatispayPayments.TYPE, id }, options);
18
- }
19
- async order(satispayPaymentId, params, options) {
20
- const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
21
- return this.resources.fetch({ type: 'orders' }, `satispay_payments/${_satispayPaymentId}/order`, params, options);
22
- }
23
- async payment_gateway(satispayPaymentId, params, options) {
24
- const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
25
- return this.resources.fetch({ type: 'payment_gateways' }, `satispay_payments/${_satispayPaymentId}/payment_gateway`, params, options);
26
- }
27
- async versions(satispayPaymentId, params, options) {
28
- const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
29
- return this.resources.fetch({ type: 'versions' }, `satispay_payments/${_satispayPaymentId}/versions`, params, options);
30
- }
31
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
32
- isSatispayPayment(resource) {
33
- return resource.type && (resource.type === SatispayPayments.TYPE);
34
- }
35
- relationship(id) {
36
- return ((id === null) || (typeof id === 'string')) ? { id, type: SatispayPayments.TYPE } : { id: id.id, type: SatispayPayments.TYPE };
37
- }
38
- type() {
39
- return SatispayPayments.TYPE;
40
- }
41
- }
42
- SatispayPayments.TYPE = 'satispay_payments';
43
- export default SatispayPayments;
1
+ import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){const n=e.id||e;return this.resources.fetch({type:"orders"},`satispay_payments/${n}/order`,t,r)}async payment_gateway(e,t,r){const n=e.id||e;return this.resources.fetch({type:"payment_gateways"},`satispay_payments/${n}/payment_gateway`,t,r)}async versions(e,t,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`satispay_payments/${n}/versions`,t,r)}isSatispayPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="satispay_payments";export default s;
@@ -1,139 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- import type { ShippingCategory } from './shipping_categories';
5
- import type { InventoryStockLocation } from './inventory_stock_locations';
6
- import type { StockLocation } from './stock_locations';
7
- import type { Address } from './addresses';
8
- import type { ShippingMethod } from './shipping_methods';
9
- import type { DeliveryLeadTime } from './delivery_lead_times';
10
- import type { StockLineItem } from './stock_line_items';
11
- import type { StockTransfer } from './stock_transfers';
12
- import type { LineItem } from './line_items';
13
- import type { CarrierAccount } from './carrier_accounts';
14
- import type { Parcel } from './parcels';
15
- import type { Attachment } from './attachments';
16
- import type { Event } from './events';
17
- import type { Tag } from './tags';
18
- import type { Version } from './versions';
19
- type ShipmentRel = ResourceRel & {
20
- type: typeof Shipments.TYPE;
21
- };
22
- type OrderRel = ResourceRel & {
23
- type: 'orders';
24
- };
25
- type ShippingCategoryRel = ResourceRel & {
26
- type: 'shipping_categories';
27
- };
28
- type InventoryStockLocationRel = ResourceRel & {
29
- type: 'inventory_stock_locations';
30
- };
31
- type AddressRel = ResourceRel & {
32
- type: 'addresses';
33
- };
34
- type ShippingMethodRel = ResourceRel & {
35
- type: 'shipping_methods';
36
- };
37
- type TagRel = ResourceRel & {
38
- type: 'tags';
39
- };
40
- interface Shipment extends Resource {
41
- number?: string;
42
- status?: string;
43
- currency_code?: string;
44
- cost_amount_cents?: number;
45
- cost_amount_float?: number;
46
- formatted_cost_amount?: string;
47
- skus_count?: number;
48
- selected_rate_id?: string;
49
- rates?: object[];
50
- purchase_error_code?: string;
51
- purchase_error_message?: string;
52
- get_rates_errors?: object[];
53
- get_rates_started_at?: string;
54
- get_rates_completed_at?: string;
55
- purchase_started_at?: string;
56
- purchase_completed_at?: string;
57
- purchase_failed_at?: string;
58
- on_hold_at?: string;
59
- picking_at?: string;
60
- packing_at?: string;
61
- ready_to_ship_at?: string;
62
- shipped_at?: string;
63
- order?: Order;
64
- shipping_category?: ShippingCategory;
65
- inventory_stock_location?: InventoryStockLocation;
66
- stock_location?: StockLocation;
67
- origin_address?: Address;
68
- shipping_address?: Address;
69
- shipping_method?: ShippingMethod;
70
- delivery_lead_time?: DeliveryLeadTime;
71
- stock_line_items?: StockLineItem[];
72
- stock_transfers?: StockTransfer[];
73
- line_items?: LineItem[];
74
- available_shipping_methods?: ShippingMethod[];
75
- carrier_accounts?: CarrierAccount[];
76
- parcels?: Parcel[];
77
- attachments?: Attachment[];
78
- events?: Event[];
79
- tags?: Tag[];
80
- versions?: Version[];
81
- }
82
- interface ShipmentCreate extends ResourceCreate {
83
- order: OrderRel;
84
- shipping_category?: ShippingCategoryRel;
85
- inventory_stock_location: InventoryStockLocationRel;
86
- shipping_address?: AddressRel;
87
- shipping_method?: ShippingMethodRel;
88
- tags?: TagRel[];
89
- }
90
- interface ShipmentUpdate extends ResourceUpdate {
91
- _upcoming?: boolean;
92
- _on_hold?: boolean;
93
- _picking?: boolean;
94
- _packing?: boolean;
95
- _ready_to_ship?: boolean;
96
- _ship?: boolean;
97
- _reserve_stock?: boolean;
98
- _release_stock?: boolean;
99
- _decrement_stock?: boolean;
100
- _get_rates?: boolean;
101
- selected_rate_id?: string;
102
- _purchase?: boolean;
103
- shipping_category?: ShippingCategoryRel;
104
- inventory_stock_location?: InventoryStockLocationRel;
105
- shipping_address?: AddressRel;
106
- shipping_method?: ShippingMethodRel;
107
- tags?: TagRel[];
108
- }
109
- declare class Shipments extends ApiResource {
110
- static readonly TYPE: 'shipments';
111
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
112
- create(resource: ShipmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
113
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
114
- update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
115
- delete(id: string, options?: ResourcesConfig): Promise<void>;
116
- order(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
117
- shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
118
- inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
119
- stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
120
- origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
121
- shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
122
- shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
123
- delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
124
- stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
125
- stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
126
- line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
127
- available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
128
- carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
129
- parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
130
- attachments(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
131
- events(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
132
- tags(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
133
- versions(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
134
- isShipment(resource: any): resource is Shipment;
135
- relationship(id: string | ResourceId | null): ShipmentRel;
136
- type(): string;
137
- }
138
- export default Shipments;
139
- export { Shipment, ShipmentCreate, ShipmentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{ShippingCategory}from'./shipping_categories';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ShippingMethod}from'./shipping_methods';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{LineItem}from'./line_items';import type{CarrierAccount}from'./carrier_accounts';import type{Parcel}from'./parcels';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag}from'./tags';import type{Version}from'./versions';type ShipmentRel=ResourceRel&{type:typeof Shipments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};type InventoryStockLocationRel=ResourceRel&{type:'inventory_stock_locations';};type AddressRel=ResourceRel&{type:'addresses';};type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};type TagRel=ResourceRel&{type:'tags';};interface Shipment extends Resource{number?:string;status?:string;currency_code?:string;cost_amount_cents?:number;cost_amount_float?:number;formatted_cost_amount?:string;skus_count?:number;selected_rate_id?:string;rates?:object[];purchase_error_code?:string;purchase_error_message?:string;get_rates_errors?:object[];get_rates_started_at?:string;get_rates_completed_at?:string;purchase_started_at?:string;purchase_completed_at?:string;purchase_failed_at?:string;on_hold_at?:string;picking_at?:string;packing_at?:string;ready_to_ship_at?:string;shipped_at?:string;order?:Order;shipping_category?:ShippingCategory;inventory_stock_location?:InventoryStockLocation;stock_location?:StockLocation;origin_address?:Address;shipping_address?:Address;shipping_method?:ShippingMethod;delivery_lead_time?:DeliveryLeadTime;stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];line_items?:LineItem[];available_shipping_methods?:ShippingMethod[];carrier_accounts?:CarrierAccount[];parcels?:Parcel[];attachments?:Attachment[];events?:Event[];tags?:Tag[];versions?:Version[];}interface ShipmentCreate extends ResourceCreate{order:OrderRel;shipping_category?:ShippingCategoryRel;inventory_stock_location:InventoryStockLocationRel;shipping_address?:AddressRel;shipping_method?:ShippingMethodRel;tags?:TagRel[];}interface ShipmentUpdate extends ResourceUpdate{_upcoming?:boolean;_on_hold?:boolean;_picking?:boolean;_packing?:boolean;_ready_to_ship?:boolean;_ship?:boolean;_reserve_stock?:boolean;_release_stock?:boolean;_decrement_stock?:boolean;_get_rates?:boolean;selected_rate_id?:string;_purchase?:boolean;shipping_category?:ShippingCategoryRel;inventory_stock_location?:InventoryStockLocationRel;shipping_address?:AddressRel;shipping_method?:ShippingMethodRel;tags?:TagRel[];}declare class Shipments extends ApiResource{static readonly TYPE:'shipments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;create(resource:ShipmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;update(resource:ShipmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;shipping_category(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;inventory_stock_location(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;stock_location(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_method(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delivery_lead_time(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;stock_line_items(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;line_items(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;available_shipping_methods(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;carrier_accounts(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;parcels(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShipment(resource:any):resource is Shipment;relationship(id:string|ResourceId|null):ShipmentRel;type():string;}export default Shipments;export{Shipment,ShipmentCreate,ShipmentUpdate};
@@ -1,103 +1 @@
1
- import { ApiResource } from '../resource';
2
- class Shipments extends ApiResource {
3
- // static readonly PATH = 'shipments'
4
- async list(params, options) {
5
- return this.resources.list({ type: Shipments.TYPE }, params, options);
6
- }
7
- async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
9
- }
10
- async retrieve(id, params, options) {
11
- return this.resources.retrieve({ type: Shipments.TYPE, id }, params, options);
12
- }
13
- async update(resource, params, options) {
14
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
15
- }
16
- async delete(id, options) {
17
- await this.resources.delete({ type: Shipments.TYPE, id }, options);
18
- }
19
- async order(shipmentId, params, options) {
20
- const _shipmentId = shipmentId.id || shipmentId;
21
- return this.resources.fetch({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options);
22
- }
23
- async shipping_category(shipmentId, params, options) {
24
- const _shipmentId = shipmentId.id || shipmentId;
25
- return this.resources.fetch({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options);
26
- }
27
- async inventory_stock_location(shipmentId, params, options) {
28
- const _shipmentId = shipmentId.id || shipmentId;
29
- return this.resources.fetch({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options);
30
- }
31
- async stock_location(shipmentId, params, options) {
32
- const _shipmentId = shipmentId.id || shipmentId;
33
- return this.resources.fetch({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options);
34
- }
35
- async origin_address(shipmentId, params, options) {
36
- const _shipmentId = shipmentId.id || shipmentId;
37
- return this.resources.fetch({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options);
38
- }
39
- async shipping_address(shipmentId, params, options) {
40
- const _shipmentId = shipmentId.id || shipmentId;
41
- return this.resources.fetch({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options);
42
- }
43
- async shipping_method(shipmentId, params, options) {
44
- const _shipmentId = shipmentId.id || shipmentId;
45
- return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options);
46
- }
47
- async delivery_lead_time(shipmentId, params, options) {
48
- const _shipmentId = shipmentId.id || shipmentId;
49
- return this.resources.fetch({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options);
50
- }
51
- async stock_line_items(shipmentId, params, options) {
52
- const _shipmentId = shipmentId.id || shipmentId;
53
- return this.resources.fetch({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options);
54
- }
55
- async stock_transfers(shipmentId, params, options) {
56
- const _shipmentId = shipmentId.id || shipmentId;
57
- return this.resources.fetch({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options);
58
- }
59
- async line_items(shipmentId, params, options) {
60
- const _shipmentId = shipmentId.id || shipmentId;
61
- return this.resources.fetch({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options);
62
- }
63
- async available_shipping_methods(shipmentId, params, options) {
64
- const _shipmentId = shipmentId.id || shipmentId;
65
- return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);
66
- }
67
- async carrier_accounts(shipmentId, params, options) {
68
- const _shipmentId = shipmentId.id || shipmentId;
69
- return this.resources.fetch({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options);
70
- }
71
- async parcels(shipmentId, params, options) {
72
- const _shipmentId = shipmentId.id || shipmentId;
73
- return this.resources.fetch({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options);
74
- }
75
- async attachments(shipmentId, params, options) {
76
- const _shipmentId = shipmentId.id || shipmentId;
77
- return this.resources.fetch({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options);
78
- }
79
- async events(shipmentId, params, options) {
80
- const _shipmentId = shipmentId.id || shipmentId;
81
- return this.resources.fetch({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options);
82
- }
83
- async tags(shipmentId, params, options) {
84
- const _shipmentId = shipmentId.id || shipmentId;
85
- return this.resources.fetch({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options);
86
- }
87
- async versions(shipmentId, params, options) {
88
- const _shipmentId = shipmentId.id || shipmentId;
89
- return this.resources.fetch({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options);
90
- }
91
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
92
- isShipment(resource) {
93
- return resource.type && (resource.type === Shipments.TYPE);
94
- }
95
- relationship(id) {
96
- return ((id === null) || (typeof id === 'string')) ? { id, type: Shipments.TYPE } : { id: id.id, type: Shipments.TYPE };
97
- }
98
- type() {
99
- return Shipments.TYPE;
100
- }
101
- }
102
- Shipments.TYPE = 'shipments';
103
- export default Shipments;
1
+ import{ApiResource as i}from"../resource";class n extends i{async list(s,e){return this.resources.list({type:n.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:n.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:n.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:n.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:n.TYPE,id:s},e)}async order(s,e,t){const r=s.id||s;return this.resources.fetch({type:"orders"},`shipments/${r}/order`,e,t)}async shipping_category(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_categories"},`shipments/${r}/shipping_category`,e,t)}async inventory_stock_location(s,e,t){const r=s.id||s;return this.resources.fetch({type:"inventory_stock_locations"},`shipments/${r}/inventory_stock_location`,e,t)}async stock_location(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_locations"},`shipments/${r}/stock_location`,e,t)}async origin_address(s,e,t){const r=s.id||s;return this.resources.fetch({type:"addresses"},`shipments/${r}/origin_address`,e,t)}async shipping_address(s,e,t){const r=s.id||s;return this.resources.fetch({type:"addresses"},`shipments/${r}/shipping_address`,e,t)}async shipping_method(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_methods"},`shipments/${r}/shipping_method`,e,t)}async delivery_lead_time(s,e,t){const r=s.id||s;return this.resources.fetch({type:"delivery_lead_times"},`shipments/${r}/delivery_lead_time`,e,t)}async stock_line_items(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_line_items"},`shipments/${r}/stock_line_items`,e,t)}async stock_transfers(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_transfers"},`shipments/${r}/stock_transfers`,e,t)}async line_items(s,e,t){const r=s.id||s;return this.resources.fetch({type:"line_items"},`shipments/${r}/line_items`,e,t)}async available_shipping_methods(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_methods"},`shipments/${r}/available_shipping_methods`,e,t)}async carrier_accounts(s,e,t){const r=s.id||s;return this.resources.fetch({type:"carrier_accounts"},`shipments/${r}/carrier_accounts`,e,t)}async parcels(s,e,t){const r=s.id||s;return this.resources.fetch({type:"parcels"},`shipments/${r}/parcels`,e,t)}async attachments(s,e,t){const r=s.id||s;return this.resources.fetch({type:"attachments"},`shipments/${r}/attachments`,e,t)}async events(s,e,t){const r=s.id||s;return this.resources.fetch({type:"events"},`shipments/${r}/events`,e,t)}async tags(s,e,t){const r=s.id||s;return this.resources.fetch({type:"tags"},`shipments/${r}/tags`,e,t)}async versions(s,e,t){const r=s.id||s;return this.resources.fetch({type:"versions"},`shipments/${r}/versions`,e,t)}isShipment(s){return s.type&&s.type===n.TYPE}relationship(s){return s===null||typeof s=="string"?{id:s,type:n.TYPE}:{id:s.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="shipments";export default n;
@@ -1,39 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Sku } from './skus';
4
- import type { Attachment } from './attachments';
5
- import type { Version } from './versions';
6
- type ShippingCategoryRel = ResourceRel & {
7
- type: typeof ShippingCategories.TYPE;
8
- };
9
- interface ShippingCategory extends Resource {
10
- name?: string;
11
- code?: string;
12
- skus?: Sku[];
13
- attachments?: Attachment[];
14
- versions?: Version[];
15
- }
16
- interface ShippingCategoryCreate extends ResourceCreate {
17
- name: string;
18
- code?: string;
19
- }
20
- interface ShippingCategoryUpdate extends ResourceUpdate {
21
- name?: string;
22
- code?: string;
23
- }
24
- declare class ShippingCategories extends ApiResource {
25
- static readonly TYPE: 'shipping_categories';
26
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingCategory>>;
27
- create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
28
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
29
- update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
30
- delete(id: string, options?: ResourcesConfig): Promise<void>;
31
- skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
32
- attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
33
- versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
34
- isShippingCategory(resource: any): resource is ShippingCategory;
35
- relationship(id: string | ResourceId | null): ShippingCategoryRel;
36
- type(): string;
37
- }
38
- export default ShippingCategories;
39
- export { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingCategoryRel=ResourceRel&{type:typeof ShippingCategories.TYPE;};interface ShippingCategory extends Resource{name?:string;code?:string;skus?:Sku[];attachments?:Attachment[];versions?:Version[];}interface ShippingCategoryCreate extends ResourceCreate{name:string;code?:string;}interface ShippingCategoryUpdate extends ResourceUpdate{name?:string;code?:string;}declare class ShippingCategories extends ApiResource{static readonly TYPE:'shipping_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingCategory>>;create(resource:ShippingCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;update(resource:ShippingCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShippingCategory(resource:any):resource is ShippingCategory;relationship(id:string|ResourceId|null):ShippingCategoryRel;type():string;}export default ShippingCategories;export{ShippingCategory,ShippingCategoryCreate,ShippingCategoryUpdate};
@@ -1,43 +1 @@
1
- import { ApiResource } from '../resource';
2
- class ShippingCategories extends ApiResource {
3
- // static readonly PATH = 'shipping_categories'
4
- async list(params, options) {
5
- return this.resources.list({ type: ShippingCategories.TYPE }, params, options);
6
- }
7
- async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ShippingCategories.TYPE }), params, options);
9
- }
10
- async retrieve(id, params, options) {
11
- return this.resources.retrieve({ type: ShippingCategories.TYPE, id }, params, options);
12
- }
13
- async update(resource, params, options) {
14
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ShippingCategories.TYPE }), params, options);
15
- }
16
- async delete(id, options) {
17
- await this.resources.delete({ type: ShippingCategories.TYPE, id }, options);
18
- }
19
- async skus(shippingCategoryId, params, options) {
20
- const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
21
- return this.resources.fetch({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options);
22
- }
23
- async attachments(shippingCategoryId, params, options) {
24
- const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
25
- return this.resources.fetch({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
26
- }
27
- async versions(shippingCategoryId, params, options) {
28
- const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
29
- return this.resources.fetch({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
30
- }
31
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
32
- isShippingCategory(resource) {
33
- return resource.type && (resource.type === ShippingCategories.TYPE);
34
- }
35
- relationship(id) {
36
- return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingCategories.TYPE } : { id: id.id, type: ShippingCategories.TYPE };
37
- }
38
- type() {
39
- return ShippingCategories.TYPE;
40
- }
41
- }
42
- ShippingCategories.TYPE = 'shipping_categories';
43
- export default ShippingCategories;
1
+ import{ApiResource as n}from"../resource";class t extends n{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async skus(e,s,r){const c=e.id||e;return this.resources.fetch({type:"skus"},`shipping_categories/${c}/skus`,s,r)}async attachments(e,s,r){const c=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_categories/${c}/attachments`,s,r)}async versions(e,s,r){const c=e.id||e;return this.resources.fetch({type:"versions"},`shipping_categories/${c}/versions`,s,r)}isShippingCategory(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_categories";export default t;