@commercelayer/sdk 7.0.0-beta.17 → 7.0.0-beta.19

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 (297) hide show
  1. package/lib/api.cjs +0 -1
  2. package/lib/api.js +0 -1
  3. package/lib/client.cjs +45 -54
  4. package/lib/client.js +45 -54
  5. package/lib/commercelayer.cjs +11 -13
  6. package/lib/commercelayer.js +11 -13
  7. package/lib/common.cjs +0 -1
  8. package/lib/common.js +0 -1
  9. package/lib/config.cjs +0 -2
  10. package/lib/config.js +0 -2
  11. package/lib/debug.cjs +0 -2
  12. package/lib/debug.js +0 -2
  13. package/lib/enum.cjs +0 -2
  14. package/lib/enum.js +0 -2
  15. package/lib/error.cjs +19 -22
  16. package/lib/error.js +19 -22
  17. package/lib/fetch.cjs +17 -24
  18. package/lib/fetch.js +17 -24
  19. package/lib/index.cjs +0 -1
  20. package/lib/index.d.cts +1 -1
  21. package/lib/index.d.ts +1 -1
  22. package/lib/index.js +0 -1
  23. package/lib/jsonapi.cjs +0 -1
  24. package/lib/jsonapi.js +0 -1
  25. package/lib/query.cjs +0 -1
  26. package/lib/query.js +0 -1
  27. package/lib/resource.cjs +21 -26
  28. package/lib/resource.js +21 -26
  29. package/lib/resources/addresses.cjs +10 -12
  30. package/lib/resources/addresses.js +10 -12
  31. package/lib/resources/adjustments.cjs +8 -10
  32. package/lib/resources/adjustments.js +8 -10
  33. package/lib/resources/adyen_gateways.cjs +8 -10
  34. package/lib/resources/adyen_gateways.js +8 -10
  35. package/lib/resources/adyen_payments.cjs +10 -12
  36. package/lib/resources/adyen_payments.js +10 -12
  37. package/lib/resources/applications.cjs +5 -7
  38. package/lib/resources/applications.js +5 -7
  39. package/lib/resources/attachments.cjs +8 -10
  40. package/lib/resources/attachments.js +8 -10
  41. package/lib/resources/authorizations.cjs +11 -13
  42. package/lib/resources/authorizations.js +11 -13
  43. package/lib/resources/avalara_accounts.cjs +8 -10
  44. package/lib/resources/avalara_accounts.js +8 -10
  45. package/lib/resources/axerve_gateways.cjs +8 -10
  46. package/lib/resources/axerve_gateways.js +8 -10
  47. package/lib/resources/axerve_payments.cjs +9 -11
  48. package/lib/resources/axerve_payments.js +9 -11
  49. package/lib/resources/bing_geocoders.cjs +8 -10
  50. package/lib/resources/bing_geocoders.js +8 -10
  51. package/lib/resources/braintree_gateways.cjs +8 -10
  52. package/lib/resources/braintree_gateways.js +8 -10
  53. package/lib/resources/braintree_payments.cjs +8 -10
  54. package/lib/resources/braintree_payments.js +8 -10
  55. package/lib/resources/bundles.cjs +12 -14
  56. package/lib/resources/bundles.js +12 -14
  57. package/lib/resources/buy_x_pay_y_promotions.cjs +12 -14
  58. package/lib/resources/buy_x_pay_y_promotions.js +12 -14
  59. package/lib/resources/captures.cjs +10 -12
  60. package/lib/resources/captures.js +10 -12
  61. package/lib/resources/carrier_accounts.cjs +8 -10
  62. package/lib/resources/carrier_accounts.js +8 -10
  63. package/lib/resources/checkout_com_gateways.cjs +8 -10
  64. package/lib/resources/checkout_com_gateways.js +8 -10
  65. package/lib/resources/checkout_com_payments.cjs +10 -12
  66. package/lib/resources/checkout_com_payments.js +10 -12
  67. package/lib/resources/cleanups.cjs +9 -11
  68. package/lib/resources/cleanups.js +9 -11
  69. package/lib/resources/coupon_codes_promotion_rules.cjs +8 -10
  70. package/lib/resources/coupon_codes_promotion_rules.js +8 -10
  71. package/lib/resources/coupon_recipients.cjs +8 -10
  72. package/lib/resources/coupon_recipients.js +8 -10
  73. package/lib/resources/coupons.cjs +10 -12
  74. package/lib/resources/coupons.js +10 -12
  75. package/lib/resources/custom_promotion_rules.cjs +8 -10
  76. package/lib/resources/custom_promotion_rules.js +8 -10
  77. package/lib/resources/customer_addresses.cjs +8 -10
  78. package/lib/resources/customer_addresses.js +8 -10
  79. package/lib/resources/customer_groups.cjs +8 -10
  80. package/lib/resources/customer_groups.js +8 -10
  81. package/lib/resources/customer_password_resets.cjs +9 -11
  82. package/lib/resources/customer_password_resets.js +9 -11
  83. package/lib/resources/customer_payment_sources.cjs +8 -10
  84. package/lib/resources/customer_payment_sources.js +8 -10
  85. package/lib/resources/customer_subscriptions.cjs +8 -10
  86. package/lib/resources/customer_subscriptions.js +8 -10
  87. package/lib/resources/customers.cjs +10 -12
  88. package/lib/resources/customers.js +10 -12
  89. package/lib/resources/delivery_lead_times.cjs +8 -10
  90. package/lib/resources/delivery_lead_times.js +8 -10
  91. package/lib/resources/discount_engine_items.cjs +5 -7
  92. package/lib/resources/discount_engine_items.js +5 -7
  93. package/lib/resources/discount_engines.cjs +5 -7
  94. package/lib/resources/discount_engines.js +5 -7
  95. package/lib/resources/easypost_pickups.cjs +9 -11
  96. package/lib/resources/easypost_pickups.js +9 -11
  97. package/lib/resources/event_callbacks.cjs +5 -7
  98. package/lib/resources/event_callbacks.js +5 -7
  99. package/lib/resources/events.cjs +7 -9
  100. package/lib/resources/events.js +7 -9
  101. package/lib/resources/exports.cjs +9 -11
  102. package/lib/resources/exports.js +9 -11
  103. package/lib/resources/external_gateways.cjs +9 -11
  104. package/lib/resources/external_gateways.js +9 -11
  105. package/lib/resources/external_payments.cjs +8 -10
  106. package/lib/resources/external_payments.js +8 -10
  107. package/lib/resources/external_promotions.cjs +13 -15
  108. package/lib/resources/external_promotions.js +13 -15
  109. package/lib/resources/external_tax_calculators.cjs +9 -11
  110. package/lib/resources/external_tax_calculators.js +9 -11
  111. package/lib/resources/fixed_amount_promotions.cjs +12 -14
  112. package/lib/resources/fixed_amount_promotions.js +12 -14
  113. package/lib/resources/fixed_price_promotions.cjs +12 -14
  114. package/lib/resources/fixed_price_promotions.js +12 -14
  115. package/lib/resources/flex_promotions.cjs +12 -14
  116. package/lib/resources/flex_promotions.js +12 -14
  117. package/lib/resources/free_gift_promotions.cjs +12 -14
  118. package/lib/resources/free_gift_promotions.js +12 -14
  119. package/lib/resources/free_shipping_promotions.cjs +12 -14
  120. package/lib/resources/free_shipping_promotions.js +12 -14
  121. package/lib/resources/geocoders.cjs +5 -7
  122. package/lib/resources/geocoders.js +5 -7
  123. package/lib/resources/gift_card_recipients.cjs +8 -10
  124. package/lib/resources/gift_card_recipients.js +8 -10
  125. package/lib/resources/gift_cards.cjs +14 -16
  126. package/lib/resources/gift_cards.js +14 -16
  127. package/lib/resources/google_geocoders.cjs +8 -10
  128. package/lib/resources/google_geocoders.js +8 -10
  129. package/lib/resources/imports.cjs +9 -11
  130. package/lib/resources/imports.js +9 -11
  131. package/lib/resources/in_stock_subscriptions.cjs +10 -12
  132. package/lib/resources/in_stock_subscriptions.js +10 -12
  133. package/lib/resources/inventory_models.cjs +8 -10
  134. package/lib/resources/inventory_models.js +8 -10
  135. package/lib/resources/inventory_return_locations.cjs +8 -10
  136. package/lib/resources/inventory_return_locations.js +8 -10
  137. package/lib/resources/inventory_stock_locations.cjs +8 -10
  138. package/lib/resources/inventory_stock_locations.js +8 -10
  139. package/lib/resources/klarna_gateways.cjs +8 -10
  140. package/lib/resources/klarna_gateways.js +8 -10
  141. package/lib/resources/klarna_payments.cjs +9 -11
  142. package/lib/resources/klarna_payments.js +9 -11
  143. package/lib/resources/line_item_options.cjs +10 -12
  144. package/lib/resources/line_item_options.js +10 -12
  145. package/lib/resources/line_items.cjs +13 -15
  146. package/lib/resources/line_items.js +13 -15
  147. package/lib/resources/links.cjs +10 -12
  148. package/lib/resources/links.js +10 -12
  149. package/lib/resources/manual_gateways.cjs +8 -10
  150. package/lib/resources/manual_gateways.js +8 -10
  151. package/lib/resources/manual_tax_calculators.cjs +8 -10
  152. package/lib/resources/manual_tax_calculators.js +8 -10
  153. package/lib/resources/markets.cjs +10 -12
  154. package/lib/resources/markets.js +10 -12
  155. package/lib/resources/merchants.cjs +8 -10
  156. package/lib/resources/merchants.js +8 -10
  157. package/lib/resources/notifications.cjs +8 -10
  158. package/lib/resources/notifications.js +8 -10
  159. package/lib/resources/order_amount_promotion_rules.cjs +8 -10
  160. package/lib/resources/order_amount_promotion_rules.js +8 -10
  161. package/lib/resources/order_copies.cjs +8 -10
  162. package/lib/resources/order_copies.js +8 -10
  163. package/lib/resources/order_factories.cjs +5 -7
  164. package/lib/resources/order_factories.js +5 -7
  165. package/lib/resources/order_subscription_items.cjs +8 -10
  166. package/lib/resources/order_subscription_items.js +8 -10
  167. package/lib/resources/order_subscriptions.cjs +14 -16
  168. package/lib/resources/order_subscriptions.js +14 -16
  169. package/lib/resources/orders.cjs +41 -43
  170. package/lib/resources/orders.js +41 -43
  171. package/lib/resources/organizations.cjs +5 -7
  172. package/lib/resources/organizations.js +5 -7
  173. package/lib/resources/packages.cjs +8 -10
  174. package/lib/resources/packages.js +8 -10
  175. package/lib/resources/parcel_line_items.cjs +8 -10
  176. package/lib/resources/parcel_line_items.js +8 -10
  177. package/lib/resources/parcels.cjs +8 -10
  178. package/lib/resources/parcels.js +8 -10
  179. package/lib/resources/payment_gateways.cjs +5 -7
  180. package/lib/resources/payment_gateways.js +5 -7
  181. package/lib/resources/payment_methods.cjs +10 -12
  182. package/lib/resources/payment_methods.js +10 -12
  183. package/lib/resources/payment_options.cjs +8 -10
  184. package/lib/resources/payment_options.js +8 -10
  185. package/lib/resources/paypal_gateways.cjs +8 -10
  186. package/lib/resources/paypal_gateways.js +8 -10
  187. package/lib/resources/paypal_payments.cjs +8 -10
  188. package/lib/resources/paypal_payments.js +8 -10
  189. package/lib/resources/percentage_discount_promotions.cjs +12 -14
  190. package/lib/resources/percentage_discount_promotions.js +12 -14
  191. package/lib/resources/pickups.cjs +5 -7
  192. package/lib/resources/pickups.js +5 -7
  193. package/lib/resources/price_frequency_tiers.cjs +8 -10
  194. package/lib/resources/price_frequency_tiers.js +8 -10
  195. package/lib/resources/price_list_schedulers.cjs +10 -12
  196. package/lib/resources/price_list_schedulers.js +10 -12
  197. package/lib/resources/price_lists.cjs +8 -10
  198. package/lib/resources/price_lists.js +8 -10
  199. package/lib/resources/price_tiers.cjs +5 -7
  200. package/lib/resources/price_tiers.js +5 -7
  201. package/lib/resources/price_volume_tiers.cjs +8 -10
  202. package/lib/resources/price_volume_tiers.js +8 -10
  203. package/lib/resources/prices.cjs +8 -10
  204. package/lib/resources/prices.js +8 -10
  205. package/lib/resources/promotion_rules.cjs +5 -7
  206. package/lib/resources/promotion_rules.js +5 -7
  207. package/lib/resources/promotions.cjs +5 -7
  208. package/lib/resources/promotions.js +5 -7
  209. package/lib/resources/recurring_order_copies.cjs +8 -10
  210. package/lib/resources/recurring_order_copies.js +8 -10
  211. package/lib/resources/refunds.cjs +7 -9
  212. package/lib/resources/refunds.js +7 -9
  213. package/lib/resources/reserved_stocks.cjs +5 -7
  214. package/lib/resources/reserved_stocks.js +5 -7
  215. package/lib/resources/resource_errors.cjs +5 -7
  216. package/lib/resources/resource_errors.js +5 -7
  217. package/lib/resources/return_line_items.cjs +9 -11
  218. package/lib/resources/return_line_items.js +9 -11
  219. package/lib/resources/returns.cjs +21 -23
  220. package/lib/resources/returns.js +21 -23
  221. package/lib/resources/satispay_gateways.cjs +8 -10
  222. package/lib/resources/satispay_gateways.js +8 -10
  223. package/lib/resources/satispay_payments.cjs +9 -11
  224. package/lib/resources/satispay_payments.js +9 -11
  225. package/lib/resources/shipments.cjs +23 -25
  226. package/lib/resources/shipments.js +23 -25
  227. package/lib/resources/shipping_categories.cjs +8 -10
  228. package/lib/resources/shipping_categories.js +8 -10
  229. package/lib/resources/shipping_method_tiers.cjs +5 -7
  230. package/lib/resources/shipping_method_tiers.js +5 -7
  231. package/lib/resources/shipping_methods.cjs +11 -13
  232. package/lib/resources/shipping_methods.js +11 -13
  233. package/lib/resources/shipping_weight_tiers.cjs +8 -10
  234. package/lib/resources/shipping_weight_tiers.js +8 -10
  235. package/lib/resources/shipping_zones.cjs +8 -10
  236. package/lib/resources/shipping_zones.js +8 -10
  237. package/lib/resources/sku_list_items.cjs +8 -10
  238. package/lib/resources/sku_list_items.js +8 -10
  239. package/lib/resources/sku_list_promotion_rules.cjs +8 -10
  240. package/lib/resources/sku_list_promotion_rules.js +8 -10
  241. package/lib/resources/sku_lists.cjs +8 -10
  242. package/lib/resources/sku_lists.js +8 -10
  243. package/lib/resources/sku_options.cjs +10 -12
  244. package/lib/resources/sku_options.js +10 -12
  245. package/lib/resources/skus.cjs +10 -12
  246. package/lib/resources/skus.js +10 -12
  247. package/lib/resources/stock_items.cjs +9 -11
  248. package/lib/resources/stock_items.js +9 -11
  249. package/lib/resources/stock_line_items.cjs +11 -13
  250. package/lib/resources/stock_line_items.js +11 -13
  251. package/lib/resources/stock_locations.cjs +8 -10
  252. package/lib/resources/stock_locations.js +8 -10
  253. package/lib/resources/stock_reservations.cjs +9 -11
  254. package/lib/resources/stock_reservations.js +9 -11
  255. package/lib/resources/stock_transfers.cjs +14 -16
  256. package/lib/resources/stock_transfers.js +14 -16
  257. package/lib/resources/stores.cjs +8 -10
  258. package/lib/resources/stores.js +8 -10
  259. package/lib/resources/stripe_gateways.cjs +8 -10
  260. package/lib/resources/stripe_gateways.js +8 -10
  261. package/lib/resources/stripe_payments.cjs +10 -12
  262. package/lib/resources/stripe_payments.js +10 -12
  263. package/lib/resources/stripe_tax_accounts.cjs +8 -10
  264. package/lib/resources/stripe_tax_accounts.js +8 -10
  265. package/lib/resources/subscription_models.cjs +8 -10
  266. package/lib/resources/subscription_models.js +8 -10
  267. package/lib/resources/tags.cjs +8 -10
  268. package/lib/resources/tags.js +8 -10
  269. package/lib/resources/talon_one_accounts.cjs +8 -10
  270. package/lib/resources/talon_one_accounts.js +8 -10
  271. package/lib/resources/tax_calculators.cjs +5 -7
  272. package/lib/resources/tax_calculators.js +5 -7
  273. package/lib/resources/tax_categories.cjs +8 -10
  274. package/lib/resources/tax_categories.js +8 -10
  275. package/lib/resources/tax_rules.cjs +8 -10
  276. package/lib/resources/tax_rules.js +8 -10
  277. package/lib/resources/taxjar_accounts.cjs +8 -10
  278. package/lib/resources/taxjar_accounts.js +8 -10
  279. package/lib/resources/transactions.cjs +5 -7
  280. package/lib/resources/transactions.js +5 -7
  281. package/lib/resources/versions.cjs +5 -7
  282. package/lib/resources/versions.js +5 -7
  283. package/lib/resources/vertex_accounts.cjs +9 -11
  284. package/lib/resources/vertex_accounts.js +9 -11
  285. package/lib/resources/voids.cjs +7 -9
  286. package/lib/resources/voids.js +7 -9
  287. package/lib/resources/webhooks.cjs +11 -13
  288. package/lib/resources/webhooks.js +11 -13
  289. package/lib/resources/wire_transfers.cjs +8 -10
  290. package/lib/resources/wire_transfers.js +8 -10
  291. package/lib/static.cjs +0 -1
  292. package/lib/static.js +0 -1
  293. package/lib/util.cjs +0 -2
  294. package/lib/util.js +0 -2
  295. package/package.json +4 -4
  296. package/lib/chunk-AQ5VUG5P.js +0 -12
  297. package/lib/chunk-JE77HYXB.cjs +0 -17
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
4
3
  var resource = require('../resource');
