shippex v0.6.15 Shippex.Carrier behaviour
Defines a behaviour for implementing a new Carrier module. Includes a helper function for fetching the Carrier module.
Link to this section Summary
Functions
Fetches a Carrier module by its atom/string representation
Link to this section Types
Link to this section Functions
Fetches a Carrier module by its atom/string representation.
iex> Carrier.module(:ups)
Carrier.UPS
iex> Carrier.module("UPS")
Carrier.UPS
iex> Carrier.module("ups")
Carrier.UPS
Link to this section Callbacks
Link to this callback
cancel_transaction(arg0)
Link to this callback
cancel_transaction(arg0, arg1)
cancel_transaction(Shippex.Shipment.t(), String.t()) :: {atom(), String.t()}
Link to this callback
create_transaction(arg0, arg1)
create_transaction(Shippex.Shipment.t(), atom() | Shippex.Service.t()) :: {atom(), Shippex.Transaction.t() | map()}
Link to this callback
fetch_rate(arg0, arg1)
fetch_rate(Shippex.Shipment.t(), Shippex.Service.t()) :: [{atom(), Shippex.Rate.t()}] | {atom(), Shippex.Rate.t()}
Link to this callback
fetch_rates(arg0)
fetch_rates(Shippex.Shipment.t()) :: [{atom(), Shippex.Rate.t()}]