flatrate

package
v1.4.5-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 6 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL