- 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 RecordedPayments wrapper module.
- 14 :
* @module wrappers/RecordedPayments
- 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('list')) {
- 23 :
var RecordedPayment = require('./RecordedPayment');
- 24 :
obj['list'] = ApiClient.convertToType(data['list'], [RecordedPayment]);
- 25 :
}
- 26 :
if (data.hasOwnProperty('total_results_count')) {
- 27 :
obj['total_results_count'] = data['total_results_count'];
- 28 :
}
- 29 :
if (data.hasOwnProperty('has_more_results')) {
- 30 :
obj['has_more_results'] = data['has_more_results'];
- 31 :
}
- 32 :
if (data.hasOwnProperty('url')) {
- 33 :
obj['url'] = data['url'];
- 34 :
}
- 35 :
if (data.hasOwnProperty('from_index')) {
- 36 :
obj['from_index'] = data['from_index'];
- 37 :
}
- 38 :
if (data.hasOwnProperty('to_index')) {
- 39 :
obj['to_index'] = data['to_index'];
- 40 :
}
- 41 :
if (data.hasOwnProperty('query_id')) {
- 42 :
obj['query_id'] = data['query_id'];
- 43 :
}
- 44 :
}
- 45 :
return obj;
- 46 :
};
- 47 :
- 48 :
- 49 :
exports.prototype = Object.create(Base.prototype);
- 50 :
exports.prototype.constructor = exports;
- 51 :
- 52 :
/**
- 53 :
* @member [RecordedPayment] list
- 54 :
*/
- 55 :
exports.prototype['list'] = undefined;
- 56 :
/**
- 57 :
* total number of payments available with matching criteria
- 58 :
* @member {String} total_results_count
- 59 :
*/
- 60 :
exports.prototype['total_results_count'] = undefined;
- 61 :
/**
- 62 :
* true if there are more results or pages
- 63 :
* @member {String} has_more_results
- 64 :
*/
- 65 :
exports.prototype['has_more_results'] = undefined;
- 66 :
/**
- 67 :
* This URL fetches the next or previous set of payments, based on the presence of after_object or before_object parameter.
- 68 :
* @member {String} url
- 69 :
*/
- 70 :
exports.prototype['url'] = undefined;
- 71 :
/**
- 72 :
* The id of the object before which the previous set of objects are to be retrieved.
- 73 :
* @member {String} from_index
- 74 :
*/
- 75 :
exports.prototype['from_index'] = undefined;
- 76 :
/**
- 77 :
* The id of the object after which the next set of objects are to be retrieved.
- 78 :
* @member {String} to_index
- 79 :
*/
- 80 :
exports.prototype['to_index'] = undefined;
- 81 :
/**
- 82 :
* The query id of the object.
- 83 :
* @member {String} query_id
- 84 :
*/
- 85 :
exports.prototype['query_id'] = undefined;
- 86 :
- 87 :
/**
- 88 :
* @param {String} client_key - The client_key of RecordedPayments.
- 89 :
* @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
- 90 :
*/
- 91 :
exports.prototype.forClient = function (client_key) {
- 92 :
var _this = this;
- 93 :
Base.prototype.forClient.call(_this,client_key);
- 94 :
return _this;
- 95 :
};
- 96 :
/**
- 97 :
* @param {String} channel - The channel of RecordedPayments.
- 98 :
* @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
- 99 :
*/
- 100 :
exports.prototype.videChannel = function (channel) {
- 101 :
var _this = this;
- 102 :
Base.prototype.videChannel.call(_this,channel);
- 103 :
return _this;
- 104 :
};
- 105 :
/**
- 106 :
* @param {String} from_index - The from_index of RecordedPayments.
- 107 :
* @param {String} to_index - The to_index of RecordedPayments.
- 108 :
* @param {String} query_id - The query_id of RecordedPayments.
- 109 :
* @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
- 110 :
*/
- 111 :
exports.prototype.findBy = function (filterParameters) {
- 112 :
var _this = this;
- 113 :
if(filterParameters){
- 114 :
- 115 :
_this['from_index'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'from_index', false);
- 116 :
- 117 :
_this['to_index'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'to_index', false);
- 118 :
- 119 :
_this['query_id'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'query_id', false);
- 120 :
}
- 121 :
return _this;
- 122 :
};
- 123 :
/**
- 124 :
* @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
- 125 :
*/
- 126 :
exports.prototype.forCustomer = function () {
- 127 :
var _this = this;
- 128 :
- 129 :
- 130 :
return _this;
- 131 :
};
- 132 :
- 133 :
- 134 :
- 135 :
return exports;
- 136 :
- 137 :
}));