UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

129 lines (105 loc) 4.54 kB
/** * 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 ListPaymentRefundsRequest model module. * @module model/ListPaymentRefundsRequest */ /** * Constructs a new <code>ListPaymentRefundsRequest</code>. * Retrieves a list of refunds for the account making the request. The maximum results per page is 100. * @alias module:model/ListPaymentRefundsRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>ListPaymentRefundsRequest</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/ListPaymentRefundsRequest} obj Optional instance to populate. * @return {module:model/ListPaymentRefundsRequest} The populated <code>ListPaymentRefundsRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('begin_time')) { obj['begin_time'] = ApiClient.convertToType(data['begin_time'], 'String'); } if (data.hasOwnProperty('end_time')) { obj['end_time'] = ApiClient.convertToType(data['end_time'], 'String'); } if (data.hasOwnProperty('sort_order')) { obj['sort_order'] = ApiClient.convertToType(data['sort_order'], 'String'); } if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); } if (data.hasOwnProperty('location_id')) { obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } if (data.hasOwnProperty('source_type')) { obj['source_type'] = ApiClient.convertToType(data['source_type'], 'String'); } if (data.hasOwnProperty('limit')) { obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); } } return obj; } /** * The timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. * @member {String} begin_time */ exports.prototype['begin_time'] = undefined; /** * The timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. * @member {String} end_time */ exports.prototype['end_time'] = undefined; /** * The order in which results are listed: - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default). * @member {String} sort_order */ exports.prototype['sort_order'] = undefined; /** * A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). * @member {String} cursor */ exports.prototype['cursor'] = undefined; /** * Limit results to the location supplied. By default, results are returned for all locations associated with the seller. * @member {String} location_id */ exports.prototype['location_id'] = undefined; /** * If provided, only refunds with the given status are returned. For a list of refund status values, see `PaymentRefund`. Default: If omitted, refunds are returned regardless of their status. * @member {String} status */ exports.prototype['status'] = undefined; /** * If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where `CARD` was specified as the payment source. Default: If omitted, refunds are returned regardless of the source type. * @member {String} source_type */ exports.prototype['source_type'] = undefined; /** * The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. If the supplied value is greater than 100, no more than 100 results are returned. Default: 100 * @member {Number} limit */ exports.prototype['limit'] = undefined; module.exports = exports;