PHP Interface Sonata\Component\Delivery\ServiceDeliveryInterface

Show file Open project: sonata-project/ecommerce Interface Usage Examples

Public Methods

Method Description
getCode ( ) : string
getEnabled ( ) : boolean
getName ( ) : string
getPrice ( ) : float
getPriority ( ) : integer
getTotal ( Sonata\Component\Basket\BasketInterface $basket, boolean $vat = false ) : float Return the delivery price.
getVatAmount ( Sonata\Component\Basket\BasketInterface $basket ) : float Return the vat amount.
getVatRate ( ) : float
isAddressRequired ( ) : boolean
setVatRate ( float $vat ) Sets the VAT rate.

Method Details

getCode() public method

public getCode ( ) : string
return string

getEnabled() public method

public getEnabled ( ) : boolean
return boolean

getName() public method

public getName ( ) : string
return string the name of the delivery method

getPrice() public method

public getPrice ( ) : float
return float the delivery base price

getPriority() public method

public getPriority ( ) : integer
return integer

getTotal() public method

Return the delivery price.
public getTotal ( Sonata\Component\Basket\BasketInterface $basket, boolean $vat = false ) : float
$basket Sonata\Component\Basket\BasketInterface
$vat boolean
return float

getVatAmount() public method

Return the vat amount.
public getVatAmount ( Sonata\Component\Basket\BasketInterface $basket ) : float
$basket Sonata\Component\Basket\BasketInterface
return float

getVatRate() public method

public getVatRate ( ) : float
return float the vat linked to the delivery

isAddressRequired() public method

public isAddressRequired ( ) : boolean
return boolean return true an address is required to use this delivery method

setVatRate() public method

Sets the VAT rate.
public setVatRate ( float $vat )
$vat float