5
4
 
6
- const _ExternalTaxCalculators = class _ExternalTaxCalculators extends resource.ApiResource {
5
+ class ExternalTaxCalculators extends resource.ApiResource {
6
+ static TYPE = "external_tax_calculators";
7
7
  async create(resource, params, options) {
8
- return this.resources.create({ ...resource, type: _ExternalTaxCalculators.TYPE }, params, options);
8
+ return this.resources.create({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update({ ...resource, type: _ExternalTaxCalculators.TYPE }, params, options);
11
+ return this.resources.update({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
- await this.resources.delete(typeof id === "string" ? { id, type: _ExternalTaxCalculators.TYPE } : id, options);
14
+ await this.resources.delete(typeof id === "string" ? { id, type: ExternalTaxCalculators.TYPE } : id, options);
15
15
  }
16
16
  async markets(externalTaxCalculatorId, params, options) {
17
17
  const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
@@ -30,10 +30,10 @@ const _ExternalTaxCalculators = class _ExternalTaxCalculators extends resource.A
30
30
  return this.resources.fetch({ type: "versions" }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options);
31
31
  }
32
32
  async _reset_circuit(id, params, options) {
33
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _ExternalTaxCalculators.TYPE, _reset_circuit: true }, params, options);
33
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: ExternalTaxCalculators.TYPE, _reset_circuit: true }, params, options);
34
34
  }
35
35
  isExternalTaxCalculator(resource) {
36
- return resource.type && resource.type === _ExternalTaxCalculators.TYPE;
36
+ return resource.type && resource.type === ExternalTaxCalculators.TYPE;
37
37
  }
38
38
  relationship(id) {
39
39
  return super.relationshipOneToOne(id);
@@ -42,11 +42,9 @@ const _ExternalTaxCalculators = class _ExternalTaxCalculators extends resource.A
42
42
  return super.relationshipOneToMany(...ids);
43
43
  }
44
44
  type() {
45
- return _ExternalTaxCalculators.TYPE;
45
+ return ExternalTaxCalculators.TYPE;
46
46
  }
47
- };
48
- chunkJE77HYXB_cjs.__publicField(_ExternalTaxCalculators, "TYPE", "external_tax_calculators");
49
- let ExternalTaxCalculators = _ExternalTaxCalculators;
47
+ }
50
48
  const instance = new ExternalTaxCalculators();
