(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 Error wrapper module.
    * @module wrappers/Error
    */
  var exports = function() {

  };
  exports.constructFromObject = function (data, obj) {
        if (data) {
            obj = obj || new exports();
            if (data.hasOwnProperty('code')) {
                obj['code'] = data['code'];
            }
            if (data.hasOwnProperty('message')) {
                obj['message'] = data['message'];
            }
            if (data.hasOwnProperty('field')) {
                obj['field'] = data['field'];
            }
        }
        return obj;
  };


  exports.prototype = Object.create(Base.prototype);
  exports.prototype.constructor = exports;

    /**
    * A string indicating error
    * @member {String} code
    */
  exports.prototype['code'] = undefined;
    /**
    * A human-readable message providing more details about the error.
    * @member {String} message
    */
  exports.prototype['message'] = undefined;
    /**
    * Refers to the field in the request, if the error is specific to it.
    * @member {String} field
    */
  exports.prototype['field'] = undefined;




  return exports;

}));