From 70e3dbe6b3b77ab1ba788e79a4d6d88619721fb6 Mon Sep 17 00:00:00 2001 From: Brent Scheffler Date: Sat, 27 Jun 2020 21:00:26 -0700 Subject: [PATCH] Renaming PaymentAddress entity to RecipientAddress as that much better describes its purpose. --- .../{PaymentAddress.php => RecipientAddress.php} | 2 +- src/Plaid.php | 6 +++--- tests/PaymentAddressEntityTest.php | 10 +++++----- tests/PaymentInitiationTest.php | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) rename src/Entities/{PaymentAddress.php => RecipientAddress.php} (98%) diff --git a/src/Entities/PaymentAddress.php b/src/Entities/RecipientAddress.php similarity index 98% rename from src/Entities/PaymentAddress.php rename to src/Entities/RecipientAddress.php index bf9d994..9cd4c4d 100644 --- a/src/Entities/PaymentAddress.php +++ b/src/Entities/RecipientAddress.php @@ -2,7 +2,7 @@ namespace TomorrowIdeas\Plaid\Entities; -class PaymentAddress +class RecipientAddress { /** * Street address. diff --git a/src/Plaid.php b/src/Plaid.php index 2ed1cf1..9d62da8 100644 --- a/src/Plaid.php +++ b/src/Plaid.php @@ -8,7 +8,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Shuttle\Shuttle; -use TomorrowIdeas\Plaid\Entities\PaymentAddress; +use TomorrowIdeas\Plaid\Entities\RecipientAddress; class Plaid { @@ -819,10 +819,10 @@ public function getWebhookVerificationKey(string $key_id): object * * @param string $name * @param string $iban - * @param PaymentAddress $address + * @param RecipientAddress $address * @return object */ - public function createRecipient(string $name, string $iban, PaymentAddress $address): object + public function createRecipient(string $name, string $iban, RecipientAddress $address): object { $params = [ "name" => $name, diff --git a/tests/PaymentAddressEntityTest.php b/tests/PaymentAddressEntityTest.php index d2f7987..06fb550 100644 --- a/tests/PaymentAddressEntityTest.php +++ b/tests/PaymentAddressEntityTest.php @@ -2,16 +2,16 @@ namespace TomorrowIdeas\Plaid\Tests; -use TomorrowIdeas\Plaid\Entities\PaymentAddress; +use TomorrowIdeas\Plaid\Entities\RecipientAddress; /** - * @covers TomorrowIdeas\Plaid\Entities\PaymentAddress + * @covers TomorrowIdeas\Plaid\Entities\RecipientAddress */ -class PaymentAddressEntityTest extends TestCase +class RecipientAddressEntityTest extends TestCase { public function test_to_array_with_single_street(): void { - $address = new PaymentAddress("123 Elm St", null, "Anytown", "ABC 123", "US"); + $address = new RecipientAddress("123 Elm St", null, "Anytown", "ABC 123", "US"); $this->assertEquals( [ @@ -26,7 +26,7 @@ public function test_to_array_with_single_street(): void public function test_to_array_with_additional_street(): void { - $address = new PaymentAddress("123 Elm St", "Apt A", "Anytown", "ABC 123", "US"); + $address = new RecipientAddress("123 Elm St", "Apt A", "Anytown", "ABC 123", "US"); $this->assertEquals( [ diff --git a/tests/PaymentInitiationTest.php b/tests/PaymentInitiationTest.php index d505cc5..a80c989 100644 --- a/tests/PaymentInitiationTest.php +++ b/tests/PaymentInitiationTest.php @@ -2,17 +2,17 @@ namespace TomorrowIdeas\Plaid\Tests; -use TomorrowIdeas\Plaid\Entities\PaymentAddress; +use TomorrowIdeas\Plaid\Entities\RecipientAddress; /** * @covers TomorrowIdeas\Plaid\Plaid - * @covers TomorrowIdeas\Plaid\Entities\PaymentAddress + * @covers TomorrowIdeas\Plaid\Entities\RecipientAddress */ class PaymentInitiationTest extends TestCase { public function test_create_recipient(): void { - $response = $this->getPlaidClient()->createRecipient("name", "iban", new PaymentAddress("139 The Esplanade", null, "Weymouth", "DT4 7NR", "GB")); + $response = $this->getPlaidClient()->createRecipient("name", "iban", new RecipientAddress("139 The Esplanade", null, "Weymouth", "DT4 7NR", "GB")); $this->assertEquals("POST", $response->method); $this->assertEquals("2019-05-29", $response->version);