UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

85 lines (66 loc) 2.31 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'); var Money = require('./Money'); /** * The ProcessingFee model module. * @module model/ProcessingFee */ /** * Constructs a new <code>ProcessingFee</code>. * Represents the Square processing fee. * @alias module:model/ProcessingFee * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>ProcessingFee</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/ProcessingFee} obj Optional instance to populate. * @return {module:model/ProcessingFee} The populated <code>ProcessingFee</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('effective_at')) { obj['effective_at'] = ApiClient.convertToType(data['effective_at'], 'String'); } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } if (data.hasOwnProperty('amount_money')) { obj['amount_money'] = Money.constructFromObject(data['amount_money']); } } return obj; } /** * The timestamp of when the fee takes effect, in RFC 3339 format. * @member {String} effective_at */ exports.prototype['effective_at'] = undefined; /** * The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`. * @member {String} type */ exports.prototype['type'] = undefined; /** * The fee amount, which might be negative, that is assessed or adjusted by Square. Positive values represent funds being assessed, while negative values represent funds being returned. * @member {module:model/Money} amount_money */ exports.prototype['amount_money'] = undefined; module.exports = exports;