@commercelayer/sdk 4.41.0 → 4.44.1

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 (65) hide show
  1. package/lib/cjs/commercelayer.d.ts +2 -2
  2. package/lib/cjs/commercelayer.js +1 -1
  3. package/lib/cjs/resources/adyen_gateways.d.ts +2 -2
  4. package/lib/cjs/resources/avalara_accounts.d.ts +6 -6
  5. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +10 -12
  6. package/lib/cjs/resources/buy_x_pay_y_promotions.js +6 -2
  7. package/lib/cjs/resources/external_promotions.d.ts +10 -12
  8. package/lib/cjs/resources/external_promotions.js +6 -2
  9. package/lib/cjs/resources/fixed_amount_promotions.d.ts +10 -12
  10. package/lib/cjs/resources/fixed_amount_promotions.js +6 -2
  11. package/lib/cjs/resources/fixed_price_promotions.d.ts +10 -12
  12. package/lib/cjs/resources/fixed_price_promotions.js +6 -2
  13. package/lib/cjs/resources/free_gift_promotions.d.ts +10 -12
  14. package/lib/cjs/resources/free_gift_promotions.js +6 -2
  15. package/lib/cjs/resources/free_shipping_promotions.d.ts +15 -12
  16. package/lib/cjs/resources/free_shipping_promotions.js +6 -2
  17. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  18. package/lib/cjs/resources/line_items.d.ts +3 -0
  19. package/lib/cjs/resources/line_items.js +4 -0
  20. package/lib/cjs/resources/order_subscriptions.d.ts +1 -0
  21. package/lib/cjs/resources/orders.d.ts +2 -0
  22. package/lib/cjs/resources/orders.js +4 -0
  23. package/lib/cjs/resources/payment_methods.d.ts +3 -0
  24. package/lib/cjs/resources/percentage_discount_promotions.d.ts +10 -12
  25. package/lib/cjs/resources/percentage_discount_promotions.js +6 -2
  26. package/lib/cjs/resources/promotions.d.ts +6 -3
  27. package/lib/cjs/resources/promotions.js +6 -2
  28. package/lib/cjs/resources/stock_line_items.d.ts +3 -0
  29. package/lib/cjs/resources/stock_reservations.d.ts +0 -1
  30. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  31. package/lib/cjs/resources/stripe_payments.d.ts +3 -0
  32. package/lib/esm/commercelayer.d.ts +2 -2
  33. package/lib/esm/commercelayer.js +1 -1
  34. package/lib/esm/resources/adyen_gateways.d.ts +2 -2
  35. package/lib/esm/resources/avalara_accounts.d.ts +6 -6
  36. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +10 -12
  37. package/lib/esm/resources/buy_x_pay_y_promotions.js +6 -2
  38. package/lib/esm/resources/external_promotions.d.ts +10 -12
  39. package/lib/esm/resources/external_promotions.js +6 -2
  40. package/lib/esm/resources/fixed_amount_promotions.d.ts +10 -12
  41. package/lib/esm/resources/fixed_amount_promotions.js +6 -2
  42. package/lib/esm/resources/fixed_price_promotions.d.ts +10 -12
  43. package/lib/esm/resources/fixed_price_promotions.js +6 -2
  44. package/lib/esm/resources/free_gift_promotions.d.ts +10 -12
  45. package/lib/esm/resources/free_gift_promotions.js +6 -2
  46. package/lib/esm/resources/free_shipping_promotions.d.ts +15 -12
  47. package/lib/esm/resources/free_shipping_promotions.js +6 -2
  48. package/lib/esm/resources/inventory_models.d.ts +3 -0
  49. package/lib/esm/resources/line_items.d.ts +3 -0
  50. package/lib/esm/resources/line_items.js +4 -0
  51. package/lib/esm/resources/order_subscriptions.d.ts +1 -0
  52. package/lib/esm/resources/orders.d.ts +2 -0
  53. package/lib/esm/resources/orders.js +4 -0
  54. package/lib/esm/resources/payment_methods.d.ts +3 -0
  55. package/lib/esm/resources/percentage_discount_promotions.d.ts +10 -12
  56. package/lib/esm/resources/percentage_discount_promotions.js +6 -2
  57. package/lib/esm/resources/promotions.d.ts +6 -3
  58. package/lib/esm/resources/promotions.js +6 -2
  59. package/lib/esm/resources/stock_line_items.d.ts +3 -0
  60. package/lib/esm/resources/stock_reservations.d.ts +0 -1
  61. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  62. package/lib/esm/resources/stripe_payments.d.ts +3 -0
  63. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  64. package/lib/tsconfig.tsbuildinfo +1 -1
  65. package/package.json +18 -18
