@commercelayer/sdk 4.7.5 → 4.7.6
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 +1 -103
- package/lib/cjs/client.d.ts +1 -31
- package/lib/cjs/commercelayer.d.ts +1 -122
- package/lib/cjs/common.d.ts +1 -4
- package/lib/cjs/config.d.ts +1 -11
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/error.d.ts +1 -26
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/interceptor.d.ts +1 -19
- package/lib/cjs/jsonapi.d.ts +1 -5
- package/lib/cjs/model.d.ts +1 -101
- package/lib/cjs/query.d.ts +1 -23
- package/lib/cjs/resource.d.ts +1 -76
- package/lib/cjs/resources/addresses.d.ts +1 -88
- package/lib/cjs/resources/adjustments.d.ts +1 -35
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -47
- package/lib/cjs/resources/adyen_payments.d.ts +1 -44
- package/lib/cjs/resources/application.d.ts +1 -21
- package/lib/cjs/resources/attachments.d.ts +1 -156
- package/lib/cjs/resources/authorizations.d.ts +1 -57
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -52
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -32
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -56
- package/lib/cjs/resources/braintree_payments.d.ts +1 -47
- package/lib/cjs/resources/bundles.d.ts +1 -74
- package/lib/cjs/resources/captures.d.ts +1 -48
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -26
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -45
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -51
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -59
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -44
- package/lib/cjs/resources/coupons.d.ts +1 -45
- package/lib/cjs/resources/customer_addresses.d.ts +1 -41
- package/lib/cjs/resources/customer_groups.d.ts +1 -36
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -33
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -70
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -28
- package/lib/cjs/resources/customers.d.ts +1 -60
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -51
- package/lib/cjs/resources/event_callbacks.d.ts +1 -24
- package/lib/cjs/resources/external_gateways.d.ts +1 -49
- package/lib/cjs/resources/external_payments.d.ts +1 -43
- package/lib/cjs/resources/external_promotions.d.ts +1 -86
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -44
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -88
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -99
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -97
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -83
- package/lib/cjs/resources/geocoders.d.ts +1 -24
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -44
- package/lib/cjs/resources/gift_cards.d.ts +1 -82
- package/lib/cjs/resources/google_geocoders.d.ts +1 -35
- package/lib/cjs/resources/imports.d.ts +1 -40
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -59
- package/lib/cjs/resources/inventory_models.d.ts +1 -42
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -43
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -46
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -44
- package/lib/cjs/resources/klarna_payments.d.ts +1 -41
- package/lib/cjs/resources/line_item_options.d.ts +1 -57
- package/lib/cjs/resources/line_items.d.ts +1 -125
- package/lib/cjs/resources/manual_gateways.d.ts +1 -33
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -49
- package/lib/cjs/resources/markets.d.ts +1 -81
- package/lib/cjs/resources/merchants.d.ts +1 -38
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -56
- package/lib/cjs/resources/order_copies.d.ts +1 -45
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -67
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -20
- package/lib/cjs/resources/orders.d.ts +1 -271
- package/lib/cjs/resources/organization.d.ts +1 -32
- package/lib/cjs/resources/packages.d.ts +1 -56
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -49
- package/lib/cjs/resources/parcels.d.ts +1 -108
- package/lib/cjs/resources/payment_gateways.d.ts +1 -21
- package/lib/cjs/resources/payment_methods.d.ts +1 -59
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -39
- package/lib/cjs/resources/paypal_payments.d.ts +1 -49
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -97
- package/lib/cjs/resources/price_lists.d.ts +1 -39
- package/lib/cjs/resources/prices.d.ts +1 -57
- package/lib/cjs/resources/promotion_rules.d.ts +1 -24
- package/lib/cjs/resources/promotions.d.ts +1 -41
- package/lib/cjs/resources/refunds.d.ts +1 -34
- package/lib/cjs/resources/return_line_items.d.ts +1 -49
- package/lib/cjs/resources/returns.d.ts +1 -72
- package/lib/cjs/resources/shipments.d.ts +1 -89
- package/lib/cjs/resources/shipping_categories.d.ts +1 -33
- package/lib/cjs/resources/shipping_methods.d.ts +1 -74
- package/lib/cjs/resources/shipping_zones.d.ts +1 -48
- package/lib/cjs/resources/sku_list_items.d.ts +1 -47
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -68
- package/lib/cjs/resources/sku_lists.d.ts +1 -49
- package/lib/cjs/resources/sku_options.d.ts +1 -56
- package/lib/cjs/resources/skus.d.ts +1 -78
- package/lib/cjs/resources/stock_items.d.ts +1 -49
- package/lib/cjs/resources/stock_line_items.d.ts +1 -29
- package/lib/cjs/resources/stock_locations.d.ts +1 -57
- package/lib/cjs/resources/stock_transfers.d.ts +1 -71
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -38
- package/lib/cjs/resources/stripe_payments.d.ts +1 -42
- package/lib/cjs/resources/tax_calculators.d.ts +1 -27
- package/lib/cjs/resources/tax_categories.d.ts +1 -59
- package/lib/cjs/resources/tax_rules.d.ts +1 -69
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -43
- package/lib/cjs/resources/transactions.d.ts +1 -31
- package/lib/cjs/resources/voids.d.ts +1 -34
- package/lib/cjs/resources/webhooks.d.ts +1 -42
- package/lib/cjs/resources/wire_transfers.d.ts +1 -32
- package/lib/cjs/static.d.ts +1 -6
- package/lib/cjs/util.d.ts +1 -2
- package/lib/esm/api.d.ts +1 -103
- package/lib/esm/client.d.ts +1 -31
- package/lib/esm/commercelayer.d.ts +1 -122
- package/lib/esm/common.d.ts +1 -4
- package/lib/esm/config.d.ts +1 -11
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/error.d.ts +1 -26
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/interceptor.d.ts +1 -19
- package/lib/esm/jsonapi.d.ts +1 -5
- package/lib/esm/model.d.ts +1 -101
- package/lib/esm/query.d.ts +1 -23
- package/lib/esm/resource.d.ts +1 -76
- package/lib/esm/resources/addresses.d.ts +1 -88
- package/lib/esm/resources/adjustments.d.ts +1 -35
- package/lib/esm/resources/adyen_gateways.d.ts +1 -47
- package/lib/esm/resources/adyen_payments.d.ts +1 -44
- package/lib/esm/resources/application.d.ts +1 -21
- package/lib/esm/resources/attachments.d.ts +1 -156
- package/lib/esm/resources/authorizations.d.ts +1 -57
- package/lib/esm/resources/avalara_accounts.d.ts +1 -52
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -32
- package/lib/esm/resources/bing_geocoders.d.ts +1 -35
- package/lib/esm/resources/braintree_gateways.d.ts +1 -56
- package/lib/esm/resources/braintree_payments.d.ts +1 -47
- package/lib/esm/resources/bundles.d.ts +1 -74
- package/lib/esm/resources/captures.d.ts +1 -48
- package/lib/esm/resources/carrier_accounts.d.ts +1 -26
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -45
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -51
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -59
- package/lib/esm/resources/coupon_recipients.d.ts +1 -44
- package/lib/esm/resources/coupons.d.ts +1 -45
- package/lib/esm/resources/customer_addresses.d.ts +1 -41
- package/lib/esm/resources/customer_groups.d.ts +1 -36
- package/lib/esm/resources/customer_password_resets.d.ts +1 -33
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -70
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -28
- package/lib/esm/resources/customers.d.ts +1 -60
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -51
- package/lib/esm/resources/event_callbacks.d.ts +1 -24
- package/lib/esm/resources/external_gateways.d.ts +1 -49
- package/lib/esm/resources/external_payments.d.ts +1 -43
- package/lib/esm/resources/external_promotions.d.ts +1 -86
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -44
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -88
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -99
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -97
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -83
- package/lib/esm/resources/geocoders.d.ts +1 -24
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -44
- package/lib/esm/resources/gift_cards.d.ts +1 -82
- package/lib/esm/resources/google_geocoders.d.ts +1 -35
- package/lib/esm/resources/imports.d.ts +1 -40
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -59
- package/lib/esm/resources/inventory_models.d.ts +1 -42
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -43
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -46
- package/lib/esm/resources/klarna_gateways.d.ts +1 -44
- package/lib/esm/resources/klarna_payments.d.ts +1 -41
- package/lib/esm/resources/line_item_options.d.ts +1 -57
- package/lib/esm/resources/line_items.d.ts +1 -125
- package/lib/esm/resources/manual_gateways.d.ts +1 -33
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -49
- package/lib/esm/resources/markets.d.ts +1 -81
- package/lib/esm/resources/merchants.d.ts +1 -38
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -56
- package/lib/esm/resources/order_copies.d.ts +1 -45
- package/lib/esm/resources/order_subscriptions.d.ts +1 -67
- package/lib/esm/resources/order_validation_rules.d.ts +1 -20
- package/lib/esm/resources/orders.d.ts +1 -271
- package/lib/esm/resources/organization.d.ts +1 -32
- package/lib/esm/resources/packages.d.ts +1 -56
- package/lib/esm/resources/parcel_line_items.d.ts +1 -49
- package/lib/esm/resources/parcels.d.ts +1 -108
- package/lib/esm/resources/payment_gateways.d.ts +1 -21
- package/lib/esm/resources/payment_methods.d.ts +1 -59
- package/lib/esm/resources/paypal_gateways.d.ts +1 -39
- package/lib/esm/resources/paypal_payments.d.ts +1 -49
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -97
- package/lib/esm/resources/price_lists.d.ts +1 -39
- package/lib/esm/resources/prices.d.ts +1 -57
- package/lib/esm/resources/promotion_rules.d.ts +1 -24
- package/lib/esm/resources/promotions.d.ts +1 -41
- package/lib/esm/resources/refunds.d.ts +1 -34
- package/lib/esm/resources/return_line_items.d.ts +1 -49
- package/lib/esm/resources/returns.d.ts +1 -72
- package/lib/esm/resources/shipments.d.ts +1 -89
- package/lib/esm/resources/shipping_categories.d.ts +1 -33
- package/lib/esm/resources/shipping_methods.d.ts +1 -74
- package/lib/esm/resources/shipping_zones.d.ts +1 -48
- package/lib/esm/resources/sku_list_items.d.ts +1 -47
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -68
- package/lib/esm/resources/sku_lists.d.ts +1 -49
- package/lib/esm/resources/sku_options.d.ts +1 -56
- package/lib/esm/resources/skus.d.ts +1 -78
- package/lib/esm/resources/stock_items.d.ts +1 -49
- package/lib/esm/resources/stock_line_items.d.ts +1 -29
- package/lib/esm/resources/stock_locations.d.ts +1 -57
- package/lib/esm/resources/stock_transfers.d.ts +1 -71
- package/lib/esm/resources/stripe_gateways.d.ts +1 -38
- package/lib/esm/resources/stripe_payments.d.ts +1 -42
- package/lib/esm/resources/tax_calculators.d.ts +1 -27
- package/lib/esm/resources/tax_categories.d.ts +1 -59
- package/lib/esm/resources/tax_rules.d.ts +1 -69
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -43
- package/lib/esm/resources/transactions.d.ts +1 -31
- package/lib/esm/resources/voids.d.ts +1 -34
- package/lib/esm/resources/webhooks.d.ts +1 -42
- package/lib/esm/resources/wire_transfers.d.ts +1 -32
- package/lib/esm/static.d.ts +1 -6
- package/lib/esm/util.d.ts +1 -2
- package/package.json +3 -3
@@ -1,39 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PaymentMethod } from './payment_methods';
|
4
|
-
import type { PaypalPayment } from './paypal_payments';
|
5
|
-
declare type PaypalGatewayRel = ResourceRel & {
|
6
|
-
type: typeof PaypalGateways.TYPE;
|
7
|
-
};
|
8
|
-
interface PaypalGateway extends Resource {
|
9
|
-
name?: string;
|
10
|
-
payment_methods?: PaymentMethod[];
|
11
|
-
paypal_payments?: PaypalPayment[];
|
12
|
-
}
|
13
|
-
interface PaypalGatewayCreate extends ResourceCreate {
|
14
|
-
name: string;
|
15
|
-
client_id: string;
|
16
|
-
client_secret: string;
|
17
|
-
mode: string;
|
18
|
-
}
|
19
|
-
interface PaypalGatewayUpdate extends ResourceUpdate {
|
20
|
-
name?: string;
|
21
|
-
client_id?: string;
|
22
|
-
client_secret?: string;
|
23
|
-
mode?: string;
|
24
|
-
}
|
25
|
-
declare class PaypalGateways extends ApiResource {
|
26
|
-
static readonly TYPE: 'paypal_gateways';
|
27
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaypalGateway>>;
|
28
|
-
create(resource: PaypalGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalGateway>;
|
29
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalGateway>;
|
30
|
-
update(resource: PaypalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalGateway>;
|
31
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
|
-
payment_methods(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
33
|
-
paypal_payments(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>>;
|
34
|
-
isPaypalGateway(resource: any): resource is PaypalGateway;
|
35
|
-
relationship(id: string | ResourceId | null): PaypalGatewayRel;
|
36
|
-
type(): string;
|
37
|
-
}
|
38
|
-
export default PaypalGateways;
|
39
|
-
export { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{PaypalPayment}from'./paypal_payments';declare type PaypalGatewayRel=ResourceRel&{type:typeof PaypalGateways.TYPE;};interface PaypalGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];paypal_payments?:PaypalPayment[];}interface PaypalGatewayCreate extends ResourceCreate{name:string;client_id:string;client_secret:string;mode:string;}interface PaypalGatewayUpdate extends ResourceUpdate{name?:string;client_id?:string;client_secret?:string;mode?:string;}declare class PaypalGateways extends ApiResource{static readonly TYPE:'paypal_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalGateway>>;create(resource:PaypalGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;update(resource:PaypalGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(paypalGatewayId:string|PaypalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;paypal_payments(paypalGatewayId:string|PaypalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalPayment>>;isPaypalGateway(resource:any):resource is PaypalGateway;relationship(id:string|ResourceId|null):PaypalGatewayRel;type():string;}export default PaypalGateways;export{PaypalGateway,PaypalGatewayCreate,PaypalGatewayUpdate};
|
@@ -1,49 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { PaymentGateway } from './payment_gateways';
|
5
|
-
declare type PaypalPaymentRel = ResourceRel & {
|
6
|
-
type: typeof PaypalPayments.TYPE;
|
7
|
-
};
|
8
|
-
declare type OrderRel = ResourceRel & {
|
9
|
-
type: 'orders';
|
10
|
-
};
|
11
|
-
interface PaypalPayment extends Resource {
|
12
|
-
return_url?: string;
|
13
|
-
cancel_url?: string;
|
14
|
-
store_payment_source?: boolean;
|
15
|
-
note_to_payer?: string;
|
16
|
-
paypal_payer_id?: string;
|
17
|
-
name?: string;
|
18
|
-
paypal_id?: string;
|
19
|
-
status?: string;
|
20
|
-
approval_url?: string;
|
21
|
-
order?: Order;
|
22
|
-
payment_gateway?: PaymentGateway;
|
23
|
-
}
|
24
|
-
interface PaypalPaymentCreate extends ResourceCreate {
|
25
|
-
return_url: string;
|
26
|
-
cancel_url: string;
|
27
|
-
store_payment_source?: boolean;
|
28
|
-
note_to_payer?: string;
|
29
|
-
order: OrderRel;
|
30
|
-
}
|
31
|
-
interface PaypalPaymentUpdate extends ResourceUpdate {
|
32
|
-
paypal_payer_id?: string;
|
33
|
-
order?: OrderRel;
|
34
|
-
}
|
35
|
-
declare class PaypalPayments extends ApiResource {
|
36
|
-
static readonly TYPE: 'paypal_payments';
|
37
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>>;
|
38
|
-
create(resource: PaypalPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalPayment>;
|
39
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalPayment>;
|
40
|
-
update(resource: PaypalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalPayment>;
|
41
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
-
order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
43
|
-
payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
-
isPaypalPayment(resource: any): resource is PaypalPayment;
|
45
|
-
relationship(id: string | ResourceId | null): PaypalPaymentRel;
|
46
|
-
type(): string;
|
47
|
-
}
|
48
|
-
export default PaypalPayments;
|
49
|
-
export { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type PaypalPaymentRel=ResourceRel&{type:typeof PaypalPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface PaypalPayment extends Resource{return_url?:string;cancel_url?:string;store_payment_source?:boolean;note_to_payer?:string;paypal_payer_id?:string;name?:string;paypal_id?:string;status?:string;approval_url?:string;order?:Order;payment_gateway?:PaymentGateway;}interface PaypalPaymentCreate extends ResourceCreate{return_url:string;cancel_url:string;store_payment_source?:boolean;note_to_payer?:string;order:OrderRel;}interface PaypalPaymentUpdate extends ResourceUpdate{paypal_payer_id?:string;order?:OrderRel;}declare class PaypalPayments extends ApiResource{static readonly TYPE:'paypal_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalPayment>>;create(resource:PaypalPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;update(resource:PaypalPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isPaypalPayment(resource:any):resource is PaypalPayment;relationship(id:string|ResourceId|null):PaypalPaymentRel;type():string;}export default PaypalPayments;export{PaypalPayment,PaypalPaymentCreate,PaypalPaymentUpdate};
|
@@ -1,97 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { PromotionRule } from './promotion_rules';
|
5
|
-
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
-
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
-
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
-
import type { Attachment } from './attachments';
|
9
|
-
import type { SkuList } from './sku_lists';
|
10
|
-
import type { Sku } from './skus';
|
11
|
-
declare type PercentageDiscountPromotionRel = ResourceRel & {
|
12
|
-
type: typeof PercentageDiscountPromotions.TYPE;
|
13
|
-
};
|
14
|
-
declare type MarketRel = ResourceRel & {
|
15
|
-
type: 'markets';
|
16
|
-
};
|
17
|
-
declare type PromotionRuleRel = ResourceRel & {
|
18
|
-
type: 'promotion_rules';
|
19
|
-
};
|
20
|
-
declare type OrderAmountPromotionRuleRel = ResourceRel & {
|
21
|
-
type: 'order_amount_promotion_rules';
|
22
|
-
};
|
23
|
-
declare type SkuListPromotionRuleRel = ResourceRel & {
|
24
|
-
type: 'sku_list_promotion_rules';
|
25
|
-
};
|
26
|
-
declare type CouponCodesPromotionRuleRel = ResourceRel & {
|
27
|
-
type: 'coupon_codes_promotion_rules';
|
28
|
-
};
|
29
|
-
declare type SkuListRel = ResourceRel & {
|
30
|
-
type: 'sku_lists';
|
31
|
-
};
|
32
|
-
interface PercentageDiscountPromotion extends Resource {
|
33
|
-
name?: string;
|
34
|
-
currency_code?: string;
|
35
|
-
starts_at?: string;
|
36
|
-
expires_at?: string;
|
37
|
-
total_usage_limit?: number;
|
38
|
-
total_usage_count?: number;
|
39
|
-
active?: boolean;
|
40
|
-
percentage?: number;
|
41
|
-
market?: Market;
|
42
|
-
promotion_rules?: PromotionRule[];
|
43
|
-
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
44
|
-
sku_list_promotion_rule?: SkuListPromotionRule;
|
45
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
46
|
-
attachments?: Attachment[];
|
47
|
-
sku_list?: SkuList;
|
48
|
-
skus?: Sku[];
|
49
|
-
}
|
50
|
-
interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
51
|
-
name: string;
|
52
|
-
currency_code?: string;
|
53
|
-
starts_at: string;
|
54
|
-
expires_at: string;
|
55
|
-
total_usage_limit: number;
|
56
|
-
percentage: number;
|
57
|
-
market?: MarketRel;
|
58
|
-
promotion_rules?: PromotionRuleRel[];
|
59
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
60
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
61
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
62
|
-
sku_list?: SkuListRel;
|
63
|
-
}
|
64
|
-
interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
|
65
|
-
name?: string;
|
66
|
-
currency_code?: string;
|
67
|
-
starts_at?: string;
|
68
|
-
expires_at?: string;
|
69
|
-
total_usage_limit?: number;
|
70
|
-
percentage?: number;
|
71
|
-
market?: MarketRel;
|
72
|
-
promotion_rules?: PromotionRuleRel[];
|
73
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
74
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
75
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
76
|
-
sku_list?: SkuListRel;
|
77
|
-
}
|
78
|
-
declare class PercentageDiscountPromotions extends ApiResource {
|
79
|
-
static readonly TYPE: 'percentage_discount_promotions';
|
80
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PercentageDiscountPromotion>>;
|
81
|
-
create(resource: PercentageDiscountPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PercentageDiscountPromotion>;
|
82
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PercentageDiscountPromotion>;
|
83
|
-
update(resource: PercentageDiscountPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PercentageDiscountPromotion>;
|
84
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
85
|
-
market(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
86
|
-
order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
87
|
-
sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
88
|
-
coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
89
|
-
attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
90
|
-
sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
91
|
-
skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
92
|
-
isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
|
93
|
-
relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
|
94
|
-
type(): string;
|
95
|
-
}
|
96
|
-
export default PercentageDiscountPromotions;
|
97
|
-
export { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';declare type PercentageDiscountPromotionRel=ResourceRel&{type:typeof PercentageDiscountPromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface PercentageDiscountPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;percentage?:number;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];sku_list?:SkuList;skus?:Sku[];}interface PercentageDiscountPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;percentage:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list?:SkuListRel;}interface PercentageDiscountPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;percentage?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list?:SkuListRel;}declare class PercentageDiscountPromotions extends ApiResource{static readonly TYPE:'percentage_discount_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PercentageDiscountPromotion>>;create(resource:PercentageDiscountPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;update(resource:PercentageDiscountPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;sku_list(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isPercentageDiscountPromotion(resource:any):resource is PercentageDiscountPromotion;relationship(id:string|ResourceId|null):PercentageDiscountPromotionRel;type():string;}export default PercentageDiscountPromotions;export{PercentageDiscountPromotion,PercentageDiscountPromotionCreate,PercentageDiscountPromotionUpdate};
|
@@ -1,39 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Price } from './prices';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
declare type PriceListRel = ResourceRel & {
|
6
|
-
type: typeof PriceLists.TYPE;
|
7
|
-
};
|
8
|
-
interface PriceList extends Resource {
|
9
|
-
name?: string;
|
10
|
-
currency_code?: string;
|
11
|
-
tax_included?: boolean;
|
12
|
-
prices?: Price[];
|
13
|
-
attachments?: Attachment[];
|
14
|
-
}
|
15
|
-
interface PriceListCreate extends ResourceCreate {
|
16
|
-
name: string;
|
17
|
-
currency_code: string;
|
18
|
-
tax_included?: boolean;
|
19
|
-
}
|
20
|
-
interface PriceListUpdate extends ResourceUpdate {
|
21
|
-
name?: string;
|
22
|
-
currency_code?: string;
|
23
|
-
tax_included?: boolean;
|
24
|
-
}
|
25
|
-
declare class PriceLists extends ApiResource {
|
26
|
-
static readonly TYPE: 'price_lists';
|
27
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceList>>;
|
28
|
-
create(resource: PriceListCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
29
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
30
|
-
update(resource: PriceListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
31
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
|
-
prices(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
|
33
|
-
attachments(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
34
|
-
isPriceList(resource: any): resource is PriceList;
|
35
|
-
relationship(id: string | ResourceId | null): PriceListRel;
|
36
|
-
type(): string;
|
37
|
-
}
|
38
|
-
export default PriceLists;
|
39
|
-
export { PriceList, PriceListCreate, PriceListUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Price}from'./prices';import type{Attachment}from'./attachments';declare type PriceListRel=ResourceRel&{type:typeof PriceLists.TYPE;};interface PriceList extends Resource{name?:string;currency_code?:string;tax_included?:boolean;prices?:Price[];attachments?:Attachment[];}interface PriceListCreate extends ResourceCreate{name:string;currency_code:string;tax_included?:boolean;}interface PriceListUpdate extends ResourceUpdate{name?:string;currency_code?:string;tax_included?:boolean;}declare class PriceLists extends ApiResource{static readonly TYPE:'price_lists';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PriceList>>;create(resource:PriceListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;update(resource:PriceListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;delete(id:string,options?:ResourcesConfig):Promise<void>;prices(priceListId:string|PriceList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;attachments(priceListId:string|PriceList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPriceList(resource:any):resource is PriceList;relationship(id:string|ResourceId|null):PriceListRel;type():string;}export default PriceLists;export{PriceList,PriceListCreate,PriceListUpdate};
|
@@ -1,57 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PriceList } from './price_lists';
|
4
|
-
import type { Sku } from './skus';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
declare type PriceRel = ResourceRel & {
|
7
|
-
type: typeof Prices.TYPE;
|
8
|
-
};
|
9
|
-
declare type PriceListRel = ResourceRel & {
|
10
|
-
type: 'price_lists';
|
11
|
-
};
|
12
|
-
declare type SkuRel = ResourceRel & {
|
13
|
-
type: 'skus';
|
14
|
-
};
|
15
|
-
interface Price extends Resource {
|
16
|
-
currency_code?: string;
|
17
|
-
sku_code?: string;
|
18
|
-
amount_cents?: number;
|
19
|
-
amount_float?: number;
|
20
|
-
formatted_amount?: string;
|
21
|
-
compare_at_amount_cents?: number;
|
22
|
-
compare_at_amount_float?: number;
|
23
|
-
formatted_compare_at_amount?: string;
|
24
|
-
price_list?: PriceList;
|
25
|
-
sku?: Sku;
|
26
|
-
attachments?: Attachment[];
|
27
|
-
}
|
28
|
-
interface PriceCreate extends ResourceCreate {
|
29
|
-
sku_code?: string;
|
30
|
-
amount_cents: number;
|
31
|
-
compare_at_amount_cents: number;
|
32
|
-
price_list: PriceListRel;
|
33
|
-
sku?: SkuRel;
|
34
|
-
}
|
35
|
-
interface PriceUpdate extends ResourceUpdate {
|
36
|
-
sku_code?: string;
|
37
|
-
amount_cents?: number;
|
38
|
-
compare_at_amount_cents?: number;
|
39
|
-
price_list?: PriceListRel;
|
40
|
-
sku?: SkuRel;
|
41
|
-
}
|
42
|
-
declare class Prices extends ApiResource {
|
43
|
-
static readonly TYPE: 'prices';
|
44
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
|
45
|
-
create(resource: PriceCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
46
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
47
|
-
update(resource: PriceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
48
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
49
|
-
price_list(priceId: string | Price, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
50
|
-
sku(priceId: string | Price, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
51
|
-
attachments(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
|
-
isPrice(resource: any): resource is Price;
|
53
|
-
relationship(id: string | ResourceId | null): PriceRel;
|
54
|
-
type(): string;
|
55
|
-
}
|
56
|
-
export default Prices;
|
57
|
-
export { Price, PriceCreate, PriceUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PriceList}from'./price_lists';import type{Sku}from'./skus';import type{Attachment}from'./attachments';declare type PriceRel=ResourceRel&{type:typeof Prices.TYPE;};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type SkuRel=ResourceRel&{type:'skus';};interface Price extends Resource{currency_code?:string;sku_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;compare_at_amount_cents?:number;compare_at_amount_float?:number;formatted_compare_at_amount?:string;price_list?:PriceList;sku?:Sku;attachments?:Attachment[];}interface PriceCreate extends ResourceCreate{sku_code?:string;amount_cents:number;compare_at_amount_cents:number;price_list:PriceListRel;sku?:SkuRel;}interface PriceUpdate extends ResourceUpdate{sku_code?:string;amount_cents?:number;compare_at_amount_cents?:number;price_list?:PriceListRel;sku?:SkuRel;}declare class Prices extends ApiResource{static readonly TYPE:'prices';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;create(resource:PriceCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;update(resource:PriceUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;delete(id:string,options?:ResourcesConfig):Promise<void>;price_list(priceId:string|Price,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;sku(priceId:string|Price,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(priceId:string|Price,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPrice(resource:any):resource is Price;relationship(id:string|ResourceId|null):PriceRel;type():string;}export default Prices;export{Price,PriceCreate,PriceUpdate};
|
@@ -1,24 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
4
|
-
import type { FreeShippingPromotion } from './free_shipping_promotions';
|
5
|
-
import type { FixedAmountPromotion } from './fixed_amount_promotions';
|
6
|
-
import type { FreeGiftPromotion } from './free_gift_promotions';
|
7
|
-
import type { FixedPricePromotion } from './fixed_price_promotions';
|
8
|
-
import type { ExternalPromotion } from './external_promotions';
|
9
|
-
declare type PromotionRuleRel = ResourceRel & {
|
10
|
-
type: typeof PromotionRules.TYPE;
|
11
|
-
};
|
12
|
-
interface PromotionRule extends Resource {
|
13
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
|
14
|
-
}
|
15
|
-
declare class PromotionRules extends ApiResource {
|
16
|
-
static readonly TYPE: 'promotion_rules';
|
17
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PromotionRule>>;
|
18
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PromotionRule>;
|
19
|
-
isPromotionRule(resource: any): resource is PromotionRule;
|
20
|
-
relationship(id: string | ResourceId | null): PromotionRuleRel;
|
21
|
-
type(): string;
|
22
|
-
}
|
23
|
-
export default PromotionRules;
|
24
|
-
export { PromotionRule };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';declare type PromotionRuleRel=ResourceRel&{type:typeof PromotionRules.TYPE;};interface PromotionRule extends Resource{promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;}declare class PromotionRules extends ApiResource{static readonly TYPE:'promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PromotionRule>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PromotionRule>;isPromotionRule(resource:any):resource is PromotionRule;relationship(id:string|ResourceId|null):PromotionRuleRel;type():string;}export default PromotionRules;export{PromotionRule};
|
@@ -1,41 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { PromotionRule } from './promotion_rules';
|
5
|
-
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
-
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
-
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
-
import type { Attachment } from './attachments';
|
9
|
-
declare type PromotionRel = ResourceRel & {
|
10
|
-
type: typeof Promotions.TYPE;
|
11
|
-
};
|
12
|
-
interface Promotion extends Resource {
|
13
|
-
name?: string;
|
14
|
-
currency_code?: string;
|
15
|
-
starts_at?: string;
|
16
|
-
expires_at?: string;
|
17
|
-
total_usage_limit?: number;
|
18
|
-
total_usage_count?: number;
|
19
|
-
active?: boolean;
|
20
|
-
market?: Market;
|
21
|
-
promotion_rules?: PromotionRule[];
|
22
|
-
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
23
|
-
sku_list_promotion_rule?: SkuListPromotionRule;
|
24
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
25
|
-
attachments?: Attachment[];
|
26
|
-
}
|
27
|
-
declare class Promotions extends ApiResource {
|
28
|
-
static readonly TYPE: 'promotions';
|
29
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Promotion>>;
|
30
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Promotion>;
|
31
|
-
market(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
32
|
-
order_amount_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
33
|
-
sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
34
|
-
coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
35
|
-
attachments(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
36
|
-
isPromotion(resource: any): resource is Promotion;
|
37
|
-
relationship(id: string | ResourceId | null): PromotionRel;
|
38
|
-
type(): string;
|
39
|
-
}
|
40
|
-
export default Promotions;
|
41
|
-
export { Promotion };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';declare type PromotionRel=ResourceRel&{type:typeof Promotions.TYPE;};interface Promotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];}declare class Promotions extends ApiResource{static readonly TYPE:'promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Promotion>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Promotion>;market(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPromotion(resource:any):resource is Promotion;relationship(id:string|ResourceId|null):PromotionRel;type():string;}export default Promotions;export{Promotion};
|
@@ -1,34 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { Capture } from './captures';
|
5
|
-
declare type RefundRel = ResourceRel & {
|
6
|
-
type: typeof Refunds.TYPE;
|
7
|
-
};
|
8
|
-
interface Refund extends Resource {
|
9
|
-
number?: string;
|
10
|
-
currency_code?: string;
|
11
|
-
amount_cents?: number;
|
12
|
-
amount_float?: number;
|
13
|
-
formatted_amount?: string;
|
14
|
-
succeeded?: boolean;
|
15
|
-
message?: string;
|
16
|
-
error_code?: string;
|
17
|
-
error_detail?: string;
|
18
|
-
token?: string;
|
19
|
-
gateway_transaction_id?: string;
|
20
|
-
order?: Order;
|
21
|
-
reference_capture?: Capture;
|
22
|
-
}
|
23
|
-
declare class Refunds extends ApiResource {
|
24
|
-
static readonly TYPE: 'refunds';
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
|
26
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Refund>;
|
27
|
-
order(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
28
|
-
reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
29
|
-
isRefund(resource: any): resource is Refund;
|
30
|
-
relationship(id: string | ResourceId | null): RefundRel;
|
31
|
-
type(): string;
|
32
|
-
}
|
33
|
-
export default Refunds;
|
34
|
-
export { Refund };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';declare type RefundRel=ResourceRel&{type:typeof Refunds.TYPE;};interface Refund extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;reference_capture?:Capture;}declare class Refunds extends ApiResource{static readonly TYPE:'refunds';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Refund>;order(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_capture(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;isRefund(resource:any):resource is Refund;relationship(id:string|ResourceId|null):RefundRel;type():string;}export default Refunds;export{Refund};
|
@@ -1,49 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Return } from './returns';
|
4
|
-
import type { LineItem } from './line_items';
|
5
|
-
declare type ReturnLineItemRel = ResourceRel & {
|
6
|
-
type: typeof ReturnLineItems.TYPE;
|
7
|
-
};
|
8
|
-
declare type ReturnRel = ResourceRel & {
|
9
|
-
type: 'returns';
|
10
|
-
};
|
11
|
-
declare type LineItemRel = ResourceRel & {
|
12
|
-
type: 'line_items';
|
13
|
-
};
|
14
|
-
interface ReturnLineItem extends Resource {
|
15
|
-
sku_code?: string;
|
16
|
-
bundle_code?: string;
|
17
|
-
name?: string;
|
18
|
-
quantity?: number;
|
19
|
-
return_reason?: object;
|
20
|
-
restocked_at?: string;
|
21
|
-
return?: Return;
|
22
|
-
line_item?: LineItem;
|
23
|
-
}
|
24
|
-
interface ReturnLineItemCreate extends ResourceCreate {
|
25
|
-
quantity: number;
|
26
|
-
return_reason?: object;
|
27
|
-
return: ReturnRel;
|
28
|
-
line_item: LineItemRel;
|
29
|
-
}
|
30
|
-
interface ReturnLineItemUpdate extends ResourceUpdate {
|
31
|
-
quantity?: number;
|
32
|
-
_restock?: boolean;
|
33
|
-
return_reason?: object;
|
34
|
-
}
|
35
|
-
declare class ReturnLineItems extends ApiResource {
|
36
|
-
static readonly TYPE: 'return_line_items';
|
37
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
38
|
-
create(resource: ReturnLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
|
39
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
|
40
|
-
update(resource: ReturnLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
|
41
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
-
return(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
43
|
-
line_item(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
44
|
-
isReturnLineItem(resource: any): resource is ReturnLineItem;
|
45
|
-
relationship(id: string | ResourceId | null): ReturnLineItemRel;
|
46
|
-
type(): string;
|
47
|
-
}
|
48
|
-
export default ReturnLineItems;
|
49
|
-
export { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Return}from'./returns';import type{LineItem}from'./line_items';declare type ReturnLineItemRel=ResourceRel&{type:typeof ReturnLineItems.TYPE;};declare type ReturnRel=ResourceRel&{type:'returns';};declare type LineItemRel=ResourceRel&{type:'line_items';};interface ReturnLineItem extends Resource{sku_code?:string;bundle_code?:string;name?:string;quantity?:number;return_reason?:object;restocked_at?:string;return?:Return;line_item?:LineItem;}interface ReturnLineItemCreate extends ResourceCreate{quantity:number;return_reason?:object;return:ReturnRel;line_item:LineItemRel;}interface ReturnLineItemUpdate extends ResourceUpdate{quantity?:number;_restock?:boolean;return_reason?:object;}declare class ReturnLineItems extends ApiResource{static readonly TYPE:'return_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;create(resource:ReturnLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;update(resource:ReturnLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;return(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isReturnLineItem(resource:any):resource is ReturnLineItem;relationship(id:string|ResourceId|null):ReturnLineItemRel;type():string;}export default ReturnLineItems;export{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate};
|
@@ -1,72 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { Customer } from './customers';
|
5
|
-
import type { StockLocation } from './stock_locations';
|
6
|
-
import type { Address } from './addresses';
|
7
|
-
import type { ReturnLineItem } from './return_line_items';
|
8
|
-
import type { Attachment } from './attachments';
|
9
|
-
declare type ReturnRel = ResourceRel & {
|
10
|
-
type: typeof Returns.TYPE;
|
11
|
-
};
|
12
|
-
declare type OrderRel = ResourceRel & {
|
13
|
-
type: 'orders';
|
14
|
-
};
|
15
|
-
declare type StockLocationRel = ResourceRel & {
|
16
|
-
type: 'stock_locations';
|
17
|
-
};
|
18
|
-
interface Return extends Resource {
|
19
|
-
number?: string;
|
20
|
-
status?: string;
|
21
|
-
customer_email?: string;
|
22
|
-
skus_count?: number;
|
23
|
-
approved_at?: string;
|
24
|
-
cancelled_at?: string;
|
25
|
-
shipped_at?: string;
|
26
|
-
rejected_at?: string;
|
27
|
-
received_at?: string;
|
28
|
-
archived_at?: string;
|
29
|
-
order?: Order;
|
30
|
-
customer?: Customer;
|
31
|
-
stock_location?: StockLocation;
|
32
|
-
origin_address?: Address;
|
33
|
-
destination_address?: Address;
|
34
|
-
return_line_items?: ReturnLineItem[];
|
35
|
-
attachments?: Attachment[];
|
36
|
-
}
|
37
|
-
interface ReturnCreate extends ResourceCreate {
|
38
|
-
order: OrderRel;
|
39
|
-
stock_location?: StockLocationRel;
|
40
|
-
}
|
41
|
-
interface ReturnUpdate extends ResourceUpdate {
|
42
|
-
_request?: boolean;
|
43
|
-
_approve?: boolean;
|
44
|
-
_cancel?: boolean;
|
45
|
-
_ship?: boolean;
|
46
|
-
_reject?: boolean;
|
47
|
-
_receive?: boolean;
|
48
|
-
_restock?: boolean;
|
49
|
-
_archive?: boolean;
|
50
|
-
_unarchive?: boolean;
|
51
|
-
stock_location?: StockLocationRel;
|
52
|
-
}
|
53
|
-
declare class Returns extends ApiResource {
|
54
|
-
static readonly TYPE: 'returns';
|
55
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Return>>;
|
56
|
-
create(resource: ReturnCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
57
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
58
|
-
update(resource: ReturnUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
59
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
60
|
-
order(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
61
|
-
customer(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
62
|
-
stock_location(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
63
|
-
origin_address(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
64
|
-
destination_address(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
65
|
-
return_line_items(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
66
|
-
attachments(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
67
|
-
isReturn(resource: any): resource is Return;
|
68
|
-
relationship(id: string | ResourceId | null): ReturnRel;
|
69
|
-
type(): string;
|
70
|
-
}
|
71
|
-
export default Returns;
|
72
|
-
export { Return, ReturnCreate, ReturnUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Customer}from'./customers';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ReturnLineItem}from'./return_line_items';import type{Attachment}from'./attachments';declare type ReturnRel=ResourceRel&{type:typeof Returns.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Return extends Resource{number?:string;status?:string;customer_email?:string;skus_count?:number;approved_at?:string;cancelled_at?:string;shipped_at?:string;rejected_at?:string;received_at?:string;archived_at?:string;order?:Order;customer?:Customer;stock_location?:StockLocation;origin_address?:Address;destination_address?:Address;return_line_items?:ReturnLineItem[];attachments?:Attachment[];}interface ReturnCreate extends ResourceCreate{order:OrderRel;stock_location?:StockLocationRel;}interface ReturnUpdate extends ResourceUpdate{_request?:boolean;_approve?:boolean;_cancel?:boolean;_ship?:boolean;_reject?:boolean;_receive?:boolean;_restock?:boolean;_archive?:boolean;_unarchive?:boolean;stock_location?:StockLocationRel;}declare class Returns extends ApiResource{static readonly TYPE:'returns';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;create(resource:ReturnCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;update(resource:ReturnUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;return_line_items(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isReturn(resource:any):resource is Return;relationship(id:string|ResourceId|null):ReturnRel;type():string;}export default Returns;export{Return,ReturnCreate,ReturnUpdate};
|