@commercelayer/sdk 4.40.0 → 4.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/lib/cjs/api.d.ts +3 -2
  2. package/lib/cjs/api.js +8 -2
  3. package/lib/cjs/client.d.ts +8 -9
  4. package/lib/cjs/client.js +42 -11
  5. package/lib/cjs/commercelayer.d.ts +4 -2
  6. package/lib/cjs/commercelayer.js +7 -1
  7. package/lib/cjs/error.d.ts +7 -7
  8. package/lib/cjs/jsonapi.d.ts +1 -0
  9. package/lib/cjs/jsonapi.js +1 -1
  10. package/lib/cjs/model.d.ts +1 -1
  11. package/lib/cjs/resource.d.ts +1 -1
  12. package/lib/cjs/resource.js +1 -2
  13. package/lib/cjs/resources/authorizations.d.ts +3 -3
  14. package/lib/cjs/resources/authorizations.js +4 -4
  15. package/lib/cjs/resources/avalara_accounts.d.ts +6 -6
  16. package/lib/cjs/resources/axerve_payments.d.ts +2 -0
  17. package/lib/cjs/resources/bundles.d.ts +8 -8
  18. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +12 -2
  19. package/lib/cjs/resources/buy_x_pay_y_promotions.js +4 -0
  20. package/lib/cjs/resources/captures.d.ts +3 -3
  21. package/lib/cjs/resources/captures.js +4 -4
  22. package/lib/cjs/resources/customer_payment_sources.d.ts +13 -1
  23. package/lib/cjs/resources/customer_payment_sources.js +4 -0
  24. package/lib/cjs/resources/external_promotions.d.ts +12 -2
  25. package/lib/cjs/resources/external_promotions.js +4 -0
  26. package/lib/cjs/resources/fixed_amount_promotions.d.ts +12 -2
  27. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  28. package/lib/cjs/resources/fixed_price_promotions.d.ts +12 -2
  29. package/lib/cjs/resources/fixed_price_promotions.js +4 -0
  30. package/lib/cjs/resources/free_gift_promotions.d.ts +12 -2
  31. package/lib/cjs/resources/free_gift_promotions.js +4 -0
  32. package/lib/cjs/resources/free_shipping_promotions.d.ts +12 -2
  33. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  34. package/lib/cjs/resources/imports.d.ts +0 -2
  35. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  36. package/lib/cjs/resources/line_items.d.ts +9 -0
  37. package/lib/cjs/resources/line_items.js +4 -0
  38. package/lib/cjs/resources/markets.d.ts +5 -0
  39. package/lib/cjs/resources/orders.d.ts +5 -1
  40. package/lib/cjs/resources/orders.js +4 -0
  41. package/lib/cjs/resources/organization.d.ts +4 -4
  42. package/lib/cjs/resources/payment_methods.d.ts +2 -0
  43. package/lib/cjs/resources/percentage_discount_promotions.d.ts +12 -2
  44. package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
  45. package/lib/cjs/resources/price_lists.d.ts +3 -0
  46. package/lib/cjs/resources/prices.d.ts +6 -6
  47. package/lib/cjs/resources/promotions.d.ts +4 -1
  48. package/lib/cjs/resources/promotions.js +4 -0
  49. package/lib/cjs/resources/refunds.d.ts +3 -3
  50. package/lib/cjs/resources/refunds.js +4 -4
  51. package/lib/cjs/resources/shipments.d.ts +11 -1
  52. package/lib/cjs/resources/shipments.js +7 -0
  53. package/lib/cjs/resources/shipping_categories.d.ts +3 -0
  54. package/lib/cjs/resources/shipping_methods.d.ts +2 -0
  55. package/lib/cjs/resources/stock_line_items.d.ts +7 -0
  56. package/lib/cjs/resources/stock_line_items.js +9 -0
  57. package/lib/cjs/resources/stock_locations.d.ts +3 -0
  58. package/lib/cjs/resources/stock_reservations.d.ts +0 -1
  59. package/lib/cjs/resources/stock_transfers.d.ts +1 -0
  60. package/lib/cjs/resources/stripe_payments.d.ts +2 -0
  61. package/lib/cjs/resources/transactions.d.ts +3 -0
  62. package/lib/cjs/resources/transactions.js +4 -0
  63. package/lib/cjs/resources/voids.d.ts +3 -3
  64. package/lib/cjs/resources/voids.js +4 -4
  65. package/lib/cjs/resources/webhooks.d.ts +7 -0
  66. package/lib/cjs/resources/webhooks.js +6 -0
  67. package/lib/cjs/static.d.ts +4 -1
  68. package/lib/cjs/static.js +8 -2
  69. package/lib/cjs/util.d.ts +6 -1
  70. package/lib/cjs/util.js +1 -0
  71. package/lib/esm/api.d.ts +3 -2
  72. package/lib/esm/api.js +7 -1
  73. package/lib/esm/client.d.ts +8 -9
  74. package/lib/esm/client.js +42 -11
  75. package/lib/esm/commercelayer.d.ts +4 -2
  76. package/lib/esm/commercelayer.js +7 -1
  77. package/lib/esm/error.d.ts +7 -7
  78. package/lib/esm/jsonapi.d.ts +1 -0
  79. package/lib/esm/jsonapi.js +1 -1
  80. package/lib/esm/model.d.ts +1 -1
  81. package/lib/esm/resource.d.ts +1 -1
  82. package/lib/esm/resource.js +1 -2
  83. package/lib/esm/resources/authorizations.d.ts +3 -3
  84. package/lib/esm/resources/authorizations.js +4 -4
  85. package/lib/esm/resources/avalara_accounts.d.ts +6 -6
  86. package/lib/esm/resources/axerve_payments.d.ts +2 -0
  87. package/lib/esm/resources/bundles.d.ts +8 -8
  88. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +12 -2
  89. package/lib/esm/resources/buy_x_pay_y_promotions.js +4 -0
  90. package/lib/esm/resources/captures.d.ts +3 -3
  91. package/lib/esm/resources/captures.js +4 -4
  92. package/lib/esm/resources/customer_payment_sources.d.ts +13 -1
  93. package/lib/esm/resources/customer_payment_sources.js +4 -0
  94. package/lib/esm/resources/external_promotions.d.ts +12 -2
  95. package/lib/esm/resources/external_promotions.js +4 -0
  96. package/lib/esm/resources/fixed_amount_promotions.d.ts +12 -2
  97. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  98. package/lib/esm/resources/fixed_price_promotions.d.ts +12 -2
  99. package/lib/esm/resources/fixed_price_promotions.js +4 -0
  100. package/lib/esm/resources/free_gift_promotions.d.ts +12 -2
  101. package/lib/esm/resources/free_gift_promotions.js +4 -0
  102. package/lib/esm/resources/free_shipping_promotions.d.ts +12 -2
  103. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  104. package/lib/esm/resources/imports.d.ts +0 -2
  105. package/lib/esm/resources/inventory_models.d.ts +3 -0
  106. package/lib/esm/resources/line_items.d.ts +9 -0
  107. package/lib/esm/resources/line_items.js +4 -0
  108. package/lib/esm/resources/markets.d.ts +5 -0
  109. package/lib/esm/resources/orders.d.ts +5 -1
  110. package/lib/esm/resources/orders.js +4 -0
  111. package/lib/esm/resources/organization.d.ts +4 -4
  112. package/lib/esm/resources/payment_methods.d.ts +2 -0
  113. package/lib/esm/resources/percentage_discount_promotions.d.ts +12 -2
  114. package/lib/esm/resources/percentage_discount_promotions.js +4 -0
  115. package/lib/esm/resources/price_lists.d.ts +3 -0
  116. package/lib/esm/resources/prices.d.ts +6 -6
  117. package/lib/esm/resources/promotions.d.ts +4 -1
  118. package/lib/esm/resources/promotions.js +4 -0
  119. package/lib/esm/resources/refunds.d.ts +3 -3
  120. package/lib/esm/resources/refunds.js +4 -4
  121. package/lib/esm/resources/shipments.d.ts +11 -1
  122. package/lib/esm/resources/shipments.js +7 -0
  123. package/lib/esm/resources/shipping_categories.d.ts +3 -0
  124. package/lib/esm/resources/shipping_methods.d.ts +2 -0
  125. package/lib/esm/resources/stock_line_items.d.ts +7 -0
  126. package/lib/esm/resources/stock_line_items.js +9 -0
  127. package/lib/esm/resources/stock_locations.d.ts +3 -0
  128. package/lib/esm/resources/stock_reservations.d.ts +0 -1
  129. package/lib/esm/resources/stock_transfers.d.ts +1 -0
  130. package/lib/esm/resources/stripe_payments.d.ts +2 -0
  131. package/lib/esm/resources/transactions.d.ts +3 -0
  132. package/lib/esm/resources/transactions.js +4 -0
  133. package/lib/esm/resources/voids.d.ts +3 -3
  134. package/lib/esm/resources/voids.js +4 -4
  135. package/lib/esm/resources/webhooks.d.ts +7 -0
  136. package/lib/esm/resources/webhooks.js +6 -0
  137. package/lib/esm/static.d.ts +4 -1
  138. package/lib/esm/static.js +8 -2
  139. package/lib/esm/util.d.ts +6 -1
  140. package/lib/esm/util.js +27 -1
  141. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  142. package/lib/tsconfig.tsbuildinfo +1 -1
  143. package/package.json +7 -7
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Customer, CustomerType } from './customers';
5
+ import type { PaymentMethod, PaymentMethodType } from './payment_methods';
5
6
  import type { AdyenPayment, AdyenPaymentType } from './adyen_payments';
