square-connect
Version:
JavaScript client library for the Square Connect v2 API
84 lines (65 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 CatalogImage model module.
* @module model/CatalogImage
*/
/**
* Constructs a new <code>CatalogImage</code>.
* An image file to use in Square catalogs. It can be associated with catalog items, item variations, and categories.
* @alias module:model/CatalogImage
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CatalogImage</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/CatalogImage} obj Optional instance to populate.
* @return {module:model/CatalogImage} The populated <code>CatalogImage</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('url')) {
obj['url'] = ApiClient.convertToType(data['url'], 'String');
}
if (data.hasOwnProperty('caption')) {
obj['caption'] = ApiClient.convertToType(data['caption'], 'String');
}
}
return obj;
}
/**
* The internal name to identify this image in calls to the Square API.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* The URL of this image, generated by Square after an image is uploaded using the `CreateCatalogImage` endpoint.
* @member {String} url
*/
exports.prototype['url'] = undefined;
/**
* A caption that describes what is shown in the image. Displayed in the Square Online Store. This is a searchable attribute for use in applicable query filters.
* @member {String} caption
*/
exports.prototype['caption'] = undefined;
module.exports = exports;