@commercelayer/sdk 5.0.0-beta.1 → 5.0.0-beta.2

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 (191) hide show
  1. package/lib/cjs/client.js +0 -1
  2. package/lib/cjs/common.js +0 -2
  3. package/lib/cjs/debug.js +0 -3
  4. package/lib/cjs/error.js +0 -1
  5. package/lib/cjs/resources/addresses.d.ts +10 -10
  6. package/lib/cjs/resources/adjustments.d.ts +8 -8
  7. package/lib/cjs/resources/adyen_gateways.d.ts +4 -4
  8. package/lib/cjs/resources/adyen_payments.d.ts +1 -1
  9. package/lib/cjs/resources/attachments.d.ts +2 -2
  10. package/lib/cjs/resources/authorizations.d.ts +6 -6
  11. package/lib/cjs/resources/avalara_accounts.d.ts +6 -6
  12. package/lib/cjs/resources/axerve_gateways.d.ts +4 -4
  13. package/lib/cjs/resources/axerve_payments.d.ts +3 -3
  14. package/lib/cjs/resources/bing_geocoders.d.ts +2 -2
  15. package/lib/cjs/resources/braintree_gateways.d.ts +2 -2
  16. package/lib/cjs/resources/braintree_payments.d.ts +1 -1
  17. package/lib/cjs/resources/bundles.d.ts +12 -12
  18. package/lib/cjs/resources/captures.d.ts +6 -6
  19. package/lib/cjs/resources/checkout_com_gateways.d.ts +2 -2
  20. package/lib/cjs/resources/checkout_com_payments.d.ts +4 -4
  21. package/lib/cjs/resources/cleanups.d.ts +1 -1
  22. package/lib/cjs/resources/coupon_recipients.d.ts +2 -2
  23. package/lib/cjs/resources/coupons.d.ts +4 -4
  24. package/lib/cjs/resources/customer_groups.d.ts +2 -2
  25. package/lib/cjs/resources/customer_password_resets.d.ts +1 -1
  26. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -1
  27. package/lib/cjs/resources/customers.d.ts +2 -2
  28. package/lib/cjs/resources/delivery_lead_times.d.ts +4 -4
  29. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  30. package/lib/cjs/resources/events.d.ts +1 -1
  31. package/lib/cjs/resources/exports.d.ts +1 -1
  32. package/lib/cjs/resources/external_gateways.d.ts +3 -3
  33. package/lib/cjs/resources/external_payments.d.ts +1 -1
  34. package/lib/cjs/resources/external_promotions.d.ts +11 -11
  35. package/lib/cjs/resources/external_tax_calculators.d.ts +5 -5
  36. package/lib/cjs/resources/fixed_amount_promotions.d.ts +10 -10
  37. package/lib/cjs/resources/fixed_price_promotions.d.ts +10 -10
  38. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -8
  39. package/lib/cjs/resources/free_shipping_promotions.d.ts +8 -8
  40. package/lib/cjs/resources/geocoders.d.ts +1 -1
  41. package/lib/cjs/resources/gift_card_recipients.d.ts +2 -2
  42. package/lib/cjs/resources/gift_cards.d.ts +8 -8
  43. package/lib/cjs/resources/google_geocoders.d.ts +2 -2
  44. package/lib/cjs/resources/imports.d.ts +2 -2
  45. package/lib/cjs/resources/inventory_models.d.ts +2 -2
  46. package/lib/cjs/resources/inventory_return_locations.d.ts +2 -2
  47. package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -2
  48. package/lib/cjs/resources/klarna_gateways.d.ts +2 -2
  49. package/lib/cjs/resources/klarna_payments.d.ts +2 -2
  50. package/lib/cjs/resources/line_item_options.d.ts +5 -5
  51. package/lib/cjs/resources/line_items.d.ts +4 -4
  52. package/lib/cjs/resources/manual_gateways.d.ts +2 -2
  53. package/lib/cjs/resources/manual_tax_calculators.d.ts +2 -2
  54. package/lib/cjs/resources/markets.d.ts +3 -3
  55. package/lib/cjs/resources/merchants.d.ts +2 -2
  56. package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
  57. package/lib/cjs/resources/packages.d.ts +10 -10
  58. package/lib/cjs/resources/parcel_line_items.d.ts +2 -2
  59. package/lib/cjs/resources/parcels.d.ts +4 -4
  60. package/lib/cjs/resources/payment_gateways.d.ts +1 -1
  61. package/lib/cjs/resources/payment_methods.d.ts +4 -4
  62. package/lib/cjs/resources/paypal_gateways.d.ts +2 -2
  63. package/lib/cjs/resources/paypal_payments.d.ts +3 -3
  64. package/lib/cjs/resources/percentage_discount_promotions.d.ts +10 -10
  65. package/lib/cjs/resources/price_lists.d.ts +4 -4
  66. package/lib/cjs/resources/price_tiers.d.ts +2 -2
  67. package/lib/cjs/resources/price_volume_tiers.d.ts +4 -4
  68. package/lib/cjs/resources/prices.d.ts +8 -8
  69. package/lib/cjs/resources/promotions.d.ts +4 -4
  70. package/lib/cjs/resources/refunds.d.ts +6 -6
  71. package/lib/cjs/resources/return_line_items.d.ts +2 -2
  72. package/lib/cjs/resources/satispay_gateways.d.ts +2 -2
  73. package/lib/cjs/resources/satispay_payments.d.ts +1 -1
  74. package/lib/cjs/resources/shipping_categories.d.ts +2 -2
  75. package/lib/cjs/resources/shipping_method_tiers.d.ts +2 -2
  76. package/lib/cjs/resources/shipping_methods.d.ts +4 -4
  77. package/lib/cjs/resources/shipping_weight_tiers.d.ts +4 -4
  78. package/lib/cjs/resources/shipping_zones.d.ts +2 -2
  79. package/lib/cjs/resources/sku_lists.d.ts +3 -3
  80. package/lib/cjs/resources/sku_options.d.ts +2 -2
  81. package/lib/cjs/resources/skus.d.ts +4 -4
  82. package/lib/cjs/resources/stock_items.d.ts +2 -2
  83. package/lib/cjs/resources/stock_line_items.d.ts +1 -1
  84. package/lib/cjs/resources/stock_locations.d.ts +2 -2
  85. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  86. package/lib/cjs/resources/stripe_gateways.d.ts +2 -2
  87. package/lib/cjs/resources/stripe_payments.d.ts +2 -2
  88. package/lib/cjs/resources/tax_calculators.d.ts +1 -1
  89. package/lib/cjs/resources/tax_categories.d.ts +2 -2
  90. package/lib/cjs/resources/tax_rules.d.ts +2 -2
  91. package/lib/cjs/resources/taxjar_accounts.d.ts +2 -2
  92. package/lib/cjs/resources/transactions.d.ts +6 -6
  93. package/lib/cjs/resources/voids.d.ts +6 -6
  94. package/lib/cjs/resources/webhooks.d.ts +5 -5
  95. package/lib/esm/client.js +0 -1
  96. package/lib/esm/common.js +0 -2
  97. package/lib/esm/debug.js +0 -3
  98. package/lib/esm/error.js +0 -1
  99. package/lib/esm/resources/addresses.d.ts +10 -10
  100. package/lib/esm/resources/adjustments.d.ts +8 -8
  101. package/lib/esm/resources/adyen_gateways.d.ts +4 -4
  102. package/lib/esm/resources/adyen_payments.d.ts +1 -1
  103. package/lib/esm/resources/attachments.d.ts +2 -2
  104. package/lib/esm/resources/authorizations.d.ts +6 -6
  105. package/lib/esm/resources/avalara_accounts.d.ts +6 -6
  106. package/lib/esm/resources/axerve_gateways.d.ts +4 -4
  107. package/lib/esm/resources/axerve_payments.d.ts +3 -3
  108. package/lib/esm/resources/bing_geocoders.d.ts +2 -2
  109. package/lib/esm/resources/braintree_gateways.d.ts +2 -2
  110. package/lib/esm/resources/braintree_payments.d.ts +1 -1
  111. package/lib/esm/resources/bundles.d.ts +12 -12
  112. package/lib/esm/resources/captures.d.ts +6 -6
  113. package/lib/esm/resources/checkout_com_gateways.d.ts +2 -2
  114. package/lib/esm/resources/checkout_com_payments.d.ts +4 -4
  115. package/lib/esm/resources/cleanups.d.ts +1 -1
  116. package/lib/esm/resources/coupon_recipients.d.ts +2 -2
  117. package/lib/esm/resources/coupons.d.ts +4 -4
  118. package/lib/esm/resources/customer_groups.d.ts +2 -2
  119. package/lib/esm/resources/customer_password_resets.d.ts +1 -1
  120. package/lib/esm/resources/customer_subscriptions.d.ts +1 -1
  121. package/lib/esm/resources/customers.d.ts +2 -2
  122. package/lib/esm/resources/delivery_lead_times.d.ts +4 -4
  123. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  124. package/lib/esm/resources/events.d.ts +1 -1
  125. package/lib/esm/resources/exports.d.ts +1 -1
  126. package/lib/esm/resources/external_gateways.d.ts +3 -3
  127. package/lib/esm/resources/external_payments.d.ts +1 -1
  128. package/lib/esm/resources/external_promotions.d.ts +11 -11
  129. package/lib/esm/resources/external_tax_calculators.d.ts +5 -5
  130. package/lib/esm/resources/fixed_amount_promotions.d.ts +10 -10
  131. package/lib/esm/resources/fixed_price_promotions.d.ts +10 -10
  132. package/lib/esm/resources/free_gift_promotions.d.ts +8 -8
  133. package/lib/esm/resources/free_shipping_promotions.d.ts +8 -8
  134. package/lib/esm/resources/geocoders.d.ts +1 -1
  135. package/lib/esm/resources/gift_card_recipients.d.ts +2 -2
  136. package/lib/esm/resources/gift_cards.d.ts +8 -8
  137. package/lib/esm/resources/google_geocoders.d.ts +2 -2
  138. package/lib/esm/resources/imports.d.ts +2 -2
  139. package/lib/esm/resources/inventory_models.d.ts +2 -2
  140. package/lib/esm/resources/inventory_return_locations.d.ts +2 -2
  141. package/lib/esm/resources/inventory_stock_locations.d.ts +2 -2
  142. package/lib/esm/resources/klarna_gateways.d.ts +2 -2
  143. package/lib/esm/resources/klarna_payments.d.ts +2 -2
  144. package/lib/esm/resources/line_item_options.d.ts +5 -5
  145. package/lib/esm/resources/line_items.d.ts +4 -4
  146. package/lib/esm/resources/manual_gateways.d.ts +2 -2
  147. package/lib/esm/resources/manual_tax_calculators.d.ts +2 -2
  148. package/lib/esm/resources/markets.d.ts +3 -3
  149. package/lib/esm/resources/merchants.d.ts +2 -2
  150. package/lib/esm/resources/order_subscriptions.d.ts +1 -1
  151. package/lib/esm/resources/packages.d.ts +10 -10
  152. package/lib/esm/resources/parcel_line_items.d.ts +2 -2
  153. package/lib/esm/resources/parcels.d.ts +4 -4
  154. package/lib/esm/resources/payment_gateways.d.ts +1 -1
  155. package/lib/esm/resources/payment_methods.d.ts +4 -4
  156. package/lib/esm/resources/paypal_gateways.d.ts +2 -2
  157. package/lib/esm/resources/paypal_payments.d.ts +3 -3
  158. package/lib/esm/resources/percentage_discount_promotions.d.ts +10 -10
  159. package/lib/esm/resources/price_lists.d.ts +4 -4
  160. package/lib/esm/resources/price_tiers.d.ts +2 -2
  161. package/lib/esm/resources/price_volume_tiers.d.ts +4 -4
  162. package/lib/esm/resources/prices.d.ts +8 -8
  163. package/lib/esm/resources/promotions.d.ts +4 -4
  164. package/lib/esm/resources/refunds.d.ts +6 -6
  165. package/lib/esm/resources/return_line_items.d.ts +2 -2
  166. package/lib/esm/resources/satispay_gateways.d.ts +2 -2
  167. package/lib/esm/resources/satispay_payments.d.ts +1 -1
  168. package/lib/esm/resources/shipping_categories.d.ts +2 -2
  169. package/lib/esm/resources/shipping_method_tiers.d.ts +2 -2
  170. package/lib/esm/resources/shipping_methods.d.ts +4 -4
  171. package/lib/esm/resources/shipping_weight_tiers.d.ts +4 -4
  172. package/lib/esm/resources/shipping_zones.d.ts +2 -2
  173. package/lib/esm/resources/sku_lists.d.ts +3 -3
  174. package/lib/esm/resources/sku_options.d.ts +2 -2
  175. package/lib/esm/resources/skus.d.ts +4 -4
  176. package/lib/esm/resources/stock_items.d.ts +2 -2
  177. package/lib/esm/resources/stock_line_items.d.ts +1 -1
  178. package/lib/esm/resources/stock_locations.d.ts +2 -2
  179. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  180. package/lib/esm/resources/stripe_gateways.d.ts +2 -2
  181. package/lib/esm/resources/stripe_payments.d.ts +2 -2
  182. package/lib/esm/resources/tax_calculators.d.ts +1 -1
  183. package/lib/esm/resources/tax_categories.d.ts +2 -2
  184. package/lib/esm/resources/tax_rules.d.ts +2 -2
  185. package/lib/esm/resources/taxjar_accounts.d.ts +2 -2
  186. package/lib/esm/resources/transactions.d.ts +6 -6
  187. package/lib/esm/resources/voids.d.ts +6 -6
  188. package/lib/esm/resources/webhooks.d.ts +5 -5
  189. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  190. package/lib/tsconfig.tsbuildinfo +1 -1
  191. package/package.json +1 -1
