cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
249 lines (217 loc) • 9.88 kB
JavaScript
/**
* 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.Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo model module.
* @module model/Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
* @version 0.0.1
*/
/**
* Constructs a new <code>Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo</code>.
* Shipping information.
* @alias module:model/Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
* @class
* @param country {String} Address country code ISO 3166-1 alpha-2 country code.
* @param countryCallingCode {String} Phone number country code as defined by the International Telecommunication Union.
* @param phoneNumber {String} Phone number without country code.
*/
var exports = function(country, countryCallingCode, phoneNumber) {
var _this = this;
_this['country'] = country;
_this['countryCallingCode'] = countryCallingCode;
_this['phoneNumber'] = phoneNumber;
};
/**
* Constructs a <code>Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo</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/Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo} obj Optional instance to populate.
* @return {module:model/Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo} The populated <code>Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('addressId')) {
obj['addressId'] = ApiClient.convertToType(data['addressId'], 'String');
}
if (data.hasOwnProperty('district')) {
obj['district'] = ApiClient.convertToType(data['district'], 'String');
}
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('address3')) {
obj['address3'] = ApiClient.convertToType(data['address3'], '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('country')) {
obj['country'] = ApiClient.convertToType(data['country'], 'String');
}
if (data.hasOwnProperty('postalCode')) {
obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String');
}
if (data.hasOwnProperty('createTime')) {
obj['createTime'] = ApiClient.convertToType(data['createTime'], 'String');
}
if (data.hasOwnProperty('lastUsedTime')) {
obj['lastUsedTime'] = ApiClient.convertToType(data['lastUsedTime'], '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('email')) {
obj['email'] = ApiClient.convertToType(data['email'], 'String');
}
if (data.hasOwnProperty('countryCallingCode')) {
obj['countryCallingCode'] = ApiClient.convertToType(data['countryCallingCode'], 'String');
}
if (data.hasOwnProperty('phoneNumber')) {
obj['phoneNumber'] = ApiClient.convertToType(data['phoneNumber'], 'String');
}
if (data.hasOwnProperty('numberIsVoiceOnly')) {
obj['numberIsVoiceOnly'] = ApiClient.convertToType(data['numberIsVoiceOnly'], 'Boolean');
}
if (data.hasOwnProperty('instructions')) {
obj['instructions'] = ApiClient.convertToType(data['instructions'], 'String');
}
}
return obj;
}
/**
* (Conditional) Reference identifier of the address Conditionality - Required when address is already registered with VACP System. Optional for requests when address fields are provided.
* @member {String} addressId
*/
exports.prototype['addressId'] = undefined;
/**
* Name of the business; Name of the community; c/o Name etc. Notes - Shipping Address - The final recipient's name will be captured in deliveryContacts field. Billing Address - The Card Holder or Consumer Name will be recorded as part of Card or Order Information.
* @member {String} district
*/
exports.prototype['district'] = undefined;
/**
* (Conditional) Address line 1 Conditionality - Required when used with the DPA Registration operation in the Management Service APIs Required when address is used as shipping/delivery Address.
* @member {String} address1
*/
exports.prototype['address1'] = undefined;
/**
* Address line 2.
* @member {String} address2
*/
exports.prototype['address2'] = undefined;
/**
* Address line 3.
* @member {String} address3
*/
exports.prototype['address3'] = undefined;
/**
* (Conditional) Address city Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country
* @member {String} locality
*/
exports.prototype['locality'] = undefined;
/**
* (Conditional) Address state Recommendation to support ISO 3166-2 format i.e. made up of ISO 3166-1 alpha 2 country code, followed by an alphanumeric string of 3 characters representing the state or sub-division Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country.
* @member {String} administrativeArea
*/
exports.prototype['administrativeArea'] = undefined;
/**
* Address country code ISO 3166-1 alpha-2 country code.
* @member {String} country
*/
exports.prototype['country'] = undefined;
/**
* Address zip/postal code Conditionality - When used with the DPA Registration operation in th Management Service APIs at least one of the following is required. - both city and state - zip Required if this is a shipping address in a valid format for the country and has a postal code or zip code
* @member {String} postalCode
*/
exports.prototype['postalCode'] = undefined;
/**
* Date and time the address was created. UTC time in Unix epoch format.
* @member {String} createTime
*/
exports.prototype['createTime'] = undefined;
/**
* Date and time the address was last used. UTC time in Unix epoch format.
* @member {String} lastUsedTime
*/
exports.prototype['lastUsedTime'] = undefined;
/**
* First name of the recipient.
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
/**
* Middle name of the recipient.
* @member {String} middleName
*/
exports.prototype['middleName'] = undefined;
/**
* Last name of the recipient.
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
/**
* Consumer-provided email address.
* @member {String} email
*/
exports.prototype['email'] = undefined;
/**
* Phone number country code as defined by the International Telecommunication Union.
* @member {String} countryCallingCode
*/
exports.prototype['countryCallingCode'] = undefined;
/**
* Phone number without country code.
* @member {String} phoneNumber
*/
exports.prototype['phoneNumber'] = undefined;
/**
* Indicates that the phone number provided is not capable of receiving text messages.
* @member {Boolean} numberIsVoiceOnly
*/
exports.prototype['numberIsVoiceOnly'] = undefined;
/**
* Consumer-provided delivery instructions.
* @member {String} instructions
*/
exports.prototype['instructions'] = undefined;
return exports;
}));