Documentation
¶
Overview ¶
Package flatrate is a Flat Rate implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Index ¶
- Constants
- type ShippingMethod
- func (it ShippingMethod) GetAllRates() []checkout.StructShippingRate
- func (it *ShippingMethod) GetCode() string
- func (it *ShippingMethod) GetName() string
- func (it *ShippingMethod) GetRates(checkoutObject checkout.InterfaceCheckout) []checkout.StructShippingRate
- func (it *ShippingMethod) IsAllowed(checkout checkout.InterfaceCheckout) bool
Constants ¶
View Source
const ( ConstShippingCode = "flat_rate" ConstShippingName = "Flat Rate" ConstConfigPathGroup = "shipping.flat_rate" ConstConfigPathEnabled = "shipping.flat_rate.enabled" ConstConfigPathRates = "shipping.flat_rate.rates" ConstErrorModule = "shipping/flatrate" ConstErrorLevel = env.ConstErrorLevelActor )
Package global constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShippingMethod ¶
type ShippingMethod struct{}
ShippingMethod is a implementer of InterfaceShippingMethod for a "Flat Rate" shipping method
func (ShippingMethod) GetAllRates ¶
func (it ShippingMethod) GetAllRates() []checkout.StructShippingRate
GetAllRates returns an unfiltered list of all supported shipping rates using the Flat Rate method.
func (*ShippingMethod) GetCode ¶
func (it *ShippingMethod) GetCode() string
GetCode returns code of shipping method
func (*ShippingMethod) GetName ¶
func (it *ShippingMethod) GetName() string
GetName returns name of shipping method
func (*ShippingMethod) GetRates ¶
func (it *ShippingMethod) GetRates(checkoutObject checkout.InterfaceCheckout) []checkout.StructShippingRate
GetRates returns rates allowed by shipping method for a given checkout
func (*ShippingMethod) IsAllowed ¶
func (it *ShippingMethod) IsAllowed(checkout checkout.InterfaceCheckout) bool
IsAllowed checks for method applicability
Click to show internal directories.
Click to hide internal directories.