Skip to content

Commit

Permalink
Merge pull request #1 from james-ingold/allow-network-transaction-id-…
Browse files Browse the repository at this point in the history
…to-be-null

Fix for paypal#10 - Allow NetworkTransactionReference id to not be required
  • Loading branch information
james-ingold authored Nov 25, 2024
2 parents de24c9e + 683bacc commit 649924c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Models/NetworkTransactionReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class NetworkTransactionReference implements \JsonSerializable
{
/**
* @var string
* @var string|null
*/
private $id;

Expand All @@ -38,9 +38,9 @@ class NetworkTransactionReference implements \JsonSerializable
private $acquirerReferenceNumber;

/**
* @param string $id
* @param string|null $id
*/
public function __construct(string $id)
public function __construct(?string $id = null)
{
$this->id = $id;
}
Expand All @@ -52,7 +52,7 @@ public function __construct(string $id)
* is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is
* numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}
Expand All @@ -64,10 +64,9 @@ public function getId(): string
* is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is
* numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
*
* @required
* @maps id
*/
public function setId(string $id): void
public function setId(?string $id): void
{
$this->id = $id;
}
Expand Down

0 comments on commit 649924c

Please sign in to comment.