51
49
  var external_tax_calculators_default = instance;
52
50
 
@@ -1,15 +1,15 @@
1
- import { __publicField } from '../chunk-AQ5VUG5P.js';
2
1
  import { ApiResource } from '../resource';
3
2
 
4
- const _ExternalTaxCalculators = class _ExternalTaxCalculators extends ApiResource {
3
+ class ExternalTaxCalculators extends ApiResource {
4
+ static TYPE = "external_tax_calculators";
5
5
  async create(resource, params, options) {
6
- return this.resources.create({ ...resource, type: _ExternalTaxCalculators.TYPE }, params, options);
6
+ return this.resources.create({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
7
7
  }
8
8
  async update(resource, params, options) {
9
- return this.resources.update({ ...resource, type: _ExternalTaxCalculators.TYPE }, params, options);
9
+ return this.resources.update({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
10
10
  }
11
11
  async delete(id, options) {
12
- await this.resources.delete(typeof id === "string" ? { id, type: _ExternalTaxCalculators.TYPE } : id, options);
12
+ await this.resources.delete(typeof id === "string" ? { id, type: ExternalTaxCalculators.TYPE } : id, options);
13
13
  }
14
14
  async markets(externalTaxCalculatorId, params, options) {
15
15
  const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
@@ -28,10 +28,10 @@ const _ExternalTaxCalculators = class _ExternalTaxCalculators extends ApiResourc
28
28
  return this.resources.fetch({ type: "versions" }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options);
29
29
  }
30
30
  async _reset_circuit(id, params, options) {
31
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _ExternalTaxCalculators.TYPE, _reset_circuit: true }, params, options);
31
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: ExternalTaxCalculators.TYPE, _reset_circuit: true }, params, options);
32
32
  }
33
33
  isExternalTaxCalculator(resource) {
34
- return resource.type && resource.type === _ExternalTaxCalculators.TYPE;
34
+ return resource.type && resource.type === ExternalTaxCalculators.TYPE;
35
35
  }
36
36
  relationship(id) {
37
37
  return super.relationshipOneToOne(id);
@@ -40,11 +40,9 @@ const _ExternalTaxCalculators = class _ExternalTaxCalculators extends ApiResourc
40
40
  return super.relationshipOneToMany(...ids);
41
41
  }
42
42
  type() {
43
- return _ExternalTaxCalculators.TYPE;
43
+ return ExternalTaxCalculators.TYPE;
44
44
  }
45
- };
46
- __publicField(_ExternalTaxCalculators, "TYPE", "external_tax_calculators");
47
- let ExternalTaxCalculators = _ExternalTaxCalculators;
45
+ }
48
46
  const instance = new ExternalTaxCalculators();