package/lib/cjs/client.js CHANGED
@@ -15,7 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  var _ApiClient_accessToken, _ApiClient_client;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- /* eslint-disable @typescript-eslint/no-explicit-any */
19
18
  const axios_1 = __importDefault(require("axios"));
20
19
  const error_1 = require("./error");
21
20
  const config_1 = __importDefault(require("./config"));
package/lib/cjs/common.js CHANGED
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  exports.isResourceType = exports.isResourceId = void 0;
6
4
  const api_1 = require("./api");
package/lib/cjs/debug.js CHANGED
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /* eslint-disable @typescript-eslint/no-unused-vars */
4
- // import Debug from 'debug'
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  /* Nope debugger */
7
4
  const debuggerFunction = (_pattern, ..._args) => {
package/lib/cjs/error.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.ErrorType = exports.ApiError = exports.SdkError = void 0;
5
4
  var ErrorType;
@@ -15,13 +15,13 @@ interface Address extends Resource {
15
15
  last_name?: string;
16
16
  company?: string;
17
17
  full_name?: string;
18
- line_1?: string;
18
+ line_1: string;
19
19
  line_2?: string;
20
- city?: string;
20
+ city: string;
21
21
  zip_code?: string;
22
- state_code?: string;
23
- country_code?: string;
24
- phone?: string;
22
+ state_code: string;
23
+ country_code: string;
24
+ phone: string;
25
25
  full_address?: string;
26
26
  name?: string;
27
27
  email?: string;
@@ -60,13 +60,13 @@ interface AddressUpdate extends ResourceUpdate {
60
60
  first_name?: string;
61
61
  last_name?: string;
62
62
  company?: string;
63
- line_1?: string;
63
+ line_1: string;
64
64
  line_2?: string;
65
- city?: string;
65
+ city: string;
66
66
  zip_code?: string;
67
- state_code?: string;
68
- country_code?: string;
69
- phone?: string;
67
+ state_code: string;
68
+ country_code: string;
69
+ phone: string;
70
70
  email?: string;
71
71
  notes?: string;
72
72
  lat?: number;
@@ -6,11 +6,11 @@ type AdjustmentRel = ResourceRel & {
6
6
  };
7
7
  interface Adjustment extends Resource {
8
8
  readonly type: AdjustmentType;
9
- name?: string;
10
- currency_code?: string;
11
- amount_cents?: number;
12
- amount_float?: number;
13
- formatted_amount?: string;
9
+ name: string;
10
+ currency_code: string;
11
+ amount_cents: number;
12
+ amount_float: number;
13
+ formatted_amount: string;
14
14
  }
15
15
  interface AdjustmentCreate extends ResourceCreate {
16
16
  name: string;
@@ -18,9 +18,9 @@ interface AdjustmentCreate extends ResourceCreate {
18
18
  amount_cents: number;
19
19
  }
20
20
  interface AdjustmentUpdate extends ResourceUpdate {
21
- name?: string;
22
- currency_code?: string;
23
- amount_cents?: number;
21
+ name: string;
22
+ currency_code: string;
23
+ amount_cents: number;
24
24
  }
25
25
  declare class Adjustments extends ApiResource<Adjustment> {
26
26
  static readonly TYPE: AdjustmentType;
@@ -11,8 +11,8 @@ type AdyenPaymentRel = ResourceRel & {
11
11
  };
12
12
  interface AdyenGateway extends Resource {
13
13
  readonly type: AdyenGatewayType;
14
- name?: string;
15
- live_url_prefix?: string;
14
+ name: string;
15
+ live_url_prefix: string;
16
16
  async_api?: boolean;
17
17
  webhook_endpoint_secret?: string;
18
18
  webhook_endpoint_url?: string;
@@ -31,11 +31,11 @@ interface AdyenGatewayCreate extends ResourceCreate {
31
31
  adyen_payments?: AdyenPaymentRel[];
32
32
  }
33
33
  interface AdyenGatewayUpdate extends ResourceUpdate {
34
- name?: string;
34
+ name: string;
35
35
  merchant_account?: string;
36
36
  api_key?: string;
37
37
  public_key?: string;
38
- live_url_prefix?: string;
38
+ live_url_prefix: string;
39
39
  api_version?: string;
40
40
  async_api?: boolean;
41
41
  webhook_endpoint_secret?: string;
@@ -12,7 +12,7 @@ type OrderRel = ResourceRel & {
12
12
  interface AdyenPayment extends Resource {
13
13
  readonly type: AdyenPaymentType;
14
14
  public_key?: string;
15
- payment_methods?: object;
15
+ payment_methods: object;
16
16
  payment_request_data?: object;
17
17
  payment_request_details?: object;
18
18
  payment_response?: object;
@@ -126,7 +126,7 @@ type TaxCategoryRel = ResourceRel & {
126
126
  };
127
127
  interface Attachment extends Resource {
128
128
  readonly type: AttachmentType;
129
- name?: string;
129
+ name: string;
130
130
  description?: string;
131
131
  url?: string;
132
132
  attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory;
@@ -138,7 +138,7 @@ interface AttachmentCreate extends ResourceCreate {
138
138
  attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
139
139
  }
140
140
  interface AttachmentUpdate extends ResourceUpdate {
141
- name?: string;
141
+ name: string;
142
142
  description?: string;
143
143
  url?: string;
144
144
  attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
@@ -10,12 +10,12 @@ type AuthorizationRel = ResourceRel & {
10
10
  };
11
11
  interface Authorization extends Resource {
12
12
  readonly type: AuthorizationType;
13
- number?: string;
14
- currency_code?: string;
15
- amount_cents?: number;
16
- amount_float?: number;
17
- formatted_amount?: string;
18
- succeeded?: boolean;
13
+ number: string;
14
+ currency_code: string;
15
+ amount_cents: number;
16
+ amount_float: number;
17
+ formatted_amount: string;
18
+ succeeded: boolean;
19
19
  message?: string;
20
20
  error_code?: string;
21
21
  error_detail?: string;
@@ -12,9 +12,9 @@ type TaxCategoryRel = ResourceRel & {
12
12
  };
13
13
  interface AvalaraAccount extends Resource {
14
14
  readonly type: AvalaraAccountType;
15
- name?: string;
16
- username?: string;
17
- company_code?: string;
15
+ name: string;
16
+ username: string;
17
+ company_code: string;
18
18
  commit_invoice?: string;
19
19
  ddp?: string;
20
20
  markets?: Market[];
@@ -31,10 +31,10 @@ interface AvalaraAccountCreate extends ResourceCreate {
31
31
  tax_categories?: TaxCategoryRel[];
32
32
  }
33
33
  interface AvalaraAccountUpdate extends ResourceUpdate {
34
- name?: string;
35
- username?: string;
34
+ name: string;
35
+ username: string;
36
36
  password?: string;
37
- company_code?: string;
37
+ company_code: string;
38
38
  commit_invoice?: string;
39
39
  ddp?: string;
40
40
  tax_categories?: TaxCategoryRel[];
@@ -11,8 +11,8 @@ type AxervePaymentRel = ResourceRel & {
11
11
  };
12
12
  interface AxerveGateway extends Resource {
13
13
  readonly type: AxerveGatewayType;
14
- name?: string;
15
- login?: string;
14
+ name: string;
15
+ login: string;
16
16
  payment_methods?: PaymentMethod[];
17
17
  axerve_payments?: AxervePayment[];
18
18
  }
@@ -23,8 +23,8 @@ interface AxerveGatewayCreate extends ResourceCreate {
23
23
  axerve_payments?: AxervePaymentRel[];
24
24
  }
25
25
  interface AxerveGatewayUpdate extends ResourceUpdate {
26
- name?: string;
27
- login?: string;
26
+ name: string;
27
+ login: string;
28
28
  api_key?: string;
29
29
  axerve_payments?: AxervePaymentRel[];
30
30
  }
@@ -11,11 +11,11 @@ type OrderRel = ResourceRel & {
11
11
  };
12
12
  interface AxervePayment extends Resource {
13
13
  readonly type: AxervePaymentType;
14
- login?: string;
15
- return_url?: string;
14
+ login: string;
15
+ return_url: string;
16
16
  payment_request_data?: object;
17
17
  mismatched_amounts?: boolean;
18
- intent_amount_cents?: number;
18
+ intent_amount_cents: number;
19
19
  intent_amount_float?: number;
20
20
  formatted_intent_amount?: string;
21
21
  payment_instrument?: object;
@@ -8,7 +8,7 @@ type BingGeocoderRel = ResourceRel & {
8
8
  };
9
9
  interface BingGeocoder extends Resource {
10
10
  readonly type: BingGeocoderType;
11
- name?: string;
11
+ name: string;
12
12
  addresses?: Address[];
13
13
  attachments?: Attachment[];
14
14
  }
@@ -17,7 +17,7 @@ interface BingGeocoderCreate extends ResourceCreate {
17
17
  key: string;
18
18
  }
19
19
  interface BingGeocoderUpdate extends ResourceUpdate {
20
- name?: string;
20
+ name: string;
21
21
  key?: string;
22
22
  }
23
23
  declare class BingGeocoders extends ApiResource<BingGeocoder> {
@@ -11,7 +11,7 @@ type BraintreePaymentRel = ResourceRel & {
11
11
  };
12
12
  interface BraintreeGateway extends Resource {
13
13
  readonly type: BraintreeGatewayType;
14
- name?: string;
14
+ name: string;
15
15
  descriptor_name?: string;
16
16
  descriptor_phone?: string;
17
17
  descriptor_url?: string;
@@ -31,7 +31,7 @@ interface BraintreeGatewayCreate extends ResourceCreate {
31
31
  braintree_payments?: BraintreePaymentRel[];
32
32
  }
33
33
  interface BraintreeGatewayUpdate extends ResourceUpdate {
34
- name?: string;
34
+ name: string;
35
35
  merchant_account_id?: string;
36
36
  merchant_id?: string;
37
37
  public_key?: string;
@@ -11,7 +11,7 @@ type OrderRel = ResourceRel & {
11
11
  };
12
12
  interface BraintreePayment extends Resource {
13
13
  readonly type: BraintreePaymentType;
14
- client_token?: string;
14
+ client_token: string;
15
15
  payment_method_nonce?: string;
16
16
  payment_id?: string;
17
17
  local?: boolean;
@@ -16,19 +16,19 @@ type SkuListRel = ResourceRel & {
16
16
  };
17
17
  interface Bundle extends Resource {
18
18
  readonly type: BundleType;
19
- code?: string;
20
- name?: string;
19
+ code: string;
20
+ name: string;
21
21
  currency_code?: string;
22
22
  description?: string;
23
23
  image_url?: string;
24
24
  do_not_ship?: boolean;
25
25
  do_not_track?: boolean;
26
- price_amount_cents?: number;
27
- price_amount_float?: number;
28
- formatted_price_amount?: string;
29
- compare_at_amount_cents?: number;
30
- compare_at_amount_float?: number;
31
- formatted_compare_at_amount?: string;
26
+ price_amount_cents: number;
27
+ price_amount_float: number;
28
+ formatted_price_amount: string;
29
+ compare_at_amount_cents: number;
30
+ compare_at_amount_float: number;
31
+ formatted_compare_at_amount: string;
32
32
  skus_count?: number;
33
33
  market?: Market;
34
34
  sku_list?: SkuList;
@@ -49,13 +49,13 @@ interface BundleCreate extends ResourceCreate {
49
49
  sku_list: SkuListRel;
50
50
  }
51
51
  interface BundleUpdate extends ResourceUpdate {
52
- code?: string;
53
- name?: string;
52
+ code: string;
53
+ name: string;
54
54
  currency_code?: string;
55
55
  description?: string;
56
56
  image_url?: string;
57
- price_amount_cents?: number;
58
- compare_at_amount_cents?: number;
57
+ price_amount_cents: number;
58
+ compare_at_amount_cents: number;
59
59
  _compute_price_amount?: boolean;
60
60
  _compute_compare_at_amount?: boolean;
61
61
  }
@@ -10,12 +10,12 @@ type CaptureRel = ResourceRel & {
10
10
  };
11
11
  interface Capture extends Resource {
12
12
  readonly type: CaptureType;
13
- number?: string;
14
- currency_code?: string;
15
- amount_cents?: number;
16
- amount_float?: number;
17
- formatted_amount?: string;
18
- succeeded?: boolean;
13
+ number: string;
14
+ currency_code: string;
15
+ amount_cents: number;
16
+ amount_float: number;
17
+ formatted_amount: string;
18
+ succeeded: boolean;
19
19
  message?: string;
20
20
  error_code?: string;
21
21
  error_detail?: string;
@@ -11,7 +11,7 @@ type CheckoutComPaymentRel = ResourceRel & {
11
11
  };
12
12
  interface CheckoutComGateway extends Resource {
13
13
  readonly type: CheckoutComGatewayType;
14
- name?: string;
14
+ name: string;
15
15
  webhook_endpoint_id?: string;
16
16
  webhook_endpoint_secret?: string;
17
17
  webhook_endpoint_url?: string;
@@ -25,7 +25,7 @@ interface CheckoutComGatewayCreate extends ResourceCreate {
25
25
  checkout_com_payments?: CheckoutComPaymentRel[];
26
26
  }
27
27
  interface CheckoutComGatewayUpdate extends ResourceUpdate {
28
- name?: string;
28
+ name: string;
29
29
  secret_key?: string;
30
30
  public_key?: string;
31
31
  checkout_com_payments?: CheckoutComPaymentRel[];
@@ -12,8 +12,8 @@ type OrderRel = ResourceRel & {
12
12
  interface CheckoutComPayment extends Resource {
13
13
  readonly type: CheckoutComPaymentType;
14
14
  public_key?: string;
15
- payment_type?: string;
16
- token?: string;
15
+ payment_type: string;
16
+ token: string;
17
17
  session_id?: string;
18
18
  success_url?: string;
19
19
  failure_url?: string;
@@ -35,8 +35,8 @@ interface CheckoutComPaymentCreate extends ResourceCreate {
35
35
  order: OrderRel;
36
36
  }
37
37
  interface CheckoutComPaymentUpdate extends ResourceUpdate {
38
- payment_type?: string;
39
- token?: string;
38
+ payment_type: string;
39
+ token: string;
40
40
  session_id?: string;
41
41
  success_url?: string;
42
42
  failure_url?: string;
@@ -7,7 +7,7 @@ type CleanupRel = ResourceRel & {
7
7
  };
8
8
  interface Cleanup extends Resource {
9
9
  readonly type: CleanupType;
10
- resource_type?: string;
10
+ resource_type: string;
11
11
  status?: 'pending' | 'in_progress' | 'interrupted' | 'completed';
12
12
  started_at?: string;
13
13
  completed_at?: string;
@@ -11,7 +11,7 @@ type CustomerRel = ResourceRel & {
11
11
  };
12
12
  interface CouponRecipient extends Resource {
13
13
  readonly type: CouponRecipientType;
14
- email?: string;
14
+ email: string;
15
15
  first_name?: string;
16
16
  last_name?: string;
17
17
  customer?: Customer;
@@ -24,7 +24,7 @@ interface CouponRecipientCreate extends ResourceCreate {
24
24
  customer?: CustomerRel;
25
25
  }
26
26
  interface CouponRecipientUpdate extends ResourceUpdate {
27
- email?: string;
27
+ email: string;
28
28
  first_name?: string;
29
29
  last_name?: string;
30
30
  customer?: CustomerRel;
@@ -10,9 +10,9 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
10
10
  };
11
11
  interface Coupon extends Resource {
12
12
  readonly type: CouponType;
13
- code?: string;
13
+ code: string;
14
14
  customer_single_use?: boolean;
15
- usage_limit?: number;
15
+ usage_limit: number;
16
16
  usage_count?: number;
17
17
  recipient_email?: string;
18
18
  promotion_rule?: CouponCodesPromotionRule;
@@ -25,9 +25,9 @@ interface CouponCreate extends ResourceCreate {
25
25
  promotion_rule: CouponCodesPromotionRuleRel;
26
26
  }
27
27
  interface CouponUpdate extends ResourceUpdate {
28
- code?: string;
28
+ code: string;
29
29
  customer_single_use?: boolean;
30
- usage_limit?: number;
30
+ usage_limit: number;
31
31
  recipient_email?: string;
32
32
  promotion_rule?: CouponCodesPromotionRuleRel;
33
33
  }
@@ -9,7 +9,7 @@ type CustomerGroupRel = ResourceRel & {
9
9
  };
10
10
  interface CustomerGroup extends Resource {
11
11
  readonly type: CustomerGroupType;
12
- name?: string;
12
+ name: string;
13
13
  customers?: Customer[];
14
14
  markets?: Market[];
15
15
  attachments?: Attachment[];
@@ -18,7 +18,7 @@ interface CustomerGroupCreate extends ResourceCreate {
18
18
  name: string;
19
19
  }
20
20
  interface CustomerGroupUpdate extends ResourceUpdate {
21
- name?: string;
21
+ name: string;
22
22
  }
23
23
  declare class CustomerGroups extends ApiResource<CustomerGroup> {
24
24
  static readonly TYPE: CustomerGroupType;
@@ -8,7 +8,7 @@ type CustomerPasswordResetRel = ResourceRel & {
8
8
  };
9
9
  interface CustomerPasswordReset extends Resource {
10
10
  readonly type: CustomerPasswordResetType;
11
- customer_email?: string;
11
+ customer_email: string;
12
12
  reset_password_token?: string;
13
13
  reset_password_at?: string;
14
14
  customer?: Customer;
@@ -8,7 +8,7 @@ type CustomerSubscriptionRel = ResourceRel & {
8
8
  };
9
9
  interface CustomerSubscription extends Resource {
10
10
  readonly type: CustomerSubscriptionType;
11
- customer_email?: string;
11
+ customer_email: string;
12
12
  customer?: Customer;
13
13
  events?: Event[];
14
14
  }
@@ -19,7 +19,7 @@ type CustomerGroupRel = ResourceRel & {
19
19
  };
20
20
  interface Customer extends Resource {
21
21
  readonly type: CustomerType;
22
- email?: string;
22
+ email: string;
23
23
  status?: 'prospect' | 'acquired' | 'repeat';
24
24
  has_password?: boolean;
25
25
  customer_group?: CustomerGroup;
@@ -39,7 +39,7 @@ interface CustomerCreate extends ResourceCreate {
39
39
  customer_group?: CustomerGroupRel;
40
40
  }
41
41
  interface CustomerUpdate extends ResourceUpdate {
42
- email?: string;
42
+ email: string;
43
43
  password?: string;
44
44
  customer_group?: CustomerGroupRel;
45
45
  }
@@ -15,8 +15,8 @@ type ShippingMethodRel = ResourceRel & {
15
15
  };
16
16
  interface DeliveryLeadTime extends Resource {
17
17
  readonly type: DeliveryLeadTimeType;
18
- min_hours?: number;
19
- max_hours?: number;
18
+ min_hours: number;
19
+ max_hours: number;
20
20
  min_days?: number;
21
21
  max_days?: number;
22
22
  stock_location?: StockLocation;
@@ -30,8 +30,8 @@ interface DeliveryLeadTimeCreate extends ResourceCreate {
30
30
  shipping_method: ShippingMethodRel;
31
31
  }
32
32
  interface DeliveryLeadTimeUpdate extends ResourceUpdate {
33
- min_hours?: number;
34
- max_hours?: number;
33
+ min_hours: number;
34
+ max_hours: number;
35
35
  stock_location?: StockLocationRel;
36
36
  shipping_method?: ShippingMethodRel;
37
37
  }
@@ -7,7 +7,7 @@ type EventCallbackRel = ResourceRel & {
7
7
  };
8
8
  interface EventCallback extends Resource {
9
9
  readonly type: EventCallbackType;
10
- callback_url?: string;
10
+ callback_url: string;
11
11
  payload?: object;
12
12
  response_code?: string;
13
13
  response_message?: string;
@@ -8,7 +8,7 @@ type EventRel = ResourceRel & {
8
8
  };
9
9
  interface Event extends Resource {
10
10
  readonly type: EventType;
11
- name?: string;
11
+ name: string;
12
12
  last_event_callbacks?: EventCallback[];
13
13
  webhooks?: Webhook[];
14
14
  }
@@ -7,7 +7,7 @@ type ExportRel = ResourceRel & {
7
7
  };
8
8
  interface Export extends Resource {
9
9
  readonly type: ExportType;
10
- resource_type?: string;
10
+ resource_type: string;
11
11
  format?: string;
12
12
  status?: 'pending' | 'in_progress' | 'completed';
13
13
  includes?: string[];
@@ -8,8 +8,8 @@ type ExternalGatewayRel = ResourceRel & {
8
8
  };
9
9
  interface ExternalGateway extends Resource {
10
10
  readonly type: ExternalGatewayType;
11
- name?: string;
12
- shared_secret?: string;
11
+ name: string;
12
+ shared_secret: string;
13
13
  authorize_url?: string;
14
14
  capture_url?: string;
15
15
  void_url?: string;
@@ -27,7 +27,7 @@ interface ExternalGatewayCreate extends ResourceCreate {
27
27
  token_url?: string;
28
28
  }
29
29
  interface ExternalGatewayUpdate extends ResourceUpdate {
30
- name?: string;
30
+ name: string;
31
31
  authorize_url?: string;
32
32
  capture_url?: string;
33
33
  void_url?: string;
@@ -12,7 +12,7 @@ type OrderRel = ResourceRel & {
12
12
  };
13
13
  interface ExternalPayment extends Resource {
14
14
  readonly type: ExternalPaymentType;
15
- payment_source_token?: string;
15
+ payment_source_token: string;
16
16
  options?: object;
17
17
  payment_instrument?: object;
18
18
  order?: Order;
@@ -28,15 +28,15 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
28
28
  };
29
29
  interface ExternalPromotion extends Resource {
30
30
  readonly type: ExternalPromotionType;
31
- name?: string;
31
+ name: string;
32
32
  currency_code?: string;
33
- starts_at?: string;
34
- expires_at?: string;
35
- total_usage_limit?: number;
33
+ starts_at: string;
34
+ expires_at: string;
35
+ total_usage_limit: number;
36
36
  total_usage_count?: number;
37
37
  active?: boolean;
38
- promotion_url?: string;
39
- shared_secret?: string;
38
+ promotion_url: string;
39
+ shared_secret: string;
40
40
  market?: Market;
41
41
  promotion_rules?: PromotionRule[];
42
42
  order_amount_promotion_rule?: OrderAmountPromotionRule;
@@ -59,12 +59,12 @@ interface ExternalPromotionCreate extends ResourceCreate {
59
59
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
60
60
  }
61
61
  interface ExternalPromotionUpdate extends ResourceUpdate {
62
- name?: string;
62
+ name: string;
63
63
  currency_code?: string;
64
- starts_at?: string;
65
- expires_at?: string;
66
- total_usage_limit?: number;
67
- promotion_url?: string;
64
+ starts_at: string;
65
+ expires_at: string;
66
+ total_usage_limit: number;
67
+ promotion_url: string;
68
68
  market?: MarketRel;
69
69
  promotion_rules?: PromotionRuleRel[];
70
70
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
@@ -8,9 +8,9 @@ type ExternalTaxCalculatorRel = ResourceRel & {
8
8
  };
9
9
  interface ExternalTaxCalculator extends Resource {
10
10
  readonly type: ExternalTaxCalculatorType;
11
- name?: string;
12
- tax_calculator_url?: string;
13
- shared_secret?: string;
11
+ name: string;
12
+ tax_calculator_url: string;
13
+ shared_secret: string;
14
14
  markets?: Market[];
15
15
  attachments?: Attachment[];
16
16
  }
@@ -19,8 +19,8 @@ interface ExternalTaxCalculatorCreate extends ResourceCreate {
19
19
  tax_calculator_url: string;
20
20
  }
21
21
  interface ExternalTaxCalculatorUpdate extends ResourceUpdate {
22
- name?: string;
23
- tax_calculator_url?: string;
22
+ name: string;
23
+ tax_calculator_url: string;
24
24
  }
25
25
  declare class ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator> {
26
26
  static readonly TYPE: ExternalTaxCalculatorType;