OrderItemBuilder

Namespace

IO\Builder\Order

Properties
Type Name Description

CheckoutService

$checkoutService

VatService

$vatService

ItemNameFilter

$itemNameFilter

VatRepositoryContract

$vatRepository

WebstoreRepositoryContract

$webstoreRepository

CustomerService

$customerService

Methods
public __construct($checkoutService, $vatService, $itemNameFilter, $webstoreRepository, $vatRepository, $customerService)

OrderItemBuilder constructor.

Parameters

Type

Name

Description

CheckoutService

$checkoutService

VatService

$vatService

ItemNameFilter

$itemNameFilter

WebstoreRepositoryContract

$webstoreRepository

VatRepositoryContract

$vatRepository

CustomerService

$customerService

public fromBasket($basket, $items):array

Add a basket item to the order

Parameters

Type

Name

Description

Basket

$basket

array

$items

public getVatField($vat, $vatRate):int

Get the vat field for the given vat rate.

Parameters

Type

Name

Description

Vat

$vat

The country VAT instance.

float

$vatRate

The vat rate.