UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

151 lines (126 loc) 7.47 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/PtsV2IncrementalAuthorizationPatch201ResponseLinks', 'model/RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation', 'model/RiskV1AddressVerificationsPost201ResponseErrorInformation', 'model/RiskV1DecisionsPost201ResponseClientReferenceInformation'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./PtsV2IncrementalAuthorizationPatch201ResponseLinks'), require('./RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation'), require('./RiskV1AddressVerificationsPost201ResponseErrorInformation'), require('./RiskV1DecisionsPost201ResponseClientReferenceInformation')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.RiskV1AddressVerificationsPost201Response = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2IncrementalAuthorizationPatch201ResponseLinks, root.CyberSource.RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation, root.CyberSource.RiskV1AddressVerificationsPost201ResponseErrorInformation, root.CyberSource.RiskV1DecisionsPost201ResponseClientReferenceInformation); } }(this, function(ApiClient, PtsV2IncrementalAuthorizationPatch201ResponseLinks, RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation, RiskV1AddressVerificationsPost201ResponseErrorInformation, RiskV1DecisionsPost201ResponseClientReferenceInformation) { 'use strict'; /** * The RiskV1AddressVerificationsPost201Response model module. * @module model/RiskV1AddressVerificationsPost201Response * @version 0.0.1 */ /** * Constructs a new <code>RiskV1AddressVerificationsPost201Response</code>. * @alias module:model/RiskV1AddressVerificationsPost201Response * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>RiskV1AddressVerificationsPost201Response</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/RiskV1AddressVerificationsPost201Response} obj Optional instance to populate. * @return {module:model/RiskV1AddressVerificationsPost201Response} The populated <code>RiskV1AddressVerificationsPost201Response</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('_links')) { obj['_links'] = PtsV2IncrementalAuthorizationPatch201ResponseLinks.constructFromObject(data['_links']); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } if (data.hasOwnProperty('submitTimeUtc')) { obj['submitTimeUtc'] = ApiClient.convertToType(data['submitTimeUtc'], 'String'); } if (data.hasOwnProperty('submitTimeLocal')) { obj['submitTimeLocal'] = ApiClient.convertToType(data['submitTimeLocal'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } if (data.hasOwnProperty('message')) { obj['message'] = ApiClient.convertToType(data['message'], 'String'); } if (data.hasOwnProperty('clientReferenceInformation')) { obj['clientReferenceInformation'] = RiskV1DecisionsPost201ResponseClientReferenceInformation.constructFromObject(data['clientReferenceInformation']); } if (data.hasOwnProperty('addressVerificationInformation')) { obj['addressVerificationInformation'] = RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation.constructFromObject(data['addressVerificationInformation']); } if (data.hasOwnProperty('errorInformation')) { obj['errorInformation'] = RiskV1AddressVerificationsPost201ResponseErrorInformation.constructFromObject(data['errorInformation']); } } return obj; } /** * @member {module:model/PtsV2IncrementalAuthorizationPatch201ResponseLinks} _links */ exports.prototype['_links'] = undefined; /** * An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response. * @member {String} id */ exports.prototype['id'] = undefined; /** * Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services. * @member {String} submitTimeUtc */ exports.prototype['submitTimeUtc'] = undefined; /** * Time that the transaction was submitted in local time. Generated by Cybersource. * @member {String} submitTimeLocal */ exports.prototype['submitTimeLocal'] = undefined; /** * The status for the call can be: - COMPLETED - INVALID_REQUEST - DECLINED * @member {String} status */ exports.prototype['status'] = undefined; /** * The message describing the reason of the status. Value can be - Apartment number missing or not found. - Insufficient address information. - House/Box number not found on street. - Multiple address matches were found. - P.O. Box identifier not found or out of range. - Route service identifier not found or out of range. - Street name not found in Postal code. - Postal code not found in database. - Unable to verify or correct address. - Multiple addres matches were found (international) - Address match not found (no reason given) - Unsupported character set * @member {String} message */ exports.prototype['message'] = undefined; /** * @member {module:model/RiskV1DecisionsPost201ResponseClientReferenceInformation} clientReferenceInformation */ exports.prototype['clientReferenceInformation'] = undefined; /** * @member {module:model/RiskV1AddressVerificationsPost201ResponseAddressVerificationInformation} addressVerificationInformation */ exports.prototype['addressVerificationInformation'] = undefined; /** * @member {module:model/RiskV1AddressVerificationsPost201ResponseErrorInformation} errorInformation */ exports.prototype['errorInformation'] = undefined; return exports; }));