UNPKG

baasic-sdk-javascript

Version:

JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).

62 lines (61 loc) 3.72 kB
/** * @module shoppingCartItemsBatchClient * @description Shopping Cart Item Batch Client provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Shopping Cart Item Batch Route Definition to obtain needed routes while other routes will be obtained through HAL. By convention, all route services use the same function names as their corresponding services. */ import { ApiClient, IHttpResponse } from '../../httpApi'; import { ShoppingCartItemBatchRoute } from './'; import { IShoppingCartItem } from './contracts'; export declare class ShoppingCartItemBatchClient { protected shoppingCartItemBatchRoute: ShoppingCartItemBatchRoute; protected apiClient: ApiClient; readonly routeDefinition: ShoppingCartItemBatchRoute; constructor(shoppingCartItemBatchRoute: ShoppingCartItemBatchRoute, apiClient: ApiClient); /** * Returns a promise that is resolved once the update action has been performed; this action updates specified shopping cart item resources. * @method * @param data A collection of shopping cart item objects used to update specified shopping cart item resources. * @returns A promise that is resolved once the update action has been performed. * @example shoppingCartItemsBatchClient.update(files) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ update(data: IShoppingCartItem[]): PromiseLike<IHttpResponse<void>>; /** * Returns a promise that is resolved once the remove action has been performed. This action will remove shopping cart item resources from the system if successfully completed. Specified shopping cart items and all accompanying derived resources will be removed from the system. * @method * @param ids Collection of shopping cart item Id which uniquely identifies shopping cart item resources that need to be deleted. * @example // Remove original shopping cart item resources shoppingCartItemsBatchClient.remove([<shopping-cart-item-id>]) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ remove(ids: string[]): PromiseLike<IHttpResponse<void>>; /** * Returns a promise that is resolved once the create action has been performed; this action creates specified shopping cart item resources. * @method * @param data A collection of shopping cart item objects used to create specified shopping cart item resources. * @returns A promise that is resolved once the create action has been performed. * @example shoppingCartItemsBatchClient.create(files) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ create(data: IShoppingCartItem[]): PromiseLike<IHttpResponse<void>>; } /** * @overview ***Notes:** - Refer to the [REST API documentation](http://dev.baasic.com/api/reference/home) for detailed information about available Baasic REST API end-points. - All end-point objects are transformed by the associated route service. */