UNPKG

baasic-sdk-javascript

Version:

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

48 lines (47 loc) 2.55 kB
/** * @module commerceInvoiceStreamsClient * @description Commerce Invoice Streams Client provides an easy way to consume Commerce REST API end-points. In order to obtain a needed routes `commerceInvoiceStreamsClient` uses `commerceInvoiceStreamsRoute`. */ import { ApiClient, IHttpResponse } from '../../../httpApi'; import { CommerceInvoiceStreamsRoute } from '../'; export declare class CommerceInvoiceStreamsClient { protected commerceInvoiceStreamsRoute: CommerceInvoiceStreamsRoute; protected apiClient: ApiClient; readonly routeDefinition: CommerceInvoiceStreamsRoute; constructor(commerceInvoiceStreamsRoute: CommerceInvoiceStreamsRoute, apiClient: ApiClient); /** * Returns a promise that is resolved once the get action has been performed. Success response returns the invoice stream if successfully completed. * @method * @example // commerceInvoice is a resource previously fetched using get action. commerceInvoiceStreamsClient.get({id: commerceInvoice.id}) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ get(data: any): PromiseLike<IHttpResponse<any>>; /** * Returns a promise that is resolved once the get action has been performed. Success response returns the invoice stream as a blob. For more information on Blob objects please see [Blob Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob). * @method * @example // Request the original blob commerceInvoiceClient.getBlobl({id: commerceInvoice.id}) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ getBlob(data: any): PromiseLike<IHttpResponse<any>>; } /** * @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. */