@commercelayer/sdk 2.0.4 → 2.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +1 -1
  2. package/lib/api.d.ts +10 -3
  3. package/lib/client.d.ts +2 -0
  4. package/lib/commercelayer.d.ts +9 -1
  5. package/lib/index.d.ts +4 -2
  6. package/lib/interceptor.d.ts +10 -0
  7. package/lib/model.d.ts +94 -0
  8. package/lib/resource.d.ts +6 -3
  9. package/lib/resources/addresses.d.ts +1 -2
  10. package/lib/resources/adjustments.d.ts +1 -2
  11. package/lib/resources/adyen_gateways.d.ts +1 -2
  12. package/lib/resources/adyen_payments.d.ts +1 -2
  13. package/lib/resources/application.d.ts +1 -2
  14. package/lib/resources/attachments.d.ts +1 -2
  15. package/lib/resources/authorizations.d.ts +1 -2
  16. package/lib/resources/avalara_accounts.d.ts +1 -2
  17. package/lib/resources/billing_info_validation_rules.d.ts +1 -2
  18. package/lib/resources/bing_geocoders.d.ts +1 -2
  19. package/lib/resources/braintree_gateways.d.ts +1 -2
  20. package/lib/resources/braintree_payments.d.ts +1 -2
  21. package/lib/resources/bundles.d.ts +1 -2
  22. package/lib/resources/captures.d.ts +1 -2
  23. package/lib/resources/carrier_accounts.d.ts +1 -2
  24. package/lib/resources/checkout_com_gateways.d.ts +1 -2
  25. package/lib/resources/checkout_com_payments.d.ts +1 -2
  26. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -2
  27. package/lib/resources/coupons.d.ts +1 -2
  28. package/lib/resources/customer_addresses.d.ts +1 -2
  29. package/lib/resources/customer_groups.d.ts +1 -2
  30. package/lib/resources/customer_password_resets.d.ts +1 -2
  31. package/lib/resources/customer_payment_sources.d.ts +1 -2
  32. package/lib/resources/customer_subscriptions.d.ts +1 -2
  33. package/lib/resources/customers.d.ts +3 -2
  34. package/lib/resources/delivery_lead_times.d.ts +1 -2
  35. package/lib/resources/external_gateways.d.ts +1 -2
  36. package/lib/resources/external_payments.d.ts +1 -2
  37. package/lib/resources/external_promotions.d.ts +1 -2
  38. package/lib/resources/external_tax_calculators.d.ts +1 -2
  39. package/lib/resources/fixed_amount_promotions.d.ts +1 -2
  40. package/lib/resources/free_shipping_promotions.d.ts +1 -2
  41. package/lib/resources/geocoders.d.ts +1 -2
  42. package/lib/resources/gift_card_recipients.d.ts +1 -2
  43. package/lib/resources/gift_cards.d.ts +1 -2
  44. package/lib/resources/google_geocoders.d.ts +1 -2
  45. package/lib/resources/imports.d.ts +2 -3
  46. package/lib/resources/in_stock_subscriptions.d.ts +1 -2
  47. package/lib/resources/inventory_models.d.ts +1 -2
  48. package/lib/resources/inventory_return_locations.d.ts +1 -2
  49. package/lib/resources/inventory_stock_locations.d.ts +1 -2
  50. package/lib/resources/line_item_options.d.ts +1 -2
  51. package/lib/resources/line_items.d.ts +1 -2
  52. package/lib/resources/manual_gateways.d.ts +1 -2
  53. package/lib/resources/manual_tax_calculators.d.ts +1 -2
  54. package/lib/resources/markets.d.ts +1 -2
  55. package/lib/resources/merchants.d.ts +1 -2
  56. package/lib/resources/order_amount_promotion_rules.d.ts +1 -2
  57. package/lib/resources/order_copies.d.ts +1 -2
  58. package/lib/resources/order_subscriptions.d.ts +3 -2
  59. package/lib/resources/orders.d.ts +2 -2
  60. package/lib/resources/organization.d.ts +1 -2
  61. package/lib/resources/packages.d.ts +1 -2
  62. package/lib/resources/parcel_line_items.d.ts +1 -2
  63. package/lib/resources/parcels.d.ts +1 -2
  64. package/lib/resources/payment_gateways.d.ts +1 -2
  65. package/lib/resources/payment_methods.d.ts +1 -2
  66. package/lib/resources/paypal_gateways.d.ts +1 -2
  67. package/lib/resources/paypal_payments.d.ts +1 -2
  68. package/lib/resources/percentage_discount_promotions.d.ts +1 -2
  69. package/lib/resources/price_lists.d.ts +1 -2
  70. package/lib/resources/prices.d.ts +1 -2
  71. package/lib/resources/promotion_rules.d.ts +1 -2
  72. package/lib/resources/promotions.d.ts +1 -2
  73. package/lib/resources/refunds.d.ts +1 -2
  74. package/lib/resources/return_line_items.d.ts +1 -2
  75. package/lib/resources/returns.d.ts +1 -2
  76. package/lib/resources/shipments.d.ts +1 -2
  77. package/lib/resources/shipping_categories.d.ts +1 -2
  78. package/lib/resources/shipping_methods.d.ts +1 -2
  79. package/lib/resources/shipping_zones.d.ts +1 -2
  80. package/lib/resources/sku_list_items.d.ts +1 -2
  81. package/lib/resources/sku_list_promotion_rules.d.ts +1 -2
  82. package/lib/resources/sku_lists.d.ts +1 -2
  83. package/lib/resources/sku_options.d.ts +1 -2
  84. package/lib/resources/skus.d.ts +1 -2
  85. package/lib/resources/stock_items.d.ts +1 -2
  86. package/lib/resources/stock_line_items.d.ts +1 -2
  87. package/lib/resources/stock_locations.d.ts +1 -2
  88. package/lib/resources/stock_transfers.d.ts +1 -2
  89. package/lib/resources/stripe_gateways.d.ts +1 -2
  90. package/lib/resources/stripe_payments.d.ts +2 -2
  91. package/lib/resources/tax_calculators.d.ts +1 -2
  92. package/lib/resources/tax_categories.d.ts +1 -2
  93. package/lib/resources/tax_rules.d.ts +1 -2
  94. package/lib/resources/taxjar_accounts.d.ts +1 -2
  95. package/lib/resources/transactions.d.ts +1 -2
  96. package/lib/resources/voids.d.ts +1 -2
  97. package/lib/resources/webhooks.d.ts +1 -2
  98. package/lib/resources/wire_transfers.d.ts +1 -2
  99. package/lib/sdk.cjs.development.js +808 -274
  100. package/lib/sdk.cjs.development.js.map +1 -1
  101. package/lib/sdk.cjs.production.min.js +1 -1
  102. package/lib/sdk.cjs.production.min.js.map +1 -1
  103. package/lib/sdk.esm.js +808 -274
  104. package/lib/sdk.esm.js.map +1 -1
  105. package/package.json +7 -4
  106. package/lib/.DS_Store +0 -0
  107. package/lib/api.js +0 -271
  108. package/lib/client.js +0 -132
  109. package/lib/commercelayer.js +0 -163
  110. package/lib/error.js +0 -25
  111. package/lib/jsonapi.js +0 -83
  112. package/lib/poly.d.ts +0 -9
  113. package/lib/poly.js +0 -2
  114. package/lib/query.js +0 -172
  115. package/lib/resource.js +0 -94
  116. package/lib/resources/addresses.js +0 -45
  117. package/lib/resources/adjustments.js +0 -45
  118. package/lib/resources/adyen_gateways.js +0 -45
  119. package/lib/resources/adyen_payments.js +0 -45
  120. package/lib/resources/application.js +0 -33
  121. package/lib/resources/attachments.js +0 -45
  122. package/lib/resources/authorizations.js +0 -45
  123. package/lib/resources/avalara_accounts.js +0 -45
  124. package/lib/resources/billing_info_validation_rules.js +0 -45
  125. package/lib/resources/braintree_gateways.js +0 -45
  126. package/lib/resources/braintree_payments.js +0 -45
  127. package/lib/resources/captures.js +0 -39
  128. package/lib/resources/carrier_accounts.js +0 -36
  129. package/lib/resources/checkout_com_gateways.js +0 -45
  130. package/lib/resources/checkout_com_payments.js +0 -45
  131. package/lib/resources/coupon_codes_promotion_rules.js +0 -45
  132. package/lib/resources/coupons.js +0 -45
  133. package/lib/resources/customer_addresses.js +0 -45
  134. package/lib/resources/customer_groups.js +0 -45
  135. package/lib/resources/customer_password_resets.js +0 -45
  136. package/lib/resources/customer_payment_sources.js +0 -45
  137. package/lib/resources/customer_subscriptions.js +0 -45
  138. package/lib/resources/customers.js +0 -45
  139. package/lib/resources/delivery_lead_times.js +0 -45
  140. package/lib/resources/external_gateways.js +0 -45
  141. package/lib/resources/external_payments.js +0 -45
  142. package/lib/resources/external_promotions.js +0 -45
  143. package/lib/resources/external_tax_calculators.js +0 -45
  144. package/lib/resources/fixed_amount_promotions.js +0 -45
  145. package/lib/resources/free_shipping_promotions.js +0 -45
  146. package/lib/resources/gift_card_recipients.js +0 -45
  147. package/lib/resources/gift_cards.js +0 -45
  148. package/lib/resources/imports.js +0 -42
  149. package/lib/resources/in_stock_subscriptions.js +0 -45
  150. package/lib/resources/inventory_models.js +0 -45
  151. package/lib/resources/inventory_return_locations.js +0 -45
  152. package/lib/resources/inventory_stock_locations.js +0 -45
  153. package/lib/resources/line_item_options.js +0 -45
  154. package/lib/resources/line_items.js +0 -45
  155. package/lib/resources/manual_gateways.js +0 -45
  156. package/lib/resources/manual_tax_calculators.js +0 -45
  157. package/lib/resources/markets.js +0 -45
  158. package/lib/resources/merchants.js +0 -45
  159. package/lib/resources/order_amount_promotion_rules.js +0 -45
  160. package/lib/resources/orders.js +0 -45
  161. package/lib/resources/organization.js +0 -33
  162. package/lib/resources/packages.js +0 -45
  163. package/lib/resources/parcel_line_items.js +0 -45
  164. package/lib/resources/parcels.js +0 -45
  165. package/lib/resources/payment_gateways.js +0 -45
  166. package/lib/resources/payment_methods.js +0 -45
  167. package/lib/resources/paypal_gateways.js +0 -45
  168. package/lib/resources/paypal_payments.js +0 -45
  169. package/lib/resources/percentage_discount_promotions.js +0 -45
  170. package/lib/resources/price_lists.js +0 -45
  171. package/lib/resources/prices.js +0 -45
  172. package/lib/resources/promotion_rules.js +0 -33
  173. package/lib/resources/promotions.js +0 -33
  174. package/lib/resources/refunds.js +0 -36
  175. package/lib/resources/return_line_items.js +0 -45
  176. package/lib/resources/returns.js +0 -45
  177. package/lib/resources/shipments.js +0 -39
  178. package/lib/resources/shipping_categories.js +0 -45
  179. package/lib/resources/shipping_methods.js +0 -45
  180. package/lib/resources/shipping_zones.js +0 -45
  181. package/lib/resources/sku_list_items.js +0 -45
  182. package/lib/resources/sku_list_promotion_rules.js +0 -45
  183. package/lib/resources/sku_lists.js +0 -45
  184. package/lib/resources/sku_options.js +0 -45
  185. package/lib/resources/skus.js +0 -45
  186. package/lib/resources/stock_items.js +0 -45
  187. package/lib/resources/stock_line_items.js +0 -36
  188. package/lib/resources/stock_locations.js +0 -45
  189. package/lib/resources/stock_transfers.js +0 -45
  190. package/lib/resources/stripe_gateways.js +0 -45
  191. package/lib/resources/stripe_payments.js +0 -45
  192. package/lib/resources/tax_calculators.js +0 -33
  193. package/lib/resources/tax_categories.js +0 -45
  194. package/lib/resources/tax_rules.js +0 -45
  195. package/lib/resources/taxjar_accounts.js +0 -45
  196. package/lib/resources/transactions.js +0 -33
  197. package/lib/resources/voids.js +0 -36
  198. package/lib/resources/webhooks.js +0 -45
  199. package/lib/resources/wire_transfers.js +0 -45
  200. package/lib/util.js +0 -7
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class AvalaraAccounts extends resource_1.ApiResource {
10
- // static readonly PATH = 'avalara_accounts'
11
- async list(params, options) {
12
- return this.resources.list({ type: AvalaraAccounts.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: AvalaraAccounts.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: AvalaraAccounts.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: AvalaraAccounts.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: AvalaraAccounts.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isAvalaraAccount(resource) {
28
- return resource.type && (resource.type === AvalaraAccounts.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(AvalaraAccounts.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(AvalaraAccounts.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: AvalaraAccounts.TYPE };
42
- }
43
- }
44
- AvalaraAccounts.TYPE = 'avalara_accounts';
45
- exports.default = AvalaraAccounts;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class BillingInfoValidationRules extends resource_1.ApiResource {
10
- // static readonly PATH = 'billing_info_validation_rules'
11
- async list(params, options) {
12
- return this.resources.list({ type: BillingInfoValidationRules.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: BillingInfoValidationRules.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: BillingInfoValidationRules.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: BillingInfoValidationRules.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: BillingInfoValidationRules.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isBillingInfoValidationRule(resource) {
28
- return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(BillingInfoValidationRules.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(BillingInfoValidationRules.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: BillingInfoValidationRules.TYPE };
42
- }
43
- }
44
- BillingInfoValidationRules.TYPE = 'billing_info_validation_rules';
45
- exports.default = BillingInfoValidationRules;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class BraintreeGateways extends resource_1.ApiResource {
10
- // static readonly PATH = 'braintree_gateways'
11
- async list(params, options) {
12
- return this.resources.list({ type: BraintreeGateways.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: BraintreeGateways.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: BraintreeGateways.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: BraintreeGateways.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: BraintreeGateways.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isBraintreeGateway(resource) {
28
- return resource.type && (resource.type === BraintreeGateways.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(BraintreeGateways.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(BraintreeGateways.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: BraintreeGateways.TYPE };
42
- }
43
- }
44
- BraintreeGateways.TYPE = 'braintree_gateways';
45
- exports.default = BraintreeGateways;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class BraintreePayments extends resource_1.ApiResource {
10
- // static readonly PATH = 'braintree_payments'
11
- async list(params, options) {
12
- return this.resources.list({ type: BraintreePayments.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: BraintreePayments.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: BraintreePayments.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: BraintreePayments.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: BraintreePayments.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isBraintreePayment(resource) {
28
- return resource.type && (resource.type === BraintreePayments.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(BraintreePayments.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(BraintreePayments.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: BraintreePayments.TYPE };
42
- }
43
- }
44
- BraintreePayments.TYPE = 'braintree_payments';
45
- exports.default = BraintreePayments;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class Captures extends resource_1.ApiResource {
10
- // static readonly PATH = 'captures'
11
- async list(params, options) {
12
- return this.resources.list({ type: Captures.TYPE }, params, options);
13
- }
14
- async retrieve(id, params, options) {
15
- return this.resources.retrieve({ type: Captures.TYPE, id }, params, options);
16
- }
17
- async update(resource, options) {
18
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Captures.TYPE }), options);
19
- }
20
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
21
- isCapture(resource) {
22
- return resource.type && (resource.type === Captures.TYPE);
23
- }
24
- /*
25
- filter(): QueryBuilderRetrieve {
26
- return new QueryBuilderRetrieve(Captures.TYPE)
27
- }
28
- */
29
- /*
30
- filterList(): QueryBuilderList {
31
- return new QueryBuilderList(Captures.TYPE)
32
- }
33
- */
34
- relationship(id) {
35
- return { id, type: Captures.TYPE };
36
- }
37
- }
38
- Captures.TYPE = 'captures';
39
- exports.default = Captures;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CarrierAccounts extends resource_1.ApiResource {
10
- // static readonly PATH = 'carrier_accounts'
11
- async list(params, options) {
12
- return this.resources.list({ type: CarrierAccounts.TYPE }, params, options);
13
- }
14
- async retrieve(id, params, options) {
15
- return this.resources.retrieve({ type: CarrierAccounts.TYPE, id }, params, options);
16
- }
17
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
18
- isCarrierAccount(resource) {
19
- return resource.type && (resource.type === CarrierAccounts.TYPE);
20
- }
21
- /*
22
- filter(): QueryBuilderRetrieve {
23
- return new QueryBuilderRetrieve(CarrierAccounts.TYPE)
24
- }
25
- */
26
- /*
27
- filterList(): QueryBuilderList {
28
- return new QueryBuilderList(CarrierAccounts.TYPE)
29
- }
30
- */
31
- relationship(id) {
32
- return { id, type: CarrierAccounts.TYPE };
33
- }
34
- }
35
- CarrierAccounts.TYPE = 'carrier_accounts';
36
- exports.default = CarrierAccounts;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CheckoutComGateways extends resource_1.ApiResource {
10
- // static readonly PATH = 'checkout_com_gateways'
11
- async list(params, options) {
12
- return this.resources.list({ type: CheckoutComGateways.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CheckoutComGateways.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CheckoutComGateways.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CheckoutComGateways.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CheckoutComGateways.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCheckoutComGateway(resource) {
28
- return resource.type && (resource.type === CheckoutComGateways.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CheckoutComGateways.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CheckoutComGateways.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CheckoutComGateways.TYPE };
42
- }
43
- }
44
- CheckoutComGateways.TYPE = 'checkout_com_gateways';
45
- exports.default = CheckoutComGateways;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CheckoutComPayments extends resource_1.ApiResource {
10
- // static readonly PATH = 'checkout_com_payments'
11
- async list(params, options) {
12
- return this.resources.list({ type: CheckoutComPayments.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CheckoutComPayments.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CheckoutComPayments.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CheckoutComPayments.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CheckoutComPayments.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCheckoutComPayment(resource) {
28
- return resource.type && (resource.type === CheckoutComPayments.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CheckoutComPayments.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CheckoutComPayments.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CheckoutComPayments.TYPE };
42
- }
43
- }
44
- CheckoutComPayments.TYPE = 'checkout_com_payments';
45
- exports.default = CheckoutComPayments;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CouponCodesPromotionRules extends resource_1.ApiResource {
10
- // static readonly PATH = 'coupon_codes_promotion_rules'
11
- async list(params, options) {
12
- return this.resources.list({ type: CouponCodesPromotionRules.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CouponCodesPromotionRules.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CouponCodesPromotionRules.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CouponCodesPromotionRules.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CouponCodesPromotionRules.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCouponCodesPromotionRule(resource) {
28
- return resource.type && (resource.type === CouponCodesPromotionRules.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CouponCodesPromotionRules.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CouponCodesPromotionRules.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CouponCodesPromotionRules.TYPE };
42
- }
43
- }
44
- CouponCodesPromotionRules.TYPE = 'coupon_codes_promotion_rules';
45
- exports.default = CouponCodesPromotionRules;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class Coupons extends resource_1.ApiResource {
10
- // static readonly PATH = 'coupons'
11
- async list(params, options) {
12
- return this.resources.list({ type: Coupons.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: Coupons.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: Coupons.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: Coupons.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: Coupons.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCoupon(resource) {
28
- return resource.type && (resource.type === Coupons.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(Coupons.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(Coupons.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: Coupons.TYPE };
42
- }
43
- }
44
- Coupons.TYPE = 'coupons';
45
- exports.default = Coupons;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CustomerAddresses extends resource_1.ApiResource {
10
- // static readonly PATH = 'customer_addresses'
11
- async list(params, options) {
12
- return this.resources.list({ type: CustomerAddresses.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CustomerAddresses.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CustomerAddresses.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerAddresses.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CustomerAddresses.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCustomerAddress(resource) {
28
- return resource.type && (resource.type === CustomerAddresses.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CustomerAddresses.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CustomerAddresses.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CustomerAddresses.TYPE };
42
- }
43
- }
44
- CustomerAddresses.TYPE = 'customer_addresses';
45
- exports.default = CustomerAddresses;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CustomerGroups extends resource_1.ApiResource {
10
- // static readonly PATH = 'customer_groups'
11
- async list(params, options) {
12
- return this.resources.list({ type: CustomerGroups.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CustomerGroups.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CustomerGroups.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerGroups.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CustomerGroups.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCustomerGroup(resource) {
28
- return resource.type && (resource.type === CustomerGroups.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CustomerGroups.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CustomerGroups.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CustomerGroups.TYPE };
42
- }
43
- }
44
- CustomerGroups.TYPE = 'customer_groups';
45
- exports.default = CustomerGroups;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CustomerPasswordResets extends resource_1.ApiResource {
10
- // static readonly PATH = 'customer_password_resets'
11
- async list(params, options) {
12
- return this.resources.list({ type: CustomerPasswordResets.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CustomerPasswordResets.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CustomerPasswordResets.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerPasswordResets.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CustomerPasswordResets.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCustomerPasswordReset(resource) {
28
- return resource.type && (resource.type === CustomerPasswordResets.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CustomerPasswordResets.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CustomerPasswordResets.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CustomerPasswordResets.TYPE };
42
- }
43
- }
44
- CustomerPasswordResets.TYPE = 'customer_password_resets';
45
- exports.default = CustomerPasswordResets;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CustomerPaymentSources extends resource_1.ApiResource {
10
- // static readonly PATH = 'customer_payment_sources'
11
- async list(params, options) {
12
- return this.resources.list({ type: CustomerPaymentSources.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CustomerPaymentSources.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CustomerPaymentSources.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerPaymentSources.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CustomerPaymentSources.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCustomerPaymentSource(resource) {
28
- return resource.type && (resource.type === CustomerPaymentSources.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CustomerPaymentSources.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CustomerPaymentSources.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CustomerPaymentSources.TYPE };
42
- }
43
- }
44
- CustomerPaymentSources.TYPE = 'customer_payment_sources';
45
- exports.default = CustomerPaymentSources;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * ©2021 Commerce Layer Inc.
4
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
5
- * Generation date: 22-07-2021
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const resource_1 = require("../resource");
9
- class CustomerSubscriptions extends resource_1.ApiResource {
10
- // static readonly PATH = 'customer_subscriptions'
11
- async list(params, options) {
12
- return this.resources.list({ type: CustomerSubscriptions.TYPE }, params, options);
13
- }
14
- async create(resource, options) {
15
- return this.resources.create(Object.assign(resource, { type: CustomerSubscriptions.TYPE }), options);
16
- }
17
- async retrieve(id, params, options) {
18
- return this.resources.retrieve({ type: CustomerSubscriptions.TYPE, id }, params, options);
19
- }
20
- async update(resource, options) {
21
- return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerSubscriptions.TYPE }), options);
22
- }
23
- async delete(id, options) {
24
- this.resources.delete({ type: CustomerSubscriptions.TYPE, id }, options);
25
- }
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27
- isCustomerSubscription(resource) {
28
- return resource.type && (resource.type === CustomerSubscriptions.TYPE);
29
- }
30
- /*
31
- filter(): QueryBuilderRetrieve {
32
- return new QueryBuilderRetrieve(CustomerSubscriptions.TYPE)
33
- }
34
- */
35
- /*
36
- filterList(): QueryBuilderList {
37
- return new QueryBuilderList(CustomerSubscriptions.TYPE)
38
- }
39
- */
40
- relationship(id) {
41
- return { id, type: CustomerSubscriptions.TYPE };
42
- }
43
- }
44
- CustomerSubscriptions.TYPE = 'customer_subscriptions';
45
- exports.default = CustomerSubscriptions;