UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

85 lines (66 loc) 2.44 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 InvoiceCustomField model module. * Note: This model is in beta. * @module model/InvoiceCustomField */ /** * Constructs a new <code>InvoiceCustomField</code>. * An additional seller-defined and customer-facing field to include on the invoice. For more information, see [Custom fields](/docs/invoices-api/overview#custom-fields). * @alias module:model/InvoiceCustomField * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>InvoiceCustomField</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/InvoiceCustomField} obj Optional instance to populate. * @return {module:model/InvoiceCustomField} The populated <code>InvoiceCustomField</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('label')) { obj['label'] = ApiClient.convertToType(data['label'], 'String'); } if (data.hasOwnProperty('value')) { obj['value'] = ApiClient.convertToType(data['value'], 'String'); } if (data.hasOwnProperty('placement')) { obj['placement'] = ApiClient.convertToType(data['placement'], 'String'); } } return obj; } /** * The label or title of the custom field. This field is required for a custom field. * @member {String} label */ exports.prototype['label'] = undefined; /** * The text of the custom field. If omitted, only the label is rendered. * @member {String} value */ exports.prototype['value'] = undefined; /** * The location of the custom field on the invoice. This field is required for a custom field. See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) for possible values * @member {String} placement */ exports.prototype['placement'] = undefined; module.exports = exports;