PayPal\Test\Api\RefundTest::testSerializationDeserialization PHP Method

testSerializationDeserialization() public method

Tests for Serialization and Deserialization Issues
public testSerializationDeserialization ( ) : Refund
return PayPal\Api\Refund
    public function testSerializationDeserialization()
    {
        $obj = new Refund(self::getJson());
        $this->assertNotNull($obj);
        $this->assertNotNull($obj->getId());
        $this->assertNotNull($obj->getAmount());
        $this->assertNotNull($obj->getState());
        $this->assertNotNull($obj->getReason());
        $this->assertNotNull($obj->getInvoiceNumber());
        $this->assertNotNull($obj->getSaleId());
        $this->assertNotNull($obj->getCaptureId());
        $this->assertNotNull($obj->getParentPayment());
        $this->assertNotNull($obj->getDescription());
        $this->assertNotNull($obj->getCreateTime());
        $this->assertNotNull($obj->getUpdateTime());
        $this->assertNotNull($obj->getReasonCode());
        $this->assertNotNull($obj->getLinks());
        $this->assertEquals(self::getJson(), $obj->toJson());
        return $obj;
    }