interface ShippingManifestInterface (View source)

Methods

addOption(ShippingOption $shippingOption)

Add a shipping option to the manifest.

addOptions(Collection $shippingOptions)

Add a collection of shipping options to the manifest.

clearOptions()

Remove all shipping options

getOptionUsing(Closure $closure)

Define closure to retrieve shipping option

Collection
getOptions(Cart $cart)

Return available options for a given cart.

ShippingOption|null
getOption(Cart $cart, string $identifier)

Return available option for a given cart by identifier.

ShippingOption|null
getShippingOption(Cart $cart)

Retrieve shipping option for a given cart

Details

ShippingManifestInterface addOption(ShippingOption $shippingOption)

Add a shipping option to the manifest.

Parameters

ShippingOption $shippingOption

Return Value

ShippingManifestInterface

ShippingManifestInterface addOptions(Collection $shippingOptions)

Add a collection of shipping options to the manifest.

Parameters

Collection $shippingOptions

Return Value

ShippingManifestInterface

ShippingManifestInterface clearOptions()

Remove all shipping options

ShippingManifestInterface getOptionUsing(Closure $closure)

Define closure to retrieve shipping option

Parameters

Closure $closure

Return Value

ShippingManifestInterface

Collection getOptions(Cart $cart)

Return available options for a given cart.

Parameters

Cart $cart

Return Value

Collection

ShippingOption|null getOption(Cart $cart, string $identifier)

Return available option for a given cart by identifier.

Parameters

Cart $cart
string $identifier

Return Value

ShippingOption|null

ShippingOption|null getShippingOption(Cart $cart)

Retrieve shipping option for a given cart

Parameters

Cart $cart

Return Value

ShippingOption|null