getObject() public static method

Gets Object Instance with Json data filled in
public static getObject ( ) : Amount
return PayPal\Api\Amount
Exemplo n.º 1
0
 /**
  * @depends testSerializationDeserialization
  * @param Sale $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getPaymentMode(), "TestSample");
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getReasonCode(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibility(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample");
     $this->assertEquals($obj->getClearingTime(), "TestSample");
     $this->assertEquals($obj->getPaymentHoldStatus(), "TestSample");
     $this->assertEquals($obj->getPaymentHoldReasons(), "TestSample");
     $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getReceivableAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getExchangeRate(), "TestSample");
     $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject());
     $this->assertEquals($obj->getReceiptId(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getProcessorResponse(), ProcessorResponseTest::getObject());
     $this->assertEquals($obj->getBillingAgreementId(), "TestSample");
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Exemplo n.º 2
0
 /**
  * @depends testSerializationDeserialization
  * @param ExternalFunding $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getReferenceId(), "TestSample");
     $this->assertEquals($obj->getCode(), "TestSample");
     $this->assertEquals($obj->getFundingAccountId(), "TestSample");
     $this->assertEquals($obj->getDisplayText(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
 }
Exemplo n.º 3
0
 /**
  * @depends testSerializationDeserialization
  * @param RefundRequest $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getRefundSource(), "TestSample");
     $this->assertEquals($obj->getReason(), "TestSample");
     $this->assertEquals($obj->getInvoiceNumber(), "TestSample");
     $this->assertEquals($obj->getRefundAdvice(), true);
 }
Exemplo n.º 4
0
 /**
  * @depends testSerializationDeserialization
  * @param Capture $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getIsFinalCapture(), true);
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Exemplo n.º 5
0
 /**
  * @depends testSerializationDeserialization
  * @param Refund $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getReason(), "TestSample");
     $this->assertEquals($obj->getSaleId(), "TestSample");
     $this->assertEquals($obj->getCaptureId(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Exemplo n.º 6
0
 /**
  * @depends testSerializationDeserialization
  * @param CartBase $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getPayee(), PayeeTest::getObject());
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getNoteToPayee(), "TestSample");
     $this->assertEquals($obj->getCustom(), "TestSample");
     $this->assertEquals($obj->getInvoiceNumber(), "TestSample");
     $this->assertEquals($obj->getSoftDescriptor(), "TestSample");
     $this->assertEquals($obj->getPaymentOptions(), PaymentOptionsTest::getObject());
     $this->assertEquals($obj->getItemList(), ItemListTest::getObject());
     $this->assertEquals($obj->getNotifyUrl(), "http://www.google.com");
     $this->assertEquals($obj->getOrderUrl(), "http://www.google.com");
 }
Exemplo n.º 7
0
 /**
  * @depends testSerializationDeserialization
  * @param Order $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getPaymentMode(), "TestSample");
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getReasonCode(), "TestSample");
     $this->assertEquals($obj->getPendingReason(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibility(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject());
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }