- 1 :
- 2 :
- 3 :
(function(root, factory) {
- 4 :
- 5 :
if (typeof module === 'object' && module.exports) {
- 6 :
// CommonJS-like environments that support module.exports, like Node.
- 7 :
module.exports = factory(require('../ApiClient'), require('./InvocationContext'), require('../CommonUtil'), require('../ResponseWrapper'), require('./Base'), require('../OrbipayApiError'));
- 8 :
}
- 9 :
}(this, function(ApiClient, InvocationContext, CommonUtil, ResponseWrapper, Base, OrbipayApiError) {
- 10 :
'use strict';
- 11 :
- 12 :
/**
- 13 :
* The SourcePayment wrapper module.
- 14 :
* @module wrappers/SourcePayment
- 15 :
*/
- 16 :
var exports = function() {
- 17 :
- 18 :
};
- 19 :
exports.constructFromObject = function (data, obj) {
- 20 :
if (data) {
- 21 :
obj = obj || new exports();
- 22 :
if (data.hasOwnProperty('id')) {
- 23 :
obj['id'] = data['id'];
- 24 :
}
- 25 :
if (data.hasOwnProperty('url')) {
- 26 :
obj['url'] = data['url'];
- 27 :
}
- 28 :
if (data.hasOwnProperty('customer')) {
- 29 :
var Customer = require('./Customer');
- 30 :
obj['customer'] = Customer.constructFromObject(data['customer']);
- 31 :
}
- 32 :
if (data.hasOwnProperty('customer_account')) {
- 33 :
var CustomerAccount = require('./CustomerAccount');
- 34 :
obj['customer_account'] = CustomerAccount.constructFromObject(data['customer_account']);
- 35 :
}
- 36 :
if (data.hasOwnProperty('funding_account')) {
- 37 :
var FundingAccount = require('./FundingAccount');
- 38 :
obj['funding_account'] = FundingAccount.constructFromObject(data['funding_account']);
- 39 :
}
- 40 :
}
- 41 :
return obj;
- 42 :
};
- 43 :
- 44 :
- 45 :
exports.prototype = Object.create(Base.prototype);
- 46 :
exports.prototype.constructor = exports;
- 47 :
- 48 :
/**
- 49 :
* @member {String} id
- 50 :
*/
- 51 :
exports.prototype['id'] = undefined;
- 52 :
/**
- 53 :
* This URL fetches the details of source payment.
- 54 :
* @member {String} url
- 55 :
*/
- 56 :
exports.prototype['url'] = undefined;
- 57 :
/**
- 58 :
* @member {Customer} customer
- 59 :
*/
- 60 :
exports.prototype['customer'] = undefined;
- 61 :
/**
- 62 :
* @member {CustomerAccount} customer_account
- 63 :
*/
- 64 :
exports.prototype['customer_account'] = undefined;
- 65 :
/**
- 66 :
* @member {FundingAccount} funding_account
- 67 :
*/
- 68 :
exports.prototype['funding_account'] = undefined;
- 69 :
- 70 :
- 71 :
- 72 :
- 73 :
return exports;
- 74 :
- 75 :
}));