import { ListPage } from '../models/ListPage'; import { Searchable } from '../models/Searchable'; import { Sortable } from '../models/Sortable'; import { Filters } from '../models/Filters'; import { Shipment } from '../models/Shipment'; import { ShipmentItem } from '../models/ShipmentItem'; import { Address } from '../models/Address'; import { PartialDeep } from '../models/PartialDeep'; import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; declare class Shipments { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Get a list of shipments. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/list|api docs} for more info * * @param listOptions.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. Default: 1. 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. Default: 20, max: 100. * @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(listOptions?: { orderID?: string; search?: string; searchOn?: Searchable<'Shipments.List'>; sortBy?: Sortable<'Shipments.List'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise>>; /** * Create a new shipment. If ID is provided and an object with that ID already exists, a 409 (conflict) error is returned. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/create|api docs} for more info * * @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. */ Create(shipment: Shipment, requestOptions?: RequestOptions): Promise>; /** * Get a single shipment. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/get|api docs} for more info * * @param shipmentID ID of the 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. */ Get(shipmentID: string, requestOptions?: RequestOptions): Promise>; /** * Create or update a shipment. 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/shipments/save|api docs} for more info * * @param shipmentID ID of the shipment. * @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. */ Save(shipmentID: string, shipment: Shipment, requestOptions?: RequestOptions): Promise>; /** * Delete a shipment. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/delete|api docs} for more info * * @param shipmentID ID of the 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. */ Delete(shipmentID: string, requestOptions?: RequestOptions): Promise; /** * Partially update a shipment. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/patch|api docs} for more info * * @param shipmentID ID of the shipment. * @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. */ Patch(shipmentID: string, shipment: PartialDeep, requestOptions?: RequestOptions): Promise>; /** * Get a list of shipment items. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/list-items|api docs} for more info * * @param shipmentID ID of the shipment. * @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. Default: 1. 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. Default: 20, max: 100. * @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. */ ListItems(shipmentID: string, listOptions?: { search?: string; searchOn?: Searchable<'Shipments.ListItems'>; sortBy?: Sortable<'Shipments.ListItems'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise>>; /** * Create or update a shipment item. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/save-item|api docs} for more info * * @param shipmentID ID of the shipment. * @param shipmentItem Required fields: OrderID, LineItemID, QuantityShipped * @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. */ SaveItem(shipmentID: string, shipmentItem: ShipmentItem, requestOptions?: RequestOptions): Promise>; /** * Get a single shipment item. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/get-item|api docs} for more info * * @param shipmentID ID of the shipment. * @param orderID ID of the order. * @param lineItemID ID of the line item. * @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. */ GetItem(shipmentID: string, orderID: string, lineItemID: string, requestOptions?: RequestOptions): Promise>; /** * Delete a shipment item. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/delete-item|api docs} for more info * * @param shipmentID ID of the shipment. * @param orderID ID of the order. * @param lineItemID ID of the line item. * @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. */ DeleteItem(shipmentID: string, orderID: string, lineItemID: string, requestOptions?: RequestOptions): Promise; /** * Set a ship from 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 shipment's FromAddressID property instead. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/set-ship-from-address|api docs} for more info * * @param shipmentID ID of the shipment. * @param address Required fields: Street1, City, State, Zip, 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. */ SetShipFromAddress(shipmentID: string, address: Address, requestOptions?: RequestOptions): Promise>; /** * Set a ship to 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 shipment's ToAddressID property instead. * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/shipments/set-ship-to-address|api docs} for more info * * @param shipmentID ID of the shipment. * @param address Required fields: Street1, City, State, Zip, 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. */ SetShipToAddress(shipmentID: string, address: Address, requestOptions?: RequestOptions): Promise>; /** * @description * enables impersonation by calling the subsequent method with the stored impersonation token * * @example * Shipments.As().List() // lists Shipments using the impersonated users' token */ As(): this; } declare const _default: Shipments; export default _default;