49
47
  var external_tax_calculators_default = instance;
50
48
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
4
3
  var resource = require('../resource');
5
4
 
6
- const _FixedAmountPromotions = class _FixedAmountPromotions extends resource.ApiResource {
5
+ class FixedAmountPromotions extends resource.ApiResource {
6
+ static TYPE = "fixed_amount_promotions";
7
7
  async create(resource, params, options) {
8
- return this.resources.create({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
8
+ return this.resources.create({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
11
+ return this.resources.update({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
- await this.resources.delete(typeof id === "string" ? { id, type: _FixedAmountPromotions.TYPE } : id, options);
14
+ await this.resources.delete(typeof id === "string" ? { id, type: FixedAmountPromotions.TYPE } : id, options);
15
15
  }
16
16
  async market(fixedAmountPromotionId, params, options) {
17
17
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
@@ -62,19 +62,19 @@ const _FixedAmountPromotions = class _FixedAmountPromotions extends resource.Api
62
62
  return this.resources.fetch({ type: "skus" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/skus`, params, options);
63
63
  }
64
64
  async _disable(id, params, options) {
65
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _disable: true }, params, options);
65
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _disable: true }, params, options);
66
66
  }
67
67
  async _enable(id, params, options) {
68
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _enable: true }, params, options);
68
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _enable: true }, params, options);
69
69
  }
70
70
  async _add_tags(id, triggerValue, params, options) {
71
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options);
71
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options);
72
72
  }
73
73
  async _remove_tags(id, triggerValue, params, options) {
74
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options);
74
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options);
75
75
  }
76
76
  isFixedAmountPromotion(resource) {
77
- return resource.type && resource.type === _FixedAmountPromotions.TYPE;
77
+ return resource.type && resource.type === FixedAmountPromotions.TYPE;
78
78
  }
79
79
  relationship(id) {
80
80
  return super.relationshipOneToOne(id);
@@ -83,11 +83,9 @@ const _FixedAmountPromotions = class _FixedAmountPromotions extends resource.Api
83
83
  return super.relationshipOneToMany(...ids);
84
84
  }
85
85
  type() {
86
- return _FixedAmountPromotions.TYPE;
86
+ return FixedAmountPromotions.TYPE;
87
87
  }
88
- };
89
- chunkJE77HYXB_cjs.__publicField(_FixedAmountPromotions, "TYPE", "fixed_amount_promotions");
90
- let FixedAmountPromotions = _FixedAmountPromotions;
88
+ }
91
89
  const instance = new FixedAmountPromotions();
92
90
  var fixed_amount_promotions_default = instance;
93
91
 
@@ -1,15 +1,15 @@
1
- import { __publicField } from '../chunk-AQ5VUG5P.js';
2
1
  import { ApiResource } from '../resource';
3
2
 
4
- const _FixedAmountPromotions = class _FixedAmountPromotions extends ApiResource {
3
+ class FixedAmountPromotions extends ApiResource {
4
+ static TYPE = "fixed_amount_promotions";
5
5
  async create(resource, params, options) {
6
- return this.resources.create({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
6
+ return this.resources.create({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
7
7
  }
8
8
  async update(resource, params, options) {
9
- return this.resources.update({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
9
+ return this.resources.update({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
10
10
  }
11
11
  async delete(id, options) {
12
- await this.resources.delete(typeof id === "string" ? { id, type: _FixedAmountPromotions.TYPE } : id, options);
12
+ await this.resources.delete(typeof id === "string" ? { id, type: FixedAmountPromotions.TYPE } : id, options);
13
13
  }
14
14
  async market(fixedAmountPromotionId, params, options) {
15
15
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
@@ -60,19 +60,19 @@ const _FixedAmountPromotions = class _FixedAmountPromotions extends ApiResource
60
60
  return this.resources.fetch({ type: "skus" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/skus`, params, options);
61
61
  }
62
62
  async _disable(id, params, options) {
63
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _disable: true }, params, options);
63
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _disable: true }, params, options);
64
64
  }
65
65
  async _enable(id, params, options) {
66
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _enable: true }, params, options);
66
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _enable: true }, params, options);
67
67
  }
68
68
  async _add_tags(id, triggerValue, params, options) {
69
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options);
69
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options);
70
70
  }
