<?php
namespace App\Drivers;
use Lunar\Base\Addressable;
use Lunar\Base\Purchasable;
use Lunar\Base\TaxDriver;
use Lunar\Base\ValueObjects\Cart\TaxBreakdown;
use Lunar\Models\Contracts\CartLine;
use Lunar\Models\Contracts\Currency;
class TaxJar implements TaxDriver
{
/**
* Set the shipping address.
*/
public function setShippingAddress(?Addressable $address = null): self
{
// ...
return $this;
}
/**
* Set the billing address.
*/
public function setBillingAddress(?Addressable $address = null): self
{
// ...
return $this;
}
/**
* Set the currency.
*/
public function setCurrency(Currency $currency): self
{
// ...
return $this;
}
/**
* Set the purchasable item.
*/
public function setPurchasable(Purchasable $purchasable): self
{
// ...
return $this;
}
/**
* Set the cart line.
*/
public function setCartLine(CartLine $cartLine): self
{
// ...
return $this;
}
/**
* Return the tax breakdown from a given sub total.
*
* @param int $subTotal
*/
public function getBreakdown($subTotal): TaxBreakdown
{
// Build and return a TaxBreakdown instance...
}
}