baasic-sdk-javascript
Version:
JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
63 lines (62 loc) • 3.11 kB
TypeScript
/**
* @module commerceCountryStateBatchClient
* @description Commerce Country State Batch Client provides an easy way to consume Commerce REST API end-points. In order to obtain a needed routes `commerceCountryStateBatchClient` uses `commerceCountryStateBatchRoute`.
*/
import { ApiClient, IHttpResponse } from '../../../../httpApi';
import { CommerceLookupsCountryStateBatchRoute } from '../../';
export declare class CommerceLookupsCountryStateBatchClient {
protected commerceLookupsCountryStateBatchRoute: CommerceLookupsCountryStateBatchRoute;
protected apiClient: ApiClient;
readonly routeDefinition: CommerceLookupsCountryStateBatchRoute;
constructor(commerceLookupsCountryStateBatchRoute: CommerceLookupsCountryStateBatchRoute, apiClient: ApiClient);
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resources.
* @method
* @example commerceLookupsCountryStateBatchClient.create([{
countryId: '<country-id>',
name : '<name>',
abrv: '<abbreviation>',
description: '<description>'
}])
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create(data: any): PromiseLike<IHttpResponse<any>>;
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates specified commerce resources.
* @method
* @example commerceLookupsCountryStateBatchClient.update(commerceCountryStates)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update(data: any): PromiseLike<IHttpResponse<void>>;
/**
* Returns a promise that is resolved once the remove commerce action has been performed. This action will remove commerce resources from the system if successfully completed.
* @method
* @example commerceLookupsCountryStateBatchClient.remove(commerceCountryStateIds)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove(ids: string[]): PromiseLike<IHttpResponse<void>>;
}
/**
* @copyright (c) 2017 Mono Ltd
* @license MIT
* @author Mono Ltd
* @overview
***Notes:**
- Refer to the [Baasic REST API](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.
*/