@commercelayer/sdk 5.0.0-beta.4 → 5.0.0-beta.5

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 (193) hide show
  1. package/lib/cjs/client.js +8 -3
  2. package/lib/cjs/error.js +1 -1
  3. package/lib/cjs/jsonapi.js +5 -1
  4. package/lib/cjs/resource.js +7 -7
  5. package/lib/cjs/resources/addresses.js +2 -2
  6. package/lib/cjs/resources/adjustments.js +2 -2
  7. package/lib/cjs/resources/adyen_gateways.js +2 -2
  8. package/lib/cjs/resources/adyen_payments.js +2 -2
  9. package/lib/cjs/resources/attachments.js +2 -2
  10. package/lib/cjs/resources/authorizations.js +1 -1
  11. package/lib/cjs/resources/avalara_accounts.js +2 -2
  12. package/lib/cjs/resources/axerve_gateways.js +2 -2
  13. package/lib/cjs/resources/axerve_payments.js +2 -2
  14. package/lib/cjs/resources/billing_info_validation_rules.js +2 -2
  15. package/lib/cjs/resources/bing_geocoders.js +2 -2
  16. package/lib/cjs/resources/braintree_gateways.js +2 -2
  17. package/lib/cjs/resources/braintree_payments.js +2 -2
  18. package/lib/cjs/resources/bundles.js +2 -2
  19. package/lib/cjs/resources/captures.js +1 -1
  20. package/lib/cjs/resources/checkout_com_gateways.js +2 -2
  21. package/lib/cjs/resources/checkout_com_payments.js +2 -2
  22. package/lib/cjs/resources/cleanups.js +1 -1
  23. package/lib/cjs/resources/coupon_codes_promotion_rules.js +2 -2
  24. package/lib/cjs/resources/coupon_recipients.js +2 -2
  25. package/lib/cjs/resources/coupons.js +2 -2
  26. package/lib/cjs/resources/customer_addresses.js +2 -2
  27. package/lib/cjs/resources/customer_groups.js +2 -2
  28. package/lib/cjs/resources/customer_password_resets.js +2 -2
  29. package/lib/cjs/resources/customer_payment_sources.js +2 -2
  30. package/lib/cjs/resources/customer_subscriptions.js +2 -2
  31. package/lib/cjs/resources/customers.js +2 -2
  32. package/lib/cjs/resources/delivery_lead_times.js +2 -2
  33. package/lib/cjs/resources/exports.js +1 -1
  34. package/lib/cjs/resources/external_gateways.js +2 -2
  35. package/lib/cjs/resources/external_payments.js +2 -2
  36. package/lib/cjs/resources/external_promotions.js +2 -2
  37. package/lib/cjs/resources/external_tax_calculators.js +2 -2
  38. package/lib/cjs/resources/fixed_amount_promotions.js +2 -2
  39. package/lib/cjs/resources/fixed_price_promotions.js +2 -2
  40. package/lib/cjs/resources/free_gift_promotions.js +2 -2
  41. package/lib/cjs/resources/free_shipping_promotions.js +2 -2
  42. package/lib/cjs/resources/gift_card_recipients.js +2 -2
  43. package/lib/cjs/resources/gift_cards.js +2 -2
  44. package/lib/cjs/resources/google_geocoders.js +2 -2
  45. package/lib/cjs/resources/imports.js +1 -1
  46. package/lib/cjs/resources/in_stock_subscriptions.js +2 -2
  47. package/lib/cjs/resources/inventory_models.js +2 -2
  48. package/lib/cjs/resources/inventory_return_locations.js +2 -2
  49. package/lib/cjs/resources/inventory_stock_locations.js +2 -2
  50. package/lib/cjs/resources/klarna_gateways.js +2 -2
  51. package/lib/cjs/resources/klarna_payments.js +2 -2
  52. package/lib/cjs/resources/line_item_options.js +2 -2
  53. package/lib/cjs/resources/line_items.js +2 -2
  54. package/lib/cjs/resources/manual_gateways.js +2 -2
  55. package/lib/cjs/resources/manual_tax_calculators.js +2 -2
  56. package/lib/cjs/resources/markets.js +2 -2
  57. package/lib/cjs/resources/merchants.js +2 -2
  58. package/lib/cjs/resources/order_amount_promotion_rules.js +2 -2
  59. package/lib/cjs/resources/order_copies.js +1 -1
  60. package/lib/cjs/resources/order_subscriptions.js +2 -2
  61. package/lib/cjs/resources/orders.js +2 -2
  62. package/lib/cjs/resources/packages.js +2 -2
  63. package/lib/cjs/resources/parcel_line_items.js +2 -2
  64. package/lib/cjs/resources/parcels.js +2 -2
  65. package/lib/cjs/resources/payment_methods.js +2 -2
  66. package/lib/cjs/resources/paypal_gateways.js +2 -2
  67. package/lib/cjs/resources/paypal_payments.js +2 -2
  68. package/lib/cjs/resources/percentage_discount_promotions.js +2 -2
  69. package/lib/cjs/resources/price_lists.js +2 -2
  70. package/lib/cjs/resources/price_volume_tiers.js +2 -2
  71. package/lib/cjs/resources/prices.js +2 -2
  72. package/lib/cjs/resources/return_line_items.js +2 -2
  73. package/lib/cjs/resources/returns.js +2 -2
  74. package/lib/cjs/resources/satispay_gateways.js +2 -2
  75. package/lib/cjs/resources/satispay_payments.js +2 -2
  76. package/lib/cjs/resources/shipments.js +1 -1
  77. package/lib/cjs/resources/shipping_categories.js +2 -2
  78. package/lib/cjs/resources/shipping_methods.js +2 -2
  79. package/lib/cjs/resources/shipping_weight_tiers.js +2 -2
  80. package/lib/cjs/resources/shipping_zones.js +2 -2
  81. package/lib/cjs/resources/sku_list_items.js +2 -2
  82. package/lib/cjs/resources/sku_list_promotion_rules.js +2 -2
  83. package/lib/cjs/resources/sku_lists.js +2 -2
  84. package/lib/cjs/resources/sku_options.js +2 -2
  85. package/lib/cjs/resources/skus.js +2 -2
  86. package/lib/cjs/resources/stock_items.js +2 -2
  87. package/lib/cjs/resources/stock_locations.js +2 -2
  88. package/lib/cjs/resources/stock_transfers.js +2 -2
  89. package/lib/cjs/resources/stripe_gateways.js +2 -2
  90. package/lib/cjs/resources/stripe_payments.js +2 -2
  91. package/lib/cjs/resources/tax_categories.js +2 -2
  92. package/lib/cjs/resources/tax_rules.js +2 -2
  93. package/lib/cjs/resources/taxjar_accounts.js +2 -2
  94. package/lib/cjs/resources/webhooks.js +2 -2
  95. package/lib/cjs/resources/wire_transfers.js +2 -2
  96. package/lib/esm/client.js +8 -3
  97. package/lib/esm/error.js +1 -1
  98. package/lib/esm/jsonapi.js +5 -1
  99. package/lib/esm/resource.js +7 -7
  100. package/lib/esm/resources/addresses.js +2 -2
  101. package/lib/esm/resources/adjustments.js +2 -2
  102. package/lib/esm/resources/adyen_gateways.js +2 -2
  103. package/lib/esm/resources/adyen_payments.js +2 -2
  104. package/lib/esm/resources/attachments.js +2 -2
  105. package/lib/esm/resources/authorizations.js +1 -1
  106. package/lib/esm/resources/avalara_accounts.js +2 -2
  107. package/lib/esm/resources/axerve_gateways.js +2 -2
  108. package/lib/esm/resources/axerve_payments.js +2 -2
  109. package/lib/esm/resources/billing_info_validation_rules.js +2 -2
  110. package/lib/esm/resources/bing_geocoders.js +2 -2
  111. package/lib/esm/resources/braintree_gateways.js +2 -2
  112. package/lib/esm/resources/braintree_payments.js +2 -2
  113. package/lib/esm/resources/bundles.js +2 -2
  114. package/lib/esm/resources/captures.js +1 -1
  115. package/lib/esm/resources/checkout_com_gateways.js +2 -2
  116. package/lib/esm/resources/checkout_com_payments.js +2 -2
  117. package/lib/esm/resources/cleanups.js +1 -1
  118. package/lib/esm/resources/coupon_codes_promotion_rules.js +2 -2
  119. package/lib/esm/resources/coupon_recipients.js +2 -2
  120. package/lib/esm/resources/coupons.js +2 -2
  121. package/lib/esm/resources/customer_addresses.js +2 -2
  122. package/lib/esm/resources/customer_groups.js +2 -2
  123. package/lib/esm/resources/customer_password_resets.js +2 -2
  124. package/lib/esm/resources/customer_payment_sources.js +2 -2
  125. package/lib/esm/resources/customer_subscriptions.js +2 -2
  126. package/lib/esm/resources/customers.js +2 -2
  127. package/lib/esm/resources/delivery_lead_times.js +2 -2
  128. package/lib/esm/resources/exports.js +1 -1
  129. package/lib/esm/resources/external_gateways.js +2 -2
  130. package/lib/esm/resources/external_payments.js +2 -2
  131. package/lib/esm/resources/external_promotions.js +2 -2
  132. package/lib/esm/resources/external_tax_calculators.js +2 -2
  133. package/lib/esm/resources/fixed_amount_promotions.js +2 -2
  134. package/lib/esm/resources/fixed_price_promotions.js +2 -2
  135. package/lib/esm/resources/free_gift_promotions.js +2 -2
  136. package/lib/esm/resources/free_shipping_promotions.js +2 -2
  137. package/lib/esm/resources/gift_card_recipients.js +2 -2
  138. package/lib/esm/resources/gift_cards.js +2 -2
  139. package/lib/esm/resources/google_geocoders.js +2 -2
  140. package/lib/esm/resources/imports.js +1 -1
  141. package/lib/esm/resources/in_stock_subscriptions.js +2 -2
  142. package/lib/esm/resources/inventory_models.js +2 -2
  143. package/lib/esm/resources/inventory_return_locations.js +2 -2
  144. package/lib/esm/resources/inventory_stock_locations.js +2 -2
  145. package/lib/esm/resources/klarna_gateways.js +2 -2
  146. package/lib/esm/resources/klarna_payments.js +2 -2
  147. package/lib/esm/resources/line_item_options.js +2 -2
  148. package/lib/esm/resources/line_items.js +2 -2
  149. package/lib/esm/resources/manual_gateways.js +2 -2
  150. package/lib/esm/resources/manual_tax_calculators.js +2 -2
  151. package/lib/esm/resources/markets.js +2 -2
  152. package/lib/esm/resources/merchants.js +2 -2
  153. package/lib/esm/resources/order_amount_promotion_rules.js +2 -2
  154. package/lib/esm/resources/order_copies.js +1 -1
  155. package/lib/esm/resources/order_subscriptions.js +2 -2
  156. package/lib/esm/resources/orders.js +2 -2
  157. package/lib/esm/resources/packages.js +2 -2
  158. package/lib/esm/resources/parcel_line_items.js +2 -2
  159. package/lib/esm/resources/parcels.js +2 -2
  160. package/lib/esm/resources/payment_methods.js +2 -2
  161. package/lib/esm/resources/paypal_gateways.js +2 -2
  162. package/lib/esm/resources/paypal_payments.js +2 -2
  163. package/lib/esm/resources/percentage_discount_promotions.js +2 -2
  164. package/lib/esm/resources/price_lists.js +2 -2
  165. package/lib/esm/resources/price_volume_tiers.js +2 -2
  166. package/lib/esm/resources/prices.js +2 -2
  167. package/lib/esm/resources/return_line_items.js +2 -2
  168. package/lib/esm/resources/returns.js +2 -2
  169. package/lib/esm/resources/satispay_gateways.js +2 -2
  170. package/lib/esm/resources/satispay_payments.js +2 -2
  171. package/lib/esm/resources/shipments.js +1 -1
  172. package/lib/esm/resources/shipping_categories.js +2 -2
  173. package/lib/esm/resources/shipping_methods.js +2 -2
  174. package/lib/esm/resources/shipping_weight_tiers.js +2 -2
  175. package/lib/esm/resources/shipping_zones.js +2 -2
  176. package/lib/esm/resources/sku_list_items.js +2 -2
  177. package/lib/esm/resources/sku_list_promotion_rules.js +2 -2
  178. package/lib/esm/resources/sku_lists.js +2 -2
  179. package/lib/esm/resources/sku_options.js +2 -2
  180. package/lib/esm/resources/skus.js +2 -2
  181. package/lib/esm/resources/stock_items.js +2 -2
  182. package/lib/esm/resources/stock_locations.js +2 -2
  183. package/lib/esm/resources/stock_transfers.js +2 -2
  184. package/lib/esm/resources/stripe_gateways.js +2 -2
  185. package/lib/esm/resources/stripe_payments.js +2 -2
  186. package/lib/esm/resources/tax_categories.js +2 -2
  187. package/lib/esm/resources/tax_rules.js +2 -2
  188. package/lib/esm/resources/taxjar_accounts.js +2 -2
  189. package/lib/esm/resources/webhooks.js +2 -2
  190. package/lib/esm/resources/wire_transfers.js +2 -2
  191. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  192. package/lib/tsconfig.tsbuildinfo +1 -1
  193. package/package.json +3 -3
