square-connect
Version:
JavaScript client library for the Square Connect v2 API
85 lines (66 loc) • 2.34 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 FilterValue model module.
* Note: This model is in beta.
* @module model/FilterValue
*/
/**
* Constructs a new <code>FilterValue</code>.
* A filter to select resources based on an exact field value. For any given value, the value can only be in one property. Depending on the field, either all properties can be set or only a subset will be available. Refer to the documentation of the field.
* @alias module:model/FilterValue
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>FilterValue</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/FilterValue} obj Optional instance to populate.
* @return {module:model/FilterValue} The populated <code>FilterValue</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('all')) {
obj['all'] = ApiClient.convertToType(data['all'], ['String']);
}
if (data.hasOwnProperty('any')) {
obj['any'] = ApiClient.convertToType(data['any'], ['String']);
}
if (data.hasOwnProperty('none')) {
obj['none'] = ApiClient.convertToType(data['none'], ['String']);
}
}
return obj;
}
/**
* A list of terms that must be present on the field of the resource.
* @member {Array.<String>} all
*/
exports.prototype['all'] = undefined;
/**
* A list of terms where at least one of them must be present on the field of the resource.
* @member {Array.<String>} any
*/
exports.prototype['any'] = undefined;
/**
* A list of terms that must not be present on the field the resource
* @member {Array.<String>} none
*/
exports.prototype['none'] = undefined;
module.exports = exports;