UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

181 lines (153 loc) 8.15 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/Ucv1sessionsDataSenderInformationAccount'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ucv1sessionsDataSenderInformationAccount')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ucv1sessionsDataSenderInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ucv1sessionsDataSenderInformationAccount); } }(this, function(ApiClient, Ucv1sessionsDataSenderInformationAccount) { 'use strict'; /** * The Ucv1sessionsDataSenderInformation model module. * @module model/Ucv1sessionsDataSenderInformation * @version 0.0.1 */ /** * Constructs a new <code>Ucv1sessionsDataSenderInformation</code>. * @alias module:model/Ucv1sessionsDataSenderInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ucv1sessionsDataSenderInformation</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/Ucv1sessionsDataSenderInformation} obj Optional instance to populate. * @return {module:model/Ucv1sessionsDataSenderInformation} The populated <code>Ucv1sessionsDataSenderInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); 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('address1')) { obj['address1'] = ApiClient.convertToType(data['address1'], 'String'); } if (data.hasOwnProperty('locality')) { obj['locality'] = ApiClient.convertToType(data['locality'], 'String'); } if (data.hasOwnProperty('administrativeArea')) { obj['administrativeArea'] = ApiClient.convertToType(data['administrativeArea'], 'String'); } if (data.hasOwnProperty('postalCode')) { obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String'); } if (data.hasOwnProperty('countryCode')) { obj['countryCode'] = ApiClient.convertToType(data['countryCode'], 'String'); } if (data.hasOwnProperty('phoneNumber')) { obj['phoneNumber'] = ApiClient.convertToType(data['phoneNumber'], 'String'); } if (data.hasOwnProperty('dateOfBirth')) { obj['dateOfBirth'] = ApiClient.convertToType(data['dateOfBirth'], 'String'); } if (data.hasOwnProperty('accountType')) { obj['accountType'] = ApiClient.convertToType(data['accountType'], 'String'); } if (data.hasOwnProperty('account')) { obj['account'] = Ucv1sessionsDataSenderInformationAccount.constructFromObject(data['account']); } } return obj; } /** * First name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported.Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to the processor. * @member {String} firstName */ exports.prototype['firstName'] = undefined; /** * Middle name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor. * @member {String} middleName */ exports.prototype['middleName'] = undefined; /** * Last name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor. * @member {String} lastName */ exports.prototype['lastName'] = undefined; /** * The street address of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor. * @member {String} address1 */ exports.prototype['address1'] = undefined; /** * The city or locality of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor. * @member {String} locality */ exports.prototype['locality'] = undefined; /** * The state or province of the sender. This field is applicable for AFT transactions when the sender country is US or CA. Else it is optional. Must be a two character value * @member {String} administrativeArea */ exports.prototype['administrativeArea'] = undefined; /** * Postal code of sender. * @member {String} postalCode */ exports.prototype['postalCode'] = undefined; /** * The country associated with the address of the sender. This field is applicable for AFT transactions. Must be a two character ISO country code. For example, see [ISO Country Code](https://developer.cybersource.com/docs/cybs/en-us/country-codes/reference/all/na/country-codes/country-codes.html) * @member {String} countryCode */ exports.prototype['countryCode'] = undefined; /** * Sender phone number * @member {String} phoneNumber */ exports.prototype['phoneNumber'] = undefined; /** * Sender's date of birth. **Format**: `YYYYMMDD`. This field is a `pass-through`, which means that CyberSource ensures that the value is eight numeric characters but otherwise 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} dateOfBirth */ exports.prototype['dateOfBirth'] = undefined; /** * Identifies the sender's account type. This field is applicable for AFT transactions. Valid values are: - `00` for Other - `01` for Routing Transit Number (RTN) + Bank Account Number (BAN) - `02` for International Bank Account Number (IBAN) - `03` for Card Account - `04` for Email - `05` for Phone Number - `06` for Bank Account Number (BAN) + Bank Identification Code (BIC), also known as a SWIFT code - `07` for Wallet ID - `08` for Social Network ID * @member {String} accountType */ exports.prototype['accountType'] = undefined; /** * @member {module:model/Ucv1sessionsDataSenderInformationAccount} account */ exports.prototype['account'] = undefined; return exports; }));