71
71
  async _remove_tags(id, triggerValue, params, options) {
72
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options);
72
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options);
73
73
  }
74
74
  isFixedAmountPromotion(resource) {
75
- return resource.type && resource.type === _FixedAmountPromotions.TYPE;
75
+ return resource.type && resource.type === FixedAmountPromotions.TYPE;
76
76
  }
77
77
  relationship(id) {
78
78
  return super.relationshipOneToOne(id);
@@ -81,11 +81,9 @@ const _FixedAmountPromotions = class _FixedAmountPromotions extends ApiResource
81
81
  return super.relationshipOneToMany(...ids);
82
82
  }
83
83
  type() {
84
- return _FixedAmountPromotions.TYPE;
84
+ return FixedAmountPromotions.TYPE;
85
85
  }
86
- };
87
- __publicField(_FixedAmountPromotions, "TYPE", "fixed_amount_promotions");
88
- let FixedAmountPromotions = _FixedAmountPromotions;
86
+ }
89
87
  const instance = new FixedAmountPromotions();
90
88
  var fixed_amount_promotions_default = instance;
91
89
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
4
3
  var resource = require('../resource');
5
4
 
6
- const _FixedPricePromotions = class _FixedPricePromotions extends resource.ApiResource {
5
+ class FixedPricePromotions extends resource.ApiResource {
6
+ static TYPE = "fixed_price_promotions";
7
7
  async create(resource, params, options) {
8
- return this.resources.create({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
8
+ return this.resources.create({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
11
+ return this.resources.update({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
- await this.resources.delete(typeof id === "string" ? { id, type: _FixedPricePromotions.TYPE } : id, options);
14
+ await this.resources.delete(typeof id === "string" ? { id, type: FixedPricePromotions.TYPE } : id, options);
15
15
  }
16
16
  async market(fixedPricePromotionId, params, options) {
17
17
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
@@ -62,19 +62,19 @@ const _FixedPricePromotions = class _FixedPricePromotions extends resource.ApiRe
62
62
  return this.resources.fetch({ type: "skus" }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
63
63
  }
64
64
  async _disable(id, params, options) {
65
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _disable: true }, params, options);
65
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _disable: true }, params, options);
66
66
  }
67
67
  async _enable(id, params, options) {
68
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _enable: true }, params, options);
68
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _enable: true }, params, options);
69
69
  }
70
70
  async _add_tags(id, triggerValue, params, options) {
71
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options);
71
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options);
72
72
  }
