UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

85 lines (66 loc) 2.73 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 ListDisputesRequest model module. * Note: This model is in beta. * @module model/ListDisputesRequest */ /** * Constructs a new <code>ListDisputesRequest</code>. * Defines the request parameters for the &#x60;ListDisputes&#x60; endpoint. * @alias module:model/ListDisputesRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>ListDisputesRequest</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/ListDisputesRequest} obj Optional instance to populate. * @return {module:model/ListDisputesRequest} The populated <code>ListDisputesRequest</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('states')) { obj['states'] = ApiClient.convertToType(data['states'], ['String']); } if (data.hasOwnProperty('location_id')) { obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String'); } } return obj; } /** * 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; /** * The dispute states to filter the result. If not specified, the endpoint returns all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`). See [DisputeState](#type-disputestate) for possible values * @member {Array.<String>} states */ exports.prototype['states'] = undefined; /** * The ID of the location for which to return a list of disputes. If not specified, the endpoint returns all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`) associated with all locations. * @member {String} location_id */ exports.prototype['location_id'] = undefined; module.exports = exports;