ExCorreios v1.1.4 ExCorreios.Calculator View Source

This module calculates a shipping based on Correios services and package dimensions.

Link to this section Summary

Link to this section Functions

Link to this function

calculate(services, package, params, opts \\ [])

View Source
calculate(
  [atom()],
  %ExCorreios.Calculator.Shipping.Package{
    diameter: term(),
    format: term(),
    height: term(),
    length: term(),
    weight: term(),
    width: term()
  },
  map(),
  keyword()
) :: {:ok, [map()]} | {:error, atom()}

Calculates a shipping.