@commercelayer/sdk 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -1
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/config.d.ts +1 -1
- package/lib/cjs/config.js +1 -1
- package/lib/cjs/error.d.ts +26 -1
- package/lib/cjs/error.js +1 -1
- package/lib/cjs/interceptor.d.ts +19 -1
- package/lib/cjs/model.d.ts +1 -1
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- package/lib/cjs/resources/bundles.d.ts +6 -0
- package/lib/cjs/resources/klarna_payments.d.ts +4 -0
- package/lib/cjs/resources/orders.d.ts +7 -0
- package/lib/cjs/util.d.ts +6 -1
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/config.d.ts +1 -1
- package/lib/esm/config.js +1 -1
- package/lib/esm/debug.js +1 -1
- package/lib/esm/error.d.ts +26 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/interceptor.d.ts +19 -1
- package/lib/esm/model.d.ts +1 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- package/lib/esm/resources/bundles.d.ts +6 -0
- package/lib/esm/resources/klarna_payments.d.ts +4 -0
- package/lib/esm/resources/orders.d.ts +7 -0
- package/lib/esm/util.d.ts +6 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/api.d.ts +0 -1
- package/lib/api.js +0 -1
- package/lib/client.d.ts +0 -2
- package/lib/client.js +0 -1
- package/lib/commercelayer.d.ts +0 -1
- package/lib/commercelayer.js +0 -1
- package/lib/common.d.ts +0 -1
- package/lib/common.js +0 -1
- package/lib/config.d.ts +0 -1
- package/lib/config.js +0 -1
- package/lib/debug.d.ts +0 -1
- package/lib/debug.js +0 -1
- package/lib/error.d.ts +0 -1
- package/lib/error.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/interceptor.d.ts +0 -1
- package/lib/interceptor.js +0 -1
- package/lib/jsonapi.d.ts +0 -1
- package/lib/jsonapi.js +0 -1
- package/lib/model.d.ts +0 -1
- package/lib/model.js +0 -1
- package/lib/query.d.ts +0 -1
- package/lib/query.js +0 -1
- package/lib/resource.d.ts +0 -1
- package/lib/resource.js +0 -1
- package/lib/resources/addresses.d.ts +0 -1
- package/lib/resources/addresses.js +0 -1
- package/lib/resources/adjustments.d.ts +0 -1
- package/lib/resources/adjustments.js +0 -1
- package/lib/resources/adyen_gateways.d.ts +0 -1
- package/lib/resources/adyen_gateways.js +0 -1
- package/lib/resources/adyen_payments.d.ts +0 -1
- package/lib/resources/adyen_payments.js +0 -1
- package/lib/resources/application.d.ts +0 -1
- package/lib/resources/application.js +0 -1
- package/lib/resources/attachments.d.ts +0 -1
- package/lib/resources/attachments.js +0 -1
- package/lib/resources/authorizations.d.ts +0 -1
- package/lib/resources/authorizations.js +0 -1
- package/lib/resources/avalara_accounts.d.ts +0 -1
- package/lib/resources/avalara_accounts.js +0 -1
- package/lib/resources/billing_info_validation_rules.d.ts +0 -1
- package/lib/resources/billing_info_validation_rules.js +0 -1
- package/lib/resources/bing_geocoders.d.ts +0 -1
- package/lib/resources/bing_geocoders.js +0 -1
- package/lib/resources/braintree_gateways.d.ts +0 -1
- package/lib/resources/braintree_gateways.js +0 -1
- package/lib/resources/braintree_payments.d.ts +0 -1
- package/lib/resources/braintree_payments.js +0 -1
- package/lib/resources/bundles.d.ts +0 -1
- package/lib/resources/bundles.js +0 -1
- package/lib/resources/captures.d.ts +0 -1
- package/lib/resources/captures.js +0 -1
- package/lib/resources/carrier_accounts.d.ts +0 -1
- package/lib/resources/carrier_accounts.js +0 -1
- package/lib/resources/checkout_com_gateways.d.ts +0 -1
- package/lib/resources/checkout_com_gateways.js +0 -1
- package/lib/resources/checkout_com_payments.d.ts +0 -1
- package/lib/resources/checkout_com_payments.js +0 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +0 -1
- package/lib/resources/coupon_codes_promotion_rules.js +0 -1
- package/lib/resources/coupon_recipients.d.ts +0 -1
- package/lib/resources/coupon_recipients.js +0 -1
- package/lib/resources/coupons.d.ts +0 -1
- package/lib/resources/coupons.js +0 -1
- package/lib/resources/customer_addresses.d.ts +0 -1
- package/lib/resources/customer_addresses.js +0 -1
- package/lib/resources/customer_groups.d.ts +0 -1
- package/lib/resources/customer_groups.js +0 -1
- package/lib/resources/customer_password_resets.d.ts +0 -1
- package/lib/resources/customer_password_resets.js +0 -1
- package/lib/resources/customer_payment_sources.d.ts +0 -1
- package/lib/resources/customer_payment_sources.js +0 -1
- package/lib/resources/customer_subscriptions.d.ts +0 -1
- package/lib/resources/customer_subscriptions.js +0 -1
- package/lib/resources/customers.d.ts +0 -1
- package/lib/resources/customers.js +0 -1
- package/lib/resources/delivery_lead_times.d.ts +0 -1
- package/lib/resources/delivery_lead_times.js +0 -1
- package/lib/resources/event_callbacks.d.ts +0 -1
- package/lib/resources/event_callbacks.js +0 -1
- package/lib/resources/external_gateways.d.ts +0 -1
- package/lib/resources/external_gateways.js +0 -1
- package/lib/resources/external_payments.d.ts +0 -1
- package/lib/resources/external_payments.js +0 -1
- package/lib/resources/external_promotions.d.ts +0 -1
- package/lib/resources/external_promotions.js +0 -1
- package/lib/resources/external_tax_calculators.d.ts +0 -1
- package/lib/resources/external_tax_calculators.js +0 -1
- package/lib/resources/fixed_amount_promotions.d.ts +0 -1
- package/lib/resources/fixed_amount_promotions.js +0 -1
- package/lib/resources/fixed_price_promotions.d.ts +0 -1
- package/lib/resources/fixed_price_promotions.js +0 -1
- package/lib/resources/free_gift_promotions.d.ts +0 -1
- package/lib/resources/free_gift_promotions.js +0 -1
- package/lib/resources/free_shipping_promotions.d.ts +0 -1
- package/lib/resources/free_shipping_promotions.js +0 -1
- package/lib/resources/geocoders.d.ts +0 -1
- package/lib/resources/geocoders.js +0 -1
- package/lib/resources/gift_card_recipients.d.ts +0 -1
- package/lib/resources/gift_card_recipients.js +0 -1
- package/lib/resources/gift_cards.d.ts +0 -1
- package/lib/resources/gift_cards.js +0 -1
- package/lib/resources/google_geocoders.d.ts +0 -1
- package/lib/resources/google_geocoders.js +0 -1
- package/lib/resources/imports.d.ts +0 -1
- package/lib/resources/imports.js +0 -1
- package/lib/resources/in_stock_subscriptions.d.ts +0 -1
- package/lib/resources/in_stock_subscriptions.js +0 -1
- package/lib/resources/inventory_models.d.ts +0 -1
- package/lib/resources/inventory_models.js +0 -1
- package/lib/resources/inventory_return_locations.d.ts +0 -1
- package/lib/resources/inventory_return_locations.js +0 -1
- package/lib/resources/inventory_stock_locations.d.ts +0 -1
- package/lib/resources/inventory_stock_locations.js +0 -1
- package/lib/resources/klarna_gateways.d.ts +0 -1
- package/lib/resources/klarna_gateways.js +0 -1
- package/lib/resources/klarna_payments.d.ts +0 -1
- package/lib/resources/klarna_payments.js +0 -1
- package/lib/resources/line_item_options.d.ts +0 -1
- package/lib/resources/line_item_options.js +0 -1
- package/lib/resources/line_items.d.ts +0 -1
- package/lib/resources/line_items.js +0 -1
- package/lib/resources/manual_gateways.d.ts +0 -1
- package/lib/resources/manual_gateways.js +0 -1
- package/lib/resources/manual_tax_calculators.d.ts +0 -1
- package/lib/resources/manual_tax_calculators.js +0 -1
- package/lib/resources/markets.d.ts +0 -1
- package/lib/resources/markets.js +0 -1
- package/lib/resources/merchants.d.ts +0 -1
- package/lib/resources/merchants.js +0 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +0 -1
- package/lib/resources/order_amount_promotion_rules.js +0 -1
- package/lib/resources/order_copies.d.ts +0 -1
- package/lib/resources/order_copies.js +0 -1
- package/lib/resources/order_subscriptions.d.ts +0 -1
- package/lib/resources/order_subscriptions.js +0 -1
- package/lib/resources/order_validation_rules.d.ts +0 -1
- package/lib/resources/order_validation_rules.js +0 -1
- package/lib/resources/orders.d.ts +0 -1
- package/lib/resources/orders.js +0 -1
- package/lib/resources/organization.d.ts +0 -1
- package/lib/resources/organization.js +0 -1
- package/lib/resources/packages.d.ts +0 -1
- package/lib/resources/packages.js +0 -1
- package/lib/resources/parcel_line_items.d.ts +0 -1
- package/lib/resources/parcel_line_items.js +0 -1
- package/lib/resources/parcels.d.ts +0 -1
- package/lib/resources/parcels.js +0 -1
- package/lib/resources/payment_gateways.d.ts +0 -1
- package/lib/resources/payment_gateways.js +0 -1
- package/lib/resources/payment_methods.d.ts +0 -1
- package/lib/resources/payment_methods.js +0 -1
- package/lib/resources/paypal_gateways.d.ts +0 -1
- package/lib/resources/paypal_gateways.js +0 -1
- package/lib/resources/paypal_payments.d.ts +0 -1
- package/lib/resources/paypal_payments.js +0 -1
- package/lib/resources/percentage_discount_promotions.d.ts +0 -1
- package/lib/resources/percentage_discount_promotions.js +0 -1
- package/lib/resources/price_lists.d.ts +0 -1
- package/lib/resources/price_lists.js +0 -1
- package/lib/resources/prices.d.ts +0 -1
- package/lib/resources/prices.js +0 -1
- package/lib/resources/promotion_rules.d.ts +0 -1
- package/lib/resources/promotion_rules.js +0 -1
- package/lib/resources/promotions.d.ts +0 -1
- package/lib/resources/promotions.js +0 -1
- package/lib/resources/refunds.d.ts +0 -1
- package/lib/resources/refunds.js +0 -1
- package/lib/resources/return_line_items.d.ts +0 -1
- package/lib/resources/return_line_items.js +0 -1
- package/lib/resources/returns.d.ts +0 -1
- package/lib/resources/returns.js +0 -1
- package/lib/resources/shipments.d.ts +0 -1
- package/lib/resources/shipments.js +0 -1
- package/lib/resources/shipping_categories.d.ts +0 -1
- package/lib/resources/shipping_categories.js +0 -1
- package/lib/resources/shipping_methods.d.ts +0 -1
- package/lib/resources/shipping_methods.js +0 -1
- package/lib/resources/shipping_zones.d.ts +0 -1
- package/lib/resources/shipping_zones.js +0 -1
- package/lib/resources/sku_list_items.d.ts +0 -1
- package/lib/resources/sku_list_items.js +0 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +0 -1
- package/lib/resources/sku_list_promotion_rules.js +0 -1
- package/lib/resources/sku_lists.d.ts +0 -1
- package/lib/resources/sku_lists.js +0 -1
- package/lib/resources/sku_options.d.ts +0 -1
- package/lib/resources/sku_options.js +0 -1
- package/lib/resources/skus.d.ts +0 -1
- package/lib/resources/skus.js +0 -1
- package/lib/resources/stock_items.d.ts +0 -1
- package/lib/resources/stock_items.js +0 -1
- package/lib/resources/stock_line_items.d.ts +0 -1
- package/lib/resources/stock_line_items.js +0 -1
- package/lib/resources/stock_locations.d.ts +0 -1
- package/lib/resources/stock_locations.js +0 -1
- package/lib/resources/stock_transfers.d.ts +0 -1
- package/lib/resources/stock_transfers.js +0 -1
- package/lib/resources/stripe_gateways.d.ts +0 -1
- package/lib/resources/stripe_gateways.js +0 -1
- package/lib/resources/stripe_payments.d.ts +0 -1
- package/lib/resources/stripe_payments.js +0 -1
- package/lib/resources/tax_calculators.d.ts +0 -1
- package/lib/resources/tax_calculators.js +0 -1
- package/lib/resources/tax_categories.d.ts +0 -1
- package/lib/resources/tax_categories.js +0 -1
- package/lib/resources/tax_rules.d.ts +0 -1
- package/lib/resources/tax_rules.js +0 -1
- package/lib/resources/taxjar_accounts.d.ts +0 -1
- package/lib/resources/taxjar_accounts.js +0 -1
- package/lib/resources/transactions.d.ts +0 -1
- package/lib/resources/transactions.js +0 -1
- package/lib/resources/voids.d.ts +0 -1
- package/lib/resources/voids.js +0 -1
- package/lib/resources/webhooks.d.ts +0 -1
- package/lib/resources/webhooks.js +0 -1
- package/lib/resources/wire_transfers.d.ts +0 -1
- package/lib/resources/wire_transfers.js +0 -1
- package/lib/static.d.ts +0 -1
- package/lib/static.js +0 -1
- package/lib/util.d.ts +0 -2
- package/lib/util.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as n}from"../resource";class r extends n{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`inventory_return_locations/${e}/stock_location`,t,s)}async inventory_model(e,t,s){return this.resources.fetch({type:"inventory_models"},`inventory_return_locations/${e}/inventory_model`,t,s)}isInventoryReturnLocation(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="inventory_return_locations";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{StockLocation}from'./stock_locations';import{InventoryModel}from'./inventory_models';declare type InventoryStockLocationRel=ResourceRel&{type:typeof InventoryStockLocations.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};interface InventoryStockLocation extends Resource{priority?:number;on_hold?:boolean;stock_location?:StockLocation;inventory_model?:InventoryModel;}interface InventoryStockLocationCreate extends ResourceCreate{priority:number;on_hold?:boolean;stock_location:StockLocationRel;inventory_model:InventoryModelRel;}interface InventoryStockLocationUpdate extends ResourceUpdate{priority?:number;on_hold?:boolean;stock_location?:StockLocationRel;inventory_model?:InventoryModelRel;}declare class InventoryStockLocations extends ApiResource{static readonly TYPE:'inventory_stock_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;create(resource:InventoryStockLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;update(resource:InventoryStockLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(inventoryStockLocationId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;inventory_model(inventoryStockLocationId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;isInventoryStockLocation(resource:any):resource is InventoryStockLocation;relationship(id:string|ResourceId|null):InventoryStockLocationRel;type():string;}export default InventoryStockLocations;export{InventoryStockLocation,InventoryStockLocationCreate,InventoryStockLocationUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as r}from"../resource";class s extends r{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,o){return this.resources.create({...e,type:s.TYPE},t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:s.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update({...e,type:s.TYPE},t,o)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async stock_location(e,t,o){return this.resources.fetch({type:"stock_locations"},`inventory_stock_locations/${e}/stock_location`,t,o)}async inventory_model(e,t,o){return this.resources.fetch({type:"inventory_models"},`inventory_stock_locations/${e}/inventory_model`,t,o)}isInventoryStockLocation(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="inventory_stock_locations";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PaymentMethod}from'./payment_methods';import{KlarnaPayment}from'./klarna_payments';declare type KlarnaGatewayRel=ResourceRel&{type:typeof KlarnaGateways.TYPE;};declare type KlarnaPaymentRel=ResourceRel&{type:'klarna_payments';};interface KlarnaGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];klarna_payments?:KlarnaPayment[];}interface KlarnaGatewayCreate extends ResourceCreate{name:string;country_code:string;api_key:string;api_secret:string;klarna_payments?:KlarnaPaymentRel[];}interface KlarnaGatewayUpdate extends ResourceUpdate{name?:string;country_code?:string;api_key?:string;api_secret?:string;klarna_payments?:KlarnaPaymentRel[];}declare class KlarnaGateways extends ApiResource{static readonly TYPE:'klarna_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaGateway>>;create(resource:KlarnaGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;update(resource:KlarnaGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(klarnaGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;klarna_payments(klarnaGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaPayment>>;isKlarnaGateway(resource:any):resource is KlarnaGateway;relationship(id:string|ResourceId|null):KlarnaGatewayRel;type():string;}export default KlarnaGateways;export{KlarnaGateway,KlarnaGatewayCreate,KlarnaGatewayUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as r}from"../resource";class s extends r{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,a){return this.resources.create({...e,type:s.TYPE},t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:s.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update({...e,type:s.TYPE},t,a)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,a){return this.resources.fetch({type:"payment_methods"},`klarna_gateways/${e}/payment_methods`,t,a)}async klarna_payments(e,t,a){return this.resources.fetch({type:"klarna_payments"},`klarna_gateways/${e}/klarna_payments`,t,a)}isKlarnaGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||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;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{PaymentGateway}from'./payment_gateways';declare type KlarnaPaymentRel=ResourceRel&{type:typeof KlarnaPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface KlarnaPayment extends Resource{session_id?:string;client_token?:string;payment_methods?:object[];auth_token?:string;order?:Order;payment_gateway?:PaymentGateway;}interface KlarnaPaymentCreate extends ResourceCreate{order:OrderRel;}interface KlarnaPaymentUpdate extends ResourceUpdate{auth_token?:string;_update?:boolean;order?:OrderRel;}declare class KlarnaPayments extends ApiResource{static readonly TYPE:'klarna_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaPayment>>;create(resource:KlarnaPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;update(resource:KlarnaPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(klarnaPaymentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(klarnaPaymentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isKlarnaPayment(resource:any):resource is KlarnaPayment;relationship(id:string|ResourceId|null):KlarnaPaymentRel;type():string;}export default KlarnaPayments;export{KlarnaPayment,KlarnaPaymentCreate,KlarnaPaymentUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`klarna_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`klarna_payments/${e}/payment_gateway`,t,s)}isKlarnaPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="klarna_payments";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{LineItem}from'./line_items';import{SkuOption}from'./sku_options';declare type LineItemOptionRel=ResourceRel&{type:typeof LineItemOptions.TYPE;};declare type LineItemRel=ResourceRel&{type:'line_items';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};interface LineItemOption extends Resource{name?:string;quantity?:number;currency_code?:string;unit_amount_cents?:number;unit_amount_float?:number;formatted_unit_amount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;delay_hours?:number;delay_days?:number;options?:object;line_item?:LineItem;sku_option?:SkuOption;}interface LineItemOptionCreate extends ResourceCreate{name?:string;quantity:number;options:object;line_item:LineItemRel;sku_option:SkuOptionRel;}interface LineItemOptionUpdate extends ResourceUpdate{name?:string;quantity?:number;options?:object;sku_option?:SkuOptionRel;}declare class LineItemOptions extends ApiResource{static readonly TYPE:'line_item_options';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;create(resource:LineItemOptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;update(resource:LineItemOptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;delete(id:string,options?:ResourcesConfig):Promise<void>;line_item(lineItemOptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;sku_option(lineItemOptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;isLineItemOption(resource:any):resource is LineItemOption;relationship(id:string|ResourceId|null):LineItemOptionRel;type():string;}export default LineItemOptions;export{LineItemOption,LineItemOptionCreate,LineItemOptionUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as r}from"../resource";class s extends r{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,i){return this.resources.create({...e,type:s.TYPE},t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:s.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update({...e,type:s.TYPE},t,i)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async line_item(e,t,i){return this.resources.fetch({type:"line_items"},`line_item_options/${e}/line_item`,t,i)}async sku_option(e,t,i){return this.resources.fetch({type:"sku_options"},`line_item_options/${e}/sku_option`,t,i)}isLineItemOption(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="line_item_options";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{Adjustment}from'./adjustments';import{Bundle}from'./bundles';import{ExternalPromotion}from'./external_promotions';import{FixedAmountPromotion}from'./fixed_amount_promotions';import{FreeShippingPromotion}from'./free_shipping_promotions';import{GiftCard}from'./gift_cards';import{PaymentMethod}from'./payment_methods';import{PercentageDiscountPromotion}from'./percentage_discount_promotions';import{Shipment}from'./shipments';import{Sku}from'./skus';import{LineItemOption}from'./line_item_options';import{StockLineItem}from'./stock_line_items';import{StockTransfer}from'./stock_transfers';declare type LineItemRel=ResourceRel&{type:typeof LineItems.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};declare type AdjustmentRel=ResourceRel&{type:'adjustments';};declare type BundleRel=ResourceRel&{type:'bundles';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type SkuRel=ResourceRel&{type:'skus';};interface LineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;currency_code?:string;unit_amount_cents?:number;unit_amount_float?:number;formatted_unit_amount?:string;options_amount_cents?:number;options_amount_float?:number;formatted_options_amount?:string;discount_cents?:number;discount_float?:number;formatted_discount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;tax_amount_cents?:number;tax_amount_float?:number;formatted_tax_amount?:string;name?:string;image_url?:string;discount_breakdown?:object;tax_rate?:number;tax_breakdown?:object;item_type?:string;order?:Order;item?:Adjustment|Bundle|ExternalPromotion|FixedAmountPromotion|FreeShippingPromotion|GiftCard|PaymentMethod|PercentageDiscountPromotion|Shipment|Sku;line_item_options?:LineItemOption[];shipment_line_items?:object[];stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];}interface LineItemCreate extends ResourceCreate{sku_code?:string;bundle_code?:string;quantity:number;_external_price?:boolean;_update_quantity?:boolean;unit_amount_cents?:number;name?:string;image_url?:string;item_type?:string;order:OrderRel;item?:AdjustmentRel|BundleRel|ExternalPromotionRel|FixedAmountPromotionRel|FreeShippingPromotionRel|GiftCardRel|PaymentMethodRel|PercentageDiscountPromotionRel|ShipmentRel|SkuRel;}interface LineItemUpdate extends ResourceUpdate{sku_code?:string;bundle_code?:string;quantity?:number;name?:string;image_url?:string;}declare class LineItems extends ApiResource{static readonly TYPE:'line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;create(resource:LineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;update(resource:LineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(lineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;line_item_options(lineItemId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;stock_line_items(lineItemId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(lineItemId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;isLineItem(resource:any):resource is LineItem;relationship(id:string|ResourceId|null):LineItemRel;type():string;}export default LineItems;export{LineItem,LineItemCreate,LineItemUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`line_items/${e}/order`,t,r)}async line_item_options(e,t,r){return this.resources.fetch({type:"line_item_options"},`line_items/${e}/line_item_options`,t,r)}async stock_line_items(e,t,r){return this.resources.fetch({type:"stock_line_items"},`line_items/${e}/stock_line_items`,t,r)}async stock_transfers(e,t,r){return this.resources.fetch({type:"stock_transfers"},`line_items/${e}/stock_transfers`,t,r)}isLineItem(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||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 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PaymentMethod}from'./payment_methods';declare type ManualGatewayRel=ResourceRel&{type:typeof ManualGateways.TYPE;};interface ManualGateway extends Resource{name?:string;require_capture?:boolean;payment_methods?:PaymentMethod[];}interface ManualGatewayCreate extends ResourceCreate{name:string;require_capture?:boolean;}interface ManualGatewayUpdate extends ResourceUpdate{name?:string;require_capture?:boolean;}declare class ManualGateways extends ApiResource{static readonly TYPE:'manual_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ManualGateway>>;create(resource:ManualGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;update(resource:ManualGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(manualGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;isManualGateway(resource:any):resource is ManualGateway;relationship(id:string|ResourceId|null):ManualGatewayRel;type():string;}export default ManualGateways;export{ManualGateway,ManualGatewayCreate,ManualGatewayUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...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({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async payment_methods(e,r,s){return this.resources.fetch({type:"payment_methods"},`manual_gateways/${e}/payment_methods`,r,s)}isManualGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="manual_gateways";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{TaxCategory}from'./tax_categories';import{Market}from'./markets';import{Attachment}from'./attachments';import{TaxRule}from'./tax_rules';declare type ManualTaxCalculatorRel=ResourceRel&{type:typeof ManualTaxCalculators.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};declare type TaxRuleRel=ResourceRel&{type:'tax_rules';};interface ManualTaxCalculator extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];tax_rules?:TaxRule[];}interface ManualTaxCalculatorCreate extends ResourceCreate{name:string;tax_categories?:TaxCategoryRel[];tax_rules?:TaxRuleRel[];}interface ManualTaxCalculatorUpdate extends ResourceUpdate{name?:string;tax_categories?:TaxCategoryRel[];tax_rules?:TaxRuleRel[];}declare class ManualTaxCalculators extends ApiResource{static readonly TYPE:'manual_tax_calculators';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ManualTaxCalculator>>;create(resource:ManualTaxCalculatorCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;update(resource:ManualTaxCalculatorUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(manualTaxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(manualTaxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(manualTaxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;tax_rules(manualTaxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxRule>>;isManualTaxCalculator(resource:any):resource is ManualTaxCalculator;relationship(id:string|ResourceId|null):ManualTaxCalculatorRel;type():string;}export default ManualTaxCalculators;export{ManualTaxCalculator,ManualTaxCalculatorCreate,ManualTaxCalculatorUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as s}from"../resource";class r extends s{async list(t,e){return this.resources.list({type:r.TYPE},t,e)}async create(t,e,a){return this.resources.create({...t,type:r.TYPE},e,a)}async retrieve(t,e,a){return this.resources.retrieve({type:r.TYPE,id:t},e,a)}async update(t,e,a){return this.resources.update({...t,type:r.TYPE},e,a)}async delete(t,e){await this.resources.delete({type:r.TYPE,id:t},e)}async tax_categories(t,e,a){return this.resources.fetch({type:"tax_categories"},`manual_tax_calculators/${t}/tax_categories`,e,a)}async markets(t,e,a){return this.resources.fetch({type:"markets"},`manual_tax_calculators/${t}/markets`,e,a)}async attachments(t,e,a){return this.resources.fetch({type:"attachments"},`manual_tax_calculators/${t}/attachments`,e,a)}async tax_rules(t,e,a){return this.resources.fetch({type:"tax_rules"},`manual_tax_calculators/${t}/tax_rules`,e,a)}isManualTaxCalculator(t){return t.type&&t.type===r.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:r.TYPE}:{id:t.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="manual_tax_calculators";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Merchant}from'./merchants';import{PriceList}from'./price_lists';import{InventoryModel}from'./inventory_models';import{TaxCalculator}from'./tax_calculators';import{CustomerGroup}from'./customer_groups';import{Attachment}from'./attachments';declare type MarketRel=ResourceRel&{type:typeof Markets.TYPE;};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};interface Market extends Resource{number?:number;name?:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;private?:boolean;merchant?:Merchant;price_list?:PriceList;inventory_model?:InventoryModel;tax_calculator?:TaxCalculator;customer_group?:CustomerGroup;attachments?:Attachment[];}interface MarketCreate extends ResourceCreate{name:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;merchant:MerchantRel;price_list:PriceListRel;inventory_model:InventoryModelRel;tax_calculator?:TaxCalculatorRel;customer_group?:CustomerGroupRel;}interface MarketUpdate extends ResourceUpdate{name?:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;merchant?:MerchantRel;price_list?:PriceListRel;inventory_model?:InventoryModelRel;tax_calculator?:TaxCalculatorRel;customer_group?:CustomerGroupRel;}declare class Markets extends ApiResource{static readonly TYPE:'markets';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;create(resource:MarketCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;update(resource:MarketUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;delete(id:string,options?:ResourcesConfig):Promise<void>;merchant(marketId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;price_list(marketId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;inventory_model(marketId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;tax_calculator(marketId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCalculator>;customer_group(marketId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;attachments(marketId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isMarket(resource:any):resource is Market;relationship(id:string|ResourceId|null):MarketRel;type():string;}export default Markets;export{Market,MarketCreate,MarketUpdate};
|
package/lib/resources/markets.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async merchant(e,t,r){return this.resources.fetch({type:"merchants"},`markets/${e}/merchant`,t,r)}async price_list(e,t,r){return this.resources.fetch({type:"price_lists"},`markets/${e}/price_list`,t,r)}async inventory_model(e,t,r){return this.resources.fetch({type:"inventory_models"},`markets/${e}/inventory_model`,t,r)}async tax_calculator(e,t,r){return this.resources.fetch({type:"tax_calculators"},`markets/${e}/tax_calculator`,t,r)}async customer_group(e,t,r){return this.resources.fetch({type:"customer_groups"},`markets/${e}/customer_group`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`markets/${e}/attachments`,t,r)}isMarket(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||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 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Address}from'./addresses';import{Attachment}from'./attachments';declare type MerchantRel=ResourceRel&{type:typeof Merchants.TYPE;};declare type AddressRel=ResourceRel&{type:'addresses';};interface Merchant extends Resource{name?:string;address?:Address;attachments?:Attachment[];}interface MerchantCreate extends ResourceCreate{name:string;address:AddressRel;}interface MerchantUpdate extends ResourceUpdate{name?:string;address?:AddressRel;}declare class Merchants extends ApiResource{static readonly TYPE:'merchants';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Merchant>>;create(resource:MerchantCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;update(resource:MerchantUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;delete(id:string,options?:ResourcesConfig):Promise<void>;address(merchantId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;attachments(merchantId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isMerchant(resource:any):resource is Merchant;relationship(id:string|ResourceId|null):MerchantRel;type():string;}export default Merchants;export{Merchant,MerchantCreate,MerchantUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async address(e,t,r){return this.resources.fetch({type:"addresses"},`merchants/${e}/address`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`merchants/${e}/attachments`,t,r)}isMerchant(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="merchants";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PercentageDiscountPromotion}from'./percentage_discount_promotions';import{FreeShippingPromotion}from'./free_shipping_promotions';import{FixedAmountPromotion}from'./fixed_amount_promotions';import{FreeGiftPromotion}from'./free_gift_promotions';import{FixedPricePromotion}from'./fixed_price_promotions';import{ExternalPromotion}from'./external_promotions';declare type OrderAmountPromotionRuleRel=ResourceRel&{type:typeof OrderAmountPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};interface OrderAmountPromotionRule extends Resource{order_amount_cents?:number;order_amount_float?:number;formatted_order_amount?:string;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;}interface OrderAmountPromotionRuleCreate extends ResourceCreate{order_amount_cents?:number;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;}interface OrderAmountPromotionRuleUpdate extends ResourceUpdate{order_amount_cents?:number;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;}declare class OrderAmountPromotionRules extends ApiResource{static readonly TYPE:'order_amount_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderAmountPromotionRule>>;create(resource:OrderAmountPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;update(resource:OrderAmountPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;isOrderAmountPromotionRule(resource:any):resource is OrderAmountPromotionRule;relationship(id:string|ResourceId|null):OrderAmountPromotionRuleRel;type():string;}export default OrderAmountPromotionRules;export{OrderAmountPromotionRule,OrderAmountPromotionRuleCreate,OrderAmountPromotionRuleUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...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 e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_amount_promotion_rules";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{OrderSubscription}from'./order_subscriptions';declare type OrderCopyRel=ResourceRel&{type:typeof OrderCopies.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface OrderCopy extends Resource{status?:string;started_at?:string;completed_at?:string;failed_at?:string;place_target_order?:boolean;cancel_source_order?:boolean;reuse_wallet?:boolean;errors_log?:object;errors_count?:number;source_order?:Order;target_order?:Order;order_subscription?:OrderSubscription;}interface OrderCopyCreate extends ResourceCreate{place_target_order?:boolean;cancel_source_order?:boolean;reuse_wallet?:boolean;source_order:OrderRel;}declare class OrderCopies extends ApiResource{static readonly TYPE:'order_copies';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;create(resource:OrderCopyCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderCopy>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderCopy>;delete(id:string,options?:ResourcesConfig):Promise<void>;source_order(orderCopyId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;target_order(orderCopyId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;order_subscription(orderCopyId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;isOrderCopy(resource:any):resource is OrderCopy;relationship(id:string|ResourceId|null):OrderCopyRel;type():string;}export default OrderCopies;export{OrderCopy,OrderCopyCreate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as o}from"../resource";class s extends o{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create({...e,type:s.TYPE},r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}async source_order(e,r,t){return this.resources.fetch({type:"orders"},`order_copies/${e}/source_order`,r,t)}async target_order(e,r,t){return this.resources.fetch({type:"orders"},`order_copies/${e}/target_order`,r,t)}async order_subscription(e,r,t){return this.resources.fetch({type:"order_subscriptions"},`order_copies/${e}/order_subscription`,r,t)}isOrderCopy(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="order_copies";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{Order}from'./orders';import{Customer}from'./customers';import{OrderCopy}from'./order_copies';declare type OrderSubscriptionRel=ResourceRel&{type:typeof OrderSubscriptions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type OrderRel=ResourceRel&{type:'orders';};interface OrderSubscription extends Resource{number?:string;status?:string;frequency?:string;activate_by_source_order?:boolean;customer_email?:string;starts_at?:string;expires_at?:string;next_run_at?:string;occurrencies?:number;errors_count?:number;succeeded_on_last_run?:boolean;options?:object;market?:Market;source_order?:Order;customer?:Customer;order_copies?:OrderCopy[];orders?:Order[];}interface OrderSubscriptionCreate extends ResourceCreate{frequency:string;activate_by_source_order?:boolean;starts_at?:string;expires_at?:string;options?:object;market?:MarketRel;source_order:OrderRel;}interface OrderSubscriptionUpdate extends ResourceUpdate{expires_at?:string;_activate?:boolean;_deactivate?:boolean;_cancel?:boolean;}declare class OrderSubscriptions extends ApiResource{static readonly TYPE:'order_subscriptions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;create(resource:OrderSubscriptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;update(resource:OrderSubscriptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(orderSubscriptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;source_order(orderSubscriptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(orderSubscriptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;order_copies(orderSubscriptionId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;orders(orderSubscriptionId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;isOrderSubscription(resource:any):resource is OrderSubscription;relationship(id:string|ResourceId|null):OrderSubscriptionRel;type():string;}export default OrderSubscriptions;export{OrderSubscription,OrderSubscriptionCreate,OrderSubscriptionUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as o}from"../resource";class t extends o{async list(r,e){return this.resources.list({type:t.TYPE},r,e)}async create(r,e,s){return this.resources.create({...r,type:t.TYPE},e,s)}async retrieve(r,e,s){return this.resources.retrieve({type:t.TYPE,id:r},e,s)}async update(r,e,s){return this.resources.update({...r,type:t.TYPE},e,s)}async delete(r,e){await this.resources.delete({type:t.TYPE,id:r},e)}async market(r,e,s){return this.resources.fetch({type:"markets"},`order_subscriptions/${r}/market`,e,s)}async source_order(r,e,s){return this.resources.fetch({type:"orders"},`order_subscriptions/${r}/source_order`,e,s)}async customer(r,e,s){return this.resources.fetch({type:"customers"},`order_subscriptions/${r}/customer`,e,s)}async order_copies(r,e,s){return this.resources.fetch({type:"order_copies"},`order_subscriptions/${r}/order_copies`,e,s)}async orders(r,e,s){return this.resources.fetch({type:"orders"},`order_subscriptions/${r}/orders`,e,s)}isOrderSubscription(r){return r.type&&r.type===t.TYPE}relationship(r){return r===null||typeof r=="string"?{id:r,type:t.TYPE}:{id:r.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="order_subscriptions";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';declare type OrderValidationRuleRel=ResourceRel&{type:typeof OrderValidationRules.TYPE;};interface OrderValidationRule extends Resource{market?:Market;}declare class OrderValidationRules extends ApiResource{static readonly TYPE:'order_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderValidationRule>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderValidationRule>;market(orderValidationRuleId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isOrderValidationRule(resource:any):resource is OrderValidationRule;relationship(id:string|ResourceId|null):OrderValidationRuleRel;type():string;}export default OrderValidationRules;export{OrderValidationRule};
|
@@ -1 +0,0 @@
|
|
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)}async market(e,t,s){return this.resources.fetch({type:"markets"},`order_validation_rules/${e}/market`,t,s)}isOrderValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||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;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{Customer}from'./customers';import{Address}from'./addresses';import{PaymentMethod}from'./payment_methods';import{CustomerPaymentSource}from'./customer_payment_sources';import{AdyenPayment}from'./adyen_payments';import{BraintreePayment}from'./braintree_payments';import{CheckoutComPayment}from'./checkout_com_payments';import{ExternalPayment}from'./external_payments';import{KlarnaPayment}from'./klarna_payments';import{PaypalPayment}from'./paypal_payments';import{StripePayment}from'./stripe_payments';import{WireTransfer}from'./wire_transfers';import{LineItem}from'./line_items';import{Shipment}from'./shipments';import{Authorization}from'./authorizations';import{Void}from'./voids';import{Capture}from'./captures';import{Refund}from'./refunds';import{OrderSubscription}from'./order_subscriptions';import{OrderCopy}from'./order_copies';import{Attachment}from'./attachments';declare type OrderRel=ResourceRel&{type:typeof Orders.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type AddressRel=ResourceRel&{type:'addresses';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};declare type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};declare type ExternalPaymentRel=ResourceRel&{type:'external_payments';};declare type KlarnaPaymentRel=ResourceRel&{type:'klarna_payments';};declare type PaypalPaymentRel=ResourceRel&{type:'paypal_payments';};declare type StripePaymentRel=ResourceRel&{type:'stripe_payments';};declare type WireTransferRel=ResourceRel&{type:'wire_transfers';};interface Order extends Resource{number?:number;autorefresh?:boolean;status?:string;payment_status?:string;fulfillment_status?:string;guest?:boolean;editable?:boolean;customer_email?:string;language_code?:string;currency_code?:string;tax_included?:boolean;tax_rate?:number;freight_taxable?:boolean;requires_billing_info?:boolean;country_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;subtotal_amount_cents?:number;subtotal_amount_float?:number;formatted_subtotal_amount?:string;shipping_amount_cents?:number;shipping_amount_float?:number;formatted_shipping_amount?:string;payment_method_amount_cents?:number;payment_method_amount_float?:number;formatted_payment_method_amount?:string;discount_amount_cents?:number;discount_amount_float?:number;formatted_discount_amount?:string;adjustment_amount_cents?:number;adjustment_amount_float?:number;formatted_adjustment_amount?:string;gift_card_amount_cents?:number;gift_card_amount_float?:number;formatted_gift_card_amount?:string;total_tax_amount_cents?:number;total_tax_amount_float?:number;formatted_total_tax_amount?:string;subtotal_tax_amount_cents?:number;subtotal_tax_amount_float?:number;formatted_subtotal_tax_amount?:string;shipping_tax_amount_cents?:number;shipping_tax_amount_float?:number;formatted_shipping_tax_amount?:string;payment_method_tax_amount_cents?:number;payment_method_tax_amount_float?:number;formatted_payment_method_tax_amount?:string;adjustment_tax_amount_cents?:number;adjustment_tax_amount_float?:number;formatted_adjustment_tax_amount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;total_taxable_amount_cents?:number;total_taxable_amount_float?:number;formatted_total_taxable_amount?:string;subtotal_taxable_amount_cents?:number;subtotal_taxable_amount_float?:number;formatted_subtotal_taxable_amount?:string;shipping_taxable_amount_cents?:number;shipping_taxable_amount_float?:number;formatted_shipping_taxable_amount?:string;payment_method_taxable_amount_cents?:number;payment_method_taxable_amount_float?:number;formatted_payment_method_taxable_amount?:string;adjustment_taxable_amount_cents?:number;adjustment_taxable_amount_float?:number;formatted_adjustment_taxable_amount?:string;total_amount_with_taxes_cents?:number;total_amount_with_taxes_float?:number;formatted_total_amount_with_taxes?:string;fees_amount_cents?:number;fees_amount_float?:number;formatted_fees_amount?:string;duty_amount_cents?:number;duty_amount_float?:number;formatted_duty_amount?:string;skus_count?:number;line_item_options_count?:number;shipments_count?:number;payment_source_details?:object;token?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;checkout_url?:string;placed_at?:string;approved_at?:string;cancelled_at?:string;payment_updated_at?:string;fulfillment_updated_at?:string;refreshed_at?:string;archived_at?:string;expires_at?:string;market?:Market;customer?:Customer;shipping_address?:Address;billing_address?:Address;available_payment_methods?:PaymentMethod[];available_customer_payment_sources?:CustomerPaymentSource[];payment_method?:PaymentMethod;payment_source?:AdyenPayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|StripePayment|WireTransfer;line_items?:LineItem[];shipments?:Shipment[];transactions?:(Authorization|Void|Capture|Refund)[];authorizations?:Authorization[];captures?:Capture[];voids?:Void[];refunds?:Refund[];order_subscriptions?:OrderSubscription[];order_copies?:OrderCopy[];attachments?:Attachment[];}interface OrderCreate extends ResourceCreate{autorefresh?:boolean;guest?:boolean;customer_email?:string;customer_password?:string;language_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;market?:MarketRel;customer?:CustomerRel;shipping_address?:AddressRel;billing_address?:AddressRel;payment_method?:PaymentMethodRel;payment_source?:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}interface OrderUpdate extends ResourceUpdate{autorefresh?:boolean;guest?:boolean;customer_email?:string;customer_password?:string;language_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;_archive?:boolean;_unarchive?:boolean;_place?:boolean;_cancel?:boolean;_approve?:boolean;_approve_and_capture?:boolean;_authorize?:boolean;_authorization_amount_cents?:number;_capture?:boolean;_refund?:boolean;_update_taxes?:boolean;_billing_address_clone_id?:string;_shipping_address_clone_id?:string;_customer_payment_source_id?:string;_shipping_address_same_as_billing?:boolean;_billing_address_same_as_shipping?:boolean;_save_payment_source_to_customer_wallet?:boolean;_save_shipping_address_to_customer_address_book?:boolean;_save_billing_address_to_customer_address_book?:boolean;_refresh?:boolean;market?:MarketRel;customer?:CustomerRel;shipping_address?:AddressRel;billing_address?:AddressRel;payment_method?:PaymentMethodRel;payment_source?:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}declare class Orders extends ApiResource{static readonly TYPE:'orders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;create(resource:OrderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;update(resource:OrderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(orderId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;customer(orderId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;shipping_address(orderId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;billing_address(orderId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;available_payment_methods(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;available_customer_payment_sources(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;payment_method(orderId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;line_items(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;shipments(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;authorizations(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;captures(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;refunds(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;order_subscriptions(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;order_copies(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;attachments(orderId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isOrder(resource:any):resource is Order;relationship(id:string|ResourceId|null):OrderRel;type():string;}export default Orders;export{Order,OrderCreate,OrderUpdate};
|
package/lib/resources/orders.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create({...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({...e,type:t.TYPE},s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async market(e,s,r){return this.resources.fetch({type:"markets"},`orders/${e}/market`,s,r)}async customer(e,s,r){return this.resources.fetch({type:"customers"},`orders/${e}/customer`,s,r)}async shipping_address(e,s,r){return this.resources.fetch({type:"addresses"},`orders/${e}/shipping_address`,s,r)}async billing_address(e,s,r){return this.resources.fetch({type:"addresses"},`orders/${e}/billing_address`,s,r)}async available_payment_methods(e,s,r){return this.resources.fetch({type:"payment_methods"},`orders/${e}/available_payment_methods`,s,r)}async available_customer_payment_sources(e,s,r){return this.resources.fetch({type:"customer_payment_sources"},`orders/${e}/available_customer_payment_sources`,s,r)}async payment_method(e,s,r){return this.resources.fetch({type:"payment_methods"},`orders/${e}/payment_method`,s,r)}async line_items(e,s,r){return this.resources.fetch({type:"line_items"},`orders/${e}/line_items`,s,r)}async shipments(e,s,r){return this.resources.fetch({type:"shipments"},`orders/${e}/shipments`,s,r)}async authorizations(e,s,r){return this.resources.fetch({type:"authorizations"},`orders/${e}/authorizations`,s,r)}async captures(e,s,r){return this.resources.fetch({type:"captures"},`orders/${e}/captures`,s,r)}async voids(e,s,r){return this.resources.fetch({type:"voids"},`orders/${e}/voids`,s,r)}async refunds(e,s,r){return this.resources.fetch({type:"refunds"},`orders/${e}/refunds`,s,r)}async order_subscriptions(e,s,r){return this.resources.fetch({type:"order_subscriptions"},`orders/${e}/order_subscriptions`,s,r)}async order_copies(e,s,r){return this.resources.fetch({type:"order_copies"},`orders/${e}/order_copies`,s,r)}async attachments(e,s,r){return this.resources.fetch({type:"attachments"},`orders/${e}/attachments`,s,r)}isOrder(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="orders";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import{QueryParamsRetrieve}from'../query';declare type OrganizationRel=ResourceRel&{type:typeof Organizations.TYPE;};interface Organization extends Resource{name?:string;slug?:string;domain?:string;support_phone?:string;support_email?:string;logo_url?:string;favicon_url?:string;primary_color?:string;contrast_color?:string;gtm_id?:string;gtm_id_test?:string;discount_disabled?:boolean;account_disabled?:boolean;acceptance_disabled?:boolean;max_concurrent_promotions?:number;max_concurrent_imports?:number;}declare class Organizations extends ApiResource{static readonly TYPE:'organization';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Organization>;isOrganization(resource:any):resource is Organization;relationship(id:string|ResourceId|null):OrganizationRel;type():string;}export default Organizations;export{Organization};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class e extends i{async retrieve(r,t){return this.resources.singleton({type:e.TYPE},r,t)}isOrganization(r){return r.type&&r.type===e.TYPE}relationship(r){return r===null||typeof r=="string"?{id:r,type:e.TYPE}:{id:r.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="organization";export default e;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{StockLocation}from'./stock_locations';import{Parcel}from'./parcels';import{Attachment}from'./attachments';declare type PackageRel=ResourceRel&{type:typeof Packages.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Package extends Resource{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocation;parcels?:Parcel[];attachments?:Attachment[];}interface PackageCreate extends ResourceCreate{name:string;code?:string;length:number;width:number;height:number;unit_of_length:string;stock_location:StockLocationRel;}interface PackageUpdate extends ResourceUpdate{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocationRel;}declare class Packages extends ApiResource{static readonly TYPE:'packages';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Package>>;create(resource:PackageCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;update(resource:PackageUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(packageId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;parcels(packageId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(packageId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPackage(resource:any):resource is Package;relationship(id:string|ResourceId|null):PackageRel;type():string;}export default Packages;export{Package,PackageCreate,PackageUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async stock_location(e,t,r){return this.resources.fetch({type:"stock_locations"},`packages/${e}/stock_location`,t,r)}async parcels(e,t,r){return this.resources.fetch({type:"parcels"},`packages/${e}/parcels`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`packages/${e}/attachments`,t,r)}isPackage(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="packages";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Parcel}from'./parcels';import{StockLineItem}from'./stock_line_items';declare type ParcelLineItemRel=ResourceRel&{type:typeof ParcelLineItems.TYPE;};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type StockLineItemRel=ResourceRel&{type:'stock_line_items';};interface ParcelLineItem extends Resource{sku_code?:string;quantity?:number;parcel?:Parcel;stock_line_item?:StockLineItem;shipment_line_item?:object;}interface ParcelLineItemCreate extends ResourceCreate{sku_code?:string;quantity:number;parcel:ParcelRel;stock_line_item:StockLineItemRel;shipment_line_item?:object;}declare type ParcelLineItemUpdate=ResourceUpdate;declare class ParcelLineItems extends ApiResource{static readonly TYPE:'parcel_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;create(resource:ParcelLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;update(resource:ParcelLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;parcel(parcelLineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;stock_line_item(parcelLineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;isParcelLineItem(resource:any):resource is ParcelLineItem;relationship(id:string|ResourceId|null):ParcelLineItemRel;type():string;}export default ParcelLineItems;export{ParcelLineItem,ParcelLineItemCreate,ParcelLineItemUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async parcel(e,t,r){return this.resources.fetch({type:"parcels"},`parcel_line_items/${e}/parcel`,t,r)}async stock_line_item(e,t,r){return this.resources.fetch({type:"stock_line_items"},`parcel_line_items/${e}/stock_line_item`,t,r)}isParcelLineItem(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="parcel_line_items";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Shipment}from'./shipments';import{Package}from'./packages';import{ParcelLineItem}from'./parcel_line_items';import{Attachment}from'./attachments';declare type ParcelRel=ResourceRel&{type:typeof Parcels.TYPE;};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type PackageRel=ResourceRel&{type:'packages';};interface Parcel extends Resource{number?:string;weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;shipping_label_url?:string;shipping_label_file_type?:string;shipping_label_size?:string;shipping_label_resolution?:string;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment?:Shipment;package?:Package;parcel_line_items?:ParcelLineItem[];attachments?:Attachment[];}interface ParcelCreate extends ResourceCreate{weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment:ShipmentRel;package:PackageRel;}interface ParcelUpdate extends ResourceUpdate{weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment?:ShipmentRel;package?:PackageRel;}declare class Parcels extends ApiResource{static readonly TYPE:'parcels';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;create(resource:ParcelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;update(resource:ParcelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipment(parcelId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;package(parcelId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;parcel_line_items(parcelId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;attachments(parcelId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isParcel(resource:any):resource is Parcel;relationship(id:string|ResourceId|null):ParcelRel;type():string;}export default Parcels;export{Parcel,ParcelCreate,ParcelUpdate};
|
package/lib/resources/parcels.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as c}from"../resource";class r extends c{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`parcels/${e}/shipment`,t,s)}async package(e,t,s){return this.resources.fetch({type:"packages"},`parcels/${e}/package`,t,s)}async parcel_line_items(e,t,s){return this.resources.fetch({type:"parcel_line_items"},`parcels/${e}/parcel_line_items`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`parcels/${e}/attachments`,t,s)}isParcel(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="parcels";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PaymentMethod}from'./payment_methods';declare type PaymentGatewayRel=ResourceRel&{type:typeof PaymentGateways.TYPE;};interface PaymentGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];}declare class PaymentGateways extends ApiResource{static readonly TYPE:'payment_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentGateway>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;payment_methods(paymentGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;isPaymentGateway(resource:any):resource is PaymentGateway;relationship(id:string|ResourceId|null):PaymentGatewayRel;type():string;}export default PaymentGateways;export{PaymentGateway};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as y}from"../resource";class t extends y{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)}async payment_methods(e,r,s){return this.resources.fetch({type:"payment_methods"},`payment_gateways/${e}/payment_methods`,r,s)}isPaymentGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||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;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{PaymentGateway}from'./payment_gateways';import{Attachment}from'./attachments';declare type PaymentMethodRel=ResourceRel&{type:typeof PaymentMethods.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PaymentGatewayRel=ResourceRel&{type:'payment_gateways';};interface PaymentMethod extends Resource{payment_source_type?:string;name?:string;currency_code?:string;moto?:boolean;disabled_at?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;market?:Market;payment_gateway?:PaymentGateway;attachments?:Attachment[];}interface PaymentMethodCreate extends ResourceCreate{payment_source_type:string;currency_code?:string;moto?:boolean;price_amount_cents:number;market?:MarketRel;payment_gateway:PaymentGatewayRel;}interface PaymentMethodUpdate extends ResourceUpdate{payment_source_type?:string;currency_code?:string;moto?:boolean;price_amount_cents?:number;market?:MarketRel;payment_gateway?:PaymentGatewayRel;}declare class PaymentMethods extends ApiResource{static readonly TYPE:'payment_methods';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;create(resource:PaymentMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;update(resource:PaymentMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(paymentMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;payment_gateway(paymentMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;attachments(paymentMethodId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPaymentMethod(resource:any):resource is PaymentMethod;relationship(id:string|ResourceId|null):PaymentMethodRel;type():string;}export default PaymentMethods;export{PaymentMethod,PaymentMethodCreate,PaymentMethodUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){return this.resources.fetch({type:"markets"},`payment_methods/${e}/market`,t,r)}async payment_gateway(e,t,r){return this.resources.fetch({type:"payment_gateways"},`payment_methods/${e}/payment_gateway`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`payment_methods/${e}/attachments`,t,r)}isPaymentMethod(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="payment_methods";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PaymentMethod}from'./payment_methods';import{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,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;paypal_payments(paypalGatewayId:string,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 +0,0 @@
|
|
1
|
-
import{ApiResource as p}from"../resource";class s extends p{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){return this.resources.fetch({type:"payment_methods"},`paypal_gateways/${e}/payment_methods`,t,r)}async paypal_payments(e,t,r){return this.resources.fetch({type:"paypal_payments"},`paypal_gateways/${e}/paypal_payments`,t,r)}isPaypalGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="paypal_gateways";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{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;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;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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(paypalPaymentId:string,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 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`paypal_payments/${e}/order`,t,r)}async payment_gateway(e,t,r){return this.resources.fetch({type:"payment_gateways"},`paypal_payments/${e}/payment_gateway`,t,r)}isPaypalPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||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 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{PromotionRule}from'./promotion_rules';import{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import{SkuListPromotionRule}from'./sku_list_promotion_rules';import{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import{Attachment}from'./attachments';import{SkuList}from'./sku_lists';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(percentageDiscountPromotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(percentageDiscountPromotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(percentageDiscountPromotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(percentageDiscountPromotionId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;sku_list(percentageDiscountPromotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(percentageDiscountPromotionId:string,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 +0,0 @@
|
|
1
|
-
import{ApiResource as s}from"../resource";class o extends s{async list(e,t){return this.resources.list({type:o.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:o.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:o.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:o.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:o.TYPE,id:e},t)}async market(e,t,r){return this.resources.fetch({type:"markets"},`percentage_discount_promotions/${e}/market`,t,r)}async order_amount_promotion_rule(e,t,r){return this.resources.fetch({type:"order_amount_promotion_rules"},`percentage_discount_promotions/${e}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){return this.resources.fetch({type:"sku_list_promotion_rules"},`percentage_discount_promotions/${e}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){return this.resources.fetch({type:"coupon_codes_promotion_rules"},`percentage_discount_promotions/${e}/coupon_codes_promotion_rule`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`percentage_discount_promotions/${e}/attachments`,t,r)}async sku_list(e,t,r){return this.resources.fetch({type:"sku_lists"},`percentage_discount_promotions/${e}/sku_list`,t,r)}async skus(e,t,r){return this.resources.fetch({type:"skus"},`percentage_discount_promotions/${e}/skus`,t,r)}isPercentageDiscountPromotion(e){return e.type&&e.type===o.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:o.TYPE}:{id:e.id,type:o.TYPE}}type(){return o.TYPE}}o.TYPE="percentage_discount_promotions";export default o;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Price}from'./prices';import{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,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;attachments(priceListId:string,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 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async prices(e,t,r){return this.resources.fetch({type:"prices"},`price_lists/${e}/prices`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`price_lists/${e}/attachments`,t,r)}isPriceList(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="price_lists";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PriceList}from'./price_lists';import{Sku}from'./skus';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;sku(priceId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(priceId:string,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};
|
package/lib/resources/prices.js
DELETED
@@ -1 +0,0 @@
|
|
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({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async price_list(e,t,s){return this.resources.fetch({type:"price_lists"},`prices/${e}/price_list`,t,s)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`prices/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`prices/${e}/attachments`,t,s)}isPrice(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="prices";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PercentageDiscountPromotion}from'./percentage_discount_promotions';import{FreeShippingPromotion}from'./free_shipping_promotions';import{FixedAmountPromotion}from'./fixed_amount_promotions';import{FreeGiftPromotion}from'./free_gift_promotions';import{FixedPricePromotion}from'./fixed_price_promotions';import{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 +0,0 @@
|
|
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 e===null||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 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{PromotionRule}from'./promotion_rules';import{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import{SkuListPromotionRule}from'./sku_list_promotion_rules';import{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(promotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(promotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(promotionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(promotionId:string,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 +0,0 @@
|
|
1
|
-
import{ApiResource as s}from"../resource";class o extends s{async list(t,e){return this.resources.list({type:o.TYPE},t,e)}async retrieve(t,e,r){return this.resources.retrieve({type:o.TYPE,id:t},e,r)}async market(t,e,r){return this.resources.fetch({type:"markets"},`promotions/${t}/market`,e,r)}async order_amount_promotion_rule(t,e,r){return this.resources.fetch({type:"order_amount_promotion_rules"},`promotions/${t}/order_amount_promotion_rule`,e,r)}async sku_list_promotion_rule(t,e,r){return this.resources.fetch({type:"sku_list_promotion_rules"},`promotions/${t}/sku_list_promotion_rule`,e,r)}async coupon_codes_promotion_rule(t,e,r){return this.resources.fetch({type:"coupon_codes_promotion_rules"},`promotions/${t}/coupon_codes_promotion_rule`,e,r)}async attachments(t,e,r){return this.resources.fetch({type:"attachments"},`promotions/${t}/attachments`,e,r)}isPromotion(t){return t.type&&t.type===o.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:o.TYPE}:{id:t.id,type:o.TYPE}}type(){return o.TYPE}}o.TYPE="promotions";export default o;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_capture(refundId:string,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};
|
package/lib/resources/refunds.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as n}from"../resource";class r extends n{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)}async order(e,t,s){return this.resources.fetch({type:"orders"},`refunds/${e}/order`,t,s)}async reference_capture(e,t,s){return this.resources.fetch({type:"captures"},`refunds/${e}/reference_capture`,t,s)}isRefund(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="refunds";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Return}from'./returns';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string,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 +0,0 @@
|
|
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({...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({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async return(e,r,s){return this.resources.fetch({type:"returns"},`return_line_items/${e}/return`,r,s)}async line_item(e,r,s){return this.resources.fetch({type:"line_items"},`return_line_items/${e}/line_item`,r,s)}isReturnLineItem(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="return_line_items";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{Customer}from'./customers';import{StockLocation}from'./stock_locations';import{Address}from'./addresses';import{ReturnLineItem}from'./return_line_items';import{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,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;return_line_items(returnId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string,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};
|
package/lib/resources/returns.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as n}from"../resource";class s extends n{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`returns/${e}/order`,t,r)}async customer(e,t,r){return this.resources.fetch({type:"customers"},`returns/${e}/customer`,t,r)}async stock_location(e,t,r){return this.resources.fetch({type:"stock_locations"},`returns/${e}/stock_location`,t,r)}async origin_address(e,t,r){return this.resources.fetch({type:"addresses"},`returns/${e}/origin_address`,t,r)}async destination_address(e,t,r){return this.resources.fetch({type:"addresses"},`returns/${e}/destination_address`,t,r)}async return_line_items(e,t,r){return this.resources.fetch({type:"return_line_items"},`returns/${e}/return_line_items`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`returns/${e}/attachments`,t,r)}isReturn(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="returns";export default s;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{ShippingCategory}from'./shipping_categories';import{StockLocation}from'./stock_locations';import{Address}from'./addresses';import{ShippingMethod}from'./shipping_methods';import{DeliveryLeadTime}from'./delivery_lead_times';import{StockLineItem}from'./stock_line_items';import{StockTransfer}from'./stock_transfers';import{CarrierAccount}from'./carrier_accounts';import{Parcel}from'./parcels';import{Attachment}from'./attachments';declare type ShipmentRel=ResourceRel&{type:typeof Shipments.TYPE;};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};interface Shipment extends Resource{number?:string;status?:string;currency_code?:string;cost_amount_cents?:number;cost_amount_float?:number;formatted_cost_amount?:string;skus_count?:number;selected_rate_id?:string;rates?:object[];purchase_error_code?:string;purchase_error_message?:string;get_rates_started_at?:string;get_rates_completed_at?:string;purchase_started_at?:string;purchase_completed_at?:string;purchase_failed_at?:string;order?:Order;shipping_category?:ShippingCategory;stock_location?:StockLocation;origin_address?:Address;shipping_address?:Address;shipping_method?:ShippingMethod;delivery_lead_time?:DeliveryLeadTime;shipment_line_items?:object[];stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];available_shipping_methods?:ShippingMethod[];carrier_accounts?:CarrierAccount[];parcels?:Parcel[];attachments?:Attachment[];}interface ShipmentUpdate extends ResourceUpdate{_on_hold?:boolean;_picking?:boolean;_packing?:boolean;_ready_to_ship?:boolean;_ship?:boolean;_get_rates?:boolean;selected_rate_id?:string;_purchase?:boolean;shipping_method?:ShippingMethodRel;}declare class Shipments extends ApiResource{static readonly TYPE:'shipments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;update(resource:ShipmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;order(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;shipping_category(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;stock_location(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_address(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_method(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delivery_lead_time(shipmentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;stock_line_items(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;available_shipping_methods(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;carrier_accounts(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;parcels(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(shipmentId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShipment(resource:any):resource is Shipment;relationship(id:string|ResourceId|null):ShipmentRel;type():string;}export default Shipments;export{Shipment,ShipmentUpdate};
|
@@ -1 +0,0 @@
|
|
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({...e,type:r.TYPE},s,t)}async order(e,s,t){return this.resources.fetch({type:"orders"},`shipments/${e}/order`,s,t)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`shipments/${e}/shipping_category`,s,t)}async stock_location(e,s,t){return this.resources.fetch({type:"stock_locations"},`shipments/${e}/stock_location`,s,t)}async origin_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/origin_address`,s,t)}async shipping_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/shipping_address`,s,t)}async shipping_method(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/shipping_method`,s,t)}async delivery_lead_time(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`shipments/${e}/delivery_lead_time`,s,t)}async stock_line_items(e,s,t){return this.resources.fetch({type:"stock_line_items"},`shipments/${e}/stock_line_items`,s,t)}async stock_transfers(e,s,t){return this.resources.fetch({type:"stock_transfers"},`shipments/${e}/stock_transfers`,s,t)}async available_shipping_methods(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/available_shipping_methods`,s,t)}async carrier_accounts(e,s,t){return this.resources.fetch({type:"carrier_accounts"},`shipments/${e}/carrier_accounts`,s,t)}async parcels(e,s,t){return this.resources.fetch({type:"parcels"},`shipments/${e}/parcels`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`shipments/${e}/attachments`,s,t)}isShipment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||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 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Sku}from'./skus';import{Attachment}from'./attachments';declare type ShippingCategoryRel=ResourceRel&{type:typeof ShippingCategories.TYPE;};interface ShippingCategory extends Resource{name?:string;skus?:Sku[];attachments?:Attachment[];}interface ShippingCategoryCreate extends ResourceCreate{name:string;}interface ShippingCategoryUpdate extends ResourceUpdate{name?:string;}declare class ShippingCategories extends ApiResource{static readonly TYPE:'shipping_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingCategory>>;create(resource:ShippingCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;update(resource:ShippingCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(shippingCategoryId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(shippingCategoryId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingCategory(resource:any):resource is ShippingCategory;relationship(id:string|ResourceId|null):ShippingCategoryRel;type():string;}export default ShippingCategories;export{ShippingCategory,ShippingCategoryCreate,ShippingCategoryUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async skus(e,t,s){return this.resources.fetch({type:"skus"},`shipping_categories/${e}/skus`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_categories/${e}/attachments`,t,s)}isShippingCategory(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="shipping_categories";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{ShippingZone}from'./shipping_zones';import{ShippingCategory}from'./shipping_categories';import{DeliveryLeadTime}from'./delivery_lead_times';import{Attachment}from'./attachments';declare type ShippingMethodRel=ResourceRel&{type:typeof ShippingMethods.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};interface ShippingMethod extends Resource{name?:string;currency_code?:string;disabled_at?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;free_over_amount_cents?:number;free_over_amount_float?:number;formatted_free_over_amount?:string;price_amount_for_shipment_cents?:number;price_amount_for_shipment_float?:number;formatted_price_amount_for_shipment?:string;market?:Market;shipping_zone?:ShippingZone;shipping_category?:ShippingCategory;delivery_lead_time_for_shipment?:DeliveryLeadTime;attachments?:Attachment[];}interface ShippingMethodCreate extends ResourceCreate{name:string;currency_code?:string;price_amount_cents:number;free_over_amount_cents?:number;market?:MarketRel;shipping_zone:ShippingZoneRel;shipping_category:ShippingCategoryRel;}interface ShippingMethodUpdate extends ResourceUpdate{name?:string;currency_code?:string;price_amount_cents?:number;free_over_amount_cents?:number;market?:MarketRel;shipping_zone?:ShippingZoneRel;shipping_category?:ShippingCategoryRel;}declare class ShippingMethods extends ApiResource{static readonly TYPE:'shipping_methods';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;create(resource:ShippingMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;update(resource:ShippingMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(shippingMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;shipping_zone(shippingMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;shipping_category(shippingMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delivery_lead_time_for_shipment(shippingMethodId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;attachments(shippingMethodId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingMethod(resource:any):resource is ShippingMethod;relationship(id:string|ResourceId|null):ShippingMethodRel;type():string;}export default ShippingMethods;export{ShippingMethod,ShippingMethodCreate,ShippingMethodUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as r}from"../resource";class i extends r{async list(e,t){return this.resources.list({type:i.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:i.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:i.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:i.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:i.TYPE,id:e},t)}async market(e,t,s){return this.resources.fetch({type:"markets"},`shipping_methods/${e}/market`,t,s)}async shipping_zone(e,t,s){return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${e}/shipping_zone`,t,s)}async shipping_category(e,t,s){return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${e}/shipping_category`,t,s)}async delivery_lead_time_for_shipment(e,t,s){return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${e}/delivery_lead_time_for_shipment`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_methods/${e}/attachments`,t,s)}isShippingMethod(e){return e.type&&e.type===i.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:i.TYPE}:{id:e.id,type:i.TYPE}}type(){return i.TYPE}}i.TYPE="shipping_methods";export default i;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Attachment}from'./attachments';declare type ShippingZoneRel=ResourceRel&{type:typeof ShippingZones.TYPE;};interface ShippingZone extends Resource{name?:string;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;attachments?:Attachment[];}interface ShippingZoneCreate extends ResourceCreate{name:string;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;}interface ShippingZoneUpdate extends ResourceUpdate{name?:string;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;}declare class ShippingZones extends ApiResource{static readonly TYPE:'shipping_zones';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingZone>>;create(resource:ShippingZoneCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;update(resource:ShippingZoneUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;delete(id:string,options?:ResourcesConfig):Promise<void>;attachments(shippingZoneId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingZone(resource:any):resource is ShippingZone;relationship(id:string|ResourceId|null):ShippingZoneRel;type():string;}export default ShippingZones;export{ShippingZone,ShippingZoneCreate,ShippingZoneUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:t.TYPE},s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async attachments(e,s,r){return this.resources.fetch({type:"attachments"},`shipping_zones/${e}/attachments`,s,r)}isShippingZone(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_zones";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{SkuList}from'./sku_lists';import{Sku}from'./skus';declare type SkuListItemRel=ResourceRel&{type:typeof SkuListItems.TYPE;};declare type SkuListRel=ResourceRel&{type:'sku_lists';};declare type SkuRel=ResourceRel&{type:'skus';};interface SkuListItem extends Resource{position?:number;sku_code?:string;quantity?:number;sku_list?:SkuList;sku?:Sku;}interface SkuListItemCreate extends ResourceCreate{position?:number;sku_code?:string;quantity?:number;sku_list:SkuListRel;sku:SkuRel;}interface SkuListItemUpdate extends ResourceUpdate{position?:number;sku_code?:string;quantity?:number;}declare class SkuListItems extends ApiResource{static readonly TYPE:'sku_list_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;create(resource:SkuListItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;update(resource:SkuListItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku_list(skuListItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;sku(skuListItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;isSkuListItem(resource:any):resource is SkuListItem;relationship(id:string|ResourceId|null):SkuListItemRel;type():string;}export default SkuListItems;export{SkuListItem,SkuListItemCreate,SkuListItemUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:t.TYPE},s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async sku_list(e,s,r){return this.resources.fetch({type:"sku_lists"},`sku_list_items/${e}/sku_list`,s,r)}async sku(e,s,r){return this.resources.fetch({type:"skus"},`sku_list_items/${e}/sku`,s,r)}isSkuListItem(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||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;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PercentageDiscountPromotion}from'./percentage_discount_promotions';import{FreeShippingPromotion}from'./free_shipping_promotions';import{FixedAmountPromotion}from'./fixed_amount_promotions';import{FreeGiftPromotion}from'./free_gift_promotions';import{FixedPricePromotion}from'./fixed_price_promotions';import{ExternalPromotion}from'./external_promotions';import{SkuList}from'./sku_lists';import{Sku}from'./skus';declare type SkuListPromotionRuleRel=ResourceRel&{type:typeof SkuListPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface SkuListPromotionRule extends Resource{all_skus?:boolean;min_quantity?:number;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;sku_list?:SkuList;skus?:Sku[];}interface SkuListPromotionRuleCreate extends ResourceCreate{all_skus?:boolean;min_quantity?:number;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;sku_list?:SkuListRel;}interface SkuListPromotionRuleUpdate extends ResourceUpdate{all_skus?:boolean;min_quantity?:number;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;sku_list?:SkuListRel;}declare class SkuListPromotionRules extends ApiResource{static readonly TYPE:'sku_list_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListPromotionRule>>;create(resource:SkuListPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;update(resource:SkuListPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku_list(skuListPromotionRuleId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(skuListPromotionRuleId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isSkuListPromotionRule(resource:any):resource is SkuListPromotionRule;relationship(id:string|ResourceId|null):SkuListPromotionRuleRel;type():string;}export default SkuListPromotionRules;export{SkuListPromotionRule,SkuListPromotionRuleCreate,SkuListPromotionRuleUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as u}from"../resource";class r extends u{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create({...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({...e,type:r.TYPE},s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async sku_list(e,s,t){return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${e}/sku_list`,s,t)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${e}/skus`,s,t)}isSkuListPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="sku_list_promotion_rules";export default r;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Sku}from'./skus';import{SkuListItem}from'./sku_list_items';import{Bundle}from'./bundles';declare type SkuListRel=ResourceRel&{type:typeof SkuLists.TYPE;};interface SkuList extends Resource{name?:string;slug?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;skus?:Sku[];sku_list_items?:SkuListItem[];bundles?:Bundle[];}interface SkuListCreate extends ResourceCreate{name:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;}interface SkuListUpdate extends ResourceUpdate{name?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;}declare class SkuLists extends ApiResource{static readonly TYPE:'sku_lists';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuList>>;create(resource:SkuListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;update(resource:SkuListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(skuListId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;sku_list_items(skuListId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;bundles(skuListId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;isSkuList(resource:any):resource is SkuList;relationship(id:string|ResourceId|null):SkuListRel;type():string;}export default SkuLists;export{SkuList,SkuListCreate,SkuListUpdate};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource as u}from"../resource";class t extends u{async list(s,e){return this.resources.list({type:t.TYPE},s,e)}async create(s,e,r){return this.resources.create({...s,type:t.TYPE},e,r)}async retrieve(s,e,r){return this.resources.retrieve({type:t.TYPE,id:s},e,r)}async update(s,e,r){return this.resources.update({...s,type:t.TYPE},e,r)}async delete(s,e){await this.resources.delete({type:t.TYPE,id:s},e)}async skus(s,e,r){return this.resources.fetch({type:"skus"},`sku_lists/${s}/skus`,e,r)}async sku_list_items(s,e,r){return this.resources.fetch({type:"sku_list_items"},`sku_lists/${s}/sku_list_items`,e,r)}async bundles(s,e,r){return this.resources.fetch({type:"bundles"},`sku_lists/${s}/bundles`,e,r)}isSkuList(s){return s.type&&s.type===t.TYPE}relationship(s){return s===null||typeof s=="string"?{id:s,type:t.TYPE}:{id:s.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="sku_lists";export default t;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Market}from'./markets';import{Attachment}from'./attachments';declare type SkuOptionRel=ResourceRel&{type:typeof SkuOptions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};interface SkuOption extends Resource{name?:string;currency_code?:string;description?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;delay_hours?:number;delay_days?:number;sku_code_regex?:string;market?:Market;attachments?:Attachment[];}interface SkuOptionCreate extends ResourceCreate{name:string;currency_code?:string;description?:string;price_amount_cents?:number;delay_hours?:number;sku_code_regex?:string;market:MarketRel;}interface SkuOptionUpdate extends ResourceUpdate{name?:string;currency_code?:string;description?:string;price_amount_cents?:number;delay_hours?:number;sku_code_regex?:string;market?:MarketRel;}declare class SkuOptions extends ApiResource{static readonly TYPE:'sku_options';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuOption>>;create(resource:SkuOptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;update(resource:SkuOptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(skuOptionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(skuOptionId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isSkuOption(resource:any):resource is SkuOption;relationship(id:string|ResourceId|null):SkuOptionRel;type():string;}export default SkuOptions;export{SkuOption,SkuOptionCreate,SkuOptionUpdate};
|
@@ -1 +0,0 @@
|
|
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({...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({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){return this.resources.fetch({type:"markets"},`sku_options/${e}/market`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`sku_options/${e}/attachments`,t,r)}isSkuOption(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="sku_options";export default s;
|
package/lib/resources/skus.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{ShippingCategory}from'./shipping_categories';import{Price}from'./prices';import{StockItem}from'./stock_items';import{DeliveryLeadTime}from'./delivery_lead_times';import{SkuOption}from'./sku_options';import{Attachment}from'./attachments';declare type SkuRel=ResourceRel&{type:typeof Skus.TYPE;};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};interface Sku extends Resource{code?:string;name?:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;inventory?:object;shipping_category?:ShippingCategory;prices?:Price[];stock_items?:StockItem[];delivery_lead_times?:DeliveryLeadTime[];sku_options?:SkuOption[];attachments?:Attachment[];}interface SkuCreate extends ResourceCreate{code:string;name:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;shipping_category:ShippingCategoryRel;}interface SkuUpdate extends ResourceUpdate{code?:string;name?:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;shipping_category?:ShippingCategoryRel;}declare class Skus extends ApiResource{static readonly TYPE:'skus';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;create(resource:SkuCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;update(resource:SkuUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipping_category(skuId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;prices(skuId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;stock_items(skuId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;delivery_lead_times(skuId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<DeliveryLeadTime>>;sku_options(skuId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuOption>>;attachments(skuId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isSku(resource:any):resource is Sku;relationship(id:string|ResourceId|null):SkuRel;type():string;}export default Skus;export{Sku,SkuCreate,SkuUpdate};
|
package/lib/resources/skus.js
DELETED
@@ -1 +0,0 @@
|
|
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({...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({...e,type:r.TYPE},s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`skus/${e}/shipping_category`,s,t)}async prices(e,s,t){return this.resources.fetch({type:"prices"},`skus/${e}/prices`,s,t)}async stock_items(e,s,t){return this.resources.fetch({type:"stock_items"},`skus/${e}/stock_items`,s,t)}async delivery_lead_times(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`skus/${e}/delivery_lead_times`,s,t)}async sku_options(e,s,t){return this.resources.fetch({type:"sku_options"},`skus/${e}/sku_options`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`skus/${e}/attachments`,s,t)}isSku(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="skus";export default r;
|