UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

142 lines (121 loc) 5.17 kB
/** * CyberSource Merged Spec * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html * * OpenAPI spec version: 0.0.1 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.38 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Invoicingv2invoicesInvoiceInformation = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The Invoicingv2invoicesInvoiceInformation model module. * @module model/Invoicingv2invoicesInvoiceInformation * @version 0.0.1 */ /** * Constructs a new <code>Invoicingv2invoicesInvoiceInformation</code>. * Contains all of the invoice-specific fields, such as the invoice number and due date. * @alias module:model/Invoicingv2invoicesInvoiceInformation * @class * @param description {String} The description included in the invoice. * @param dueDate {Date} The invoice due date. This field is required for creating an invoice. Format: `YYYY-MM-DD`, where `YYYY` = year, `MM` = month, and `DD` = day */ var exports = function(description, dueDate) { var _this = this; _this['description'] = description; _this['dueDate'] = dueDate; }; /** * Constructs a <code>Invoicingv2invoicesInvoiceInformation</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/Invoicingv2invoicesInvoiceInformation} obj Optional instance to populate. * @return {module:model/Invoicingv2invoicesInvoiceInformation} The populated <code>Invoicingv2invoicesInvoiceInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('invoiceNumber')) { obj['invoiceNumber'] = ApiClient.convertToType(data['invoiceNumber'], 'String'); } if (data.hasOwnProperty('description')) { obj['description'] = ApiClient.convertToType(data['description'], 'String'); } if (data.hasOwnProperty('dueDate')) { obj['dueDate'] = ApiClient.convertToType(data['dueDate'], 'Date'); } if (data.hasOwnProperty('expirationDate')) { obj['expirationDate'] = ApiClient.convertToType(data['expirationDate'], 'Date'); } if (data.hasOwnProperty('sendImmediately')) { obj['sendImmediately'] = ApiClient.convertToType(data['sendImmediately'], 'Boolean'); } if (data.hasOwnProperty('allowPartialPayments')) { obj['allowPartialPayments'] = ApiClient.convertToType(data['allowPartialPayments'], 'Boolean'); } if (data.hasOwnProperty('deliveryMode')) { obj['deliveryMode'] = ApiClient.convertToType(data['deliveryMode'], 'String'); } } return obj; } /** * Invoice Number. * @member {String} invoiceNumber */ exports.prototype['invoiceNumber'] = undefined; /** * The description included in the invoice. * @member {String} description */ exports.prototype['description'] = undefined; /** * The invoice due date. This field is required for creating an invoice. Format: `YYYY-MM-DD`, where `YYYY` = year, `MM` = month, and `DD` = day * @member {Date} dueDate */ exports.prototype['dueDate'] = undefined; /** * Define an expiration date for the link. Format: `YYYY-MM-DD`, where `YYYY` = year, `MM` = month, and `DD` = day * @member {Date} expirationDate */ exports.prototype['expirationDate'] = undefined; /** * If set to `true`, we send the invoice immediately. If set to `false`, the invoice remains in draft mode. * @member {Boolean} sendImmediately * @default false */ exports.prototype['sendImmediately'] = false; /** * If set to `true`, the payer can make a partial invoice payment. * @member {Boolean} allowPartialPayments * @default false */ exports.prototype['allowPartialPayments'] = false; /** * If this field is set to 'None', an invoice will be generated with the status 'CREATED', but no email will be dispatched. Possible values: - `None` - `Email` * @member {String} deliveryMode */ exports.prototype['deliveryMode'] = undefined; return exports; }));