UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

156 lines (131 loc) 8.35 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.CardProcessingConfigCommonMerchantDescriptorInformation = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The CardProcessingConfigCommonMerchantDescriptorInformation model module. * @module model/CardProcessingConfigCommonMerchantDescriptorInformation * @version 0.0.1 */ /** * Constructs a new <code>CardProcessingConfigCommonMerchantDescriptorInformation</code>. * A merchant descriptor is the line of copy that identifies transactions on a cardholder's account activity and statement. If this information is not populated, the data will be retrieved from OMS. * @alias module:model/CardProcessingConfigCommonMerchantDescriptorInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>CardProcessingConfigCommonMerchantDescriptorInformation</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/CardProcessingConfigCommonMerchantDescriptorInformation} obj Optional instance to populate. * @return {module:model/CardProcessingConfigCommonMerchantDescriptorInformation} The populated <code>CardProcessingConfigCommonMerchantDescriptorInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('city')) { obj['city'] = ApiClient.convertToType(data['city'], 'String'); } if (data.hasOwnProperty('country')) { obj['country'] = ApiClient.convertToType(data['country'], 'String'); } if (data.hasOwnProperty('phone')) { obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); } if (data.hasOwnProperty('state')) { obj['state'] = ApiClient.convertToType(data['state'], 'String'); } if (data.hasOwnProperty('street')) { obj['street'] = ApiClient.convertToType(data['street'], 'String'); } if (data.hasOwnProperty('zip')) { obj['zip'] = ApiClient.convertToType(data['zip'], 'String'); } if (data.hasOwnProperty('url')) { obj['url'] = ApiClient.convertToType(data['url'], 'String'); } if (data.hasOwnProperty('countryOfOrigin')) { obj['countryOfOrigin'] = ApiClient.convertToType(data['countryOfOrigin'], 'String'); } } return obj; } /** * Applicable for TSYS (tsys), RUPAY, American Express Direct (amexdirect) and Elavon Americas (elavonamericas) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>1</td><td>38</td><td>^[0-9a-zA-Z\\s]+$</td></tr> </table> * @member {String} name */ exports.prototype['name'] = undefined; /** * Applicable for American Express Direct (amexdirect), TSYS (tsys), RUPAY and Elavon Americas (elavonamericas) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>1</td><td>21</td><td>^[0-9a-zA-Z\\s]+$</td></tr> </table> * @member {String} city */ exports.prototype['city'] = undefined; /** * Applicable for Six (six), Elavon Americas (elavonamericas), TSYS (tsys) and American Express Direct (amexdirect) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>3</td><td>3</td><td>^[A-Z]+$</td></tr> </table> * @member {String} country */ exports.prototype['country'] = undefined; /** * Applicable for RUPAY, Elavon Americas (elavonamericas), American Express Direct (amexdirect) and TSYS (tsys) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>1</td><td>20</td><td>^[0-9a-zA-Z\\s]+$</td></tr> </table> * @member {String} phone */ exports.prototype['phone'] = undefined; /** * Applicable for RUPAY, TSYS (tsys), Elavon Americas (elavonamericas) and American Express Direct (amexdirect) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>No</td><td>1</td><td>3</td><td>^[A-Z]+$</td></tr> </table> * @member {String} state */ exports.prototype['state'] = undefined; /** * Applicable for American Express Direct (amexdirect), TSYS (tsys) and Elavon Americas (elavonamericas) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>1</td><td>38</td><td>^[0-9a-zA-Z\\s]+$</td></tr> </table> * @member {String} street */ exports.prototype['street'] = undefined; /** * Applicable for Elavon Americas (elavonamericas), RUPAY, American Express Direct (amexdirect) and TSYS (tsys) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>1</td><td>15</td><td>^[0-9a-zA-Z\\s]+$</td></tr> </table> * @member {String} zip */ exports.prototype['zip'] = undefined; /** * Applicable for RUPAY and American Express Direct (amexdirect) processors. Validation details (for selected processors)... <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, hybrid</td><td>Yes</td><td>1</td><td>40</td><td>URL</td></tr> <tr><td>American Express Direct</td><td>cp</td><td>No</td><td>1</td><td>40</td><td>URL</td></tr> </table> * @member {String} url */ exports.prototype['url'] = undefined; /** * Country Cf Origin of merchant is applicable for VPC Processors and is dependent on governmentControlled attribute. * @member {String} countryOfOrigin */ exports.prototype['countryOfOrigin'] = undefined; return exports; }));