square-connect
Version:
JavaScript client library for the Square Connect v2 API
77 lines (61 loc) • 2.28 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 CatalogQueryPrefix model module.
* @module model/CatalogQueryPrefix
*/
/**
* Constructs a new <code>CatalogQueryPrefix</code>.
* The query filter to return the search result whose named attribute values are prefixed by the specified attribute value.
* @alias module:model/CatalogQueryPrefix
* @class
* @param attributeName {String} The name of the attribute to be searched.
* @param attributePrefix {String} The desired prefix of the search attribute value.
*/
var exports = function(attributeName, attributePrefix) {
var _this = this;
_this['attribute_name'] = attributeName;
_this['attribute_prefix'] = attributePrefix;
};
/**
* Constructs a <code>CatalogQueryPrefix</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/CatalogQueryPrefix} obj Optional instance to populate.
* @return {module:model/CatalogQueryPrefix} The populated <code>CatalogQueryPrefix</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('attribute_name')) {
obj['attribute_name'] = ApiClient.convertToType(data['attribute_name'], 'String');
}
if (data.hasOwnProperty('attribute_prefix')) {
obj['attribute_prefix'] = ApiClient.convertToType(data['attribute_prefix'], 'String');
}
}
return obj;
}
/**
* The name of the attribute to be searched.
* @member {String} attribute_name
*/
exports.prototype['attribute_name'] = undefined;
/**
* The desired prefix of the search attribute value.
* @member {String} attribute_prefix
*/
exports.prototype['attribute_prefix'] = undefined;
module.exports = exports;