getObject() public static method

Gets Object Instance with Json data filled in
public static getObject ( ) : FileAttachment
return PayPal\Api\FileAttachment
Exemplo n.º 1
0
 /**
  * @depends testSerializationDeserialization
  * @param TemplateData $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getMerchantInfo(), MerchantInfoTest::getObject());
     $this->assertEquals($obj->getBillingInfo(), BillingInfoTest::getObject());
     $this->assertEquals($obj->getShippingInfo(), ShippingInfoTest::getObject());
     $this->assertEquals($obj->getItems(), InvoiceItemTest::getObject());
     $this->assertEquals($obj->getPaymentTerm(), PaymentTermTest::getObject());
     $this->assertEquals($obj->getReference(), "TestSample");
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
     $this->assertEquals($obj->getShippingCost(), ShippingCostTest::getObject());
     $this->assertEquals($obj->getCustom(), CustomAmountTest::getObject());
     $this->assertEquals($obj->getAllowPartialPayment(), true);
     $this->assertEquals($obj->getMinimumAmountDue(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTaxCalculatedAfterDiscount(), true);
     $this->assertEquals($obj->getTaxInclusive(), true);
     $this->assertEquals($obj->getTerms(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getMerchantMemo(), "TestSample");
     $this->assertEquals($obj->getLogoUrl(), "http://www.google.com");
     $this->assertEquals($obj->getTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getAttachments(), FileAttachmentTest::getObject());
 }
Exemplo n.º 2
0
 /**
  * @depends testSerializationDeserialization
  * @param Invoice $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getNumber(), "TestSample");
     $this->assertEquals($obj->getTemplateId(), "TestSample");
     $this->assertEquals($obj->getUri(), "TestSample");
     $this->assertEquals($obj->getStatus(), "TestSample");
     $this->assertEquals($obj->getMerchantInfo(), MerchantInfoTest::getObject());
     $this->assertEquals($obj->getBillingInfo(), BillingInfoTest::getObject());
     $this->assertEquals($obj->getCcInfo(), ParticipantTest::getObject());
     $this->assertEquals($obj->getShippingInfo(), ShippingInfoTest::getObject());
     $this->assertEquals($obj->getItems(), InvoiceItemTest::getObject());
     $this->assertEquals($obj->getInvoiceDate(), "TestSample");
     $this->assertEquals($obj->getPaymentTerm(), PaymentTermTest::getObject());
     $this->assertEquals($obj->getReference(), "TestSample");
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
     $this->assertEquals($obj->getShippingCost(), ShippingCostTest::getObject());
     $this->assertEquals($obj->getCustom(), CustomAmountTest::getObject());
     $this->assertEquals($obj->getAllowPartialPayment(), true);
     $this->assertEquals($obj->getMinimumAmountDue(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTaxCalculatedAfterDiscount(), true);
     $this->assertEquals($obj->getTaxInclusive(), true);
     $this->assertEquals($obj->getTerms(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getMerchantMemo(), "TestSample");
     $this->assertEquals($obj->getLogoUrl(), "http://www.google.com");
     $this->assertEquals($obj->getTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPayments(), PaymentDetailTest::getObject());
     $this->assertEquals($obj->getRefunds(), RefundDetailTest::getObject());
     $this->assertEquals($obj->getMetadata(), MetadataTest::getObject());
     $this->assertEquals($obj->getAdditionalData(), "TestSample");
     $this->assertEquals($obj->getPaidAmount(), PaymentSummaryTest::getObject());
     $this->assertEquals($obj->getRefundedAmount(), PaymentSummaryTest::getObject());
     $this->assertEquals($obj->getAttachments(), FileAttachmentTest::getObject());
 }