4. COMPANHIAS
Module: company
Company
Bases: MEBase
A factory for a Company class.
This class provides methods for managing company and service information in the MelhorEnvio API.
| METHOD | DESCRIPTION |
|---|---|
all_company |
Gets information about all companies. |
get_company |
Get details of a specific company. |
all_services |
Get information about all services. |
get_service |
Get details of a specific service. |
list_agencies |
List all agencies with optional filters. |
get_agency |
Get details of a specific agency. |
all_company() -> dict
Get information about all companies.
This method retrieves information about all available shipping companies in the MelhorEnvio API.
Usage:
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about all available shipping companies.
TYPE:
|
Source code in melhorenvio/resources/company.py
get_company(company_id: str) -> dict
Get details of a specific company.
This method retrieves detailed information about a specific shipping company in the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
company_id |
The ID of the company for which you want to retrieve information.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing detailed information about the specified shipping company.
TYPE:
|
Source code in melhorenvio/resources/company.py
all_services() -> dict
Get information about all services.
This method retrieves information about all available shipping services in the MelhorEnvio API.
Usage:
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about all available shipping services.
TYPE:
|
Source code in melhorenvio/resources/company.py
get_service(service_id: str) -> dict
Get details of a specific service.
This method retrieves detailed information about a specific shipping service in the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
service_id |
The ID of the service for which you want to retrieve information.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing detailed information about the specified shipping service.
TYPE:
|
Source code in melhorenvio/resources/company.py
list_agencies(filters: dict | None) -> dict
List all agencies with optional filters.
This method retrieves a list of all available shipping agencies with optional filtering in the MelhorEnvio API.
Usage:
>>> sdk.company().list_agencies()
>>> filters = {"key": "value"}
>>> sdk.company().list_agencies(filters=filters)
| PARAMETER | DESCRIPTION |
|---|---|
filters |
Optional filters for agency listing.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about shipping agencies.
TYPE:
|
Source code in melhorenvio/resources/company.py
get_agency(agency_id: str) -> dict
Get details of a specific agency.
This method retrieves detailed information about a specific shipping agency in the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
agency_id |
The ID of the agency for which you want to retrieve information.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing detailed information about the specified shipping agency.
TYPE:
|