Skip to content

Commit

Permalink
Make address date nullable (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kielabokkie authored Jul 3, 2023
1 parent 08c479b commit 6805d7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Model/AbnResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class AbnResponse extends AbstractResponse

#[SerializedName('AddressDate')]
#[NotBlank]
public \DateTimeImmutable $addressDate;
public ?\DateTimeImmutable $addressDate = null;

#[SerializedName('AddressPostcode')]
public string $addressPostcode;
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/AbnClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function testLookupAbnSuccess(): void
'AbnStatus' => $response->abnStatus,
'AbnStatusEffectiveFrom' => $response->abnStatusEffectiveFrom->format('Y-m-d'),
'Acn' => $response->acn,
'AddressDate' => $response->addressDate->format('Y-m-d'),
'AddressDate' => $response->addressDate?->format('Y-m-d'),
'AddressPostcode' => $response->addressPostcode,
'AddressState' => $response->addressState,
'BusinessName' => $response->businessNames,
Expand Down

0 comments on commit 6805d7f

Please sign in to comment.