5. COTAÇÃO
Module: quotation
Quotation
Bases: MEBase
A factory for a Quotation class
This class provides methods for calculating shipment information in the MelhorEnvio API.
| METHOD | DESCRIPTION |
|---|---|
calculate |
Calculate shipment information. |
calculate(body: dict) -> dict
Calculate shipment information based on provided data.
This method calculates shipping costs and information based on the provided data in the MelhorEnvio API.
Usage:
>>> body = {"key": "value"} # Replace with your shipment data
>>> sdk.quotation().calculate(body=body)
| PARAMETER | DESCRIPTION |
|---|---|
body |
The data used for calculating the shipment. Should be a dictionary.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the provided body is not a dictionary. |
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing calculated shipment information.
TYPE:
|