6
7
  import type { AxervePayment, AxervePaymentType } from './axerve_payments';
7
8
  import type { BraintreePayment, BraintreePaymentType } from './braintree_payments';
@@ -18,6 +19,9 @@ type CustomerPaymentSourceRel = ResourceRel & {
18
19
  type CustomerRel = ResourceRel & {
19
20
  type: CustomerType;
20
21
  };
22
+ type PaymentMethodRel = ResourceRel & {
23
+ type: PaymentMethodType;
24
+ };
21
25
  type AdyenPaymentRel = ResourceRel & {
22
26
  type: AdyenPaymentType;
23
27
  };
@@ -48,15 +52,22 @@ interface CustomerPaymentSource extends Resource {
48
52
  customer_token?: string | null;
49
53
  payment_source_token?: string | null;
50
54
  customer?: Customer | null;
55
+ payment_method?: PaymentMethod | null;
51
56
  payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | SatispayPayment | StripePayment | null;
52
57
  versions?: Version[] | null;
53
58
  }
54
59
  interface CustomerPaymentSourceCreate extends ResourceCreate {
60
+ customer_token?: string | null;
61
+ payment_source_token?: string | null;
55
62
  customer: CustomerRel;
56
- payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel;
63
+ payment_method?: PaymentMethodRel | null;
64
+ payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null;
57
65
  }
58
66
  interface CustomerPaymentSourceUpdate extends ResourceUpdate {
67
+ customer_token?: string | null;
68
+ payment_source_token?: string | null;
59
69
  customer?: CustomerRel | null;
70
+ payment_method?: PaymentMethodRel | null;
60
71
  payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null;
61
72
  }
62
73
  declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {
@@ -65,6 +76,7 @@ declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource>
65
76
  update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
66
77
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
67
78
  customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
79
+ payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
68
80
  versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
69
81
  isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
70
82
  relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
@@ -15,6 +15,10 @@ class CustomerPaymentSources extends resource_1.ApiResource {
15
15
  const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
16
16
  return this.resources.fetch({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options);
17
17
  }
18
+ async payment_method(customerPaymentSourceId, params, options) {
19
+ const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
20
+ return this.resources.fetch({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options);
21
+ }
18
22
  async versions(customerPaymentSourceId, params, options) {
19
23
  const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
20
24
  return this.resources.fetch({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
9
10
  import type { Coupon, CouponType } from './coupons';
10
11
  import type { SkuList, SkuListType } from './sku_lists';
11
12
  import type { Attachment } from './attachments';
@@ -32,6 +33,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
32
33
  type CouponCodesPromotionRuleRel = ResourceRel & {
33
34
  type: CouponCodesPromotionRuleType;
34
35
  };
36
+ type CustomPromotionRuleRel = ResourceRel & {
37
+ type: CustomPromotionRuleType;
38
+ };
35
39
  type CouponRel = ResourceRel & {
36
40
  type: CouponType;
37
41
  };
@@ -49,7 +53,7 @@ interface ExternalPromotion extends Resource {
49
53
  priority?: number | null;
50
54
  starts_at: string;
51
55
  expires_at: string;
52
- total_usage_limit: number;
56
+ total_usage_limit?: number | null;
53
57
  total_usage_count?: number | null;
54
58
  active?: boolean | null;
55
59
  disabled_at?: string | null;
@@ -60,6 +64,7 @@ interface ExternalPromotion extends Resource {
60
64
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
61
65
  sku_list_promotion_rule?: SkuListPromotionRule | null;
62
66
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
67
+ custom_promotion_rule?: CustomPromotionRule | null;
63
68
  coupons?: Coupon[] | null;
64
69
  sku_list?: SkuList | null;
65
70
  attachments?: Attachment[] | null;
@@ -75,13 +80,16 @@ interface ExternalPromotionCreate extends ResourceCreate {
75
80
  priority?: number | null;
76
81
  starts_at: string;
77
82
  expires_at: string;
78
- total_usage_limit: number;
83
+ total_usage_limit?: number | null;
84
+ _disable?: boolean | null;
85
+ _enable?: boolean | null;
79
86
  promotion_url: string;
80
87
  market?: MarketRel | null;
81
88
  promotion_rules?: PromotionRuleRel[] | null;
82
89
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
83
90
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
84
91
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
92
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
85
93
  coupons?: CouponRel[] | null;
86
94
  sku_list?: SkuListRel | null;
87
95
  tags?: TagRel[] | null;
@@ -102,6 +110,7 @@ interface ExternalPromotionUpdate extends ResourceUpdate {
102
110
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
103
111
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
104
112
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
113
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
105
114
  coupons?: CouponRel[] | null;
106
115
  sku_list?: SkuListRel | null;
107
116
  tags?: TagRel[] | null;
@@ -115,6 +124,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
115
124
  order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
116
125
  sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
117
126
  coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
127
+ custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
118
128
  coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
119
129
  sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
120
130
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
@@ -27,6 +27,10 @@ class ExternalPromotions extends resource_1.ApiResource {
27
27
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async custom_promotion_rule(externalPromotionId, params, options) {
31
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
32
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options);
33
+ }
30
34
  async coupons(externalPromotionId, params, options) {
31
35
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
32
36
  return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
9
10
  import type { Coupon, CouponType } from './coupons';
10
11
  import type { SkuList, SkuListType } from './sku_lists';
11
12
  import type { Attachment } from './attachments';
@@ -32,6 +33,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
32
33
  type CouponCodesPromotionRuleRel = ResourceRel & {
33
34
  type: CouponCodesPromotionRuleType;
34
35
  };
36
+ type CustomPromotionRuleRel = ResourceRel & {
37
+ type: CustomPromotionRuleType;
38
+ };
35
39
  type CouponRel = ResourceRel & {
36
40
  type: CouponType;
37
41
  };
@@ -49,7 +53,7 @@ interface FixedAmountPromotion extends Resource {
49
53
  priority?: number | null;
50
54
  starts_at: string;
51
55
  expires_at: string;
52
- total_usage_limit: number;
56
+ total_usage_limit?: number | null;
53
57
  total_usage_count?: number | null;
54
58
  active?: boolean | null;
55
59
  disabled_at?: string | null;
@@ -61,6 +65,7 @@ interface FixedAmountPromotion extends Resource {
61
65
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
62
66
  sku_list_promotion_rule?: SkuListPromotionRule | null;
63
67
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
68
+ custom_promotion_rule?: CustomPromotionRule | null;
64
69
  coupons?: Coupon[] | null;
65
70
  sku_list?: SkuList | null;
66
71
  attachments?: Attachment[] | null;
@@ -76,13 +81,16 @@ interface FixedAmountPromotionCreate extends ResourceCreate {
76
81
  priority?: number | null;
77
82
  starts_at: string;
78
83
  expires_at: string;
79
- total_usage_limit: number;
84
+ total_usage_limit?: number | null;
85
+ _disable?: boolean | null;
86
+ _enable?: boolean | null;
80
87
  fixed_amount_cents: number;
81
88
  market?: MarketRel | null;
82
89
  promotion_rules?: PromotionRuleRel[] | null;
83
90
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
84
91
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
85
92
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
93
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
86
94
  coupons?: CouponRel[] | null;
87
95
  sku_list?: SkuListRel | null;
88
96
  tags?: TagRel[] | null;
@@ -103,6 +111,7 @@ interface FixedAmountPromotionUpdate extends ResourceUpdate {
103
111
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
104
112
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
105
113
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
114
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
106
115
  coupons?: CouponRel[] | null;
107
116
  sku_list?: SkuListRel | null;
108
117
  tags?: TagRel[] | null;
@@ -116,6 +125,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
116
125
  order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
117
126
  sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
118
127
  coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
128
+ custom_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
119
129
  coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
120
130
  sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
121
131
  attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
@@ -27,6 +27,10 @@ class FixedAmountPromotions extends resource_1.ApiResource {
27
27
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async custom_promotion_rule(fixedAmountPromotionId, params, options) {
31
+ const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
32
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options);
33
+ }
30
34
  async coupons(fixedAmountPromotionId, params, options) {
31
35
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
32
36
  return this.resources.fetch({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
9
10
  import type { Coupon, CouponType } from './coupons';
10
11
  import type { SkuList, SkuListType } from './sku_lists';
11
12
  import type { Attachment } from './attachments';
@@ -32,6 +33,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
32
33
  type CouponCodesPromotionRuleRel = ResourceRel & {
33
34
  type: CouponCodesPromotionRuleType;
34
35
  };
36
+ type CustomPromotionRuleRel = ResourceRel & {
37
+ type: CustomPromotionRuleType;
38
+ };
35
39
  type CouponRel = ResourceRel & {
36
40
  type: CouponType;
37
41
  };
@@ -49,7 +53,7 @@ interface FixedPricePromotion extends Resource {
49
53
  priority?: number | null;
50
54
  starts_at: string;
51
55
  expires_at: string;
52
- total_usage_limit: number;
56
+ total_usage_limit?: number | null;
53
57
  total_usage_count?: number | null;
54
58
  active?: boolean | null;
55
59
  disabled_at?: string | null;
@@ -61,6 +65,7 @@ interface FixedPricePromotion extends Resource {
61
65
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
62
66
  sku_list_promotion_rule?: SkuListPromotionRule | null;
63
67
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
68
+ custom_promotion_rule?: CustomPromotionRule | null;
64
69
  coupons?: Coupon[] | null;
65
70
  sku_list?: SkuList | null;
66
71
  attachments?: Attachment[] | null;
@@ -76,13 +81,16 @@ interface FixedPricePromotionCreate extends ResourceCreate {
76
81
  priority?: number | null;
77
82
  starts_at: string;
78
83
  expires_at: string;
79
- total_usage_limit: number;
84
+ total_usage_limit?: number | null;
85
+ _disable?: boolean | null;
86
+ _enable?: boolean | null;
80
87
  fixed_amount_cents: number;
81
88
  market?: MarketRel | null;
82
89
  promotion_rules?: PromotionRuleRel[] | null;
83
90
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
84
91
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
85
92
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
93
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
86
94
  coupons?: CouponRel[] | null;
87
95
  sku_list: SkuListRel;
88
96
  tags?: TagRel[] | null;
@@ -103,6 +111,7 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
103
111
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
104
112
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
105
113
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
114
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
106
115
  coupons?: CouponRel[] | null;
107
116
  sku_list?: SkuListRel | null;
108
117
  tags?: TagRel[] | null;
@@ -116,6 +125,7 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
116
125
  order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
117
126
  sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
118
127
  coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
128
+ custom_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
119
129
  coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
120
130
  sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
121
131
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
@@ -27,6 +27,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
27
27
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async custom_promotion_rule(fixedPricePromotionId, params, options) {
31
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options);
33
+ }
30
34
  async coupons(fixedPricePromotionId, params, options) {
31
35
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
36
  return this.resources.fetch({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
9
10
  import type { Coupon, CouponType } from './coupons';
10
11
  import type { SkuList, SkuListType } from './sku_lists';
11
12
  import type { Attachment } from './attachments';
@@ -32,6 +33,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
32
33
  type CouponCodesPromotionRuleRel = ResourceRel & {
33
34
  type: CouponCodesPromotionRuleType;
34
35
  };
36
+ type CustomPromotionRuleRel = ResourceRel & {
37
+ type: CustomPromotionRuleType;
38
+ };
35
39
  type CouponRel = ResourceRel & {
36
40
  type: CouponType;
37
41
  };
@@ -49,7 +53,7 @@ interface FreeGiftPromotion extends Resource {
49
53
  priority?: number | null;
50
54
  starts_at: string;
51
55
  expires_at: string;
52
- total_usage_limit: number;
56
+ total_usage_limit?: number | null;
53
57
  total_usage_count?: number | null;
54
58
  active?: boolean | null;
55
59
  disabled_at?: string | null;
@@ -59,6 +63,7 @@ interface FreeGiftPromotion extends Resource {
59
63
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
60
64
  sku_list_promotion_rule?: SkuListPromotionRule | null;
61
65
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
66
+ custom_promotion_rule?: CustomPromotionRule | null;
62
67
  coupons?: Coupon[] | null;
63
68
  sku_list?: SkuList | null;
64
69
  attachments?: Attachment[] | null;
@@ -74,13 +79,16 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
74
79
  priority?: number | null;
75
80
  starts_at: string;
76
81
  expires_at: string;
77
- total_usage_limit: number;
82
+ total_usage_limit?: number | null;
83
+ _disable?: boolean | null;
84
+ _enable?: boolean | null;
78
85
  max_quantity?: number | null;
79
86
  market?: MarketRel | null;
80
87
  promotion_rules?: PromotionRuleRel[] | null;
81
88
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
82
89
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
83
90
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
91
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
84
92
  coupons?: CouponRel[] | null;
85
93
  sku_list: SkuListRel;
86
94
  tags?: TagRel[] | null;
@@ -101,6 +109,7 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
101
109
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
102
110
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
103
111
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
112
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
104
113
  coupons?: CouponRel[] | null;
105
114
  sku_list?: SkuListRel | null;
106
115
  tags?: TagRel[] | null;
@@ -114,6 +123,7 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
114
123
  order_amount_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
115
124
  sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
116
125
  coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
126
+ custom_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
117
127
  coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
118
128
  sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
119
129
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
@@ -27,6 +27,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
27
27
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async custom_promotion_rule(freeGiftPromotionId, params, options) {
31
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/custom_promotion_rule`, params, options);
33
+ }
30
34
  async coupons(freeGiftPromotionId, params, options) {
31
35
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
36
  return this.resources.fetch({ type: 'coupons' }, `free_gift_promotions/${_freeGiftPromotionId}/coupons`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
9
10
  import type { Coupon, CouponType } from './coupons';
10
11
  import type { SkuList } from './sku_lists';
11
12
  import type { Attachment } from './attachments';
@@ -31,6 +32,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
31
32
  type CouponCodesPromotionRuleRel = ResourceRel & {
32
33
  type: CouponCodesPromotionRuleType;
33
34
  };
35
+ type CustomPromotionRuleRel = ResourceRel & {
36
+ type: CustomPromotionRuleType;
37
+ };
34
38
  type CouponRel = ResourceRel & {
35
39
  type: CouponType;
36
40
  };
@@ -45,7 +49,7 @@ interface FreeShippingPromotion extends Resource {
45
49
  priority?: number | null;
46
50
  starts_at: string;
47
51
  expires_at: string;
48
- total_usage_limit: number;
52
+ total_usage_limit?: number | null;
49
53
  total_usage_count?: number | null;
50
54
  active?: boolean | null;
51
55
  disabled_at?: string | null;
@@ -54,6 +58,7 @@ interface FreeShippingPromotion extends Resource {
54
58
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
55
59
  sku_list_promotion_rule?: SkuListPromotionRule | null;
56
60
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
61
+ custom_promotion_rule?: CustomPromotionRule | null;
57
62
  coupons?: Coupon[] | null;
58
63
  sku_list?: SkuList | null;
59
64
  attachments?: Attachment[] | null;
@@ -68,12 +73,15 @@ interface FreeShippingPromotionCreate extends ResourceCreate {
68
73
  priority?: number | null;
69
74
  starts_at: string;
70
75
  expires_at: string;
71
- total_usage_limit: number;
76
+ total_usage_limit?: number | null;
77
+ _disable?: boolean | null;
78
+ _enable?: boolean | null;
72
79
  market?: MarketRel | null;
73
80
  promotion_rules?: PromotionRuleRel[] | null;
74
81
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
75
82
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
76
83
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
84
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
77
85
  coupons?: CouponRel[] | null;
78
86
  tags?: TagRel[] | null;
79
87
  }
@@ -92,6 +100,7 @@ interface FreeShippingPromotionUpdate extends ResourceUpdate {
92
100
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
93
101
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
94
102
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
103
+ custom_promotion_rule?: CustomPromotionRuleRel | null;
95
104
  coupons?: CouponRel[] | null;
96
105
  tags?: TagRel[] | null;
97
106
  }
@@ -104,6 +113,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
104
113
  order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
105
114
  sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
106
115
  coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
116
+ custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
107
117
  coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
108
118
  sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
109
119
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
@@ -27,6 +27,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
27
27
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async custom_promotion_rule(freeShippingPromotionId, params, options) {
31
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options);
33
+ }
30
34
  async coupons(freeShippingPromotionId, params, options) {
31
35
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
36
  return this.resources.fetch({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options);
@@ -22,7 +22,6 @@ interface Import extends Resource {
22
22
  processed_count?: number | null;
23
23
  errors_log?: Record<string, any> | null;
24
24
  warnings_log?: Record<string, any> | null;
25
- cleanup_records?: boolean | null;
26
25
  attachment_url?: string | null;
27
26
  events?: Event[] | null;
28
27
  }
@@ -31,7 +30,6 @@ interface ImportCreate extends ResourceCreate {
31
30
  format?: string | null;
32
31
  parent_resource_id?: string | null;
33
32
  inputs: Array<Record<string, any>>;
34
- cleanup_records?: boolean | null;
35
33
  }
36
34
  declare class Imports extends ApiResource<Import> {
37
35
  static readonly TYPE: ImportType;
@@ -16,6 +16,7 @@ interface InventoryModel extends Resource {
16
16
  stock_locations_cutoff?: number | null;
17
17
  stock_reservation_cutoff?: number | null;
18
18
  put_stock_transfers_on_hold?: boolean | null;
19
+ manual_stock_decrement?: boolean | null;
19
20
  inventory_stock_locations?: InventoryStockLocation[] | null;
20
21
  inventory_return_locations?: InventoryReturnLocation[] | null;
21
22
  attachments?: Attachment[] | null;
@@ -27,6 +28,7 @@ interface InventoryModelCreate extends ResourceCreate {
27
28
  stock_locations_cutoff?: number | null;
28
29
  stock_reservation_cutoff?: number | null;
29
30
  put_stock_transfers_on_hold?: boolean | null;
31
+ manual_stock_decrement?: boolean | null;
30
32
  }
31
33
  interface InventoryModelUpdate extends ResourceUpdate {
32
34
  name?: string | null;
@@ -34,6 +36,7 @@ interface InventoryModelUpdate extends ResourceUpdate {
34
36
  stock_locations_cutoff?: number | null;
35
37
  stock_reservation_cutoff?: number | null;
36
38
  put_stock_transfers_on_hold?: boolean | null;
39
+ manual_stock_decrement?: boolean | null;
37
40
  }
38
41
  declare class InventoryModels extends ApiResource<InventoryModel> {
39
42
  static readonly TYPE: InventoryModelType;
@@ -13,6 +13,7 @@ import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } fro
13
13
  import type { Shipment, ShipmentType } from './shipments';
14
14
  import type { Sku, SkuType } from './skus';
15
15
  import type { LineItemOption } from './line_item_options';
16
+ import type { ReturnLineItem } from './return_line_items';
16
17
  import type { StockReservation } from './stock_reservations';
17
18
  import type { StockLineItem } from './stock_line_items';
18
19
  import type { StockTransfer } from './stock_transfers';
@@ -63,10 +64,14 @@ interface LineItem extends Resource {
63
64
  sku_code?: string | null;
64
65
  bundle_code?: string | null;
65
66
  quantity: number;
67
+ _external_price?: boolean | null;
66
68
  currency_code?: string | null;
67
69
  unit_amount_cents?: number | null;
68
70
  unit_amount_float?: number | null;
69
71
  formatted_unit_amount?: string | null;
72
+ compare_at_amount_cents?: number | null;
73
+ compare_at_amount_float?: number | null;
74
+ formatted_compare_at_amount?: string | null;
70
75
  options_amount_cents?: number | null;
71
76
  options_amount_float?: number | null;
72
77
  formatted_options_amount?: string | null;
@@ -92,6 +97,7 @@ interface LineItem extends Resource {
92
97
  sku?: Sku | null;
93
98
  bundle?: Bundle | null;
94
99
  line_item_options?: LineItemOption[] | null;
100
+ return_line_items?: ReturnLineItem[] | null;
95
101
  /**
96
102
  * @deprecated This field should not be used as it may be removed in the future without notice
97
103
  */
@@ -110,6 +116,7 @@ interface LineItemCreate extends ResourceCreate {
110
116
  _update_quantity?: boolean | null;
111
117
  _reserve_stock?: boolean | null;
112
118
  unit_amount_cents?: number | null;
119
+ compare_at_amount_cents?: number | null;
113
120
  name?: string | null;
114
121
  image_url?: string | null;
115
122
  item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
@@ -126,6 +133,7 @@ interface LineItemUpdate extends ResourceUpdate {
126
133
  quantity?: number | null;
127
134
  _external_price?: boolean | null;
128
135
  _reserve_stock?: boolean | null;
136
+ compare_at_amount_cents?: number | null;
129
137
  name?: string | null;
130
138
  image_url?: string | null;
131
139
  frequency?: string | null;
@@ -138,6 +146,7 @@ declare class LineItems extends ApiResource<LineItem> {
138
146
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
139
147
  order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
140
148
  line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
149
+ return_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
141
150
  stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
142
151
  stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
143
152
  stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
@@ -19,6 +19,10 @@ class LineItems extends resource_1.ApiResource {
19
19
  const _lineItemId = lineItemId.id || lineItemId;
20
20
  return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
21
21
  }
22
+ async return_line_items(lineItemId, params, options) {
23
+ const _lineItemId = lineItemId.id || lineItemId;
24
+ return this.resources.fetch({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options);
25
+ }
22
26
  async stock_reservations(lineItemId, params, options) {
23
27
  const _lineItemId = lineItemId.id || lineItemId;
24
28
  return this.resources.fetch({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options);
@@ -35,6 +35,7 @@ interface Market extends Resource {
35
35
  readonly type: MarketType;
36
36
  number?: number | null;
37
37
  name: string;
38
+ code?: string | null;
38
39
  facebook_pixel_id?: string | null;
39
40
  checkout_url?: string | null;
40
41
  external_prices_url?: string | null;
@@ -53,10 +54,13 @@ interface Market extends Resource {
53
54
  }
54
55
  interface MarketCreate extends ResourceCreate {
55
56
  name: string;
57
+ code?: string | null;
56
58
  facebook_pixel_id?: string | null;
57
59
  checkout_url?: string | null;
58
60
  external_prices_url?: string | null;
59
61
  external_order_validation_url?: string | null;
62
+ _disable?: boolean | null;
63
+ _enable?: boolean | null;
60
64
  merchant: MerchantRel;
61
65
  price_list: PriceListRel;
62
66
  inventory_model: InventoryModelRel;
@@ -66,6 +70,7 @@ interface MarketCreate extends ResourceCreate {
66
70
  }
67
71
  interface MarketUpdate extends ResourceUpdate {
68
72
  name?: string | null;
73
+ code?: string | null;
69
74
  facebook_pixel_id?: string | null;
70
75
  checkout_url?: string | null;
71
76
  external_prices_url?: string | null;
@@ -89,7 +89,7 @@ type TagRel = ResourceRel & {
89
89
  };
90
90
  interface Order extends Resource {
91
91
  readonly type: OrderType;
92
- number?: number | null;
92
+ number?: string | null;
93
93
  autorefresh?: boolean | null;
94
94
  status: 'draft' | 'pending' | 'placed' | 'editing' | 'approved' | 'cancelled';
95
95
  payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
@@ -217,6 +217,7 @@ interface Order extends Resource {
217
217
  voids?: Void[] | null;
218
218
  refunds?: Refund[] | null;
219
219
  returns?: Return[] | null;
220
+ order_subscription?: OrderSubscription | null;
220
221
  order_subscriptions?: OrderSubscription[] | null;
221
222
  order_factories?: OrderFactory[] | null;
222
223
  order_copies?: OrderCopy[] | null;
@@ -227,6 +228,7 @@ interface Order extends Resource {
227
228
  versions?: Version[] | null;
228
229
  }
229
230
  interface OrderCreate extends ResourceCreate {
231
+ number?: string | null;
230
232
  autorefresh?: boolean | null;
231
233
  guest?: boolean | null;
232
234
  customer_email?: string | null;
@@ -252,6 +254,7 @@ interface OrderCreate extends ResourceCreate {
252
254
  tags?: TagRel[] | null;
253
255
  }
254
256
  interface OrderUpdate extends ResourceUpdate {
257
+ number?: string | null;
255
258
  autorefresh?: boolean | null;
256
259
  guest?: boolean | null;
257
260
  customer_email?: string | null;
@@ -329,6 +332,7 @@ declare class Orders extends ApiResource<Order> {
329
332
  voids(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
330
333
  refunds(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
331
334
  returns(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Return>>;
335
+ order_subscription(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
332
336
  order_subscriptions(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
333
337
  order_factories(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>>;
334
338
  order_copies(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>>;