square-connect
Version:
JavaScript client library for the Square Connect v2 API
113 lines (91 loc) • 3.97 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');
var Range = require('./Range');
/**
* The CustomAttributeFilter model module.
* Note: This model is in beta.
* @module model/CustomAttributeFilter
*/
/**
* Constructs a new <code>CustomAttributeFilter</code>.
* Supported custom attribute query expressions for calling the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint to search for items or item variations.
* @alias module:model/CustomAttributeFilter
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CustomAttributeFilter</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/CustomAttributeFilter} obj Optional instance to populate.
* @return {module:model/CustomAttributeFilter} The populated <code>CustomAttributeFilter</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('custom_attribute_definition_id')) {
obj['custom_attribute_definition_id'] = ApiClient.convertToType(data['custom_attribute_definition_id'], 'String');
}
if (data.hasOwnProperty('key')) {
obj['key'] = ApiClient.convertToType(data['key'], 'String');
}
if (data.hasOwnProperty('string_filter')) {
obj['string_filter'] = ApiClient.convertToType(data['string_filter'], 'String');
}
if (data.hasOwnProperty('number_filter')) {
obj['number_filter'] = Range.constructFromObject(data['number_filter']);
}
if (data.hasOwnProperty('selection_uids_filter')) {
obj['selection_uids_filter'] = ApiClient.convertToType(data['selection_uids_filter'], ['String']);
}
if (data.hasOwnProperty('bool_filter')) {
obj['bool_filter'] = ApiClient.convertToType(data['bool_filter'], 'Boolean');
}
}
return obj;
}
/**
* A query expression to filter items or item variations by matching their custom attributes' `custom_attribute_definition_id` property value against the the specified id.
* @member {String} custom_attribute_definition_id
*/
exports.prototype['custom_attribute_definition_id'] = undefined;
/**
* A query expression to filter items or item variations by matching their custom attributes' `key` property value against the specified key.
* @member {String} key
*/
exports.prototype['key'] = undefined;
/**
* A query expression to filter items or item variations by matching their custom attributes' `string_value` property value against the specified text.
* @member {String} string_filter
*/
exports.prototype['string_filter'] = undefined;
/**
* A query expression to filter items or item variations with their custom attributes containing a number value within the specified range.
* @member {module:model/Range} number_filter
*/
exports.prototype['number_filter'] = undefined;
/**
* A query expression to filter items or item variations by matching their custom attributes' `selection_uid_values` values against the specified selection uids.
* @member {Array.<String>} selection_uids_filter
*/
exports.prototype['selection_uids_filter'] = undefined;
/**
* A query expression to filter items or item variations by matching their custom attributes' `boolean_value` property values against the specified Boolean expression.
* @member {Boolean} bool_filter
*/
exports.prototype['bool_filter'] = undefined;
module.exports = exports;