<?php

/**
 * ListBinIssuedDocumentsTest
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  FattureInCloud
 * @author   Fatture In Cloud API team
 * @link     https://fattureincloud.it
 */

/**
 * Fatture in Cloud API v2 - API Reference
 *
 * Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.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.
 *
 * The version of the OpenAPI document: 2.1.5
 * Contact: info@fattureincloud.it
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.12.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Please update the test case below to test the model.
 */

namespace FattureInCloud\Test\Model;

use FattureInCloud\ObjectSerializer;
use PHPUnit\Framework\TestCase;

/**
 * ListBinIssuedDocumentsTest Class Doc Comment
 *
 * @category    Class
 * @description ListBinIssuedDocuments
 * @package     FattureInCloud
 * @author   Fatture In Cloud API team
 * @link     https://fattureincloud.it
 */
class ListBinIssuedDocumentsTest extends TestCase
{

    public $array = [];
    public $object;

    /**
     * Setup before running any test case
     */
    public static function setUpBeforeClass(): void
    {
    }

    /**
     * Setup before running each test case
     */
    public function setUp(): void
    {
        $json = '{
          "data": [
            {
              "id": 12345,
              "type": "receipt",
              "numeration": "rec123",
              "subject": "",
              "visible_subject": "",
              "amount_net": 68.18,
              "amount_vat": 6.82,
              "amount_gross": 75,
              "amount_due_discount": 0,
              "entity": {
                "id": 54321,
                "name": "Mary Red S.r.L.",
                "vat_number": "IT05432181211",
                "tax_code": "IT05432181211",
                "address_street": "Via Italia, 66",
                "address_postal_code": "20900",
                "address_city": "Milano",
                "address_province": "MI",
                "address_extra": "",
                "country": "Italia",
                "certified_email": "mary@pec.red.com",
                "ei_code": "ABCXCR1"
              },
              "date": "2021-08-20",
              "number": 1,
              "next_due_date": "2021-12-31",
              "url": "ypbqqe4u8w8bdabcd5fd5b1a4gtqhlof.pdf",
              "items_list": null,
              "payments_list": null
            },
            {
              "id": 12346,
              "type": "receipt",
              "numeration": "rec124",
              "subject": "",
              "visible_subject": "",
              "amount_net": 168.18,
              "amount_vat": 16.82,
              "amount_gross": 175,
              "amount_due_discount": 0,
              "entity": {
                "id": 54321,
                "name": "Mary Red S.r.L.",
                "vat_number": "IT05432181211",
                "tax_code": "IT05432181211",
                "address_street": "Via Italia, 66",
                "address_postal_code": "20900",
                "address_city": "Milano",
                "address_province": "MI",
                "address_extra": "",
                "country": "Italia",
                "certified_email": "mary@pec.red.com",
                "ei_code": "ABCXCR1"
              },
              "date": "2021-08-28",
              "number": 1,
              "next_due_date": "2021-12-31",
              "url": "qwertye4u8w8bdaqrt5fd5b1a4gtqhlof.pdf",
              "items_list": null,
              "payments_list": null
            }
          ]
        }';

        $this->array = json_decode($json, true);

        $this->object = ObjectSerializer::deserialize($json, '\FattureInCloud\Model\ListBinIssuedDocuments');
    }

    /**
     * Clean up after running each test case
     */
    public function tearDown(): void
    {
    }

    /**
     * Clean up after running all test cases
     */
    public static function tearDownAfterClass(): void
    {
    }

    /**
     * Test "ListBinIssuedDocuments"
     */
    public function testListBinIssuedDocuments()
    {
        foreach ($this->array as $key => $value) {
            Testcase::assertArrayHasKey($key, $this->object);
        }
    }

    /**
     * Test attribute "data"
     */
    public function testPropertyData()
    {
        foreach ($this->array['data'] as $key => $value) {
            TestCase::assertArrayHasKey($key, $this->object['data']);
        }
    }
}
