square-connect
Version:
JavaScript client library for the Square Connect v2 API
85 lines (66 loc) • 2.66 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 OrderLineItemPricingBlocklistsBlockedTax model module.
* Note: This model is in beta.
* @module model/OrderLineItemPricingBlocklistsBlockedTax
*/
/**
* Constructs a new <code>OrderLineItemPricingBlocklistsBlockedTax</code>.
* A tax to block from applying to a line item. The tax must be identified by either `tax_uid` or `tax_catalog_object_id`, but not both.
* @alias module:model/OrderLineItemPricingBlocklistsBlockedTax
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>OrderLineItemPricingBlocklistsBlockedTax</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/OrderLineItemPricingBlocklistsBlockedTax} obj Optional instance to populate.
* @return {module:model/OrderLineItemPricingBlocklistsBlockedTax} The populated <code>OrderLineItemPricingBlocklistsBlockedTax</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('uid')) {
obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
}
if (data.hasOwnProperty('tax_uid')) {
obj['tax_uid'] = ApiClient.convertToType(data['tax_uid'], 'String');
}
if (data.hasOwnProperty('tax_catalog_object_id')) {
obj['tax_catalog_object_id'] = ApiClient.convertToType(data['tax_catalog_object_id'], 'String');
}
}
return obj;
}
/**
* Unique ID of the `BlockedTax` within the order.
* @member {String} uid
*/
exports.prototype['uid'] = undefined;
/**
* The `uid` of the tax that should be blocked. Use this field to block ad-hoc taxes. For catalog taxes use the `tax_catalog_object_id` field.
* @member {String} tax_uid
*/
exports.prototype['tax_uid'] = undefined;
/**
* The `catalog_object_id` of the tax that should be blocked. Use this field to block catalog taxes. For ad-hoc taxes use the `tax_uid` field.
* @member {String} tax_catalog_object_id
*/
exports.prototype['tax_catalog_object_id'] = undefined;
module.exports = exports;