View Source ExCheckout.Item (ex_checkout v1.5.2)

Defines a struct for storing an Item in a Package.

The monetary_value might be required depending on the origin/destination countries of the shipment. Both monetary_value and insurance are integers stored in USD cents.

Link to this section Summary

Functions

Builds and returns an Item. Use this instead of directly initializing the struct.

Link to this section Types

@type t() :: %ExCheckout.Item{
  description: nil | String.t(),
  monetary_value: nil | integer(),
  quantity: nil | number(),
  weight: nil | number()
}

Link to this section Functions

@spec new(map()) :: t()

Builds and returns an Item. Use this instead of directly initializing the struct.