73
73
  async _remove_tags(id, triggerValue, params, options) {
74
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options);
74
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options);
75
75
  }
76
76
  isFixedPricePromotion(resource) {
77
- return resource.type && resource.type === _FixedPricePromotions.TYPE;
77
+ return resource.type && resource.type === FixedPricePromotions.TYPE;
78
78
  }
79
79
  relationship(id) {
80
80
  return super.relationshipOneToOne(id);
@@ -83,11 +83,9 @@ const _FixedPricePromotions = class _FixedPricePromotions extends resource.ApiRe
83
83
  return super.relationshipOneToMany(...ids);
84
84
  }
85
85
  type() {
86
- return _FixedPricePromotions.TYPE;
86
+ return FixedPricePromotions.TYPE;
87
87
  }
88
- };
89
- chunkJE77HYXB_cjs.__publicField(_FixedPricePromotions, "TYPE", "fixed_price_promotions");
90
- let FixedPricePromotions = _FixedPricePromotions;
88
+ }
91
89
  const instance = new FixedPricePromotions();
92
90
  var fixed_price_promotions_default = instance;
93
91
 
@@ -1,15 +1,15 @@
1
- import { __publicField } from '../chunk-AQ5VUG5P.js';
2
1
  import { ApiResource } from '../resource';
3
2
 
4
- const _FixedPricePromotions = class _FixedPricePromotions extends ApiResource {
3
+ class FixedPricePromotions extends ApiResource {
4
+ static TYPE = "fixed_price_promotions";
5
5
  async create(resource, params, options) {
6
- return this.resources.create({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
6
+ return this.resources.create({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
7
7
  }
8
8
  async update(resource, params, options) {
9
- return this.resources.update({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
9
+ return this.resources.update({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
10
10
  }
11
11
  async delete(id, options) {
12
- await this.resources.delete(typeof id === "string" ? { id, type: _FixedPricePromotions.TYPE } : id, options);
12
+ await this.resources.delete(typeof id === "string" ? { id, type: FixedPricePromotions.TYPE } : id, options);
13
13
  }
14
14
  async market(fixedPricePromotionId, params, options) {
15
15
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
@@ -60,19 +60,19 @@ const _FixedPricePromotions = class _FixedPricePromotions extends ApiResource {
60
60
  return this.resources.fetch({ type: "skus" }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
61
61
  }
62
62
  async _disable(id, params, options) {
63
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _disable: true }, params, options);
63
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _disable: true }, params, options);
64
64
  }
65
65
  async _enable(id, params, options) {
66
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _enable: true }, params, options);
66
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _enable: true }, params, options);
67
67
  }
68
68
  async _add_tags(id, triggerValue, params, options) {
69
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options);
69
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options);
70
70
  }
71
71
  async _remove_tags(id, triggerValue, params, options) {
72
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options);
72
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options);
73
73
  }
74
74
  isFixedPricePromotion(resource) {
75
- return resource.type && resource.type === _FixedPricePromotions.TYPE;
75
+ return resource.type && resource.type === FixedPricePromotions.TYPE;
76
76
  }
77
77
  relationship(id) {
78
78
  return super.relationshipOneToOne(id);
@@ -81,11 +81,9 @@ const _FixedPricePromotions = class _FixedPricePromotions extends ApiResource {
81
81
  return super.relationshipOneToMany(...ids);
82
82
  }
83
83
  type() {
84
- return _FixedPricePromotions.TYPE;
84
+ return FixedPricePromotions.TYPE;
85
85
  }
86
- };
87
- __publicField(_FixedPricePromotions, "TYPE", "fixed_price_promotions");
88
- let FixedPricePromotions = _FixedPricePromotions;
86
+ }
89
87
  const instance = new FixedPricePromotions();
90
88
  var fixed_price_promotions_default = instance;
91
89
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
4
3
  var resource = require('../resource');
5
4
 
