UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

200 lines (170 loc) 10 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.Ptsv2paymentsMerchantInformationMerchantDescriptor = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The Ptsv2paymentsMerchantInformationMerchantDescriptor model module. * @module model/Ptsv2paymentsMerchantInformationMerchantDescriptor * @version 0.0.1 */ /** * Constructs a new <code>Ptsv2paymentsMerchantInformationMerchantDescriptor</code>. * @alias module:model/Ptsv2paymentsMerchantInformationMerchantDescriptor * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv2paymentsMerchantInformationMerchantDescriptor</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/Ptsv2paymentsMerchantInformationMerchantDescriptor} obj Optional instance to populate. * @return {module:model/Ptsv2paymentsMerchantInformationMerchantDescriptor} The populated <code>Ptsv2paymentsMerchantInformationMerchantDescriptor</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('alternateName')) { obj['alternateName'] = ApiClient.convertToType(data['alternateName'], 'String'); } if (data.hasOwnProperty('contact')) { obj['contact'] = ApiClient.convertToType(data['contact'], '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('country')) { obj['country'] = ApiClient.convertToType(data['country'], '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('phone')) { obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); } if (data.hasOwnProperty('url')) { obj['url'] = ApiClient.convertToType(data['url'], 'String'); } if (data.hasOwnProperty('countryOfOrigin')) { obj['countryOfOrigin'] = ApiClient.convertToType(data['countryOfOrigin'], 'String'); } if (data.hasOwnProperty('storeId')) { obj['storeId'] = ApiClient.convertToType(data['storeId'], 'String'); } if (data.hasOwnProperty('storeName')) { obj['storeName'] = ApiClient.convertToType(data['storeName'], 'String'); } if (data.hasOwnProperty('customerServicePhoneNumber')) { obj['customerServicePhoneNumber'] = ApiClient.convertToType(data['customerServicePhoneNumber'], 'String'); } } return obj; } /** * Your merchant name. **Note** For Paymentech processor using Cybersource Payouts, the maximum data length is 22. #### PIN debit Your business name. This name is displayed on the cardholder's statement. When you include more than one consecutive space, extra spaces are removed. When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. Optional field for PIN debit credit or PIN debit purchase requests. #### Airline processing Your merchant name. This name is displayed on the cardholder's statement. When you include more than one consecutive space, extra spaces are removed. **Note** Some airline fee programs may require the original ticket number (ticket identifier) or the ancillary service description in positions 13 through 23 of this field. **Important** This value must consist of English characters. Required for captures and credits. * @member {String} name */ exports.prototype['name'] = undefined; /** * An alternate name for the merchant. * @member {String} alternateName */ exports.prototype['alternateName'] = undefined; /** * Contact information for the merchant. **Note** These are the maximum data lengths for the following payment processors: - FDCCompass (13) - Paymentech (13) * @member {String} contact */ exports.prototype['contact'] = undefined; /** * First line of merchant's address. * @member {String} address1 */ exports.prototype['address1'] = undefined; /** * Merchant's City. #### PIN debit City for your business location. This value might be displayed on the cardholder's statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. Optional field for PIN debit credit or PIN debit purchase requests. * @member {String} locality */ exports.prototype['locality'] = undefined; /** * Merchant's country. #### PIN debit Country code for your business location. Use the [ISO Standard Country Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf) This value might be displayed on the cardholder's statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. **Note** If your business is located in the U.S. or Canada and you include this field in a request, you must also include `merchantInformation.merchantDescriptor.administrativeArea`. Optional field for PIN debit credit or PIN debit purchase. * @member {String} country */ exports.prototype['country'] = undefined; /** * Merchant's postal code. #### PIN debit Postal code for your business location. This value might be displayed on the cardholder's statement. If your business is domiciled in the U.S., you can use a 5-digit or 9-digit postal code. A 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example: `12345-6789` If your business is domiciled in Canada, you can use a 6-digit or 9-digit postal code. A 6-digit postal code must follow this format: [alpha][numeric][alpha][space] [numeric][alpha][numeric] Example: `A1B 2C3` When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. **Note** This field is supported only for businesses located in the U.S. or Canada. **Important** Mastercard requires a postal code for any country that uses postal codes. You can provide the postal code in your account or you can include this field in your request. Optional field for PIN debit credit or PIN debit purchase. * @member {String} postalCode */ exports.prototype['postalCode'] = undefined; /** * The state where the merchant is located. #### PIN debit State code or region code for your business. Use the Use the [State, Province, and Territory Codes for the United States and Canada](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf) This value might be displayed on the cardholder's statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. **Note** This field is supported only for businesses located in the U.S. or Canada. Optional field for PIN debit credit or PIN debit purchase. * @member {String} administrativeArea */ exports.prototype['administrativeArea'] = undefined; /** * Merchant phone as contact information for CNP transactions * @member {String} phone */ exports.prototype['phone'] = undefined; /** * Address of company's website provided by merchant * @member {String} url */ exports.prototype['url'] = undefined; /** * #### Visa Platform Connect This field will indicate merchant country of origin * @member {String} countryOfOrigin */ exports.prototype['countryOfOrigin'] = undefined; /** * The identifier of the store. * @member {String} storeId */ exports.prototype['storeId'] = undefined; /** * The name of the store. * @member {String} storeName */ exports.prototype['storeName'] = undefined; /** * #### Visa Platform Connect Indicates customer service phone number of Merchant. * @member {String} customerServicePhoneNumber */ exports.prototype['customerServicePhoneNumber'] = undefined; return exports; }));