From 9a46b27e442627253cddb0933953340b1f0e16da Mon Sep 17 00:00:00 2001 From: Mike Tramontano Date: Wed, 9 Jul 2014 14:18:32 -0400 Subject: [PATCH 1/2] Correct shipping address set/get docs The document comments actually power what classes are instantiated when parsing the API responses --- lib/PayPal/Api/PayerInfo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PayPal/Api/PayerInfo.php b/lib/PayPal/Api/PayerInfo.php index 2cc9c98..9328481 100644 --- a/lib/PayPal/Api/PayerInfo.php +++ b/lib/PayPal/Api/PayerInfo.php @@ -241,7 +241,7 @@ class PayerInfo extends PPModel * Set Shipping Address * Shipping address of the Payer from their PayPal Account * - * @param \PayPal\Api\Address $shipping_address + * @param \PayPal\Api\ShippingAddress $shipping_address * * @return $this */ @@ -256,7 +256,7 @@ class PayerInfo extends PPModel * Get Shipping Address * Shipping address of the Payer from their PayPal Account * - * @return \PayPal\Api\Address + * @return \PayPal\Api\ShippingAddress */ public function getShippingAddress() { @@ -267,7 +267,7 @@ class PayerInfo extends PPModel * Set Shipping Address * Shipping address of the Payer from their PayPal Account * - * @param \PayPal\Api\Address $shipping_address + * @param \PayPal\Api\ShippingAddress $shipping_address * * @deprecated Use setShippingAddress * @@ -286,7 +286,7 @@ class PayerInfo extends PPModel * * @deprecated Use getShippingAddress * - * @return \PayPal\Api\Address + * @return \PayPal\Api\ShippingAddress */ public function getShipping_address() { From e49c50231c1d569af7c3e7cb0adfc9c9e148b739 Mon Sep 17 00:00:00 2001 From: Avi Das Date: Tue, 22 Jul 2014 14:25:51 -0500 Subject: [PATCH 2/2] Change address to shipping address in tests --- tests/PayPal/Test/Api/PayerInfoTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/PayPal/Test/Api/PayerInfoTest.php b/tests/PayPal/Test/Api/PayerInfoTest.php index b1f5858..e3e6581 100644 --- a/tests/PayPal/Test/Api/PayerInfoTest.php +++ b/tests/PayPal/Test/Api/PayerInfoTest.php @@ -21,7 +21,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase { $payerInfo->setLastName(self::$lastName); $payerInfo->setPhone(self::$phone); $payerInfo->setPayerId(self::$payerId); - $payerInfo->setShippingAddress(AddressTest::createAddress()); + $payerInfo->setShippingAddress(ShippingAddressTest::createAddress()); return $payerInfo; } @@ -36,7 +36,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase { $this->assertEquals(self::$lastName, $this->payerInfo->getLastName()); $this->assertEquals(self::$phone, $this->payerInfo->getPhone()); $this->assertEquals(self::$payerId, $this->payerInfo->getPayerId()); - $this->assertEquals(AddressTest::$line1, $this->payerInfo->getShippingAddress()->getLine1()); + $this->assertEquals(ShippingAddressTest::$line1, $this->payerInfo->getShippingAddress()->getLine1()); } public function testSerializeDeserialize() {