Skip to content

Commit

Permalink
Added the getAddress2() method to the Address interface
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Apr 24, 2024
1 parent 5e73b83 commit 5c64f6e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- `ComputesShipToName`
- `FillsCommonCheckoutAttributes`
- BC: Added the `deleteByType()` and `clear()` methods to the `AdjustmentCollection` interface
- BC: Added the `getAddress2()` method to the `Address` interface
- BC: The `Adjustable::itemsTotal()` has been renamed to `preAdjustmentTotal()`
- BC: The `invalidateAdjustments()` method has been added to the `Adjustable` interface
- BC: The `exceptTypes()` method has been added to the `AdjustmentCollection` interface
Expand Down
5 changes: 5 additions & 0 deletions src/Checkout/Tests/Example/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public function getAddress(): string
return $this->data['address'] ?? '';
}

public function getAddress2(): ?string
{
return $this->data['address2'] ?? null;
}

public function fill(array $attributes)
{
$this->data = array_merge($this->data, $attributes);
Expand Down
2 changes: 2 additions & 0 deletions src/Contracts/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ public function getCity(): ?string;
* The address part (Street, number, building, PO box etc)
*/
public function getAddress(): string;

public function getAddress2(): ?string;
}
1 change: 1 addition & 0 deletions src/Contracts/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Added the `Schematized` interface
- Added the `getConfigurationSchema()` method to the `Configurable` interface
- BC: Added the `itemsTotal()` method to the `CheckoutSubject` interface
- BC: Added the `getAddress2()` method to the `Address` interface
- BC: Added the following methods to the `Payable` interface:
- `getNumber()`
- `getPayableRemoteId()`
Expand Down
5 changes: 5 additions & 0 deletions src/Contracts/Tests/Dummies/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@ public function getAddress(): string
{
return $this->address;
}

public function getAddress2(): ?string
{
return null;
}
}
5 changes: 5 additions & 0 deletions src/Shipment/Tests/Dummies/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ public function getAddress(): string
{
return $this->address;
}

public function getAddress2(): ?string
{
return $this->address2;
}
}
5 changes: 5 additions & 0 deletions src/Support/Tests/Dummies/DummyAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ public function getAddress(): string
{
return $this->address ?? '';
}

public function getAddress2(): ?string
{
return null;
}
}
5 changes: 5 additions & 0 deletions src/Support/Traits/AddressModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ public function getAddress(): string
{
return $this->address ?: '';
}

public function getAddress2(): ?string
{
return $this->address2 ?? null;
}
}
5 changes: 5 additions & 0 deletions src/Taxes/Tests/Dummies/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ public function getAddress(): string
{
return $this->address;
}

public function getAddress2(): ?string
{
return $this->address2;
}
}

0 comments on commit 5c64f6e

Please sign in to comment.