UNPKG

ordercloud-javascript-sdk

Version:

The offical Javascript SDK for the Ordercloud ecommerce API

61 lines (60 loc) 4.15 kB
import { SubscriptionIntegration } from '../models/SubscriptionIntegration'; import { PartialDeep } from '../models/PartialDeep'; import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; declare class SubscriptionIntegrations { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Retrieve a subscription integration * Check out the {@link https://ordercloud.io/api-reference/integrations/subscription-integrations/get|api docs} for more info * * @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<TSubscriptionIntegration extends SubscriptionIntegration>(requestOptions?: RequestOptions): Promise<RequiredDeep<TSubscriptionIntegration>>; /** * Create or update a subscription integration If an object with the same ID already exists, it will be overwritten. * Check out the {@link https://ordercloud.io/api-reference/integrations/subscription-integrations/save|api docs} for more info * * @param subscriptionIntegration Required fields: ApiClientID, HashKey * @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<TSubscriptionIntegration extends SubscriptionIntegration>(subscriptionIntegration: SubscriptionIntegration, requestOptions?: RequestOptions): Promise<RequiredDeep<TSubscriptionIntegration>>; /** * Delete a subscription integration * Check out the {@link https://ordercloud.io/api-reference/integrations/subscription-integrations/delete|api docs} for more info * * @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(requestOptions?: RequestOptions): Promise<void>; /** * Partially update a subscription integration * Check out the {@link https://ordercloud.io/api-reference/integrations/subscription-integrations/patch|api docs} for more info * * @param subscriptionIntegration * @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<TSubscriptionIntegration extends SubscriptionIntegration>(subscriptionIntegration: PartialDeep<SubscriptionIntegration>, requestOptions?: RequestOptions): Promise<RequiredDeep<TSubscriptionIntegration>>; /** * @description * enables impersonation by calling the subsequent method with the stored impersonation token * * @example * SubscriptionIntegrations.As().List() // lists SubscriptionIntegrations using the impersonated users' token */ As(): this; } declare const _default: SubscriptionIntegrations; export default _default;