ordercloud-javascript-sdk
Version:
The offical Javascript SDK for the Ordercloud ecommerce API
456 lines (455 loc) • 35.8 kB
TypeScript
import { ListPage } from '../models/ListPage';
import { Searchable } from '../models/Searchable';
import { Sortable } from '../models/Sortable';
import { Filters } from '../models/Filters';
import { Order } from '../models/Order';
import { OrderDirection } from '../models/OrderDirection';
import { SearchType } from '../models/SearchType';
import { OrderApproval } from '../models/OrderApproval';
import { OrderApprovalInfo } from '../models/OrderApprovalInfo';
import { Address } from '../models/Address';
import { User } from '../models/User';
import { EligiblePromotion } from '../models/EligiblePromotion';
import { OrderSplitResult } from '../models/OrderSplitResult';
import { OrderPromotion } from '../models/OrderPromotion';
import { RefreshPromosResponse } from '../models/RefreshPromosResponse';
import { Shipment } from '../models/Shipment';
import { PartialDeep } from '../models/PartialDeep';
import { RequiredDeep } from '../models/RequiredDeep';
import { RequestOptions } from '../models/RequestOptions';
declare class Orders {
private impersonating;
/**
* @ignore
* not part of public api, don't include in generated docs
*/
constructor();
/**
* List orders
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param listOptions.buyerID ID of the buyer.
* @param listOptions.supplierID ID of the supplier.
* @param listOptions.from Lower bound of date range that the order was created.
* @param listOptions.to Upper bound of date range that the order was created.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.searchType Type of search to perform.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
List<TOrder extends Order>(direction: OrderDirection, listOptions?: {
buyerID?: string;
supplierID?: string;
from?: string;
to?: string;
search?: string;
searchOn?: Searchable<'Orders.List'>;
searchType?: SearchType;
sortBy?: Sortable<'Orders.List'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TOrder>>>;
/**
* Create an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/create|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param order
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Create<TOrder extends Order>(direction: OrderDirection, order: Order, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Retrieve an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/get|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Get<TOrder extends Order>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Create or update an order If an object with the same ID already exists, it will be overwritten.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/save|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param order
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Save<TOrder extends Order>(direction: OrderDirection, orderID: string, order: Order, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Delete an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/delete|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Delete(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<void>;
/**
* Partially update an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/patch|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param order
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Patch<TOrder extends Order>(direction: OrderDirection, orderID: string, order: PartialDeep<Order>, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Auto-apply promotions to an order Apply up to 100 eligible promotions where AutoApply=true.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/apply-promotions|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ApplyPromotions<TOrder extends Order>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* List order approvals Returns all Approvals associated with the Order.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list-approvals|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ListApprovals<TOrderApproval extends OrderApproval>(direction: OrderDirection, orderID: string, listOptions?: {
search?: string;
searchOn?: Searchable<'Orders.ListApprovals'>;
sortBy?: Sortable<'Orders.ListApprovals'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TOrderApproval>>>;
/**
* Approve an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/approve|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param orderApprovalInfo
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Approve<TOrder extends Order>(direction: OrderDirection, orderID: string, orderApprovalInfo: OrderApprovalInfo, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Set a billing address Use only when the address is not to be saved/reused.<br/></br>To use a saved address (i.e. from the Addresses resource), PATCH the order's BillingAddressID property instead.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/set-billing-address|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param address Required fields: Street1, City, Country
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
SetBillingAddress<TOrder extends Order>(direction: OrderDirection, orderID: string, address: Address, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Partially update an order billing address Not allowed on unsubmitted orders where BillingAddressID has been set. In that case, use the Addresses resource to update the saved address.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/patch-billing-address|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param address
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
PatchBillingAddress<TOrder extends Order>(direction: OrderDirection, orderID: string, address: PartialDeep<Address>, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Cancel an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/cancel|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Cancel<TOrder extends Order>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Complete an order Use only when an order doesn't need a shipment. You will not be able to ship or reopen an order after completing it.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/complete|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Complete<TOrder extends Order>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Decline an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/decline|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param orderApprovalInfo
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Decline<TOrder extends Order>(direction: OrderDirection, orderID: string, orderApprovalInfo: OrderApprovalInfo, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* List order eligible approvers Returns all Users who can approve or decline this order (but have not done so).
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list-eligible-approvers|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ListEligibleApprovers<TUser extends User>(direction: OrderDirection, orderID: string, listOptions?: {
search?: string;
searchOn?: Searchable<'Orders.ListEligibleApprovers'>;
sortBy?: Sortable<'Orders.ListEligibleApprovers'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TUser>>>;
/**
* List eligible promotions for an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list-eligible-promotions|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ListEligiblePromotions<TEligiblePromotion extends EligiblePromotion>(direction: OrderDirection, orderID: string, listOptions?: {
search?: string;
searchOn?: Searchable<'Orders.ListEligiblePromotions'>;
sortBy?: Sortable<'Orders.ListEligiblePromotions'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TEligiblePromotion>>>;
/**
* Forward an order Creates and submits 0 or more outgoing Orders to Suppliers, one for each unique Product.DefaultSupplierID on this Order.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/forward|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Forward<TOrderSplitResult extends OrderSplitResult>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrderSplitResult>>;
/**
* Partially update an order from user Only FirstName, LastName, and Email can be updated.<br/></br>Primarily used to facilitate guest checkout scenarios.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/patch-from-user|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param user
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
PatchFromUser<TOrder extends Order>(direction: OrderDirection, orderID: string, user: PartialDeep<User>, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* List order promotions
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list-promotions|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ListPromotions<TOrderPromotion extends OrderPromotion>(direction: OrderDirection, orderID: string, listOptions?: {
search?: string;
searchOn?: Searchable<'Orders.ListPromotions'>;
sortBy?: Sortable<'Orders.ListPromotions'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TOrderPromotion>>>;
/**
* Add a promotion to an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/add-promotion|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param promoCode Promo code of the order promotion.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
AddPromotion<TOrderPromotion extends OrderPromotion>(direction: OrderDirection, orderID: string, promoCode: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrderPromotion>>;
/**
* Remove a promotion from an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/remove-promotion|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param promoCode Promo code of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
RemovePromotion<TOrder extends Order>(direction: OrderDirection, orderID: string, promoCode: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Refresh promotions on an order Re-calculates promotion discounts, removes promotions that are no longer valid, and adds eligible promotions where AutoApply=true (up to limit of 100)
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/refresh-promotions|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
RefreshPromotions<TRefreshPromosResponse extends RefreshPromosResponse>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TRefreshPromosResponse>>;
/**
* Create a new shipment containing all items on an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/ship|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param shipment
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Ship<TOrder extends Order>(direction: OrderDirection, orderID: string, shipment: Shipment, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* List shipments for an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/list-shipments|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param listOptions.search Word or phrase to search for.
* @param listOptions.searchOn Comma-delimited list of fields to search on.
* @param listOptions.sortBy Comma-delimited list of fields to sort by.
* @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.
* @param listOptions.pageSize Number of results to return per page.
* @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
ListShipments<TShipment extends Shipment>(direction: OrderDirection, orderID: string, listOptions?: {
search?: string;
searchOn?: Searchable<'Orders.ListShipments'>;
sortBy?: Sortable<'Orders.ListShipments'>;
page?: number;
pageSize?: number;
filters?: Filters;
}, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TShipment>>>;
/**
* Set a shipping address Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the order's ShippingAddressID property instead. The address used will be populated on the ShippingAddress property of each LineItem.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/set-shipping-address|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param address Required fields: Street1, City, Country
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
SetShippingAddress<TOrder extends Order>(direction: OrderDirection, orderID: string, address: Address, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Partially update an order shipping address Not allowed on unsubmitted orders where ShippingAddressID has been set. In that case, use the Addresses resource to update the saved address.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/patch-shipping-address|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param address
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
PatchShippingAddress<TOrder extends Order>(direction: OrderDirection, orderID: string, address: PartialDeep<Address>, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Split an order Creates, but does not submit, 0 or more outgoing Orders to Suppliers, one for each unique Product.DefaultSupplierID on this Order.
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/split|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Split<TOrderSplitResult extends OrderSplitResult>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrderSplitResult>>;
/**
* Submit an order
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/submit|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Submit<TOrder extends Order>(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TOrder>>;
/**
* Validate an order in its current state
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/orders/validate|api docs} for more info
*
* @param direction Direction of the order, from the current user's perspective.
* @param orderID ID of the order.
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
Validate(direction: OrderDirection, orderID: string, requestOptions?: RequestOptions): Promise<void>;
/**
* @description
* enables impersonation by calling the subsequent method with the stored impersonation token
*
* @example
* Orders.As().List() // lists Orders using the impersonated users' token
*/
As(): this;
}
declare const _default: Orders;
export default _default;