(function(root, factory) {
if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./InvocationContext'), require('../CommonUtil'), require('../ResponseWrapper'), require('./Base'), require('../OrbipayApiError'));
}
}(this, function(ApiClient, InvocationContext, CommonUtil, ResponseWrapper, Base, OrbipayApiError) {
'use strict';
/**
* The SourcePayment wrapper module.
* @module wrappers/SourcePayment
*/
var exports = function() {
};
exports.constructFromObject = function (data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = data['id'];
}
if (data.hasOwnProperty('url')) {
obj['url'] = data['url'];
}
if (data.hasOwnProperty('customer')) {
var Customer = require('./Customer');
obj['customer'] = Customer.constructFromObject(data['customer']);
}
if (data.hasOwnProperty('customer_account')) {
var CustomerAccount = require('./CustomerAccount');
obj['customer_account'] = CustomerAccount.constructFromObject(data['customer_account']);
}
if (data.hasOwnProperty('funding_account')) {
var FundingAccount = require('./FundingAccount');
obj['funding_account'] = FundingAccount.constructFromObject(data['funding_account']);
}
}
return obj;
};
exports.prototype = Object.create(Base.prototype);
exports.prototype.constructor = exports;
/**
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* This URL fetches the details of source payment.
* @member {String} url
*/
exports.prototype['url'] = undefined;
/**
* @member {Customer} customer
*/
exports.prototype['customer'] = undefined;
/**
* @member {CustomerAccount} customer_account
*/
exports.prototype['customer_account'] = undefined;
/**
* @member {FundingAccount} funding_account
*/
exports.prototype['funding_account'] = undefined;
return exports;
}));