UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

103 lines (82 loc) 3.17 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 InvoicePaymentReminder model module. * Note: This model is in beta. * @module model/InvoicePaymentReminder */ /** * Constructs a new <code>InvoicePaymentReminder</code>. * Describes a payment request reminder (automatic notification) that Square sends to the customer. You configure a reminder relative to the payment request &#x60;due_date&#x60;. * @alias module:model/InvoicePaymentReminder * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>InvoicePaymentReminder</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/InvoicePaymentReminder} obj Optional instance to populate. * @return {module:model/InvoicePaymentReminder} The populated <code>InvoicePaymentReminder</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('relative_scheduled_days')) { obj['relative_scheduled_days'] = ApiClient.convertToType(data['relative_scheduled_days'], 'Number'); } if (data.hasOwnProperty('message')) { obj['message'] = ApiClient.convertToType(data['message'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } if (data.hasOwnProperty('sent_at')) { obj['sent_at'] = ApiClient.convertToType(data['sent_at'], 'String'); } } return obj; } /** * A Square-assigned ID that uniquely identifies the reminder within the `InvoicePaymentRequest`. * @member {String} uid */ exports.prototype['uid'] = undefined; /** * The number of days before (a negative number) or after (a positive number) the payment request `due_date` when the reminder is sent. For example, -3 indicates that the reminder should be sent 3 days before the payment request `due_date`. * @member {Number} relative_scheduled_days */ exports.prototype['relative_scheduled_days'] = undefined; /** * The reminder message. * @member {String} message */ exports.prototype['message'] = undefined; /** * The status of the reminder. See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values * @member {String} status */ exports.prototype['status'] = undefined; /** * If sent, the timestamp when the reminder was sent, in RFC 3339 format. * @member {String} sent_at */ exports.prototype['sent_at'] = undefined; module.exports = exports;