/**
 * Fatture in Cloud API v2 - API Reference
 * Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy.   The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. For more information, please visit https://www.fattureincloud.it.
 *
 * The version of the OpenAPI document: 2.0.2
 * Contact: info@fattureincloud.it
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD.
    define(['expect.js', process.cwd() + '/src/index'], factory)
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    factory(require('expect.js'), require(process.cwd() + '/src/index'))
  } else {
    // Browser globals (root is window)
    factory(root.expect, root.fattureInCloudSdk)
  }
}(this, function (expect, fattureInCloudSdk) {
  'use strict'

  let instance

  beforeEach(function () {
    instance = new fattureInCloudSdk.IssuedDocumentPreCreateInfo()
    instance.numerations = {
      2018: {
        AB123: 2
      },
      2019: {
        123: 3
      }
    }
    instance.dn_numerations = {
      2017: {
        '': 1000
      },
      2018: {
        '': 112
      }
    }
    instance.default_values = {
      default_template: {
        id: 111,
        type: 'standard',
        name: 'Light Smoke'
      },
      dn_template: {
        id: 222,
        type: 'delivery_note',
        name: 'DDT 1'
      },
      ai_template: {
        id: 333,
        type: 'accompanying_invoice',
        name: 'FT Accompagnatoria 1'
      },
      notes: '',
      rivalsa: 0,
      cassa: 0,
      withholding_tax: 0,
      withholding_tax_taxable: 100,
      other_withholding_tax: 0,
      use_gross_prices: false,
      payment_method: {
        id: 123321,
        name: 'Bonifico bancario',
        is_default: true,
        details: [
          {
            title: 'Banca',
            description: 'Indesa'
          },
          {
            title: 'IBAN',
            description: 'IT17QA12345600000003498936'
          },
          {
            title: 'Intestatario',
            description: 'Mario Rossi'
          }
        ],
        bank_iban: 'IT17QA12345600000003498936',
        bank_name: 'Indesa',
        bank_beneficiary: 'Mario Rossi',
        ei_payment_method: 'MP05'
      }
    }
    instance.extra_data_default_values = {
      ts_communication: false,
      ts_tipo_spesa: 'SR',
      ts_flag_tipo_spesa: 0,
      ts_pagamento_tracciato: false
    }
    instance.items_default_values = {
      vat: {
        id: 0,
        value: 22,
        description: '',
        notes: '',
        e_invoice: true,
        ei_type: '0',
        ei_description: '',
        is_disabled: false,
        editable: false,
        default: true
      }
    }
    instance.countries_list = [
      'Italia',
      'Afghanistan',
      'Albania'
    ]
    instance.currencies_list = [
      {
        id: 'AED',
        symbol: 'AED',
        html_symbol: 'AED',
        exchange_rate: '4.09500'
      },
      {
        id: 'ALL',
        symbol: 'ALL',
        html_symbol: 'ALL',
        exchange_rate: '121.50000'
      }
    ]
    instance.templates_list = [
      {
        id: 10,
        name: 'New Standard S1'
      },
      {
        id: 11,
        name: 'New Standard S2'
      }
    ]
    instance.dn_templates_list = [
      {
        id: 660,
        name: 'DDT 1'
      },
      {
        id: 680,
        name: 'DDT Prova'
      }
    ]
    instance.ai_templates_list = [
      {
        id: 663,
        name: 'FT Accompagnatoria 1'
      }
    ]
    instance.payment_methods_list = [
      {
        id: 123321,
        name: 'Bonifico bancario',
        is_default: true,
        details: [
          {
            title: 'Banca',
            description: 'Indesa'
          },
          {
            title: 'IBAN',
            description: 'IT17QA12345600000003498936'
          },
          {
            title: 'Intestatario',
            description: 'Mario Rossi'
          }
        ],
        bank_iban: 'IT17QA12345600000003498936',
        bank_name: 'Indesa',
        bank_beneficiary: 'Mario Rossi',
        ei_payment_method: 'MP05'
      }
    ]
    instance.payment_accounts_list = [
      {
        id: 21,
        name: 'Indesa - Carta conto'
      },
      {
        id: 287,
        name: 'Bonifico_Bancario'
      }
    ]
    instance.vat_types_list = [
      {
        id: 1409,
        value: 15,
        description: 'ALIQUOTA #1234#',
        ei_type: '0',
        is_disabled: false
      },
      {
        id: 1332,
        value: 0,
        description: 'Non imp. art. 17 c. 6 lett. A TER DPR 633/72',
        ei_type: '0',
        is_disabled: false
      }
    ]
  })

  // const getProperty = function (object, getter, property) {
  //   // Use getter method if present; otherwise, get the property directly.
  //   if (typeof object[getter] === 'function') { return object[getter]() } else { return object[property] }
  // }

  // const setProperty = function (object, setter, property, value) {
  //   // Use setter method if present; otherwise, set the property directly.
  //   if (typeof object[setter] === 'function') { object[setter](value) } else { object[property] = value }
  // }

  describe('IssuedDocumentPreCreateInfo', function () {
    it('should create an instance of IssuedDocumentPreCreateInfo', function () {
      expect(instance).to.be.a(fattureInCloudSdk.IssuedDocumentPreCreateInfo)
    })

    it('should have the property numerations (base name: "numerations")', function () {
      expect(typeof instance.numerations).to.be('object')
    })

    it('should have the property dnNumerations (base name: "dn_numerations")', function () {
      expect(typeof instance.dn_numerations).to.be('object')
    })

    it('should have the property defaultValues (base name: "default_values")', function () {
      expect(typeof instance.default_values).to.be('object')
    })

    it('should have the property extraDataDefaultValues (base name: "extra_data_default_values")', function () {
      expect(typeof instance.extra_data_default_values).to.be('object')
    })

    it('should have the property itemsDefaultValues (base name: "items_default_values")', function () {
      expect(typeof instance.items_default_values).to.be('object')
    })

    it('should have the property countriesList (base name: "countries_list")', function () {
      expect(typeof instance.countries_list).to.be('object')
    })

    it('should have the property currenciesList (base name: "currencies_list")', function () {
      expect(typeof instance.currencies_list).to.be('object')
    })

    it('should have the property templatesList (base name: "templates_list")', function () {
      expect(typeof instance.templates_list).to.be('object')
    })

    it('should have the property dnTemplatesList (base name: "dn_templates_list")', function () {
      expect(typeof instance.dn_templates_list).to.be('object')
    })

    it('should have the property aiTemplatesList (base name: "ai_templates_list")', function () {
      expect(typeof instance.ai_templates_list).to.be('object')
    })

    it('should have the property paymentMethodsList (base name: "payment_methods_list")', function () {
      expect(typeof instance.payment_methods_list).to.be('object')
    })

    it('should have the property paymentAccountsList (base name: "payment_accounts_list")', function () {
      expect(typeof instance.payment_accounts_list).to.be('object')
    })

    it('should have the property vatTypesList (base name: "vat_types_list")', function () {
      expect(typeof instance.payment_accounts_list).to.be('object')
    })
  })
}))