6
- const _FlexPromotions = class _FlexPromotions extends resource.ApiResource {
5
+ class FlexPromotions extends resource.ApiResource {
6
+ static TYPE = "flex_promotions";
7
7
  async create(resource, params, options) {
8
- return this.resources.create({ ...resource, type: _FlexPromotions.TYPE }, params, options);
8
+ return this.resources.create({ ...resource, type: FlexPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update({ ...resource, type: _FlexPromotions.TYPE }, params, options);
11
+ return this.resources.update({ ...resource, type: FlexPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
- await this.resources.delete(typeof id === "string" ? { id, type: _FlexPromotions.TYPE } : id, options);
14
+ await this.resources.delete(typeof id === "string" ? { id, type: FlexPromotions.TYPE } : id, options);
15
15
  }
16
16
  async coupon_codes_promotion_rule(flexPromotionId, params, options) {
17
17
  const _flexPromotionId = flexPromotionId.id || flexPromotionId;
@@ -38,19 +38,19 @@ const _FlexPromotions = class _FlexPromotions extends resource.ApiResource {
38
38
  return this.resources.fetch({ type: "versions" }, `flex_promotions/${_flexPromotionId}/versions`, params, options);
39
39
  }
40
40
  async _disable(id, params, options) {
41
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _disable: true }, params, options);
41
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _disable: true }, params, options);
42
42
  }
43
43
  async _enable(id, params, options) {
44
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _enable: true }, params, options);
44
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _enable: true }, params, options);
45
45
  }
46
46
  async _add_tags(id, triggerValue, params, options) {
47
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _add_tags: triggerValue }, params, options);
47
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _add_tags: triggerValue }, params, options);
48
48
  }
49
49
  async _remove_tags(id, triggerValue, params, options) {
50
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _remove_tags: triggerValue }, params, options);
50
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _remove_tags: triggerValue }, params, options);
51
51
  }
52
52
  isFlexPromotion(resource) {
53
- return resource.type && resource.type === _FlexPromotions.TYPE;
53
+ return resource.type && resource.type === FlexPromotions.TYPE;
54
54
  }
55
55
  relationship(id) {
56
56
  return super.relationshipOneToOne(id);
@@ -59,11 +59,9 @@ const _FlexPromotions = class _FlexPromotions extends resource.ApiResource {
59
59
  return super.relationshipOneToMany(...ids);
60
60
  }
61
61
  type() {
62
- return _FlexPromotions.TYPE;
62
+ return FlexPromotions.TYPE;
63
63
  }
64
- };
65
- chunkJE77HYXB_cjs.__publicField(_FlexPromotions, "TYPE", "flex_promotions");
66
- let FlexPromotions = _FlexPromotions;
64
+ }
67
65
  const instance = new FlexPromotions();
68
66
  var flex_promotions_default = instance;
69
67
 
@@ -1,15 +1,15 @@
1
- import { __publicField } from '../chunk-AQ5VUG5P.js';
2
1
  import { ApiResource } from '../resource';
3
2
 
4
- const _FlexPromotions = class _FlexPromotions extends ApiResource {
3
+ class FlexPromotions extends ApiResource {
4
+ static TYPE = "flex_promotions";
5
5
  async create(resource, params, options) {
6
- return this.resources.create({ ...resource, type: _FlexPromotions.TYPE }, params, options);
6
+ return this.resources.create({ ...resource, type: FlexPromotions.TYPE }, params, options);
7
7
  }
8
8
  async update(resource, params, options) {
9
- return this.resources.update({ ...resource, type: _FlexPromotions.TYPE }, params, options);
9
+ return this.resources.update({ ...resource, type: FlexPromotions.TYPE }, params, options);
10
10
  }
11
11
  async delete(id, options) {
12
- await this.resources.delete(typeof id === "string" ? { id, type: _FlexPromotions.TYPE } : id, options);
12
+ await this.resources.delete(typeof id === "string" ? { id, type: FlexPromotions.TYPE } : id, options);
13
13
  }
14
14
  async coupon_codes_promotion_rule(flexPromotionId, params, options) {
15
15
  const _flexPromotionId = flexPromotionId.id || flexPromotionId;
@@ -36,19 +36,19 @@ const _FlexPromotions = class _FlexPromotions extends ApiResource {
36
36
  return this.resources.fetch({ type: "versions" }, `flex_promotions/${_flexPromotionId}/versions`, params, options);
37
37
  }
38
38
  async _disable(id, params, options) {
39
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _disable: true }, params, options);
39
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _disable: true }, params, options);
40
40
  }
41
41
  async _enable(id, params, options) {
42
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _enable: true }, params, options);
42
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _enable: true }, params, options);
43
43
  }
44
44
  async _add_tags(id, triggerValue, params, options) {
45
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _add_tags: triggerValue }, params, options);
45
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _add_tags: triggerValue }, params, options);
46
46
  }
47
47
  async _remove_tags(id, triggerValue, params, options) {
48
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FlexPromotions.TYPE, _remove_tags: triggerValue }, params, options);
48
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FlexPromotions.TYPE, _remove_tags: triggerValue }, params, options);
49
49
  }
50
50
  isFlexPromotion(resource) {
51
- return resource.type && resource.type === _FlexPromotions.TYPE;
51
+ return resource.type && resource.type === FlexPromotions.TYPE;
52
52
  }
53
53
  relationship(id) {
54
54
  return super.relationshipOneToOne(id);
@@ -57,11 +57,9 @@ const _FlexPromotions = class _FlexPromotions extends ApiResource {
57
57
  return super.relationshipOneToMany(...ids);
58
58
  }
59
59
  type() {
60
- return _FlexPromotions.TYPE;
60
+ return FlexPromotions.TYPE;
61
61
  }
62
- };
63
- __publicField(_FlexPromotions, "TYPE", "flex_promotions");
64
- let FlexPromotions = _FlexPromotions;
62
+ }
65
63
  const instance = new FlexPromotions();
66
64
  var flex_promotions_default = instance;
67
65
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
4
3
  var resource = require('../resource');
5
4
 
