public function testSerializationDeserialization()
{
$obj = new Invoice(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getId());
$this->assertNotNull($obj->getNumber());
$this->assertNotNull($obj->getTemplateId());
$this->assertNotNull($obj->getUri());
$this->assertNotNull($obj->getStatus());
$this->assertNotNull($obj->getMerchantInfo());
$this->assertNotNull($obj->getBillingInfo());
$this->assertNotNull($obj->getCcInfo());
$this->assertNotNull($obj->getShippingInfo());
$this->assertNotNull($obj->getItems());
$this->assertNotNull($obj->getInvoiceDate());
$this->assertNotNull($obj->getPaymentTerm());
$this->assertNotNull($obj->getReference());
$this->assertNotNull($obj->getDiscount());
$this->assertNotNull($obj->getShippingCost());
$this->assertNotNull($obj->getCustom());
$this->assertNotNull($obj->getAllowPartialPayment());
$this->assertNotNull($obj->getMinimumAmountDue());
$this->assertNotNull($obj->getTaxCalculatedAfterDiscount());
$this->assertNotNull($obj->getTaxInclusive());
$this->assertNotNull($obj->getTerms());
$this->assertNotNull($obj->getNote());
$this->assertNotNull($obj->getMerchantMemo());
$this->assertNotNull($obj->getLogoUrl());
$this->assertNotNull($obj->getTotalAmount());
$this->assertNotNull($obj->getPayments());
$this->assertNotNull($obj->getRefunds());
$this->assertNotNull($obj->getMetadata());
$this->assertNotNull($obj->getAdditionalData());
$this->assertNotNull($obj->getPaidAmount());
$this->assertNotNull($obj->getRefundedAmount());
$this->assertNotNull($obj->getAttachments());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}