cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
110 lines (90 loc) • 5.77 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.Vasv2taxOrderInformationShippingDetails = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Vasv2taxOrderInformationShippingDetails model module.
* @module model/Vasv2taxOrderInformationShippingDetails
* @version 0.0.1
*/
/**
* Constructs a new <code>Vasv2taxOrderInformationShippingDetails</code>.
* @alias module:model/Vasv2taxOrderInformationShippingDetails
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Vasv2taxOrderInformationShippingDetails</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/Vasv2taxOrderInformationShippingDetails} obj Optional instance to populate.
* @return {module:model/Vasv2taxOrderInformationShippingDetails} The populated <code>Vasv2taxOrderInformationShippingDetails</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('shipFromLocality')) {
obj['shipFromLocality'] = ApiClient.convertToType(data['shipFromLocality'], 'String');
}
if (data.hasOwnProperty('shipFromCountry')) {
obj['shipFromCountry'] = ApiClient.convertToType(data['shipFromCountry'], 'String');
}
if (data.hasOwnProperty('shipFromPostalCode')) {
obj['shipFromPostalCode'] = ApiClient.convertToType(data['shipFromPostalCode'], 'String');
}
if (data.hasOwnProperty('shipFromAdministrativeArea')) {
obj['shipFromAdministrativeArea'] = ApiClient.convertToType(data['shipFromAdministrativeArea'], 'String');
}
}
return obj;
}
/**
* City where the product is shipped from. This field is used only when the `orderInformation.shipTo.administrativeArea` and `orderInformation.shipTo.country` fields are present. **NOTE** If this field appears in a `lineItems` object, then the value of this field in the `lineItems` object overrides the value of the corresponding field at the request-level or order-level object. #### Tax Calculation This field is used to determine tax rules and/or rates applied to the transaction based on sourcing. Optional for U.S. and Canadian taxes. Not applicable to international and value added taxes.
* @member {String} shipFromLocality
*/
exports.prototype['shipFromLocality'] = undefined;
/**
* Country from which the order is shipped. This field is used only when `orderInformation.shippingDetails.shipFromLocality` and `orderInformation.shippingDetails.shipFromAdministrativeArea` are present. Use the [ISO Standard Country Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf). **NOTE** If this field appears in a `lineItems` object, then the value of this field in the `lineItems` object overrides the value of the corresponding field at the request-level or order-level object. #### Tax Calculation This field is used to determine tax rules and/ or rates applied to the transaction based on sourcing. Optional for U.S., Canadian, international tax, and value added taxes.
* @member {String} shipFromCountry
*/
exports.prototype['shipFromCountry'] = undefined;
/**
* Postal code where the product is shipped from. #### Tax Calculation This field is used to determine tax rules and/or rates applied to the transaction based on sourcing. Optional for U.S. and Canadian taxes. Not applicable to international and value added taxes.
* @member {String} shipFromPostalCode
*/
exports.prototype['shipFromPostalCode'] = undefined;
/**
* State from which the order is shipped. This field is used only when `orderInformation.shippingDetails.shipFromLocality` and `orderInformation.shippingDetails.shipFromCountry` are present. Use the [State, Province, and Territory Codes for the United States and Canada](http://apps.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf). **NOTE** If this field appears in a `lineItems` object, then the value of this field in the `lineItems` object overrides the value of the corresponding field at the request-level or order-level object. #### Tax Calculation This field is used to determine tax rules and/or rates applied to the transaction based on sourcing. Optional for U.S. and Canadian taxes. Not applicable to international and value added taxes.
* @member {String} shipFromAdministrativeArea
*/
exports.prototype['shipFromAdministrativeArea'] = undefined;
return exports;
}));