Skip to content

Commit

Permalink
Added the getCalculator & estimate methods to the ShippingMethod in…
Browse files Browse the repository at this point in the history
…terface
  • Loading branch information
fulopattila122 committed Apr 1, 2024
1 parent bc18eb2 commit 3bd2f3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
- `setPayableRemoteId()`
- `findByPayableRemoteId()`
- BC: The return type of the `getNumber()` method of the Order interface is no longer nullable
- BC: Added the `getCalculator()` & `estimate()` methods to the `ShippingMethod` interface
- BC: The `Channel` interface extends the `Configurable` interface
- BC: Added the following methods to the `Channel` interface:
- `getLanguage()`
Expand Down
1 change: 1 addition & 0 deletions src/Shipment/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Changed minimal Enum requirement to v4.2
- Added `isZoneRestricted()` & `isNotZoneRestricted()` helper methods to the `ShippingMethod` class
- BC: Changed the ShippingFeeCalculator, Carrier and Shipment interfaces to Configurable & Schematized
- BC: Added the `getCalculator()` & `estimate()` methods to the `ShippingMethod` interface

## 3.x Series

Expand Down
5 changes: 5 additions & 0 deletions src/Shipment/Contracts/ShippingMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
namespace Vanilo\Shipment\Contracts;

use Vanilo\Contracts\Configurable;
use Vanilo\Shipment\Models\ShippingFee;

interface ShippingMethod extends Configurable
{
public function getCarrier(): ?Carrier;

public function getCalculator(): ShippingFeeCalculator;

public function estimate(?object $subject = null): ShippingFee;
}

0 comments on commit 3bd2f3c

Please sign in to comment.