ePages 6.11.0 - DE_EPAGES/ShippingTypes/API/Object/ShippingMethodWeightOfBasket.pm

Package DE_EPAGES::ShippingTypes::API::Object::ShippingMethodWeightOfBasket

object interface for ShippingMethodWeightOfBasket.

Base
DE_EPAGES::Order::API::Object::ContainerShippingMethod

Functions

getLevels
price
setLevels

getLevels

Return the shipping levels for the given currency in the requested tax model.

Syntax
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel);
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel, $ExtraPrecision);
Input
$CurrencyID (char(3))
currency id
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ExtraPrecision (boolean)
(optional, default=0) not used
Return
$ahLevels (int)
list of hashes, keys:
BaseValue, LowerBound, UpperBound, Multiplier, ShippingLevelID

price

Returns the shipping price by the given requirements.

Syntax
$ShippingPrice = $Object->price( $hVars );
Input
$hVars (ref.hash)
  • CurrencyID - alpha currency code (ISO 4217) - char(3)
  • TaxModel - gross or net price - int
  • ShippingElements
    • Element - e.g. Products - object
    • Quantity - quantity of element - float
    | ref.array.hash
Return
$ShippingPrice (money)
price of shipping

setLevels

Sets all shipping levels for the given currency. Deletes shipping levels that are not included in the list. Calculates net prices from gross prices if $TaxModel is TAX_MODEL_GROSS.

Syntax
$Object->setLevels($CurrencyID, $TaxModel, $ahLevels);
Input
$CurrencyID (char(3))
currency id
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ahLevels (int)
list of hashes, keys:
BaseValue, LowerBound, UpperBound, Multiplier