ePages 7.0.0 - DE_EPAGES/ExternalShipping/API/Object/ShippingFulfillmentMethod.pm

Package DE_EPAGES::ExternalShipping::API::Object::ShippingFulfillmentMethod

object interface for ShippingFulfillmentMethod.

Base
DE_EPAGES::Object::API::Object::Object

Functions

addMandatoryAddressFields
addVisibleAddressFields
className
dbPackage
getSizeUnit
getWeightUnit
isLineItemSupported
isUsable
newShippingLabel

addMandatoryAddressFields

Makes certains address fields mandatory. For now this method only supports shipping address fields but it can be extended to support other address fields such as delivery address fields or shop address fields.

Syntax
addMandatoryAddressFields( $aShippingAddressFields );
Input
$aShippingAddressFields (string)
Comma-separated list of shipping
address fields which must be mandatory.

addVisibleAddressFields

Makes certains address fields visible. For now this method only supports shipping address fields but it can be extended to support other address fields such as delivery address fields or shop address fields.

Syntax
addVisibleAddressFields( $aShippingAddressFields );
Input
$aShippingAddressFields (string)
Comma-separated list of shipping
address fields which must be visible.

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $ShippingFulfillmentMethod->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $ShippingFulfillmentMethod->dbPackage;
Return
$DbPackage (String)
database package name

getSizeUnit

Returns the UnitsOfMeasurement object that represents the units system to use for the shipping size.
By default this method returns the 'SizeUnit' attribute defined by the ExternalShipping specific cartridge.
See in CARTRIDGE_NAME/Database/XML/ShippingFulfillmentTypes.xml
Also a cartridge could implement its own getSizeUnit() method if needs to determine the unit dynamically (!)

Syntax
$SizeUnit = $ShippingFulfillmentMethod->getSizeUnit() ;
Return
$SizeUnit (Object)
UnitsOfMeasurement object for the size

getWeightUnit

Returns the UnitsOfMeasurement object that represents the units system to use for the shipping weight.
By default this method returns the 'WeightUnit' attribute defined by the ExternalShipping specific cartridge.
See in CARTRIDGE_NAME/Database/XML/ShippingFulfillmentTypes.xml
Also a cartridge could implement its own getSizeUnit() method if needs to determine the unit dynamically (!)

Syntax
$WeightUnit = $ShippingFulfillmentMethod->getWeightUnit() ;
Return
$WeightUnit (object)
UnitsOfMeasurement object for the weight

isLineItemSupported

Returns true if this lineitem type is supported by this shipping fulfillment method Used for filtering out lineitems that are not meant to be shipped.

Syntax
$ShippingFulfillmentMethod->isLineItemSupported( $LineItem );
Input
$LineItem (DE_EPAGES::Order::API::Object::LineItem)
LineItem
Return
$IsSupported (boolean)
True if lineitem can be used.

isUsable

Checks if ShippingFulfillmentMethod is usable

Syntax
isUsable( );
Return
$IsUsable (boolean)
True if ShippingFulfillmentMethod is usable

newShippingLabel

Creates a new shipping label, using the class ShippingType.ShippingLabelClass. This label is saved to the folder 'ShippingLabels' Either an order or an order document can be provided as template to clone from.

Syntax
$FulfillmentMethod->newShippingLabel( $Order );
$FulfillmentMethod->newShippingLabel( $OrderDocument );
Input
$Order (object)
customer order | object
$OrderDocument | order document
Return
$ShippingLabel (object)
shipping label