ordercloud-javascript-sdk
Version:
The offical Javascript SDK for the Ordercloud ecommerce API
47 lines (46 loc) • 2.62 kB
TypeScript
import { BundleItems } from '../models/BundleItems';
import { LineItem } from '../models/LineItem';
import { RequiredDeep } from '../models/RequiredDeep';
import { RequestOptions } from '../models/RequestOptions';
declare class BundleSubscriptionItems {
private impersonating;
/**
* @ignore
* not part of public api, don't include in generated docs
*/
constructor();
/**
* Create a bundle subscription item
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/bundle-subscription-items/create|api docs} for more info
*
* @param subscriptionID ID of the subscription.
* @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>(subscriptionID: string, bundleID: string, bundleItems: BundleItems, requestOptions?: RequestOptions): Promise<RequiredDeep<TLineItem>>;
/**
* Delete a bundle subscription item
* Check out the {@link https://ordercloud.io/api-reference/orders-and-fulfillment/bundle-subscription-items/delete|api docs} for more info
*
* @param subscriptionID ID of the subscription.
* @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(subscriptionID: string, bundleID: string, bundleItemID: string, requestOptions?: RequestOptions): Promise<void>;
/**
* @description
* enables impersonation by calling the subsequent method with the stored impersonation token
*
* @example
* BundleSubscriptionItems.As().List() // lists BundleSubscriptionItems using the impersonated users' token
*/
As(): this;
}
declare const _default: BundleSubscriptionItems;
export default _default;