@commercelayer/sdk 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +6 -4
- package/lib/cjs/api.js +1 -1
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.d.ts +2 -0
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/debug.d.ts +3 -0
- package/lib/cjs/debug.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +4 -2
- package/lib/cjs/query.js +1 -1
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/adyen_payments.js +1 -1
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/braintree_payments.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +5 -0
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/checkout_com_payments.js +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +7 -3
- package/lib/cjs/resources/delivery_lead_times.js +1 -1
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_payments.d.ts +2 -0
- package/lib/cjs/resources/external_payments.js +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +3 -0
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +42 -0
- package/lib/cjs/resources/klarna_gateways.js +1 -0
- package/lib/cjs/resources/klarna_payments.d.ts +39 -0
- package/lib/cjs/resources/klarna_payments.js +1 -0
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/line_items.js +1 -1
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +7 -3
- package/lib/cjs/resources/organization.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +4 -1
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/paypal_payments.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +1 -0
- package/lib/cjs/resources/return_line_items.js +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +4 -2
- package/lib/cjs/resources/shipping_methods.js +1 -1
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +3 -0
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/stripe_payments.js +1 -1
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/static.js +1 -1
- package/lib/esm/api.d.ts +6 -4
- package/lib/esm/api.js +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +2 -0
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/debug.d.ts +3 -0
- package/lib/esm/debug.js +1 -0
- package/lib/esm/error.js +1 -1
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +4 -2
- package/lib/esm/query.js +1 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.js +1 -1
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +5 -0
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.js +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +7 -3
- package/lib/esm/resources/customer_payment_sources.js +1 -1
- package/lib/esm/resources/customer_subscriptions.js +1 -1
- package/lib/esm/resources/customers.js +1 -1
- package/lib/esm/resources/delivery_lead_times.js +1 -1
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_payments.d.ts +2 -0
- package/lib/esm/resources/external_promotions.d.ts +3 -0
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +1 -1
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/klarna_gateways.d.ts +42 -0
- package/lib/esm/resources/klarna_gateways.js +1 -0
- package/lib/esm/resources/klarna_payments.d.ts +39 -0
- package/lib/esm/resources/klarna_payments.js +1 -0
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.js +1 -1
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +7 -3
- package/lib/esm/resources/orders.js +1 -1
- package/lib/esm/resources/organization.js +1 -1
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +4 -1
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.d.ts +1 -0
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +4 -2
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +3 -0
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.js +1 -1
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/esm/static.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isExternalTaxCalculator(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="external_tax_calculators";export default t;
|
@@ -26,6 +26,7 @@ declare type CouponCodesPromotionRuleRel = ResourceId & {
|
|
26
26
|
};
|
27
27
|
interface FixedAmountPromotion extends Resource {
|
28
28
|
name?: string;
|
29
|
+
currency_code?: string;
|
29
30
|
starts_at?: string;
|
30
31
|
expires_at?: string;
|
31
32
|
total_usage_limit?: number;
|
@@ -43,6 +44,7 @@ interface FixedAmountPromotion extends Resource {
|
|
43
44
|
}
|
44
45
|
interface FixedAmountPromotionCreate extends ResourceCreate {
|
45
46
|
name: string;
|
47
|
+
currency_code?: string;
|
46
48
|
starts_at: string;
|
47
49
|
expires_at: string;
|
48
50
|
total_usage_limit: number;
|
@@ -55,6 +57,7 @@ interface FixedAmountPromotionCreate extends ResourceCreate {
|
|
55
57
|
}
|
56
58
|
interface FixedAmountPromotionUpdate extends ResourceUpdate {
|
57
59
|
name?: string;
|
60
|
+
currency_code?: string;
|
58
61
|
starts_at?: string;
|
59
62
|
expires_at?: string;
|
60
63
|
total_usage_limit?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isFixedAmountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="fixed_amount_promotions";export default t;
|
@@ -31,6 +31,7 @@ declare type SkuListRel = ResourceId & {
|
|
31
31
|
};
|
32
32
|
interface FixedPricePromotion extends Resource {
|
33
33
|
name?: string;
|
34
|
+
currency_code?: string;
|
34
35
|
starts_at?: string;
|
35
36
|
expires_at?: string;
|
36
37
|
total_usage_limit?: number;
|
@@ -50,6 +51,7 @@ interface FixedPricePromotion extends Resource {
|
|
50
51
|
}
|
51
52
|
interface FixedPricePromotionCreate extends ResourceCreate {
|
52
53
|
name: string;
|
54
|
+
currency_code?: string;
|
53
55
|
starts_at: string;
|
54
56
|
expires_at: string;
|
55
57
|
total_usage_limit: number;
|
@@ -63,6 +65,7 @@ interface FixedPricePromotionCreate extends ResourceCreate {
|
|
63
65
|
}
|
64
66
|
interface FixedPricePromotionUpdate extends ResourceUpdate {
|
65
67
|
name?: string;
|
68
|
+
currency_code?: string;
|
66
69
|
starts_at?: string;
|
67
70
|
expires_at?: string;
|
68
71
|
total_usage_limit?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFixedPricePromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="fixed_price_promotions";export default r;
|
@@ -31,6 +31,7 @@ declare type SkuListRel = ResourceId & {
|
|
31
31
|
};
|
32
32
|
interface FreeGiftPromotion extends Resource {
|
33
33
|
name?: string;
|
34
|
+
currency_code?: string;
|
34
35
|
starts_at?: string;
|
35
36
|
expires_at?: string;
|
36
37
|
total_usage_limit?: number;
|
@@ -48,6 +49,7 @@ interface FreeGiftPromotion extends Resource {
|
|
48
49
|
}
|
49
50
|
interface FreeGiftPromotionCreate extends ResourceCreate {
|
50
51
|
name: string;
|
52
|
+
currency_code?: string;
|
51
53
|
starts_at: string;
|
52
54
|
expires_at: string;
|
53
55
|
total_usage_limit: number;
|
@@ -61,6 +63,7 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
|
|
61
63
|
}
|
62
64
|
interface FreeGiftPromotionUpdate extends ResourceUpdate {
|
63
65
|
name?: string;
|
66
|
+
currency_code?: string;
|
64
67
|
starts_at?: string;
|
65
68
|
expires_at?: string;
|
66
69
|
total_usage_limit?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isFreeGiftPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_gift_promotions";export default r;
|
@@ -26,6 +26,7 @@ declare type CouponCodesPromotionRuleRel = ResourceId & {
|
|
26
26
|
};
|
27
27
|
interface FreeShippingPromotion extends Resource {
|
28
28
|
name?: string;
|
29
|
+
currency_code?: string;
|
29
30
|
starts_at?: string;
|
30
31
|
expires_at?: string;
|
31
32
|
total_usage_limit?: number;
|
@@ -40,6 +41,7 @@ interface FreeShippingPromotion extends Resource {
|
|
40
41
|
}
|
41
42
|
interface FreeShippingPromotionCreate extends ResourceCreate {
|
42
43
|
name: string;
|
44
|
+
currency_code?: string;
|
43
45
|
starts_at: string;
|
44
46
|
expires_at: string;
|
45
47
|
total_usage_limit: number;
|
@@ -51,6 +53,7 @@ interface FreeShippingPromotionCreate extends ResourceCreate {
|
|
51
53
|
}
|
52
54
|
interface FreeShippingPromotionUpdate extends ResourceUpdate {
|
53
55
|
name?: string;
|
56
|
+
currency_code?: string;
|
54
57
|
starts_at?: string;
|
55
58
|
expires_at?: string;
|
56
59
|
total_usage_limit?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFreeShippingPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_shipping_promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isGeocoder(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="geocoders";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isGiftCardRecipient(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="gift_card_recipients";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isGiftCard(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="gift_cards";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isGoogleGeocoder(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="google_geocoders";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isImport(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="imports";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isInStockSubscription(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="in_stock_subscriptions";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isInventoryModel(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="inventory_models";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isInventoryReturnLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_return_locations";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isInventoryStockLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_stock_locations";export default t;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { PaymentMethod } from './payment_methods';
|
4
|
+
import { KlarnaPayment } from './klarna_payments';
|
5
|
+
declare type KlarnaGatewayRel = ResourceId & {
|
6
|
+
type: typeof KlarnaGateways.TYPE;
|
7
|
+
};
|
8
|
+
declare type KlarnaPaymentRel = ResourceId & {
|
9
|
+
type: 'klarna_payments';
|
10
|
+
};
|
11
|
+
interface KlarnaGateway extends Resource {
|
12
|
+
name?: string;
|
13
|
+
payment_methods?: PaymentMethod[];
|
14
|
+
klarna_payments?: KlarnaPayment[];
|
15
|
+
}
|
16
|
+
interface KlarnaGatewayCreate extends ResourceCreate {
|
17
|
+
name: string;
|
18
|
+
country_code: string;
|
19
|
+
api_key: string;
|
20
|
+
api_secret: string;
|
21
|
+
klarna_payments?: KlarnaPaymentRel[];
|
22
|
+
}
|
23
|
+
interface KlarnaGatewayUpdate extends ResourceUpdate {
|
24
|
+
name?: string;
|
25
|
+
country_code?: string;
|
26
|
+
api_key?: string;
|
27
|
+
api_secret?: string;
|
28
|
+
klarna_payments?: KlarnaPaymentRel[];
|
29
|
+
}
|
30
|
+
declare class KlarnaGateways extends ApiResource {
|
31
|
+
static readonly TYPE: 'klarna_gateways';
|
32
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaGateway>>;
|
33
|
+
create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
34
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
35
|
+
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
36
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
+
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
38
|
+
relationship(id: string | ResourceId): KlarnaGatewayRel;
|
39
|
+
type(): string;
|
40
|
+
}
|
41
|
+
export default KlarnaGateways;
|
42
|
+
export { KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate };
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isKlarnaGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="klarna_gateways";export default s;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { Order } from './orders';
|
4
|
+
import { PaymentGateway } from './payment_gateways';
|
5
|
+
declare type KlarnaPaymentRel = ResourceId & {
|
6
|
+
type: typeof KlarnaPayments.TYPE;
|
7
|
+
};
|
8
|
+
declare type OrderRel = ResourceId & {
|
9
|
+
type: 'orders';
|
10
|
+
};
|
11
|
+
interface KlarnaPayment extends Resource {
|
12
|
+
session_id?: string;
|
13
|
+
client_token?: string;
|
14
|
+
payment_methods?: object[];
|
15
|
+
auth_token?: string;
|
16
|
+
order?: Order;
|
17
|
+
payment_gateway?: PaymentGateway;
|
18
|
+
}
|
19
|
+
interface KlarnaPaymentCreate extends ResourceCreate {
|
20
|
+
order: OrderRel;
|
21
|
+
}
|
22
|
+
interface KlarnaPaymentUpdate extends ResourceUpdate {
|
23
|
+
auth_token?: string;
|
24
|
+
_update?: boolean;
|
25
|
+
order?: OrderRel;
|
26
|
+
}
|
27
|
+
declare class KlarnaPayments extends ApiResource {
|
28
|
+
static readonly TYPE: 'klarna_payments';
|
29
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
30
|
+
create(resource: KlarnaPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
31
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
32
|
+
update(resource: KlarnaPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
33
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
34
|
+
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
35
|
+
relationship(id: string | ResourceId): KlarnaPaymentRel;
|
36
|
+
type(): string;
|
37
|
+
}
|
38
|
+
export default KlarnaPayments;
|
39
|
+
export { KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate };
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isKlarnaPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="klarna_payments";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as r}from"../resource";class t extends r{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,i){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async retrieve(e,s,i){return this.resources.retrieve({type:t.TYPE,id:e},s,i)}async update(e,s,i){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isLineItemOption(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="line_item_options";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isLineItem(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="line_items";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isManualGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="manual_gateways";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isManualTaxCalculator(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="manual_tax_calculators";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMarket(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="markets";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMerchant(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="merchants";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isOrderAmountPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_amount_promotion_rules";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isOrderCopy(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_copies";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isOrderSubscription(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_subscriptions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as s}from"../resource";class
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}isOrderValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_validation_rules";export default r;
|
@@ -9,6 +9,7 @@ import { AdyenPayment } from './adyen_payments';
|
|
9
9
|
import { BraintreePayment } from './braintree_payments';
|
10
10
|
import { CheckoutComPayment } from './checkout_com_payments';
|
11
11
|
import { ExternalPayment } from './external_payments';
|
12
|
+
import { KlarnaPayment } from './klarna_payments';
|
12
13
|
import { PaypalPayment } from './paypal_payments';
|
13
14
|
import { StripePayment } from './stripe_payments';
|
14
15
|
import { WireTransfer } from './wire_transfers';
|
@@ -48,6 +49,9 @@ declare type CheckoutComPaymentRel = ResourceId & {
|
|
48
49
|
declare type ExternalPaymentRel = ResourceId & {
|
49
50
|
type: 'external_payments';
|
50
51
|
};
|
52
|
+
declare type KlarnaPaymentRel = ResourceId & {
|
53
|
+
type: 'klarna_payments';
|
54
|
+
};
|
51
55
|
declare type PaypalPaymentRel = ResourceId & {
|
52
56
|
type: 'paypal_payments';
|
53
57
|
};
|
@@ -162,7 +166,7 @@ interface Order extends Resource {
|
|
162
166
|
available_payment_methods?: PaymentMethod[];
|
163
167
|
available_customer_payment_sources?: CustomerPaymentSource[];
|
164
168
|
payment_method?: PaymentMethod;
|
165
|
-
payment_source?: AdyenPayment | BraintreePayment | CheckoutComPayment | ExternalPayment | PaypalPayment | StripePayment | WireTransfer;
|
169
|
+
payment_source?: AdyenPayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | StripePayment | WireTransfer;
|
166
170
|
line_items?: LineItem[];
|
167
171
|
shipments?: Shipment[];
|
168
172
|
transactions?: (Authorization | Void | Capture | Refund)[];
|
@@ -193,7 +197,7 @@ interface OrderCreate extends ResourceCreate {
|
|
193
197
|
shipping_address?: AddressRel;
|
194
198
|
billing_address?: AddressRel;
|
195
199
|
payment_method?: PaymentMethodRel;
|
196
|
-
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
200
|
+
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
197
201
|
}
|
198
202
|
interface OrderUpdate extends ResourceUpdate {
|
199
203
|
autorefresh?: boolean;
|
@@ -234,7 +238,7 @@ interface OrderUpdate extends ResourceUpdate {
|
|
234
238
|
shipping_address?: AddressRel;
|
235
239
|
billing_address?: AddressRel;
|
236
240
|
payment_method?: PaymentMethodRel;
|
237
|
-
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
241
|
+
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
238
242
|
}
|
239
243
|
declare class Orders extends ApiResource {
|
240
244
|
static readonly TYPE: 'orders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isOrder(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="orders";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async retrieve(e,t){return this.resources.singleton({type:r.TYPE},e,t)}isOrganization(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="organization";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isPackage(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="packages";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isParcelLineItem(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="parcel_line_items";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isParcel(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="parcels";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}isPaymentGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_gateways";export default t;
|
@@ -15,6 +15,7 @@ declare type PaymentGatewayRel = ResourceId & {
|
|
15
15
|
interface PaymentMethod extends Resource {
|
16
16
|
payment_source_type?: string;
|
17
17
|
name?: string;
|
18
|
+
currency_code?: string;
|
18
19
|
moto?: boolean;
|
19
20
|
disabled_at?: string;
|
20
21
|
price_amount_cents?: number;
|
@@ -26,13 +27,15 @@ interface PaymentMethod extends Resource {
|
|
26
27
|
}
|
27
28
|
interface PaymentMethodCreate extends ResourceCreate {
|
28
29
|
payment_source_type: string;
|
30
|
+
currency_code?: string;
|
29
31
|
moto?: boolean;
|
30
32
|
price_amount_cents: number;
|
31
|
-
market
|
33
|
+
market?: MarketRel;
|
32
34
|
payment_gateway: PaymentGatewayRel;
|
33
35
|
}
|
34
36
|
interface PaymentMethodUpdate extends ResourceUpdate {
|
35
37
|
payment_source_type?: string;
|
38
|
+
currency_code?: string;
|
36
39
|
moto?: boolean;
|
37
40
|
price_amount_cents?: number;
|
38
41
|
market?: MarketRel;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPaymentMethod(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_methods";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isPaypalGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="paypal_gateways";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isPaypalPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="paypal_payments";export default s;
|
@@ -31,6 +31,7 @@ declare type SkuListRel = ResourceId & {
|
|
31
31
|
};
|
32
32
|
interface PercentageDiscountPromotion extends Resource {
|
33
33
|
name?: string;
|
34
|
+
currency_code?: string;
|
34
35
|
starts_at?: string;
|
35
36
|
expires_at?: string;
|
36
37
|
total_usage_limit?: number;
|
@@ -48,6 +49,7 @@ interface PercentageDiscountPromotion extends Resource {
|
|
48
49
|
}
|
49
50
|
interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
50
51
|
name: string;
|
52
|
+
currency_code?: string;
|
51
53
|
starts_at: string;
|
52
54
|
expires_at: string;
|
53
55
|
total_usage_limit: number;
|
@@ -61,6 +63,7 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
|
61
63
|
}
|
62
64
|
interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
|
63
65
|
name?: string;
|
66
|
+
currency_code?: string;
|
64
67
|
starts_at?: string;
|
65
68
|
expires_at?: string;
|
66
69
|
total_usage_limit?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPercentageDiscountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="percentage_discount_promotions";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isPriceList(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="price_lists";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isPrice(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="prices";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotion_rules";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isRefund(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="refunds";export default r;
|