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




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

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

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


















  };

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

      if (data.hasOwnProperty('payment_auth_reference')) {
        obj['payment_auth_reference'] = ApiClient.convertToType(data['payment_auth_reference'], 'String');
      }
      if (data.hasOwnProperty('id')) {
        obj['id'] = ApiClient.convertToType(data['id'], 'String');
      }
      if (data.hasOwnProperty('url')) {
        obj['url'] = ApiClient.convertToType(data['url'], 'String');
      }
      if (data.hasOwnProperty('auth_amount')) {
        obj['auth_amount'] = ApiClient.convertToType(data['auth_amount'], 'String');
      }
      if (data.hasOwnProperty('status')) {
        obj['status'] = ApiClient.convertToType(data['status'], 'String');
      }
      if (data.hasOwnProperty('payment_method')) {
        obj['payment_method'] = ApiClient.convertToType(data['payment_method'], 'String');
      }
      if (data.hasOwnProperty('currency_code3d')) {
        obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], 'String');
      }
      if (data.hasOwnProperty('card_cvv_number')) {
        obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
      }
      if (data.hasOwnProperty('entry_time')) {
        obj['entry_time'] = ApiClient.convertToType(data['entry_time'], 'String');
      }
      if (data.hasOwnProperty('captured_time')) {
        obj['captured_time'] = ApiClient.convertToType(data['captured_time'], 'String');
      }
      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'});
      }
      if (data.hasOwnProperty('customer')) {
        obj['customer'] = PaymentAuthCustomerResponse.constructFromObject(data['customer']);
      }
      if (data.hasOwnProperty('funding_account')) {
        obj['funding_account'] = PaymentAuthFundingAccountResponse.constructFromObject(data['funding_account']);
      }
      if (data.hasOwnProperty('customer_account')) {
        obj['customer_account'] = PaymentAuthCustomerAccountResponse.constructFromObject(data['customer_account']);
      }
      if (data.hasOwnProperty('payment_network_response')) {
        obj['payment_network_response'] = PaymentNetworkResponseVo.constructFromObject(data['payment_network_response']);
      }
      if (data.hasOwnProperty('audit_info')) {
        obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
      }
    }
    return obj;
  };

  /**
   * The unique identifier in the client system for the payment.
   * @member {String} payment_auth_reference
   */
  exports.prototype['payment_auth_reference'] = undefined;
  /**
   * The unique identifier assigned by EBPP to the payment authorization.
   * @member {String} id
   */
  exports.prototype['id'] = undefined;
  /**
   * This URL fetches the details of payment authorization.
   * @member {String} url
   */
  exports.prototype['url'] = undefined;
  /**
   * The amount being authorized.
   * @member {String} auth_amount
   */
  exports.prototype['auth_amount'] = undefined;
  /**
   * The status of the payment.
   * @member {module:models/PaymentAuthorizationResponse.StatusEnum} status
   */
  exports.prototype['status'] = undefined;
  /**
   * The fulfillment method for the payment authorization.
   * @member {module:models/PaymentAuthorizationResponse.PaymentMethodEnum} payment_method
   */
  exports.prototype['payment_method'] = undefined;
  /**
   * The three-letter currency code in the ISO4217 format, in uppercase, for the card account. It must be a currency supported by EBPP. This defaults to USD.
   * @member {String} currency_code3d
   */
  exports.prototype['currency_code3d'] = undefined;
  /**
   * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
   * @member {String} card_cvv_number
   */
  exports.prototype['card_cvv_number'] = undefined;
  /**
   * The date on which the payment authorization created in UTC timestamp, with ISO8601 format. For e.g., 2019-08-13T09:21:34.359+0000.
   * @member {String} entry_time
   */
  exports.prototype['entry_time'] = undefined;
  /**
   * The date on which the payment authorization is captured in UTC timestamp, with ISO8601 format. For e.g., 2019-08-13T09:21:34.359+0000..
   * @member {String} captured_time
   */
  exports.prototype['captured_time'] = 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;
  /**
   * @member {module:models/PaymentAuthCustomerResponse} customer
   */
  exports.prototype['customer'] = undefined;
  /**
   * @member {module:models/PaymentAuthFundingAccountResponse} funding_account
   */
  exports.prototype['funding_account'] = undefined;
  /**
   * @member {module:models/PaymentAuthCustomerAccountResponse} customer_account
   */
  exports.prototype['customer_account'] = undefined;
  /**
   * @member {module:models/PaymentNetworkResponseVo} payment_network_response
   */
  exports.prototype['payment_network_response'] = undefined;
  /**
   * @member {module:models/AuditInfoVo} audit_info
   */
  exports.prototype['audit_info'] = undefined;


  /**
   * Allowed values for the <code>status</code> property.
   * @enum {String}
   * @readonly
   */
  exports.StatusEnum = {
    /**
     * value: "approved"
     * @const
     */
    "approved": "approved",
    /**
     * value: "declined"
     * @const
     */
    "declined": "declined",
    /**
     * value: "error"
     * @const
     */
    "error": "error",
    /**
     * value: "cancelled"
     * @const
     */
    "cancelled": "cancelled",
    /**
     * value: "expired"
     * @const
     */
    "expired": "expired",
    /**
     * value: "reversed"
     * @const
     */
    "reversed": "reversed",
    /**
     * value: "processed"
     * @const
     */
    "processed": "processed"  };

  /**
   * Allowed values for the <code>payment_method</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentMethodEnum = {
    /**
     * value: "voyager_fleet"
     * @const
     */
    "voyager_fleet": "voyager_fleet"  };


  return exports;
}));