UNPKG

ordercloud-javascript-sdk

Version:

The offical Javascript SDK for the Ordercloud ecommerce API

50 lines (49 loc) 2.8 kB
import { BundleItems } from '../models/BundleItems'; import { LineItem } from '../models/LineItem'; import { OrderDirection } from '../models/OrderDirection'; import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; declare class BundleLineItems { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Create a bundle line item * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/bundle-line-items/create|api docs} for more info * * @param direction Direction of the order, from the current user's perspective. * @param orderID ID of the order. * @param bundleID ID of the bundle. * @param bundleItems * @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<TLineItem extends LineItem>(direction: OrderDirection, orderID: string, bundleID: string, bundleItems: BundleItems, requestOptions?: RequestOptions): Promise<RequiredDeep<TLineItem>>; /** * Delete a bundle line item * Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/bundle-line-items/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 bundleID ID of the bundle. * @param bundleItemID ID of the bundle 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. */ Delete(direction: OrderDirection, orderID: string, bundleID: string, bundleItemID: string, requestOptions?: RequestOptions): Promise<void>; /** * @description * enables impersonation by calling the subsequent method with the stored impersonation token * * @example * BundleLineItems.As().List() // lists BundleLineItems using the impersonated users' token */ As(): this; } declare const _default: BundleLineItems; export default _default;