Shippex.Item (shippex v0.18.0) View Source

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

Specs

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

Link to this section Functions

Specs

new(map()) :: t()

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