UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

94 lines (74 loc) 2.55 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 V1Money = require('./V1Money'); /** * The V1SettlementEntry model module. * @module model/V1SettlementEntry */ /** * Constructs a new <code>V1SettlementEntry</code>. * V1SettlementEntry * @alias module:model/V1SettlementEntry * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>V1SettlementEntry</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/V1SettlementEntry} obj Optional instance to populate. * @return {module:model/V1SettlementEntry} The populated <code>V1SettlementEntry</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('payment_id')) { obj['payment_id'] = ApiClient.convertToType(data['payment_id'], 'String'); } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } if (data.hasOwnProperty('amount_money')) { obj['amount_money'] = V1Money.constructFromObject(data['amount_money']); } if (data.hasOwnProperty('fee_money')) { obj['fee_money'] = V1Money.constructFromObject(data['fee_money']); } } return obj; } /** * The settlement's unique identifier. * @member {String} payment_id */ exports.prototype['payment_id'] = undefined; /** * The settlement's current status. See [V1SettlementEntryType](#type-v1settlemententrytype) for possible values * @member {String} type */ exports.prototype['type'] = undefined; /** * The total amount of money this entry contributes to the total settlement amount. * @member {module:model/V1Money} amount_money */ exports.prototype['amount_money'] = undefined; /** * The amount of all Square fees associated with this settlement entry. This value is always negative or zero. * @member {module:model/V1Money} fee_money */ exports.prototype['fee_money'] = undefined; module.exports = exports;