@commercelayer/sdk 3.0.1 → 3.2.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.
- 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/resource.js +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +1 -1
- package/lib/cjs/resources/attachments.d.ts +1 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +1 -1
- package/lib/cjs/resources/bundles.d.ts +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/coupons.d.ts +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +2 -2
- package/lib/cjs/resources/customer_payment_sources.d.ts +8 -4
- package/lib/cjs/resources/delivery_lead_times.d.ts +2 -2
- 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_payments.d.ts +3 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -3
- package/lib/cjs/resources/inventory_return_locations.d.ts +2 -2
- package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -2
- 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.d.ts +2 -2
- package/lib/cjs/resources/line_items.d.ts +1 -1
- package/lib/cjs/resources/markets.d.ts +3 -3
- package/lib/cjs/resources/merchants.d.ts +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/order_copies.d.ts +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/orders.d.ts +7 -3
- package/lib/cjs/resources/packages.d.ts +1 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +2 -2
- package/lib/cjs/resources/parcels.d.ts +2 -2
- package/lib/cjs/resources/payment_methods.d.ts +2 -2
- package/lib/cjs/resources/paypal_payments.d.ts +1 -1
- package/lib/cjs/resources/prices.d.ts +1 -1
- package/lib/cjs/resources/return_line_items.d.ts +2 -2
- package/lib/cjs/resources/returns.d.ts +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +3 -3
- package/lib/cjs/resources/sku_list_items.d.ts +2 -2
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/sku_options.d.ts +1 -1
- package/lib/cjs/resources/skus.d.ts +1 -1
- package/lib/cjs/resources/stock_items.d.ts +1 -1
- package/lib/cjs/resources/stock_locations.d.ts +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +3 -3
- package/lib/cjs/resources/stripe_payments.d.ts +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +2 -2
- package/lib/cjs/resources/tax_rules.d.ts +1 -1
- package/lib/cjs/resources/wire_transfers.d.ts +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/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +4 -2
- 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.d.ts +1 -1
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.d.ts +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.d.ts +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.d.ts +1 -1
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +1 -1
- 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_payments.d.ts +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +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.d.ts +1 -1
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +2 -2
- 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 +8 -4
- 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.d.ts +2 -2
- 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 +3 -1
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -1
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.js +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.d.ts +3 -3
- 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.d.ts +2 -2
- package/lib/esm/resources/inventory_stock_locations.d.ts +2 -2
- 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.d.ts +2 -2
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +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.d.ts +3 -3
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +1 -1
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +1 -1
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +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.d.ts +1 -1
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +2 -2
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +2 -2
- 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 +2 -2
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +1 -1
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.d.ts +1 -1
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +2 -2
- package/lib/esm/resources/returns.d.ts +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 +3 -3
- 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.d.ts +2 -2
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +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 +1 -1
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +1 -1
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.d.ts +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.d.ts +1 -1
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +3 -3
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +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.d.ts +2 -2
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +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.d.ts +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 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)}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;
|
@@ -18,8 +18,8 @@ interface InventoryReturnLocation extends Resource {
|
|
18
18
|
}
|
19
19
|
interface InventoryReturnLocationCreate extends ResourceCreate {
|
20
20
|
priority: number;
|
21
|
-
stock_location
|
22
|
-
inventory_model
|
21
|
+
stock_location: StockLocationRel;
|
22
|
+
inventory_model: InventoryModelRel;
|
23
23
|
}
|
24
24
|
interface InventoryReturnLocationUpdate extends ResourceUpdate {
|
25
25
|
priority?: number;
|
@@ -20,8 +20,8 @@ interface InventoryStockLocation extends Resource {
|
|
20
20
|
interface InventoryStockLocationCreate extends ResourceCreate {
|
21
21
|
priority: number;
|
22
22
|
on_hold?: boolean;
|
23
|
-
stock_location
|
24
|
-
inventory_model
|
23
|
+
stock_location: StockLocationRel;
|
24
|
+
inventory_model: InventoryModelRel;
|
25
25
|
}
|
26
26
|
interface InventoryStockLocationUpdate extends ResourceUpdate {
|
27
27
|
priority?: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,
|
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;
|
@@ -31,8 +31,8 @@ interface LineItemOptionCreate extends ResourceCreate {
|
|
31
31
|
name?: string;
|
32
32
|
quantity: number;
|
33
33
|
options: object;
|
34
|
-
line_item
|
35
|
-
sku_option
|
34
|
+
line_item: LineItemRel;
|
35
|
+
sku_option: SkuOptionRel;
|
36
36
|
}
|
37
37
|
interface LineItemOptionUpdate extends ResourceUpdate {
|
38
38
|
name?: string;
|
@@ -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;
|
@@ -96,7 +96,7 @@ interface LineItemCreate extends ResourceCreate {
|
|
96
96
|
name?: string;
|
97
97
|
image_url?: string;
|
98
98
|
item_type?: string;
|
99
|
-
order
|
99
|
+
order: OrderRel;
|
100
100
|
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
101
101
|
}
|
102
102
|
interface LineItemUpdate extends ResourceUpdate {
|
@@ -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)}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 a}from"../resource";class
|
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 a}from"../resource";class
|
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;
|
@@ -43,9 +43,9 @@ interface MarketCreate extends ResourceCreate {
|
|
43
43
|
facebook_pixel_id?: string;
|
44
44
|
checkout_url?: string;
|
45
45
|
external_prices_url?: string;
|
46
|
-
merchant
|
47
|
-
price_list
|
48
|
-
inventory_model
|
46
|
+
merchant: MerchantRel;
|
47
|
+
price_list: PriceListRel;
|
48
|
+
inventory_model: InventoryModelRel;
|
49
49
|
tax_calculator?: TaxCalculatorRel;
|
50
50
|
customer_group?: CustomerGroupRel;
|
51
51
|
}
|
@@ -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;
|
@@ -35,7 +35,7 @@ interface OrderAmountPromotionRule extends Resource {
|
|
35
35
|
}
|
36
36
|
interface OrderAmountPromotionRuleCreate extends ResourceCreate {
|
37
37
|
order_amount_cents?: number;
|
38
|
-
promotion
|
38
|
+
promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
|
39
39
|
}
|
40
40
|
interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
|
41
41
|
order_amount_cents?: number;
|
@@ -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 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;
|
@@ -26,7 +26,7 @@ interface OrderCopyCreate extends ResourceCreate {
|
|
26
26
|
place_target_order?: boolean;
|
27
27
|
cancel_source_order?: boolean;
|
28
28
|
reuse_wallet?: boolean;
|
29
|
-
source_order
|
29
|
+
source_order: OrderRel;
|
30
30
|
}
|
31
31
|
declare class OrderCopies extends ApiResource {
|
32
32
|
static readonly TYPE: 'order_copies';
|
@@ -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)}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;
|
@@ -39,7 +39,7 @@ interface OrderSubscriptionCreate extends ResourceCreate {
|
|
39
39
|
expires_at?: string;
|
40
40
|
options?: object;
|
41
41
|
market?: MarketRel;
|
42
|
-
source_order
|
42
|
+
source_order: OrderRel;
|
43
43
|
}
|
44
44
|
interface OrderSubscriptionUpdate extends ResourceUpdate {
|
45
45
|
expires_at?: string;
|
@@ -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)}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;
|
@@ -27,7 +27,7 @@ interface PackageCreate extends ResourceCreate {
|
|
27
27
|
width: number;
|
28
28
|
height: number;
|
29
29
|
unit_of_length: string;
|
30
|
-
stock_location
|
30
|
+
stock_location: StockLocationRel;
|
31
31
|
}
|
32
32
|
interface PackageUpdate extends ResourceUpdate {
|
33
33
|
name?: string;
|
@@ -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;
|
@@ -24,8 +24,8 @@ interface ParcelLineItem extends Resource {
|
|
24
24
|
interface ParcelLineItemCreate extends ResourceCreate {
|
25
25
|
sku_code?: string;
|
26
26
|
quantity: number;
|
27
|
-
parcel
|
28
|
-
stock_line_item
|
27
|
+
parcel: ParcelRel;
|
28
|
+
stock_line_item: StockLineItemRel;
|
29
29
|
/**
|
30
30
|
* @deprecated This field should not be used as it may be removed in the future without notice
|
31
31
|
*/
|
@@ -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)}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;
|
@@ -63,8 +63,8 @@ interface ParcelCreate extends ResourceCreate {
|
|
63
63
|
carrier_weight_oz?: string;
|
64
64
|
signed_by?: string;
|
65
65
|
incoterm?: string;
|
66
|
-
shipment
|
67
|
-
package
|
66
|
+
shipment: ShipmentRel;
|
67
|
+
package: PackageRel;
|
68
68
|
}
|
69
69
|
interface ParcelUpdate extends ResourceUpdate {
|
70
70
|
weight?: number;
|
@@ -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;
|
@@ -28,8 +28,8 @@ interface PaymentMethodCreate extends ResourceCreate {
|
|
28
28
|
payment_source_type: string;
|
29
29
|
moto?: boolean;
|
30
30
|
price_amount_cents: number;
|
31
|
-
market
|
32
|
-
payment_gateway
|
31
|
+
market: MarketRel;
|
32
|
+
payment_gateway: PaymentGatewayRel;
|
33
33
|
}
|
34
34
|
interface PaymentMethodUpdate extends ResourceUpdate {
|
35
35
|
payment_source_type?: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as a}from"../resource";class
|
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;
|
@@ -24,7 +24,7 @@ interface PaypalPaymentCreate extends ResourceCreate {
|
|
24
24
|
return_url: string;
|
25
25
|
cancel_url: string;
|
26
26
|
note_to_payer?: string;
|
27
|
-
order
|
27
|
+
order: OrderRel;
|
28
28
|
}
|
29
29
|
interface PaypalPaymentUpdate extends ResourceUpdate {
|
30
30
|
paypal_payer_id?: string;
|
@@ -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;
|
@@ -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)}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;
|
@@ -29,7 +29,7 @@ interface PriceCreate extends ResourceCreate {
|
|
29
29
|
sku_code?: string;
|
30
30
|
amount_cents: number;
|
31
31
|
compare_at_amount_cents: number;
|
32
|
-
price_list
|
32
|
+
price_list: PriceListRel;
|
33
33
|
sku?: SkuRel;
|
34
34
|
}
|
35
35
|
interface PriceUpdate extends ResourceUpdate {
|
@@ -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)}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 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 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;
|
@@ -24,8 +24,8 @@ interface ReturnLineItem extends Resource {
|
|
24
24
|
interface ReturnLineItemCreate extends ResourceCreate {
|
25
25
|
quantity: number;
|
26
26
|
return_reason?: object;
|
27
|
-
return
|
28
|
-
line_item
|
27
|
+
return: ReturnRel;
|
28
|
+
line_item: LineItemRel;
|
29
29
|
}
|
30
30
|
interface ReturnLineItemUpdate extends ResourceUpdate {
|
31
31
|
quantity?: number;
|
@@ -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)}isReturn(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="returns";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 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)}isShipment(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="shipments";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)}isShippingCategory(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="shipping_categories";export default s;
|
@@ -40,9 +40,9 @@ interface ShippingMethodCreate extends ResourceCreate {
|
|
40
40
|
name: string;
|
41
41
|
price_amount_cents: number;
|
42
42
|
free_over_amount_cents?: number;
|
43
|
-
market
|
44
|
-
shipping_zone
|
45
|
-
shipping_category
|
43
|
+
market: MarketRel;
|
44
|
+
shipping_zone: ShippingZoneRel;
|
45
|
+
shipping_category: ShippingCategoryRel;
|
46
46
|
}
|
47
47
|
interface ShippingMethodUpdate extends ResourceUpdate {
|
48
48
|
name?: string;
|
@@ -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)}isShippingMethod(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="shipping_methods";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)}isShippingZone(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="shipping_zones";export default s;
|
@@ -22,8 +22,8 @@ interface SkuListItemCreate extends ResourceCreate {
|
|
22
22
|
position?: number;
|
23
23
|
sku_code?: string;
|
24
24
|
quantity?: number;
|
25
|
-
sku_list
|
26
|
-
sku
|
25
|
+
sku_list: SkuListRel;
|
26
|
+
sku: SkuRel;
|
27
27
|
}
|
28
28
|
interface SkuListItemUpdate extends ResourceUpdate {
|
29
29
|
position?: number;
|
@@ -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)}isSkuListItem(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="sku_list_items";export default t;
|