@@ -5,10 +5,10 @@ class CustomerAddresses extends ApiResource {
5
5
  return this.resources.list({ type: CustomerAddresses.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerAddresses.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: CustomerAddresses.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerAddresses.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: CustomerAddresses.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: CustomerAddresses.TYPE } : id, options);
@@ -5,10 +5,10 @@ class CustomerGroups extends ApiResource {
5
5
  return this.resources.list({ type: CustomerGroups.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerGroups.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: CustomerGroups.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerGroups.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: CustomerGroups.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: CustomerGroups.TYPE } : id, options);
@@ -5,10 +5,10 @@ class CustomerPasswordResets extends ApiResource {
5
5
  return this.resources.list({ type: CustomerPasswordResets.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerPasswordResets.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: CustomerPasswordResets.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerPasswordResets.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: CustomerPasswordResets.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: CustomerPasswordResets.TYPE } : id, options);
@@ -5,10 +5,10 @@ class CustomerPaymentSources extends ApiResource {
5
5
  return this.resources.list({ type: CustomerPaymentSources.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerPaymentSources.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: CustomerPaymentSources.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerPaymentSources.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: CustomerPaymentSources.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: CustomerPaymentSources.TYPE } : id, options);
@@ -5,10 +5,10 @@ class CustomerSubscriptions extends ApiResource {
5
5
  return this.resources.list({ type: CustomerSubscriptions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerSubscriptions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: CustomerSubscriptions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerSubscriptions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: CustomerSubscriptions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: CustomerSubscriptions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Customers extends ApiResource {
5
5
  return this.resources.list({ type: Customers.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Customers.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Customers.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Customers.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Customers.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Customers.TYPE } : id, options);
@@ -5,10 +5,10 @@ class DeliveryLeadTimes extends ApiResource {
5
5
  return this.resources.list({ type: DeliveryLeadTimes.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: DeliveryLeadTimes.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: DeliveryLeadTimes.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: DeliveryLeadTimes.TYPE } : id, options);
@@ -5,7 +5,7 @@ class Exports extends ApiResource {
5
5
  return this.resources.list({ type: Exports.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Exports.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Exports.TYPE }, params, options);
9
9
  }
10
10
  async delete(id, options) {
11
11
  await this.resources.delete((typeof id === 'string') ? { id, type: Exports.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ExternalGateways extends ApiResource {
5
5
  return this.resources.list({ type: ExternalGateways.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ExternalGateways.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ExternalGateways.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ExternalGateways.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ExternalPayments extends ApiResource {
5
5
  return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ExternalPayments.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ExternalPayments.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPayments.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ExternalPromotions extends ApiResource {
5
5
  return this.resources.list({ type: ExternalPromotions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ExternalPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ExternalPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPromotions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ExternalTaxCalculators extends ApiResource {
5
5
  return this.resources.list({ type: ExternalTaxCalculators.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalTaxCalculators.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalTaxCalculators.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ExternalTaxCalculators.TYPE } : id, options);
@@ -5,10 +5,10 @@ class FixedAmountPromotions extends ApiResource {
5
5
  return this.resources.list({ type: FixedAmountPromotions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: FixedAmountPromotions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: FixedAmountPromotions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: FixedAmountPromotions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class FixedPricePromotions extends ApiResource {
5
5
  return this.resources.list({ type: FixedPricePromotions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: FixedPricePromotions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: FixedPricePromotions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: FixedPricePromotions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class FreeGiftPromotions extends ApiResource {
5
5
  return this.resources.list({ type: FreeGiftPromotions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: FreeGiftPromotions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: FreeGiftPromotions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: FreeGiftPromotions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class FreeShippingPromotions extends ApiResource {
5
5
  return this.resources.list({ type: FreeShippingPromotions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: FreeShippingPromotions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: FreeShippingPromotions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: FreeShippingPromotions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: FreeShippingPromotions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: FreeShippingPromotions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class GiftCardRecipients extends ApiResource {
5
5
  return this.resources.list({ type: GiftCardRecipients.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: GiftCardRecipients.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: GiftCardRecipients.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCardRecipients.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: GiftCardRecipients.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: GiftCardRecipients.TYPE } : id, options);
@@ -5,10 +5,10 @@ class GiftCards extends ApiResource {
5
5
  return this.resources.list({ type: GiftCards.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: GiftCards.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: GiftCards.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCards.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: GiftCards.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: GiftCards.TYPE } : id, options);
@@ -5,10 +5,10 @@ class GoogleGeocoders extends ApiResource {
5
5
  return this.resources.list({ type: GoogleGeocoders.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: GoogleGeocoders.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: GoogleGeocoders.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: GoogleGeocoders.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: GoogleGeocoders.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: GoogleGeocoders.TYPE } : id, options);
@@ -5,7 +5,7 @@ class Imports extends ApiResource {
5
5
  return this.resources.list({ type: Imports.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Imports.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Imports.TYPE }, params, options);
9
9
  }
10
10
  async delete(id, options) {
11
11
  await this.resources.delete((typeof id === 'string') ? { id, type: Imports.TYPE } : id, options);
@@ -5,10 +5,10 @@ class InStockSubscriptions extends ApiResource {
5
5
  return this.resources.list({ type: InStockSubscriptions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: InStockSubscriptions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: InStockSubscriptions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: InStockSubscriptions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class InventoryModels extends ApiResource {
5
5
  return this.resources.list({ type: InventoryModels.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryModels.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: InventoryModels.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryModels.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: InventoryModels.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: InventoryModels.TYPE } : id, options);
@@ -5,10 +5,10 @@ class InventoryReturnLocations extends ApiResource {
5
5
  return this.resources.list({ type: InventoryReturnLocations.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryReturnLocations.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryReturnLocations.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: InventoryReturnLocations.TYPE } : id, options);
@@ -5,10 +5,10 @@ class InventoryStockLocations extends ApiResource {
5
5
  return this.resources.list({ type: InventoryStockLocations.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryStockLocations.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryStockLocations.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: InventoryStockLocations.TYPE } : id, options);
@@ -5,10 +5,10 @@ class KlarnaGateways extends ApiResource {
5
5
  return this.resources.list({ type: KlarnaGateways.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: KlarnaGateways.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: KlarnaGateways.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: KlarnaGateways.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: KlarnaGateways.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaGateways.TYPE } : id, options);
@@ -5,10 +5,10 @@ class KlarnaPayments extends ApiResource {
5
5
  return this.resources.list({ type: KlarnaPayments.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: KlarnaPayments.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: KlarnaPayments.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: KlarnaPayments.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: KlarnaPayments.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaPayments.TYPE } : id, options);
@@ -5,10 +5,10 @@ class LineItemOptions extends ApiResource {
5
5
  return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: LineItemOptions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: LineItemOptions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: LineItemOptions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class LineItems extends ApiResource {
5
5
  return this.resources.list({ type: LineItems.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: LineItems.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: LineItems.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: LineItems.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ManualGateways extends ApiResource {
5
5
  return this.resources.list({ type: ManualGateways.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ManualGateways.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ManualGateways.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ManualGateways.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ManualTaxCalculators extends ApiResource {
5
5
  return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ManualTaxCalculators.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Markets extends ApiResource {
5
5
  return this.resources.list({ type: Markets.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Markets.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Markets.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Markets.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Markets.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Markets.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Merchants extends ApiResource {
5
5
  return this.resources.list({ type: Merchants.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Merchants.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Merchants.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Merchants.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Merchants.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Merchants.TYPE } : id, options);
@@ -5,10 +5,10 @@ class OrderAmountPromotionRules extends ApiResource {
5
5
  return this.resources.list({ type: OrderAmountPromotionRules.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderAmountPromotionRules.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderAmountPromotionRules.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : id, options);
@@ -5,7 +5,7 @@ class OrderCopies extends ApiResource {
5
5
  return this.resources.list({ type: OrderCopies.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderCopies.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: OrderCopies.TYPE }, params, options);
9
9
  }
10
10
  async delete(id, options) {
11
11
  await this.resources.delete((typeof id === 'string') ? { id, type: OrderCopies.TYPE } : id, options);
@@ -5,10 +5,10 @@ class OrderSubscriptions extends ApiResource {
5
5
  return this.resources.list({ type: OrderSubscriptions.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: OrderSubscriptions.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: OrderSubscriptions.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: OrderSubscriptions.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Orders extends ApiResource {
5
5
  return this.resources.list({ type: Orders.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Orders.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Orders.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Orders.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Orders.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Orders.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Packages extends ApiResource {
5
5
  return this.resources.list({ type: Packages.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Packages.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Packages.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Packages.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Packages.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Packages.TYPE } : id, options);
@@ -5,10 +5,10 @@ class ParcelLineItems extends ApiResource {
5
5
  return this.resources.list({ type: ParcelLineItems.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: ParcelLineItems.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: ParcelLineItems.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: ParcelLineItems.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: ParcelLineItems.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: ParcelLineItems.TYPE } : id, options);
@@ -5,10 +5,10 @@ class Parcels extends ApiResource {
5
5
  return this.resources.list({ type: Parcels.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: Parcels.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: Parcels.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Parcels.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: Parcels.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: Parcels.TYPE } : id, options);
@@ -5,10 +5,10 @@ class PaymentMethods extends ApiResource {
5
5
  return this.resources.list({ type: PaymentMethods.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: PaymentMethods.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: PaymentMethods.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaymentMethods.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: PaymentMethods.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: PaymentMethods.TYPE } : id, options);
@@ -5,10 +5,10 @@ class PaypalGateways extends ApiResource {
5
5
  return this.resources.list({ type: PaypalGateways.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: PaypalGateways.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: PaypalGateways.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaypalGateways.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: PaypalGateways.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: PaypalGateways.TYPE } : id, options);
@@ -5,10 +5,10 @@ class PaypalPayments extends ApiResource {
5
5
  return this.resources.list({ type: PaypalPayments.TYPE }, params, options);
6
6
  }
7
7
  async create(resource, params, options) {
8
- return this.resources.create(Object.assign(Object.assign({}, resource), { type: PaypalPayments.TYPE }), params, options);
8
+ return this.resources.create({ ...resource, type: PaypalPayments.TYPE }, params, options);
9
9
  }
10
10
  async update(resource, params, options) {
11
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaypalPayments.TYPE }), params, options);
11
+ return this.resources.update({ ...resource, type: PaypalPayments.TYPE }, params, options);
12
12
  }
13
13
  async delete(id, options) {
14
14
  await this.resources.delete((typeof id === 'string') ? { id, type: PaypalPayments.TYPE } : id, options);