class PricingManager implements PricingManagerInterface (View source)

Properties

$pricing

The DTO of the pricing.

$purchasable

The instance of the purchasable model.

Authenticatable $user

The instance of the user.

Currency $currency

The instance of the currency.

$qty

The quantity value.

Collection $customerGroups

The customer groups to check against.

Methods

__construct()

No description

for(Purchasable $purchasable)

Set the purchasable property.

user(Authenticatable $user)

Set the user property.

guest()

Set the user property to NULL.

currency(Currency $currency)

Set the currency property.

qty(int $qty)

Set the quantity property.

customerGroups(Collection $customerGroups)

Set the customer groups.

customerGroup(CustomerGroup $customerGroup)

Set the customer group.

get()

Get the price for the purchasable.

Details

__construct()

No description

PricingResponse for(Purchasable $purchasable)

Set the purchasable property.

Parameters

Purchasable $purchasable

Return Value

PricingResponse

PricingManagerInterface user(Authenticatable $user)

Set the user property.

Parameters

Authenticatable $user

Return Value

PricingManagerInterface

PricingManager guest()

Set the user property to NULL.

Return Value

PricingManager

PricingManagerInterface currency(Currency $currency)

Set the currency property.

Parameters

Currency $currency

Return Value

PricingManagerInterface

PricingManagerInterface qty(int $qty)

Set the quantity property.

Parameters

int $qty

Return Value

PricingManagerInterface

PricingManagerInterface customerGroups(Collection $customerGroups)

Set the customer groups.

Parameters

Collection $customerGroups

Return Value

PricingManagerInterface

PricingManagerInterface customerGroup(CustomerGroup $customerGroup)

Set the customer group.

Parameters

CustomerGroup $customerGroup

Return Value

PricingManagerInterface

PricingResponse get()

Get the price for the purchasable.

Return Value

PricingResponse