UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

216 lines (184 loc) 8.76 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', 'model/Ptsv1pushfundstransferRecipientInformationPaymentInformation', 'model/Ptsv1pushfundstransferRecipientInformationPersonalIdentification'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ptsv1pushfundstransferRecipientInformationPaymentInformation'), require('./Ptsv1pushfundstransferRecipientInformationPersonalIdentification')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ptsv1pushfundstransferRecipientInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformation, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPersonalIdentification); } }(this, function(ApiClient, Ptsv1pushfundstransferRecipientInformationPaymentInformation, Ptsv1pushfundstransferRecipientInformationPersonalIdentification) { 'use strict'; /** * The Ptsv1pushfundstransferRecipientInformation model module. * @module model/Ptsv1pushfundstransferRecipientInformation * @version 0.0.1 */ /** * Constructs a new <code>Ptsv1pushfundstransferRecipientInformation</code>. * @alias module:model/Ptsv1pushfundstransferRecipientInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv1pushfundstransferRecipientInformation</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/Ptsv1pushfundstransferRecipientInformation} obj Optional instance to populate. * @return {module:model/Ptsv1pushfundstransferRecipientInformation} The populated <code>Ptsv1pushfundstransferRecipientInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('paymentInformation')) { obj['paymentInformation'] = Ptsv1pushfundstransferRecipientInformationPaymentInformation.constructFromObject(data['paymentInformation']); } if (data.hasOwnProperty('address1')) { obj['address1'] = ApiClient.convertToType(data['address1'], 'String'); } if (data.hasOwnProperty('address2')) { obj['address2'] = ApiClient.convertToType(data['address2'], 'String'); } if (data.hasOwnProperty('locality')) { obj['locality'] = ApiClient.convertToType(data['locality'], 'String'); } if (data.hasOwnProperty('postalCode')) { obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String'); } if (data.hasOwnProperty('administrativeArea')) { obj['administrativeArea'] = ApiClient.convertToType(data['administrativeArea'], 'String'); } if (data.hasOwnProperty('country')) { obj['country'] = ApiClient.convertToType(data['country'], 'String'); } if (data.hasOwnProperty('firstName')) { obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String'); } if (data.hasOwnProperty('middleName')) { obj['middleName'] = ApiClient.convertToType(data['middleName'], 'String'); } if (data.hasOwnProperty('lastName')) { obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String'); } if (data.hasOwnProperty('phoneNumber')) { obj['phoneNumber'] = ApiClient.convertToType(data['phoneNumber'], 'String'); } if (data.hasOwnProperty('email')) { obj['email'] = ApiClient.convertToType(data['email'], 'String'); } if (data.hasOwnProperty('personalIdentification')) { obj['personalIdentification'] = Ptsv1pushfundstransferRecipientInformationPersonalIdentification.constructFromObject(data['personalIdentification']); } if (data.hasOwnProperty('buildingNumber')) { obj['buildingNumber'] = ApiClient.convertToType(data['buildingNumber'], 'String'); } if (data.hasOwnProperty('streetName')) { obj['streetName'] = ApiClient.convertToType(data['streetName'], 'String'); } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } } return obj; } /** * @member {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformation} paymentInformation */ exports.prototype['paymentInformation'] = undefined; /** * First line of the recipient's address. Required for card payments * @member {String} address1 */ exports.prototype['address1'] = undefined; /** * Second line of the recipient's address * @member {String} address2 */ exports.prototype['address2'] = undefined; /** * Recipient city. * @member {String} locality */ exports.prototype['locality'] = undefined; /** * Recipient postal code. For USA, this must be a valid value of 5 digits or 5 digits hyphen 4 digits, for example '63368', '63368-5555'. For other regions, this can be alphanumeric, length 1-10. Mandatory for card payments. * @member {String} postalCode */ exports.prototype['postalCode'] = undefined; /** * The recipient's province, state or territory. Conditional, required if recipient's country is USA or CAN. Must be an ISO 3166-2 uppercase alpha 2 or 3 character country subdivision code. For example, Missouri is MO. See https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf Required for card payments. * @member {String} administrativeArea */ exports.prototype['administrativeArea'] = undefined; /** * Recipient country code. Use the ISO Standard Alpha Country Codes. https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf * @member {String} country */ exports.prototype['country'] = undefined; /** * First name of recipient. * @member {String} firstName */ exports.prototype['firstName'] = undefined; /** * Sender's middle name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. * @member {String} middleName */ exports.prototype['middleName'] = undefined; /** * Last name of recipient. * @member {String} lastName */ exports.prototype['lastName'] = undefined; /** * Customer's phone number. It is recommended that you include the country code when the order is from outside the U.S. * @member {String} phoneNumber */ exports.prototype['phoneNumber'] = undefined; /** * Customer's email address, including the full domain name. * @member {String} email */ exports.prototype['email'] = undefined; /** * @member {module:model/Ptsv1pushfundstransferRecipientInformationPersonalIdentification} personalIdentification */ exports.prototype['personalIdentification'] = undefined; /** * Building number in the street address. For example, if the street address is: Rua da Quitanda 187 then the building number is 187. Applicable to domestic Colombia transactions only. * @member {String} buildingNumber */ exports.prototype['buildingNumber'] = undefined; /** * This field contains the street name of the recipient's address. Applicable to domestic Colombia transactions only. * @member {String} streetName */ exports.prototype['streetName'] = undefined; /** * `B` for Business or `I` for individual. * @member {String} type */ exports.prototype['type'] = undefined; return exports; }));