(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient', 'models/FeeRefundRequest'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'), require('./FeeRefundRequest'));
  } else {
    // Browser globals (root is window)
    if (!root.OrbipayPaymentsapiClient) {
      root.OrbipayPaymentsapiClient = {};
    }
    root.OrbipayPaymentsapiClient.CreateRefundRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRefundRequest);
  }
}(this, function(ApiClient, FeeRefundRequest) {
  'use strict';




  /**
   * The CreateRefundRequest model module.
   * @module models/CreateRefundRequest
   */

  /**
   * <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>

   * Constructs a new <code>CreateRefundRequest</code>.
   * @alias module:models/CreateRefundRequest
   * @class
   */
  var exports = function() {
    var _this = this;






  };

  /**
   * Constructs a <code>CreateRefundRequest</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:models/CreateRefundRequest} obj Optional instance to populate.
   * @return {module:models/CreateRefundRequest} The populated <code>CreateRefundRequest</code> instance.
   */
  exports.constructFromObject = function(data, obj) {
    if (data) {
      obj = obj || new exports();

      if (data.hasOwnProperty('refund_reference')) {
        obj['refund_reference'] = ApiClient.convertToType(data['refund_reference'], 'String');
      }
      if (data.hasOwnProperty('refund_amount')) {
        obj['refund_amount'] = ApiClient.convertToType(data['refund_amount'], 'String');
      }
      if (data.hasOwnProperty('fee_refund')) {
        obj['fee_refund'] = FeeRefundRequest.constructFromObject(data['fee_refund']);
      }
      if (data.hasOwnProperty('comments')) {
        obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
      }
      if (data.hasOwnProperty('custom_fields')) {
        obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
      }
    }
    return obj;
  };

  /**
   * The unique identifier in the client system for the refund.
   * @member {String} refund_reference
   */
  exports.prototype['refund_reference'] = undefined;
  /**
   * The refund amount upto 2 decimal places.
   * @member {String} refund_amount
   */
  exports.prototype['refund_amount'] = undefined;
  /**
   * @member {module:models/FeeRefundRequest} fee_refund
   */
  exports.prototype['fee_refund'] = undefined;
  /**
   * Comments that can be used to recollect the operation performed on the resource object. API clients need to ensure that no sensitive information is passed in the memo. Alacriti (EBPP) is not responsible for the security of any sensitive information that may be passed as part of the memo.
   * @member {String} comments
   */
  exports.prototype['comments'] = undefined;
  /**
   * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. The custom fields need to be configured with EBPP before they can be accepted. EBPP would reject custom fields that are not pre-configured. Please contact <a href = \"mailto: support@billerpayments.com\">support@billerpayments.com</a> for more information on configuring and using custom fields. Only the custom fields enabled for the client, in EBPP, would be accepted in the requests.
   * @member {Object.<String, String>} custom_fields
   */
  exports.prototype['custom_fields'] = undefined;



  return exports;
}));