square-connect
Version:
JavaScript client library for the Square Connect v2 API
84 lines (65 loc) • 2.6 kB
JavaScript
/**
* Square Connect API
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: developers@squareup.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
*
*/
var ApiClient = require('../ApiClient');
/**
* The ListCustomersRequest model module.
* @module model/ListCustomersRequest
*/
/**
* Constructs a new <code>ListCustomersRequest</code>.
* Defines the query parameters that can be provided in a request to the ListCustomers endpoint.
* @alias module:model/ListCustomersRequest
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>ListCustomersRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ListCustomersRequest} obj Optional instance to populate.
* @return {module:model/ListCustomersRequest} The populated <code>ListCustomersRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('cursor')) {
obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
}
if (data.hasOwnProperty('sort_field')) {
obj['sort_field'] = ApiClient.convertToType(data['sort_field'], 'String');
}
if (data.hasOwnProperty('sort_order')) {
obj['sort_order'] = ApiClient.convertToType(data['sort_order'], 'String');
}
}
return obj;
}
/**
* A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
* @member {String} cursor
*/
exports.prototype['cursor'] = undefined;
/**
* Indicates how Customers should be sorted. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values
* @member {String} sort_field
*/
exports.prototype['sort_field'] = undefined;
/**
* Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values
* @member {String} sort_order
*/
exports.prototype['sort_order'] = undefined;
module.exports = exports;