diff --git a/Changelog.md b/Changelog.md index c1c35d31..b00cc05d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/src/Checkout/Tests/Example/Address.php b/src/Checkout/Tests/Example/Address.php index 836cef31..f78c6c2b 100644 --- a/src/Checkout/Tests/Example/Address.php +++ b/src/Checkout/Tests/Example/Address.php @@ -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); diff --git a/src/Contracts/Address.php b/src/Contracts/Address.php index f611c296..6f5a9660 100644 --- a/src/Contracts/Address.php +++ b/src/Contracts/Address.php @@ -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; } diff --git a/src/Contracts/Changelog.md b/src/Contracts/Changelog.md index 23f82bc8..ac3ff104 100644 --- a/src/Contracts/Changelog.md +++ b/src/Contracts/Changelog.md @@ -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()` diff --git a/src/Contracts/Tests/Dummies/Address.php b/src/Contracts/Tests/Dummies/Address.php index 6d38ad45..b38ab879 100644 --- a/src/Contracts/Tests/Dummies/Address.php +++ b/src/Contracts/Tests/Dummies/Address.php @@ -79,4 +79,9 @@ public function getAddress(): string { return $this->address; } + + public function getAddress2(): ?string + { + return null; + } } diff --git a/src/Shipment/Tests/Dummies/Address.php b/src/Shipment/Tests/Dummies/Address.php index 430cb2aa..414589d3 100644 --- a/src/Shipment/Tests/Dummies/Address.php +++ b/src/Shipment/Tests/Dummies/Address.php @@ -45,4 +45,9 @@ public function getAddress(): string { return $this->address; } + + public function getAddress2(): ?string + { + return $this->address2; + } } diff --git a/src/Support/Tests/Dummies/DummyAddress.php b/src/Support/Tests/Dummies/DummyAddress.php index fba17283..0a1be119 100644 --- a/src/Support/Tests/Dummies/DummyAddress.php +++ b/src/Support/Tests/Dummies/DummyAddress.php @@ -57,4 +57,9 @@ public function getAddress(): string { return $this->address ?? ''; } + + public function getAddress2(): ?string + { + return null; + } } diff --git a/src/Support/Traits/AddressModel.php b/src/Support/Traits/AddressModel.php index 97cd3f65..63e7f000 100644 --- a/src/Support/Traits/AddressModel.php +++ b/src/Support/Traits/AddressModel.php @@ -66,4 +66,9 @@ public function getAddress(): string { return $this->address ?: ''; } + + public function getAddress2(): ?string + { + return $this->address2 ?? null; + } } diff --git a/src/Taxes/Tests/Dummies/Address.php b/src/Taxes/Tests/Dummies/Address.php index afa1acce..9a421805 100644 --- a/src/Taxes/Tests/Dummies/Address.php +++ b/src/Taxes/Tests/Dummies/Address.php @@ -45,4 +45,9 @@ public function getAddress(): string { return $this->address; } + + public function getAddress2(): ?string + { + return $this->address2; + } }