Charges

world.money.Charges
See theCharges companion object
final case class Charges[C <: Currency & Singleton]

A select-one table of flat charges over a monetary base, each row an inclusive upper bound - delivery fee by order value, a published fee schedule. The table is the application's data; world supplies validated assembly and deterministic containment.

Rows partition the axis above the floor, so no tie-break can arise, and a capped table refuses an amount past its cap rather than extrapolating beyond the authority's own limit. Instances via Charges.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def cap: Option[BigDecimal]
Extension method from Charges

The last bounded row's bound; None for an open table.

The last bounded row's bound; None for an open table.

Attributes

def charge(m: Money[C]): Either[Outside, Money[C]]
Extension method from Charges

The containing row's charge, upper bounds inclusive. Below the floor and past a capped table's last bound are both typed refusals.

The containing row's charge, upper bounds inclusive. Below the floor and past a capped table's last bound are both typed refusals.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product