@commercelayer/sdk 3.8.0 → 3.9.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 (147) hide show
  1. package/lib/cjs/api.d.ts +8 -3
  2. package/lib/cjs/api.js +1 -1
  3. package/lib/cjs/client.js +1 -1
  4. package/lib/cjs/commercelayer.d.ts +5 -0
  5. package/lib/cjs/commercelayer.js +1 -1
  6. package/lib/cjs/jsonapi.js +1 -1
  7. package/lib/cjs/model.d.ts +6 -1
  8. package/lib/cjs/resources/adyen_gateways.js +1 -1
  9. package/lib/cjs/resources/application.d.ts +1 -1
  10. package/lib/cjs/resources/braintree_gateways.js +1 -1
  11. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  12. package/lib/cjs/resources/customer_addresses.d.ts +2 -0
  13. package/lib/cjs/resources/customer_password_resets.d.ts +2 -0
  14. package/lib/cjs/resources/customer_subscriptions.d.ts +2 -0
  15. package/lib/cjs/resources/customers.d.ts +2 -0
  16. package/lib/cjs/resources/events.d.ts +22 -0
  17. package/lib/cjs/resources/events.js +1 -0
  18. package/lib/cjs/resources/external_gateways.js +1 -1
  19. package/lib/cjs/resources/external_promotions.js +1 -1
  20. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  21. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  22. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  23. package/lib/cjs/resources/gift_cards.d.ts +2 -0
  24. package/lib/cjs/resources/imports.d.ts +2 -0
  25. package/lib/cjs/resources/in_stock_subscriptions.d.ts +2 -0
  26. package/lib/cjs/resources/line_item_options.js +1 -1
  27. package/lib/cjs/resources/manual_gateways.js +1 -1
  28. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  29. package/lib/cjs/resources/order_copies.d.ts +2 -0
  30. package/lib/cjs/resources/order_subscriptions.d.ts +2 -0
  31. package/lib/cjs/resources/order_validation_rules.js +1 -1
  32. package/lib/cjs/resources/orders.d.ts +2 -0
  33. package/lib/cjs/resources/organization.js +1 -1
  34. package/lib/cjs/resources/parcels.d.ts +4 -2
  35. package/lib/cjs/resources/payment_methods.js +1 -1
  36. package/lib/cjs/resources/paypal_gateways.js +1 -1
  37. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  38. package/lib/cjs/resources/price_tiers.d.ts +26 -0
  39. package/lib/cjs/resources/price_tiers.js +1 -0
  40. package/lib/cjs/resources/price_volume_tiers.d.ts +44 -0
  41. package/lib/cjs/resources/price_volume_tiers.js +1 -0
  42. package/lib/cjs/resources/prices.d.ts +9 -0
  43. package/lib/cjs/resources/refunds.d.ts +2 -0
  44. package/lib/cjs/resources/returns.d.ts +2 -0
  45. package/lib/cjs/resources/shipments.d.ts +3 -0
  46. package/lib/cjs/resources/shipping_method_tiers.d.ts +26 -0
  47. package/lib/cjs/resources/shipping_method_tiers.js +1 -0
  48. package/lib/cjs/resources/shipping_methods.d.ts +30 -2
  49. package/lib/cjs/resources/shipping_weight_tiers.d.ts +44 -0
  50. package/lib/cjs/resources/shipping_weight_tiers.js +1 -0
  51. package/lib/cjs/resources/sku_lists.js +1 -1
  52. package/lib/cjs/resources/sku_options.js +1 -1
  53. package/lib/cjs/resources/stock_transfers.d.ts +2 -0
  54. package/lib/cjs/resources/stripe_gateways.js +1 -1
  55. package/lib/cjs/resources/tax_calculators.js +1 -1
  56. package/lib/esm/api.d.ts +8 -3
  57. package/lib/esm/api.js +1 -1
  58. package/lib/esm/client.js +1 -1
  59. package/lib/esm/commercelayer.d.ts +5 -0
  60. package/lib/esm/commercelayer.js +1 -1
  61. package/lib/esm/debug.js +1 -1
  62. package/lib/esm/error.js +1 -1
  63. package/lib/esm/jsonapi.js +1 -1
  64. package/lib/esm/model.d.ts +6 -1
  65. package/lib/esm/resources/addresses.js +1 -1
  66. package/lib/esm/resources/adjustments.js +1 -1
  67. package/lib/esm/resources/adyen_gateways.js +1 -1
  68. package/lib/esm/resources/application.d.ts +1 -1
  69. package/lib/esm/resources/avalara_accounts.js +1 -1
  70. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  71. package/lib/esm/resources/bing_geocoders.js +1 -1
  72. package/lib/esm/resources/braintree_gateways.js +1 -1
  73. package/lib/esm/resources/bundles.js +1 -1
  74. package/lib/esm/resources/carrier_accounts.js +1 -1
  75. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  76. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  77. package/lib/esm/resources/coupons.js +1 -1
  78. package/lib/esm/resources/customer_addresses.d.ts +2 -0
  79. package/lib/esm/resources/customer_password_resets.d.ts +2 -0
  80. package/lib/esm/resources/customer_subscriptions.d.ts +2 -0
  81. package/lib/esm/resources/customers.d.ts +2 -0
  82. package/lib/esm/resources/event_callbacks.js +1 -1
  83. package/lib/esm/resources/events.d.ts +22 -0
  84. package/lib/esm/resources/events.js +1 -0
  85. package/lib/esm/resources/external_promotions.js +1 -1
  86. package/lib/esm/resources/external_tax_calculators.js +1 -1
  87. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  88. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  89. package/lib/esm/resources/free_gift_promotions.js +1 -1
  90. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  91. package/lib/esm/resources/geocoders.js +1 -1
  92. package/lib/esm/resources/gift_cards.d.ts +2 -0
  93. package/lib/esm/resources/google_geocoders.js +1 -1
  94. package/lib/esm/resources/imports.d.ts +2 -0
  95. package/lib/esm/resources/in_stock_subscriptions.d.ts +2 -0
  96. package/lib/esm/resources/inventory_models.js +1 -1
  97. package/lib/esm/resources/inventory_return_locations.js +1 -1
  98. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  99. package/lib/esm/resources/klarna_gateways.js +1 -1
  100. package/lib/esm/resources/line_item_options.js +1 -1
  101. package/lib/esm/resources/manual_gateways.js +1 -1
  102. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  103. package/lib/esm/resources/markets.js +1 -1
  104. package/lib/esm/resources/merchants.js +1 -1
  105. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  106. package/lib/esm/resources/order_copies.d.ts +2 -0
  107. package/lib/esm/resources/order_subscriptions.d.ts +2 -0
  108. package/lib/esm/resources/order_validation_rules.js +1 -1
  109. package/lib/esm/resources/orders.d.ts +2 -0
  110. package/lib/esm/resources/organization.js +1 -1
  111. package/lib/esm/resources/parcels.d.ts +4 -2
  112. package/lib/esm/resources/payment_gateways.js +1 -1
  113. package/lib/esm/resources/payment_methods.js +1 -1
  114. package/lib/esm/resources/paypal_gateways.js +1 -1
  115. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  116. package/lib/esm/resources/price_tiers.d.ts +26 -0
  117. package/lib/esm/resources/price_tiers.js +1 -0
  118. package/lib/esm/resources/price_volume_tiers.d.ts +44 -0
  119. package/lib/esm/resources/price_volume_tiers.js +1 -0
  120. package/lib/esm/resources/prices.d.ts +9 -0
  121. package/lib/esm/resources/promotion_rules.js +1 -1
  122. package/lib/esm/resources/promotions.js +1 -1
  123. package/lib/esm/resources/refunds.d.ts +2 -0
  124. package/lib/esm/resources/returns.d.ts +2 -0
  125. package/lib/esm/resources/shipments.d.ts +3 -0
  126. package/lib/esm/resources/shipping_categories.js +1 -1
  127. package/lib/esm/resources/shipping_method_tiers.d.ts +26 -0
  128. package/lib/esm/resources/shipping_method_tiers.js +1 -0
  129. package/lib/esm/resources/shipping_methods.d.ts +30 -2
  130. package/lib/esm/resources/shipping_weight_tiers.d.ts +44 -0
  131. package/lib/esm/resources/shipping_weight_tiers.js +1 -0
  132. package/lib/esm/resources/shipping_zones.js +1 -1
  133. package/lib/esm/resources/sku_list_items.js +1 -1
  134. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  135. package/lib/esm/resources/sku_lists.js +1 -1
  136. package/lib/esm/resources/sku_options.js +1 -1
  137. package/lib/esm/resources/stock_items.js +1 -1
  138. package/lib/esm/resources/stock_transfers.d.ts +2 -0
  139. package/lib/esm/resources/stripe_gateways.js +1 -1
  140. package/lib/esm/resources/tax_calculators.js +1 -1
  141. package/lib/esm/resources/tax_categories.js +1 -1
  142. package/lib/esm/resources/tax_rules.js +1 -1
  143. package/lib/esm/resources/taxjar_accounts.js +1 -1
  144. package/lib/esm/resources/webhooks.js +1 -1
  145. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  146. package/lib/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +1 -1
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isMarket(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="markets";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMarket(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="markets";export default s;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isMerchant(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="merchants";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMerchant(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="merchants";export default s;
@@ -1 +1 @@
1
- import{ApiResource as p}from"../resource";class t extends p{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,a){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,a)}async retrieve(e,s,a){return this.resources.retrieve({type:t.TYPE,id:e},s,a)}async update(e,s,a){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,a)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isOrderAmountPromotionRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="order_amount_promotion_rules";export default t;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isOrderAmountPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_amount_promotion_rules";export default r;
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, Res
2
2
  import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
4
  import { OrderSubscription } from './order_subscriptions';
5
+ import { Event } from './events';
5
6
  declare type OrderCopyRel = ResourceRel & {
6
7
  type: typeof OrderCopies.TYPE;
7
8
  };
@@ -21,6 +22,7 @@ interface OrderCopy extends Resource {
21
22
  source_order?: Order;
22
23
  target_order?: Order;
23
24
  order_subscription?: OrderSubscription;
25
+ events?: Event[];
24
26
  }
25
27
  interface OrderCopyCreate extends ResourceCreate {
26
28
  place_target_order?: boolean;
@@ -4,6 +4,7 @@ import { Market } from './markets';
4
4
  import { Order } from './orders';
5
5
  import { Customer } from './customers';
6
6
  import { OrderCopy } from './order_copies';
7
+ import { Event } from './events';
7
8
  declare type OrderSubscriptionRel = ResourceRel & {
8
9
  type: typeof OrderSubscriptions.TYPE;
9
10
  };
@@ -31,6 +32,7 @@ interface OrderSubscription extends Resource {
31
32
  customer?: Customer;
32
33
  order_copies?: OrderCopy[];
33
34
  orders?: Order[];
35
+ events?: Event[];
34
36
  }
35
37
  interface OrderSubscriptionCreate extends ResourceCreate {
36
38
  frequency: string;
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class t extends s{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,p){return this.resources.retrieve({type:t.TYPE,id:e},r,p)}isOrderValidationRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="order_validation_rules";export default t;
1
+ import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}isOrderValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_validation_rules";export default r;
@@ -24,6 +24,7 @@ import { Refund } from './refunds';
24
24
  import { OrderSubscription } from './order_subscriptions';
25
25
  import { OrderCopy } from './order_copies';
26
26
  import { Attachment } from './attachments';
27
+ import { Event } from './events';
27
28
  declare type OrderRel = ResourceRel & {
28
29
  type: typeof Orders.TYPE;
29
30
  };
@@ -181,6 +182,7 @@ interface Order extends Resource {
181
182
  order_subscriptions?: OrderSubscription[];
182
183
  order_copies?: OrderCopy[];
183
184
  attachments?: Attachment[];
185
+ events?: Event[];
184
186
  }
185
187
  interface OrderCreate extends ResourceCreate {
186
188
  autorefresh?: boolean;
@@ -1 +1 @@
1
- import{ApiResource as p}from"../resource";class t extends p{async retrieve(e,r){return this.resources.singleton({type:t.TYPE},e,r)}isOrganization(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="organization";export default t;
1
+ import{ApiResource as i}from"../resource";class r extends i{async retrieve(e,t){return this.resources.singleton({type:r.TYPE},e,t)}isOrganization(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="organization";export default r;
@@ -4,6 +4,7 @@ import { Shipment } from './shipments';
4
4
  import { Package } from './packages';
5
5
  import { ParcelLineItem } from './parcel_line_items';
6
6
  import { Attachment } from './attachments';
7
+ import { Event } from './events';
7
8
  declare type ParcelRel = ResourceRel & {
8
9
  type: typeof Parcels.TYPE;
9
10
  };
@@ -42,10 +43,11 @@ interface Parcel extends Resource {
42
43
  package?: Package;
43
44
  parcel_line_items?: ParcelLineItem[];
44
45
  attachments?: Attachment[];
46
+ events?: Event[];
45
47
  }
46
48
  interface ParcelCreate extends ResourceCreate {
47
- weight?: number;
48
- unit_of_weight?: string;
49
+ weight: number;
50
+ unit_of_weight: string;
49
51
  eel_pfc?: string;
50
52
  contents_type?: string;
51
53
  contents_explanation?: string;
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,p){return this.resources.retrieve({type:r.TYPE,id:e},t,p)}isPaymentGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="payment_gateways";export default r;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}isPaymentGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_gateways";export default t;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isPaymentMethod(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="payment_methods";export default r;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPaymentMethod(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_methods";export default t;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isPaypalGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="paypal_gateways";export default t;
1
+ import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isPaypalGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="paypal_gateways";export default s;
@@ -1 +1 @@
1
- import{ApiResource as p}from"../resource";class t extends p{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPercentageDiscountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="percentage_discount_promotions";export default t;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPercentageDiscountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="percentage_discount_promotions";export default t;
@@ -0,0 +1,26 @@
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import { Price } from './prices';
4
+ import { Attachment } from './attachments';
5
+ declare type PriceTierRel = ResourceRel & {
6
+ type: typeof PriceTiers.TYPE;
7
+ };
8
+ interface PriceTier extends Resource {
9
+ name?: string;
10
+ up_to?: number;
11
+ price_amount_cents?: number;
12
+ price_amount_float?: number;
13
+ formatted_price_amount?: string;
14
+ price?: Price;
15
+ attachments?: Attachment[];
16
+ }
17
+ declare class PriceTiers extends ApiResource {
18
+ static readonly TYPE: 'price_tiers';
19
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceTier>>;
20
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceTier>;
21
+ isPriceTier(resource: any): resource is PriceTier;
22
+ relationship(id: string | ResourceId | null): PriceTierRel;
23
+ type(): string;
24
+ }
25
+ export default PriceTiers;
26
+ export { PriceTier };
@@ -0,0 +1 @@
1
+ import{ApiResource as s}from"../resource";class e extends s{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,p){return this.resources.retrieve({type:e.TYPE,id:t},r,p)}isPriceTier(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="price_tiers";export default e;
@@ -0,0 +1,44 @@
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import { Price } from './prices';
4
+ import { Attachment } from './attachments';
5
+ declare type PriceVolumeTierRel = ResourceRel & {
6
+ type: typeof PriceVolumeTiers.TYPE;
7
+ };
8
+ declare type PriceRel = ResourceRel & {
9
+ type: 'prices';
10
+ };
11
+ interface PriceVolumeTier extends Resource {
12
+ name?: string;
13
+ up_to?: number;
14
+ price_amount_cents?: number;
15
+ price_amount_float?: number;
16
+ formatted_price_amount?: string;
17
+ price?: Price;
18
+ attachments?: Attachment[];
19
+ }
20
+ interface PriceVolumeTierCreate extends ResourceCreate {
21
+ name: string;
22
+ up_to?: number;
23
+ price_amount_cents: number;
24
+ price: PriceRel;
25
+ }
26
+ interface PriceVolumeTierUpdate extends ResourceUpdate {
27
+ name?: string;
28
+ up_to?: number;
29
+ price_amount_cents?: number;
30
+ price?: PriceRel;
31
+ }
32
+ declare class PriceVolumeTiers extends ApiResource {
33
+ static readonly TYPE: 'price_volume_tiers';
34
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceVolumeTier>>;
35
+ create(resource: PriceVolumeTierCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
36
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
37
+ update(resource: PriceVolumeTierUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
38
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
39
+ isPriceVolumeTier(resource: any): resource is PriceVolumeTier;
40
+ relationship(id: string | ResourceId | null): PriceVolumeTierRel;
41
+ type(): string;
42
+ }
43
+ export default PriceVolumeTiers;
44
+ export { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate };
@@ -0,0 +1 @@
1
+ import{ApiResource as n}from"../resource";class e extends n{async list(t,s){return this.resources.list({type:e.TYPE},t,s)}async create(t,s,r){return this.resources.create(Object.assign(Object.assign({},t),{type:e.TYPE}),s,r)}async retrieve(t,s,r){return this.resources.retrieve({type:e.TYPE,id:t},s,r)}async update(t,s,r){return this.resources.update(Object.assign(Object.assign({},t),{type:e.TYPE}),s,r)}async delete(t,s){await this.resources.delete({type:e.TYPE,id:t},s)}isPriceVolumeTier(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="price_volume_tiers";export default e;
@@ -2,6 +2,8 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { PriceList } from './price_lists';
4
4
  import { Sku } from './skus';
5
+ import { PriceTier } from './price_tiers';
6
+ import { PriceVolumeTier } from './price_volume_tiers';
5
7
  import { Attachment } from './attachments';
6
8
  declare type PriceRel = ResourceRel & {
7
9
  type: typeof Prices.TYPE;
@@ -12,6 +14,9 @@ declare type PriceListRel = ResourceRel & {
12
14
  declare type SkuRel = ResourceRel & {
13
15
  type: 'skus';
14
16
  };
17
+ declare type PriceTierRel = ResourceRel & {
18
+ type: 'price_tiers';
19
+ };
15
20
  interface Price extends Resource {
16
21
  currency_code?: string;
17
22
  sku_code?: string;
@@ -23,6 +28,8 @@ interface Price extends Resource {
23
28
  formatted_compare_at_amount?: string;
24
29
  price_list?: PriceList;
25
30
  sku?: Sku;
31
+ price_tiers?: PriceTier[];
32
+ price_volume_tiers?: PriceVolumeTier[];
26
33
  attachments?: Attachment[];
27
34
  }
28
35
  interface PriceCreate extends ResourceCreate {
@@ -31,6 +38,7 @@ interface PriceCreate extends ResourceCreate {
31
38
  compare_at_amount_cents: number;
32
39
  price_list: PriceListRel;
33
40
  sku?: SkuRel;
41
+ price_tiers?: PriceTierRel[];
34
42
  }
35
43
  interface PriceUpdate extends ResourceUpdate {
36
44
  sku_code?: string;
@@ -38,6 +46,7 @@ interface PriceUpdate extends ResourceUpdate {
38
46
  compare_at_amount_cents?: number;
39
47
  price_list?: PriceListRel;
40
48
  sku?: SkuRel;
49
+ price_tiers?: PriceTierRel[];
41
50
  }
42
51
  declare class Prices extends ApiResource {
43
52
  static readonly TYPE: 'prices';
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class t extends s{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,p){return this.resources.retrieve({type:t.TYPE,id:e},r,p)}isPromotionRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="promotion_rules";export default t;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotion_rules";export default r;
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class t extends s{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,p){return this.resources.retrieve({type:t.TYPE,id:e},r,p)}isPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="promotions";export default t;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotions";export default r;
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
2
2
  import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
4
  import { Capture } from './captures';
5
+ import { Event } from './events';
5
6
  declare type RefundRel = ResourceRel & {
6
7
  type: typeof Refunds.TYPE;
7
8
  };
@@ -19,6 +20,7 @@ interface Refund extends Resource {
19
20
  gateway_transaction_id?: string;
20
21
  order?: Order;
21
22
  reference_capture?: Capture;
23
+ events?: Event[];
22
24
  }
23
25
  declare class Refunds extends ApiResource {
24
26
  static readonly TYPE: 'refunds';
@@ -6,6 +6,7 @@ import { StockLocation } from './stock_locations';
6
6
  import { Address } from './addresses';
7
7
  import { ReturnLineItem } from './return_line_items';
8
8
  import { Attachment } from './attachments';
9
+ import { Event } from './events';
9
10
  declare type ReturnRel = ResourceRel & {
10
11
  type: typeof Returns.TYPE;
11
12
  };
@@ -33,6 +34,7 @@ interface Return extends Resource {
33
34
  destination_address?: Address;
34
35
  return_line_items?: ReturnLineItem[];
35
36
  attachments?: Attachment[];
37
+ events?: Event[];
36
38
  }
37
39
  interface ReturnCreate extends ResourceCreate {
38
40
  order: OrderRel;
@@ -11,6 +11,7 @@ import { StockTransfer } from './stock_transfers';
11
11
  import { CarrierAccount } from './carrier_accounts';
12
12
  import { Parcel } from './parcels';
13
13
  import { Attachment } from './attachments';
14
+ import { Event } from './events';
14
15
  declare type ShipmentRel = ResourceRel & {
15
16
  type: typeof Shipments.TYPE;
16
17
  };
@@ -29,6 +30,7 @@ interface Shipment extends Resource {
29
30
  rates?: object[];
30
31
  purchase_error_code?: string;
31
32
  purchase_error_message?: string;
33
+ get_rates_errors?: object[];
32
34
  get_rates_started_at?: string;
33
35
  get_rates_completed_at?: string;
34
36
  purchase_started_at?: string;
@@ -51,6 +53,7 @@ interface Shipment extends Resource {
51
53
  carrier_accounts?: CarrierAccount[];
52
54
  parcels?: Parcel[];
53
55
  attachments?: Attachment[];
56
+ events?: Event[];
54
57
  }
55
58
  interface ShipmentUpdate extends ResourceUpdate {
56
59
  _on_hold?: boolean;
@@ -1 +1 @@
1
- import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isShippingCategory(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_categories";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isShippingCategory(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="shipping_categories";export default s;
@@ -0,0 +1,26 @@
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import { ShippingMethod } from './shipping_methods';
4
+ import { Attachment } from './attachments';
5
+ declare type ShippingMethodTierRel = ResourceRel & {
6
+ type: typeof ShippingMethodTiers.TYPE;
7
+ };
8
+ interface ShippingMethodTier extends Resource {
9
+ name?: string;
10
+ up_to?: number;
11
+ price_amount_cents?: number;
12
+ price_amount_float?: number;
13
+ formatted_price_amount?: string;
14
+ shipping_method?: ShippingMethod;
15
+ attachments?: Attachment[];
16
+ }
17
+ declare class ShippingMethodTiers extends ApiResource {
18
+ static readonly TYPE: 'shipping_method_tiers';
19
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>>;
20
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethodTier>;
21
+ isShippingMethodTier(resource: any): resource is ShippingMethodTier;
22
+ relationship(id: string | ResourceId | null): ShippingMethodTierRel;
23
+ type(): string;
24
+ }
25
+ export default ShippingMethodTiers;
26
+ export { ShippingMethodTier };
@@ -0,0 +1 @@
1
+ import{ApiResource as y}from"../resource";class e extends y{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,s){return this.resources.retrieve({type:e.TYPE,id:t},r,s)}isShippingMethodTier(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="shipping_method_tiers";export default e;
@@ -3,7 +3,10 @@ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Market } from './markets';
4
4
  import { ShippingZone } from './shipping_zones';
5
5
  import { ShippingCategory } from './shipping_categories';
6
+ import { StockLocation } from './stock_locations';
6
7
  import { DeliveryLeadTime } from './delivery_lead_times';
8
+ import { ShippingMethodTier } from './shipping_method_tiers';
9
+ import { ShippingWeightTier } from './shipping_weight_tiers';
7
10
  import { Attachment } from './attachments';
8
11
  declare type ShippingMethodRel = ResourceRel & {
9
12
  type: typeof ShippingMethods.TYPE;
@@ -17,8 +20,15 @@ declare type ShippingZoneRel = ResourceRel & {
17
20
  declare type ShippingCategoryRel = ResourceRel & {
18
21
  type: 'shipping_categories';
19
22
  };
23
+ declare type StockLocationRel = ResourceRel & {
24
+ type: 'stock_locations';
25
+ };
26
+ declare type ShippingMethodTierRel = ResourceRel & {
27
+ type: 'shipping_method_tiers';
28
+ };
20
29
  interface ShippingMethod extends Resource {
21
30
  name?: string;
31
+ scheme?: string;
22
32
  currency_code?: string;
23
33
  disabled_at?: string;
24
34
  price_amount_cents?: number;
@@ -30,29 +40,47 @@ interface ShippingMethod extends Resource {
30
40
  price_amount_for_shipment_cents?: number;
31
41
  price_amount_for_shipment_float?: number;
32
42
  formatted_price_amount_for_shipment?: string;
43
+ min_weight?: number;
44
+ max_weight?: number;
45
+ unit_of_weight?: string;
33
46
  market?: Market;
34
47
  shipping_zone?: ShippingZone;
35
48
  shipping_category?: ShippingCategory;
49
+ stock_location?: StockLocation;
36
50
  delivery_lead_time_for_shipment?: DeliveryLeadTime;
51
+ shipping_method_tiers?: ShippingMethodTier[];
52
+ shipping_weight_tiers?: ShippingWeightTier[];
37
53
  attachments?: Attachment[];
38
54
  }
39
55
  interface ShippingMethodCreate extends ResourceCreate {
40
56
  name: string;
57
+ scheme?: string;
41
58
  currency_code?: string;
42
59
  price_amount_cents: number;
43
60
  free_over_amount_cents?: number;
61
+ min_weight?: number;
62
+ max_weight?: number;
63
+ unit_of_weight?: string;
44
64
  market?: MarketRel;
45
- shipping_zone: ShippingZoneRel;
46
- shipping_category: ShippingCategoryRel;
65
+ shipping_zone?: ShippingZoneRel;
66
+ shipping_category?: ShippingCategoryRel;
67
+ stock_location?: StockLocationRel;
68
+ shipping_method_tiers?: ShippingMethodTierRel[];
47
69
  }
48
70
  interface ShippingMethodUpdate extends ResourceUpdate {
49
71
  name?: string;
72
+ scheme?: string;
50
73
  currency_code?: string;
51
74
  price_amount_cents?: number;
52
75
  free_over_amount_cents?: number;
76
+ min_weight?: number;
77
+ max_weight?: number;
78
+ unit_of_weight?: string;
53
79
  market?: MarketRel;
54
80
  shipping_zone?: ShippingZoneRel;
55
81
  shipping_category?: ShippingCategoryRel;
82
+ stock_location?: StockLocationRel;
83
+ shipping_method_tiers?: ShippingMethodTierRel[];
56
84
  }
57
85
  declare class ShippingMethods extends ApiResource {
58
86
  static readonly TYPE: 'shipping_methods';
@@ -0,0 +1,44 @@
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import { ShippingMethod } from './shipping_methods';
4
+ import { Attachment } from './attachments';
5
+ declare type ShippingWeightTierRel = ResourceRel & {
6
+ type: typeof ShippingWeightTiers.TYPE;
7
+ };
8
+ declare type ShippingMethodRel = ResourceRel & {
9
+ type: 'shipping_methods';
10
+ };
11
+ interface ShippingWeightTier extends Resource {
12
+ name?: string;
13
+ up_to?: number;
14
+ price_amount_cents?: number;
15
+ price_amount_float?: number;
16
+ formatted_price_amount?: string;
17
+ shipping_method?: ShippingMethod;
18
+ attachments?: Attachment[];
19
+ }
20
+ interface ShippingWeightTierCreate extends ResourceCreate {
21
+ name: string;
22
+ up_to?: number;
23
+ price_amount_cents: number;
24
+ shipping_method: ShippingMethodRel;
25
+ }
26
+ interface ShippingWeightTierUpdate extends ResourceUpdate {
27
+ name?: string;
28
+ up_to?: number;
29
+ price_amount_cents?: number;
30
+ shipping_method?: ShippingMethodRel;
31
+ }
32
+ declare class ShippingWeightTiers extends ApiResource {
33
+ static readonly TYPE: 'shipping_weight_tiers';
34
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>>;
35
+ create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingWeightTier>;
36
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingWeightTier>;
37
+ update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingWeightTier>;
38
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
39
+ isShippingWeightTier(resource: any): resource is ShippingWeightTier;
40
+ relationship(id: string | ResourceId | null): ShippingWeightTierRel;
41
+ type(): string;
42
+ }
43
+ export default ShippingWeightTiers;
44
+ export { ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate };
@@ -0,0 +1 @@
1
+ import{ApiResource as a}from"../resource";class t extends a{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isShippingWeightTier(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_weight_tiers";export default t;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isShippingZone(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_zones";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isShippingZone(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="shipping_zones";export default s;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class r extends n{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isSkuListItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="sku_list_items";export default r;
1
+ import{ApiResource as r}from"../resource";class t extends r{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,i){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async retrieve(e,s,i){return this.resources.retrieve({type:t.TYPE,id:e},s,i)}async update(e,s,i){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isSkuListItem(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="sku_list_items";export default t;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isSkuListPromotionRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="sku_list_promotion_rules";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isSkuListPromotionRule(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="sku_list_promotion_rules";export default s;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isSkuList(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="sku_lists";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isSkuList(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="sku_lists";export default s;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isSkuOption(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="sku_options";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isSkuOption(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="sku_options";export default s;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isStockItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_items";export default r;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isStockItem(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="stock_items";export default t;
@@ -4,6 +4,7 @@ import { Sku } from './skus';
4
4
  import { StockLocation } from './stock_locations';
5
5
  import { Shipment } from './shipments';
6
6
  import { LineItem } from './line_items';
7
+ import { Event } from './events';
7
8
  declare type StockTransferRel = ResourceRel & {
8
9
  type: typeof StockTransfers.TYPE;
9
10
  };
@@ -30,6 +31,7 @@ interface StockTransfer extends Resource {
30
31
  destination_stock_location?: StockLocation;
31
32
  shipment?: Shipment;
32
33
  line_item?: LineItem;
34
+ events?: Event[];
33
35
  }
34
36
  interface StockTransferCreate extends ResourceCreate {
35
37
  sku_code?: string;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="stripe_gateways";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isStripeGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="stripe_gateways";export default s;
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class t extends s{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,p){return this.resources.retrieve({type:t.TYPE,id:e},r,p)}isTaxCalculator(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="tax_calculators";export default t;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isTaxCalculator(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="tax_calculators";export default r;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isTaxCategory(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="tax_categories";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isTaxCategory(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="tax_categories";export default s;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isTaxRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="tax_rules";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isTaxRule(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="tax_rules";export default s;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isTaxjarAccount(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="taxjar_accounts";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isTaxjarAccount(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="taxjar_accounts";export default s;
@@ -1 +1 @@
1
- import{ApiResource as n}from"../resource";class t extends n{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isWebhook(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="webhooks";export default t;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isWebhook(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="webhooks";export default s;