Skip to content

Commit

Permalink
Renaming PaymentAddress entity to RecipientAddress as that much bette…
Browse files Browse the repository at this point in the history
…r describes its purpose.
  • Loading branch information
brentscheffler committed Jun 28, 2020
1 parent 95cc67a commit 70e3dbe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace TomorrowIdeas\Plaid\Entities;

class PaymentAddress
class RecipientAddress
{
/**
* Street address.
Expand Down
6 changes: 3 additions & 3 deletions src/Plaid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions tests/PaymentAddressEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand All @@ -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(
[
Expand Down
6 changes: 3 additions & 3 deletions tests/PaymentInitiationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 70e3dbe

Please sign in to comment.