Skip to content

Commit f207f3f

Browse files
Added get/set shipping/tax amount methods to the Checkout Interface
1 parent b25f10b commit f207f3f

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

Changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@
4646
- BC: Added the `?CheckoutSubject` return type to the `getCart()` method of the `Checkout` interface
4747
- BC: Changed `Checkout::getShippingAddress()` return type to be nullable
4848
- BC: Added the void return type to `Checkout::setShippingAddress()`
49-
- BC: Added the `removeShippingAddress()` method to the Checkout interface
49+
- BC: Added the following methods to the Checkout interface:
50+
- `removeShippingAddress()`
51+
- `getShippingAmount()`
52+
- `setShippingAmount()`
53+
- `getTaxesAmount()`
54+
- `setTaxesAmount()`
5055
- BC: The unused `$config` parameter has been removed from the `RequestStore` checkout driver constructor
5156
- BC: Added the `deleteByType()` and `clear()` methods to the `AdjustmentCollection` interface
5257
- Fixed possible null return type on Billpayer::getName() when is_organization is true but the company name is null

src/Checkout/Changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
- BC: The unused `$config` parameter has been removed from the `RequestStore` checkout driver constructor
1414
- BC: Changed `Checkout::getShippingAddress()` return type to be nullable
1515
- BC: Added the void return type to `Checkout::setShippingAddress()`
16-
- BC: Added the `removeShippingAddress()` method to the Checkout interface
16+
- BC: Added the following methods to the Checkout interface:
17+
- `removeShippingAddress()`
18+
- `getShippingAmount()`
19+
- `setShippingAmount()`
20+
- `getTaxesAmount()`
21+
- `setTaxesAmount()`
1722

1823
## 3.x Series
1924

src/Checkout/Contracts/Checkout.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Vanilo\Contracts\Address;
1818
use Vanilo\Contracts\Billpayer;
1919
use Vanilo\Contracts\CheckoutSubject;
20+
use Vanilo\Contracts\DetailedAmount;
2021

2122
interface Checkout
2223
{
@@ -71,6 +72,14 @@ public function putCustomAttributes(array $data): void;
7172

7273
public function getCustomAttributes(): array;
7374

75+
public function getShippingAmount(): DetailedAmount;
76+
77+
public function setShippingAmount(float|DetailedAmount $amount): void;
78+
79+
public function getTaxesAmount(): DetailedAmount;
80+
81+
public function setTaxesAmount(float|DetailedAmount $amount): void;
82+
7483
/**
7584
* Update checkout data with an array of attributes
7685
*

0 commit comments

Comments
 (0)