6
- const _FreeGiftPromotions = class _FreeGiftPromotions extends resource.ApiResource {
5
+ class FreeGiftPromotions extends resource.ApiResource {
6
+ static TYPE = "free_gift_promotions";
7
7
  async create(resource, params, options) {
8
- return this.resources.create({ ...resource, type: _FreeGiftPromotions.TYPE }, params, options);
8
+ return this.resources.create({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update({ ...resource, type: _FreeGiftPromotions.TYPE }, params, options);
11
+ return this.resources.update({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
- await this.resources.delete(typeof id === "string" ? { id, type: _FreeGiftPromotions.TYPE } : id, options);
14
+ await this.resources.delete(typeof id === "string" ? { id, type: FreeGiftPromotions.TYPE } : id, options);
15
15
  }
16
16
  async market(freeGiftPromotionId, params, options) {
17
17
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
@@ -62,19 +62,19 @@ const _FreeGiftPromotions = class _FreeGiftPromotions extends resource.ApiResour
62
62
  return this.resources.fetch({ type: "skus" }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
63
63
  }
64
64
  async _disable(id, params, options) {
65
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _disable: true }, params, options);
65
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _disable: true }, params, options);
66
66
  }
67
67
  async _enable(id, params, options) {
68
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _enable: true }, params, options);
68
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _enable: true }, params, options);
69
69
  }
70
70
  async _add_tags(id, triggerValue, params, options) {
71
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _add_tags: triggerValue }, params, options);
71
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _add_tags: triggerValue }, params, options);
72
72
  }
73
73
  async _remove_tags(id, triggerValue, params, options) {
74
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _remove_tags: triggerValue }, params, options);
74
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _remove_tags: triggerValue }, params, options);
75
75
  }
76
76
  isFreeGiftPromotion(resource) {
77
- return resource.type && resource.type === _FreeGiftPromotions.TYPE;
77
+ return resource.type && resource.type === FreeGiftPromotions.TYPE;
78
78
  }
79
79
  relationship(id) {
80
80
  return super.relationshipOneToOne(id);
@@ -83,11 +83,9 @@ const _FreeGiftPromotions = class _FreeGiftPromotions extends resource.ApiResour
83
83
  return super.relationshipOneToMany(...ids);
84
84
  }
85
85
  type() {
86
- return _FreeGiftPromotions.TYPE;
86
+ return FreeGiftPromotions.TYPE;
87
87
  }
88
- };
89
- chunkJE77HYXB_cjs.__publicField(_FreeGiftPromotions, "TYPE", "free_gift_promotions");
90
- let FreeGiftPromotions = _FreeGiftPromotions;
88
+ }
91
89
  const instance = new FreeGiftPromotions();
92
90
  var free_gift_promotions_default = instance;
93
91
 
@@ -1,15 +1,15 @@
1
- import { __publicField } from '../chunk-AQ5VUG5P.js';
2
1
  import { ApiResource } from '../resource';
3
2
 
4
- const _FreeGiftPromotions = class _FreeGiftPromotions extends ApiResource {
3
+ class FreeGiftPromotions extends ApiResource {
4
+ static TYPE = "free_gift_promotions";
5
5
  async create(resource, params, options) {
6
- return this.resources.create({ ...resource, type: _FreeGiftPromotions.TYPE }, params, options);
6
+ return this.resources.create({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
7
7
  }
8
8
  async update(resource, params, options) {
9
- return this.resources.update({ ...resource, type: _FreeGiftPromotions.TYPE }, params, options);
9
+ return this.resources.update({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
10
10
  }
11
11
  async delete(id, options) {
12
- await this.resources.delete(typeof id === "string" ? { id, type: _FreeGiftPromotions.TYPE } : id, options);
12
+ await this.resources.delete(typeof id === "string" ? { id, type: FreeGiftPromotions.TYPE } : id, options);
13
13
  }
14
14
  async market(freeGiftPromotionId, params, options) {
15
15
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
@@ -60,19 +60,19 @@ const _FreeGiftPromotions = class _FreeGiftPromotions extends ApiResource {
60
60
  return this.resources.fetch({ type: "skus" }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
61
61
  }
62
62
  async _disable(id, params, options) {
63
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _disable: true }, params, options);
63
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _disable: true }, params, options);
64
64
  }
65
65
  async _enable(id, params, options) {
66
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _enable: true }, params, options);
66
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _enable: true }, params, options);
67
67
  }
68
68
  async _add_tags(id, triggerValue, params, options) {
69
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _add_tags: triggerValue }, params, options);
69
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _add_tags: triggerValue }, params, options);
70
70
  }
71
71
  async _remove_tags(id, triggerValue, params, options) {
72
- return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FreeGiftPromotions.TYPE, _remove_tags: triggerValue }, params, options);
72
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: FreeGiftPromotions.TYPE, _remove_tags: triggerValue }, params, options);
73
73
  }
74
74
  isFreeGiftPromotion(resource) {
75
- return resource.type && resource.type === _FreeGiftPromotions.TYPE;
75
+ return resource.type && resource.type === FreeGiftPromotions.TYPE;
76
76
  }
77
77
  relationship(id) {
78
78
  return super.relationshipOneToOne(id);
@@ -81,11 +81,9 @@ const _FreeGiftPromotions = class _FreeGiftPromotions extends ApiResource {
81
81
  return super.relationshipOneToMany(...ids);
82
82
  }
83
83
  type() {
84
- return _FreeGiftPromotions.TYPE;
84
+ return FreeGiftPromotions.TYPE;
85
85
  }
86
- };
87
- __publicField(_FreeGiftPromotions, "TYPE", "free_gift_promotions");
88
- let FreeGiftPromotions = _FreeGiftPromotions;
86
+ }
89
87
  const instance = new FreeGiftPromotions();
90
88
  var free_gift_promotions_default = instance;
91
89