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);