(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient', 'models/AuditInfoVo', 'models/CustomerAccountSnapshotResponse', 'models/CustomerSnapshotResponse', 'models/FeeResponse', 'models/FundingAccountSnapshotResponse', 'models/PaymentNetworkResponseVo', 'models/PaymentScheduleVo'], 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('./CustomerAccountSnapshotResponse'), require('./CustomerSnapshotResponse'), require('./FeeResponse'), require('./FundingAccountSnapshotResponse'), require('./PaymentNetworkResponseVo'), require('./PaymentScheduleVo'));
  } else {
    // Browser globals (root is window)
    if (!root.OrbipayPaymentsapiClient) {
      root.OrbipayPaymentsapiClient = {};
    }
    root.OrbipayPaymentsapiClient.PaymentSetupResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.CustomerAccountSnapshotResponse, root.OrbipayPaymentsapiClient.CustomerSnapshotResponse, root.OrbipayPaymentsapiClient.FeeResponse, root.OrbipayPaymentsapiClient.FundingAccountSnapshotResponse, root.OrbipayPaymentsapiClient.PaymentNetworkResponseVo, root.OrbipayPaymentsapiClient.PaymentScheduleVo);
  }
}(this, function(ApiClient, AuditInfoVo, CustomerAccountSnapshotResponse, CustomerSnapshotResponse, FeeResponse, FundingAccountSnapshotResponse, PaymentNetworkResponseVo, PaymentScheduleVo) {
  'use strict';




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

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

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






















  };

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

      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('fee')) {
        obj['fee'] = FeeResponse.constructFromObject(data['fee']);
      }
      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('payment_setup_schedule_type')) {
        obj['payment_setup_schedule_type'] = ApiClient.convertToType(data['payment_setup_schedule_type'], 'String');
      }
      if (data.hasOwnProperty('confirmation_number')) {
        obj['confirmation_number'] = ApiClient.convertToType(data['confirmation_number'], 'String');
      }
      if (data.hasOwnProperty('custom_fields')) {
        obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
      }
      if (data.hasOwnProperty('currency_code3d')) {
        obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], 'String');
      }
      if (data.hasOwnProperty('amount')) {
        obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
      }
      if (data.hasOwnProperty('card_cvv_number')) {
        obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
      }
      if (data.hasOwnProperty('next_payment_date')) {
        obj['next_payment_date'] = ApiClient.convertToType(data['next_payment_date'], 'String');
      }
      if (data.hasOwnProperty('payment_setup_reference')) {
        obj['payment_setup_reference'] = ApiClient.convertToType(data['payment_setup_reference'], 'String');
      }
      if (data.hasOwnProperty('payment_schedule')) {
        obj['payment_schedule'] = PaymentScheduleVo.constructFromObject(data['payment_schedule']);
      }
      if (data.hasOwnProperty('payment_setup_entry_date')) {
        obj['payment_setup_entry_date'] = ApiClient.convertToType(data['payment_setup_entry_date'], 'String');
      }
      if (data.hasOwnProperty('comments')) {
        obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
      }
      if (data.hasOwnProperty('customer')) {
        obj['customer'] = CustomerSnapshotResponse.constructFromObject(data['customer']);
      }
      if (data.hasOwnProperty('funding_account')) {
        obj['funding_account'] = FundingAccountSnapshotResponse.constructFromObject(data['funding_account']);
      }
      if (data.hasOwnProperty('customer_account')) {
        obj['customer_account'] = CustomerAccountSnapshotResponse.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 assigned by EBPP to the payment setup.
   * @member {String} id
   */
  exports.prototype['id'] = undefined;
  /**
   * This URL fetches the details of payment setup.
   * @member {String} url
   */
  exports.prototype['url'] = undefined;
  /**
   * @member {module:models/FeeResponse} fee
   */
  exports.prototype['fee'] = undefined;
  /**
   * The status of the payment.
   * @member {module:models/PaymentSetupResponse.StatusEnum} status
   */
  exports.prototype['status'] = undefined;
  /**
   * The fulfillment method for the payment.
   * @member {module:models/PaymentSetupResponse.PaymentMethodEnum} payment_method
   */
  exports.prototype['payment_method'] = undefined;
  /**
   * The schedule type for the payment setup.
   * @member {module:models/PaymentSetupResponse.PaymentSetupScheduleTypeEnum} payment_setup_schedule_type
   */
  exports.prototype['payment_setup_schedule_type'] = undefined;
  /**
   * The confirmation number or reference provided to the customer for the payment setup.
   * @member {String} confirmation_number
   */
  exports.prototype['confirmation_number'] = 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;
  /**
   * 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;
  /**
   * The amount being paid. In case the payment_amount_type is 'discounted_amount', 'penalty_amount' or 'other', the amount needs to be specified. In other cases, this is derived from the payment_amount_type.
   * @member {String} amount
   */
  exports.prototype['amount'] = undefined;
  /**
   * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment setup with a card funding account.
   * @member {String} card_cvv_number
   */
  exports.prototype['card_cvv_number'] = undefined;
  /**
   * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
   * @member {String} next_payment_date
   */
  exports.prototype['next_payment_date'] = undefined;
  /**
   * The unique identifier in the client system for the payment setup.
   * @member {String} payment_setup_reference
   */
  exports.prototype['payment_setup_reference'] = undefined;
  /**
   * @member {module:models/PaymentScheduleVo} payment_schedule
   */
  exports.prototype['payment_schedule'] = undefined;
  /**
   * The date on which the payment setup is captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
   * @member {String} payment_setup_entry_date
   */
  exports.prototype['payment_setup_entry_date'] = 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 (Orbipay) 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;
  /**
   * @member {module:models/CustomerSnapshotResponse} customer
   */
  exports.prototype['customer'] = undefined;
  /**
   * @member {module:models/FundingAccountSnapshotResponse} funding_account
   */
  exports.prototype['funding_account'] = undefined;
  /**
   * @member {module:models/CustomerAccountSnapshotResponse} 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: "scheduled"
     * @const
     */
    "scheduled": "scheduled",
    /**
     * value: "cancelled"
     * @const
     */
    "cancelled": "cancelled",
    /**
     * value: "declined"
     * @const
     */
    "declined": "declined",
    /**
     * value: "error"
     * @const
     */
    "error": "error",
    /**
     * value: "completed"
     * @const
     */
    "completed": "completed"  };

  /**
   * Allowed values for the <code>payment_method</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentMethodEnum = {
    /**
     * value: "ach"
     * @const
     */
    "ach": "ach",
    /**
     * value: "visa_debit"
     * @const
     */
    "visa_debit": "visa_debit",
    /**
     * value: "pinless_debit"
     * @const
     */
    "pinless_debit": "pinless_debit",
    /**
     * value: "master_debit"
     * @const
     */
    "master_debit": "master_debit",
    /**
     * value: "amex_credit"
     * @const
     */
    "amex_credit": "amex_credit",
    /**
     * value: "discover_credit"
     * @const
     */
    "discover_credit": "discover_credit",
    /**
     * value: "visa_credit"
     * @const
     */
    "visa_credit": "visa_credit",
    /**
     * value: "master_credit"
     * @const
     */
    "master_credit": "master_credit",
    /**
     * value: "discover_debit"
     * @const
     */
    "discover_debit": "discover_debit"  };

  /**
   * Allowed values for the <code>payment_setup_schedule_type</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentSetupScheduleTypeEnum = {
    /**
     * value: "variable_recurring_enrollment"
     * @const
     */
    "variable_recurring_enrollment": "variable_recurring_enrollment",
    /**
     * value: "autopay_enrollment"
     * @const
     */
    "autopay_enrollment": "autopay_enrollment",
    /**
     * value: "payment_plan"
     * @const
     */
    "payment_plan": "payment_plan"  };


  return exports;
}));