@@ -5,8 +5,9 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
- import type { Coupon } from './coupons';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
9
  import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
10
11
  import type { Attachment } from './attachments';
11
12
  import type { Event } from './events';
12
13
  import type { Tag } from './tags';
@@ -18,9 +19,6 @@ type ExternalPromotionRel = ResourceRel & {
18
19
  type MarketRel = ResourceRel & {
19
20
  type: 'markets';
20
21
  };
21
- type PromotionRuleRel = ResourceRel & {
22
- type: 'promotion_rules';
23
- };
24
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
25
23
  type: 'order_amount_promotion_rules';
26
24
  };
@@ -30,8 +28,8 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
29
  type: 'coupon_codes_promotion_rules';
32
30
  };
33
- type CouponRel = ResourceRel & {
34
- type: 'coupons';
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
35
33
  };
36
34
  type SkuListRel = ResourceRel & {
37
35
  type: 'sku_lists';
@@ -57,8 +55,9 @@ interface ExternalPromotion extends Resource {
57
55
  order_amount_promotion_rule?: OrderAmountPromotionRule;
58
56
  sku_list_promotion_rule?: SkuListPromotionRule;
59
57
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
60
- coupons?: Coupon[];
58
+ custom_promotion_rule?: CustomPromotionRule;
61
59
  sku_list?: SkuList;
60
+ coupons?: Coupon[];
62
61
  attachments?: Attachment[];
63
62
  events?: Event[];
64
63
  tags?: Tag[];
@@ -77,11 +76,10 @@ interface ExternalPromotionCreate extends ResourceCreate {
77
76
  _enable?: boolean;
78
77
  promotion_url: string;
79
78
  market?: MarketRel;
80
- promotion_rules?: PromotionRuleRel[];
81
79
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
82
80
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
83
81
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
84
- coupons?: CouponRel[];
82
+ custom_promotion_rule?: CustomPromotionRuleRel;
85
83
  sku_list?: SkuListRel;
86
84
  tags?: TagRel[];
87
85
  }
@@ -97,11 +95,10 @@ interface ExternalPromotionUpdate extends ResourceUpdate {
97
95
  _enable?: boolean;
98
96
  promotion_url?: string;
99
97
  market?: MarketRel;
100
- promotion_rules?: PromotionRuleRel[];
101
98
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
102
99
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
103
100
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
104
- coupons?: CouponRel[];
101
+ custom_promotion_rule?: CustomPromotionRuleRel;
105
102
  sku_list?: SkuListRel;
106
103
  tags?: TagRel[];
107
104
  }
@@ -116,8 +113,9 @@ declare class ExternalPromotions extends ApiResource {
116
113
  order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
117
114
  sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
118
115
  coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
119
- coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
116
+ custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
120
117
  sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
118
+ coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
121
119
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
122
120
  events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
123
121
  tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -32,14 +32,18 @@ class ExternalPromotions extends ApiResource {
32
32
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
33
33
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
34
34
  }
35
- async coupons(externalPromotionId, params, options) {
35
+ async custom_promotion_rule(externalPromotionId, params, options) {
36
36
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
37
- return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
37
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options);
38
38
  }
39
39
  async sku_list(externalPromotionId, params, options) {
40
40
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
41
41
  return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
42
42
  }
43
+ async coupons(externalPromotionId, params, options) {
44
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
45
+ return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
46
+ }
43
47
  async attachments(externalPromotionId, params, options) {
44
48
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
45
49
  return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
@@ -5,8 +5,9 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
- import type { Coupon } from './coupons';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
9
  import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
10
11
  import type { Attachment } from './attachments';
11
12
  import type { Event } from './events';
12
13
  import type { Tag } from './tags';
@@ -18,9 +19,6 @@ type FixedAmountPromotionRel = ResourceRel & {
18
19
  type MarketRel = ResourceRel & {
19
20
  type: 'markets';
20
21
  };
21
- type PromotionRuleRel = ResourceRel & {
22
- type: 'promotion_rules';
23
- };
24
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
25
23
  type: 'order_amount_promotion_rules';
26
24
  };
@@ -30,8 +28,8 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
29
  type: 'coupon_codes_promotion_rules';
32
30
  };
33
- type CouponRel = ResourceRel & {
34
- type: 'coupons';
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
35
33
  };
36
34
  type SkuListRel = ResourceRel & {
37
35
  type: 'sku_lists';
@@ -58,8 +56,9 @@ interface FixedAmountPromotion extends Resource {
58
56
  order_amount_promotion_rule?: OrderAmountPromotionRule;
59
57
  sku_list_promotion_rule?: SkuListPromotionRule;
60
58
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
61
- coupons?: Coupon[];
59
+ custom_promotion_rule?: CustomPromotionRule;
62
60
  sku_list?: SkuList;
61
+ coupons?: Coupon[];
63
62
  attachments?: Attachment[];
64
63
  events?: Event[];
65
64
  tags?: Tag[];
@@ -78,11 +77,10 @@ interface FixedAmountPromotionCreate extends ResourceCreate {
78
77
  _enable?: boolean;
79
78
  fixed_amount_cents: number;
80
79
  market?: MarketRel;
81
- promotion_rules?: PromotionRuleRel[];
82
80
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
83
81
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
84
82
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
85
- coupons?: CouponRel[];
83
+ custom_promotion_rule?: CustomPromotionRuleRel;
86
84
  sku_list?: SkuListRel;
87
85
  tags?: TagRel[];
88
86
  }
@@ -98,11 +96,10 @@ interface FixedAmountPromotionUpdate extends ResourceUpdate {
98
96
  _enable?: boolean;
99
97
  fixed_amount_cents?: number;
100
98
  market?: MarketRel;
101
- promotion_rules?: PromotionRuleRel[];
102
99
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
103
100
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
104
101
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
105
- coupons?: CouponRel[];
102
+ custom_promotion_rule?: CustomPromotionRuleRel;
106
103
  sku_list?: SkuListRel;
107
104
  tags?: TagRel[];
108
105
  }
@@ -117,8 +114,9 @@ declare class FixedAmountPromotions extends ApiResource {
117
114
  order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
118
115
  sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
119
116
  coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
120
- coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
117
+ custom_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
121
118
  sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
119
+ coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
122
120
  attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
123
121
  events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
124
122
  tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -32,14 +32,18 @@ class FixedAmountPromotions extends ApiResource {
32
32
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
33
33
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options);
34
34
  }
35
- async coupons(fixedAmountPromotionId, params, options) {
35
+ async custom_promotion_rule(fixedAmountPromotionId, params, options) {
36
36
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
37
- return this.resources.fetch({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
37
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options);
38
38
  }
39
39
  async sku_list(fixedAmountPromotionId, params, options) {
40
40
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
41
41
  return this.resources.fetch({ type: 'sku_lists' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options);
42
42
  }
43
+ async coupons(fixedAmountPromotionId, params, options) {
44
+ const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
45
+ return this.resources.fetch({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
46
+ }
43
47
  async attachments(fixedAmountPromotionId, params, options) {
44
48
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
45
49
  return this.resources.fetch({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options);
@@ -5,8 +5,9 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
- import type { Coupon } from './coupons';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
9
  import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
10
11
  import type { Attachment } from './attachments';
11
12
  import type { Event } from './events';
12
13
  import type { Tag } from './tags';
@@ -18,9 +19,6 @@ type FixedPricePromotionRel = ResourceRel & {
18
19
  type MarketRel = ResourceRel & {
19
20
  type: 'markets';
20
21
  };
21
- type PromotionRuleRel = ResourceRel & {
22
- type: 'promotion_rules';
23
- };
24
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
25
23
  type: 'order_amount_promotion_rules';
26
24
  };
@@ -30,8 +28,8 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
29
  type: 'coupon_codes_promotion_rules';
32
30
  };
33
- type CouponRel = ResourceRel & {
34
- type: 'coupons';
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
35
33
  };
36
34
  type SkuListRel = ResourceRel & {
37
35
  type: 'sku_lists';
@@ -58,8 +56,9 @@ interface FixedPricePromotion extends Resource {
58
56
  order_amount_promotion_rule?: OrderAmountPromotionRule;
59
57
  sku_list_promotion_rule?: SkuListPromotionRule;
60
58
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
61
- coupons?: Coupon[];
59
+ custom_promotion_rule?: CustomPromotionRule;
62
60
  sku_list?: SkuList;
61
+ coupons?: Coupon[];
63
62
  attachments?: Attachment[];
64
63
  events?: Event[];
65
64
  tags?: Tag[];
@@ -78,11 +77,10 @@ interface FixedPricePromotionCreate extends ResourceCreate {
78
77
  _enable?: boolean;
79
78
  fixed_amount_cents: number;
80
79
  market?: MarketRel;
81
- promotion_rules?: PromotionRuleRel[];
82
80
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
83
81
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
84
82
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
85
- coupons?: CouponRel[];
83
+ custom_promotion_rule?: CustomPromotionRuleRel;
86
84
  sku_list: SkuListRel;
87
85
  tags?: TagRel[];
88
86
  }
@@ -98,11 +96,10 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
98
96
  _enable?: boolean;
99
97
  fixed_amount_cents?: number;
100
98
  market?: MarketRel;
101
- promotion_rules?: PromotionRuleRel[];
102
99
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
103
100
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
104
101
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
105
- coupons?: CouponRel[];
102
+ custom_promotion_rule?: CustomPromotionRuleRel;
106
103
  sku_list?: SkuListRel;
107
104
  tags?: TagRel[];
108
105
  }
@@ -117,8 +114,9 @@ declare class FixedPricePromotions extends ApiResource {
117
114
  order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
118
115
  sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
119
116
  coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
120
- coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
117
+ custom_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
121
118
  sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
119
+ coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
122
120
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
123
121
  events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
124
122
  tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -32,14 +32,18 @@ class FixedPricePromotions extends ApiResource {
32
32
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
33
33
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options);
34
34
  }
35
- async coupons(fixedPricePromotionId, params, options) {
35
+ async custom_promotion_rule(fixedPricePromotionId, params, options) {
36
36
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
37
- return this.resources.fetch({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
37
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options);
38
38
  }
39
39
  async sku_list(fixedPricePromotionId, params, options) {
40
40
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
41
41
  return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
42
42
  }
43
+ async coupons(fixedPricePromotionId, params, options) {
44
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
45
+ return this.resources.fetch({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
46
+ }
43
47
  async attachments(fixedPricePromotionId, params, options) {
44
48
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
45
49
  return this.resources.fetch({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
@@ -5,8 +5,9 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
- import type { Coupon } from './coupons';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
9
  import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
10
11
  import type { Attachment } from './attachments';
11
12
  import type { Event } from './events';
12
13
  import type { Tag } from './tags';
@@ -18,9 +19,6 @@ type FreeGiftPromotionRel = ResourceRel & {
18
19
  type MarketRel = ResourceRel & {
19
20
  type: 'markets';
20
21
  };
21
- type PromotionRuleRel = ResourceRel & {
22
- type: 'promotion_rules';
23
- };
24
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
25
23
  type: 'order_amount_promotion_rules';
26
24
  };
@@ -30,8 +28,8 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
29
  type: 'coupon_codes_promotion_rules';
32
30
  };
33
- type CouponRel = ResourceRel & {
34
- type: 'coupons';
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
35
33
  };
36
34
  type SkuListRel = ResourceRel & {
37
35
  type: 'sku_lists';
@@ -56,8 +54,9 @@ interface FreeGiftPromotion extends Resource {
56
54
  order_amount_promotion_rule?: OrderAmountPromotionRule;
57
55
  sku_list_promotion_rule?: SkuListPromotionRule;
58
56
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
59
- coupons?: Coupon[];
57
+ custom_promotion_rule?: CustomPromotionRule;
60
58
  sku_list?: SkuList;
59
+ coupons?: Coupon[];
61
60
  attachments?: Attachment[];
62
61
  events?: Event[];
63
62
  tags?: Tag[];
@@ -76,11 +75,10 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
76
75
  _enable?: boolean;
77
76
  max_quantity?: number;
78
77
  market?: MarketRel;
79
- promotion_rules?: PromotionRuleRel[];
80
78
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
81
79
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
82
80
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
83
- coupons?: CouponRel[];
81
+ custom_promotion_rule?: CustomPromotionRuleRel;
84
82
  sku_list: SkuListRel;
85
83
  tags?: TagRel[];
86
84
  }
@@ -96,11 +94,10 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
96
94
  _enable?: boolean;
97
95
  max_quantity?: number;
98
96
  market?: MarketRel;
99
- promotion_rules?: PromotionRuleRel[];
100
97
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
101
98
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
102
99
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
103
- coupons?: CouponRel[];
100
+ custom_promotion_rule?: CustomPromotionRuleRel;
104
101
  sku_list?: SkuListRel;
105
102
  tags?: TagRel[];
106
103
  }
@@ -115,8 +112,9 @@ declare class FreeGiftPromotions extends ApiResource {
115
112
  order_amount_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
116
113
  sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
117
114
  coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
118
- coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
115
+ custom_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
119
116
  sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
117
+ coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
120
118
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
121
119
  events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
122
120
  tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -32,14 +32,18 @@ class FreeGiftPromotions extends ApiResource {
32
32
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
33
33
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options);
34
34
  }
35
- async coupons(freeGiftPromotionId, params, options) {
35
+ async custom_promotion_rule(freeGiftPromotionId, params, options) {
36
36
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
37
- return this.resources.fetch({ type: 'coupons' }, `free_gift_promotions/${_freeGiftPromotionId}/coupons`, params, options);
37
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/custom_promotion_rule`, params, options);
38
38
  }
39
39
  async sku_list(freeGiftPromotionId, params, options) {
40
40
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
41
41
  return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
42
42
  }
43
+ async coupons(freeGiftPromotionId, params, options) {
44
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
45
+ return this.resources.fetch({ type: 'coupons' }, `free_gift_promotions/${_freeGiftPromotionId}/coupons`, params, options);
46
+ }
43
47
  async attachments(freeGiftPromotionId, params, options) {
44
48
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
45
49
  return this.resources.fetch({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options);
@@ -5,8 +5,9 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
- import type { Coupon } from './coupons';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
9
  import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
10
11
  import type { Attachment } from './attachments';
11
12
  import type { Event } from './events';
12
13
  import type { Tag } from './tags';
@@ -17,9 +18,6 @@ type FreeShippingPromotionRel = ResourceRel & {
17
18
  type MarketRel = ResourceRel & {
18
19
  type: 'markets';
19
20
  };
20
- type PromotionRuleRel = ResourceRel & {
21
- type: 'promotion_rules';
22
- };
23
21
  type OrderAmountPromotionRuleRel = ResourceRel & {
24
22
  type: 'order_amount_promotion_rules';
25
23
  };
@@ -29,8 +27,11 @@ type SkuListPromotionRuleRel = ResourceRel & {
29
27
  type CouponCodesPromotionRuleRel = ResourceRel & {
30
28
  type: 'coupon_codes_promotion_rules';
31
29
  };
32
- type CouponRel = ResourceRel & {
33
- type: 'coupons';
30
+ type CustomPromotionRuleRel = ResourceRel & {
31
+ type: 'custom_promotion_rules';
32
+ };
33
+ type SkuListRel = ResourceRel & {
34
+ type: 'sku_lists';
34
35
  };
35
36
  type TagRel = ResourceRel & {
36
37
  type: 'tags';
@@ -51,8 +52,9 @@ interface FreeShippingPromotion extends Resource {
51
52
  order_amount_promotion_rule?: OrderAmountPromotionRule;
52
53
  sku_list_promotion_rule?: SkuListPromotionRule;
53
54
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
54
- coupons?: Coupon[];
55
+ custom_promotion_rule?: CustomPromotionRule;
55
56
  sku_list?: SkuList;
57
+ coupons?: Coupon[];
56
58
  attachments?: Attachment[];
57
59
  events?: Event[];
58
60
  tags?: Tag[];
@@ -69,11 +71,11 @@ interface FreeShippingPromotionCreate extends ResourceCreate {
69
71
  _disable?: boolean;
70
72
  _enable?: boolean;
71
73
  market?: MarketRel;
72
- promotion_rules?: PromotionRuleRel[];
73
74
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
74
75
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
75
76
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
76
- coupons?: CouponRel[];
77
+ custom_promotion_rule?: CustomPromotionRuleRel;
78
+ sku_list?: SkuListRel;
77
79
  tags?: TagRel[];
78
80
  }
79
81
  interface FreeShippingPromotionUpdate extends ResourceUpdate {
@@ -87,11 +89,11 @@ interface FreeShippingPromotionUpdate extends ResourceUpdate {
87
89
  _disable?: boolean;
88
90
  _enable?: boolean;
89
91
  market?: MarketRel;
90
- promotion_rules?: PromotionRuleRel[];
91
92
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
92
93
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
93
94
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
94
- coupons?: CouponRel[];
95
+ custom_promotion_rule?: CustomPromotionRuleRel;
96
+ sku_list?: SkuListRel;
95
97
  tags?: TagRel[];
96
98
  }
97
99
  declare class FreeShippingPromotions extends ApiResource {
@@ -105,8 +107,9 @@ declare class FreeShippingPromotions extends ApiResource {
105
107
  order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
106
108
  sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
107
109
  coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
108
- coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
110
+ custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
109
111
  sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
112
+ coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
110
113
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
111
114
  events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
112
115
  tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -32,14 +32,18 @@ class FreeShippingPromotions extends ApiResource {
32
32
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
33
33
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options);
34
34
  }
35
- async coupons(freeShippingPromotionId, params, options) {
35
+ async custom_promotion_rule(freeShippingPromotionId, params, options) {
36
36
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
37
- return this.resources.fetch({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options);
37
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options);
38
38
  }
39
39
  async sku_list(freeShippingPromotionId, params, options) {
40
40
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
41
41
  return this.resources.fetch({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options);
42
42
  }
43
+ async coupons(freeShippingPromotionId, params, options) {
44
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
45
+ return this.resources.fetch({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options);
46
+ }
43
47
  async attachments(freeShippingPromotionId, params, options) {
44
48
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
45
49
  return this.resources.fetch({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options);
@@ -13,6 +13,7 @@ interface InventoryModel extends Resource {
13
13
  stock_locations_cutoff?: number;
14
14
  stock_reservation_cutoff?: number;
15
15
  put_stock_transfers_on_hold?: boolean;
16
+ manual_stock_decrement?: boolean;
16
17
  inventory_stock_locations?: InventoryStockLocation[];
17
18
  inventory_return_locations?: InventoryReturnLocation[];
18
19
  attachments?: Attachment[];
@@ -24,6 +25,7 @@ interface InventoryModelCreate extends ResourceCreate {
24
25
  stock_locations_cutoff?: number;
25
26
  stock_reservation_cutoff?: number;
26
27
  put_stock_transfers_on_hold?: boolean;
28
+ manual_stock_decrement?: boolean;
27
29
  }
28
30
  interface InventoryModelUpdate extends ResourceUpdate {
29
31
  name?: string;
@@ -31,6 +33,7 @@ interface InventoryModelUpdate extends ResourceUpdate {
31
33
  stock_locations_cutoff?: number;
32
34
  stock_reservation_cutoff?: number;
33
35
  put_stock_transfers_on_hold?: boolean;
36
+ manual_stock_decrement?: boolean;
34
37
  }
35
38
  declare class InventoryModels extends ApiResource {
36
39
  static readonly TYPE: 'inventory_models';
@@ -12,6 +12,7 @@ import type { PercentageDiscountPromotion } from './percentage_discount_promotio
12
12
  import type { Shipment } from './shipments';
13
13
  import type { Sku } from './skus';
14
14
  import type { LineItemOption } from './line_item_options';
15
+ import type { ReturnLineItem } from './return_line_items';
15
16
  import type { StockReservation } from './stock_reservations';
16
17
  import type { StockLineItem } from './stock_line_items';
17
18
  import type { StockTransfer } from './stock_transfers';
@@ -93,6 +94,7 @@ interface LineItem extends Resource {
93
94
  sku?: Sku;
94
95
  bundle?: Bundle;
95
96
  line_item_options?: LineItemOption[];
97
+ return_line_items?: ReturnLineItem[];
96
98
  /**
97
99
  * @deprecated This field should not be used as it may be removed in the future without notice
98
100
  */
@@ -143,6 +145,7 @@ declare class LineItems extends ApiResource {
143
145
  delete(id: string, options?: ResourcesConfig): Promise<void>;
144
146
  order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
145
147
  line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
148
+ return_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
146
149
  stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
147
150
  stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
148
151
  stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
@@ -24,6 +24,10 @@ class LineItems extends ApiResource {
24
24
  const _lineItemId = lineItemId.id || lineItemId;
25
25
  return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
26
26
  }
27
+ async return_line_items(lineItemId, params, options) {
28
+ const _lineItemId = lineItemId.id || lineItemId;
29
+ return this.resources.fetch({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options);
30
+ }
27
31
  async stock_reservations(lineItemId, params, options) {
28
32
  const _lineItemId = lineItemId.id || lineItemId;
29
33
  return this.resources.fetch({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options);
@@ -30,6 +30,7 @@ interface OrderSubscription extends Resource {
30
30
  customer_email?: string;
31
31
  starts_at?: string;
32
32
  expires_at?: string;
33
+ last_run_at?: string;
33
34
  next_run_at?: string;
34
35
  occurrencies?: number;
35
36
  errors_count?: number;
@@ -214,6 +214,7 @@ interface Order extends Resource {
214
214
  voids?: Void[];
215
215
  refunds?: Refund[];
216
216
  returns?: Return[];
217
+ order_subscription?: OrderSubscription;
217
218
  order_subscriptions?: OrderSubscription[];
218
219
  order_factories?: OrderFactory[];
219
220
  order_copies?: OrderCopy[];
@@ -330,6 +331,7 @@ declare class Orders extends ApiResource {
330
331
  voids(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
331
332
  refunds(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
332
333
  returns(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Return>>;
334
+ order_subscription(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
333
335
  order_subscriptions(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
334
336
  order_factories(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>>;
335
337
  order_copies(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>>;
@@ -100,6 +100,10 @@ class Orders extends ApiResource {
100
100
  const _orderId = orderId.id || orderId;
101
101
  return this.resources.fetch({ type: 'returns' }, `orders/${_orderId}/returns`, params, options);
102
102
  }
103
+ async order_subscription(orderId, params, options) {
104
+ const _orderId = orderId.id || orderId;
105
+ return this.resources.fetch({ type: 'order_subscriptions' }, `orders/${_orderId}/order_subscription`, params, options);
106
+ }
103
107
  async order_subscriptions(orderId, params, options) {
104
108
  const _orderId = orderId.id || orderId;
105
109
  return this.resources.fetch({ type: 'order_subscriptions' }, `orders/${_orderId}/order_subscriptions`, params, options);
@@ -19,6 +19,7 @@ interface PaymentMethod extends Resource {
19
19
  currency_code?: string;
20
20
  moto?: boolean;
21
21
  require_capture?: boolean;
22
+ auto_place?: boolean;
22
23
  auto_capture?: boolean;
23
24
  disabled_at?: string;
24
25
  price_amount_cents?: number;
@@ -37,6 +38,7 @@ interface PaymentMethodCreate extends ResourceCreate {
37
38
  currency_code?: string;
38
39
  moto?: boolean;
39
40
  require_capture?: boolean;
41
+ auto_place?: boolean;
40
42
  auto_capture?: boolean;
41
43
  _disable?: boolean;
42
44
  _enable?: boolean;
@@ -50,6 +52,7 @@ interface PaymentMethodUpdate extends ResourceUpdate {
50
52
  currency_code?: string;
51
53
  moto?: boolean;
52
54
  require_capture?: boolean;
55
+ auto_place?: boolean;
53
56
  auto_capture?: boolean;
54
57
  _disable?: boolean;
55
58
  _enable?: boolean;