3. LOJA
Module: store
Store
Bases: MEBase
A factory for a Store class .
This class provides methods for managing store information in the MelhorEnvio API.
| METHOD | DESCRIPTION |
|---|---|
all |
Fetch all store information. |
create |
Create a store. |
get |
Get store information. |
create_address |
Create an address for the given store. |
list_address |
List all addresses of a store. |
create_phone |
Create a phone number for the store. |
list_phone |
List all phone numbers for the store. |
all() -> dict
Fetch all store information .
This method retrieves a list of all stores associated with the user's account through the MelhorEnvio API.
Usage:
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing detailed information about all the stores.
TYPE:
|
Source code in melhorenvio/resources/store.py
create(body: dict) -> dict
Create a store .
This method allows you to create a new store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
body |
A dictionary containing the data needed to create the store.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the provided 'body' is not a dictionary. |
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about the newly created store.
TYPE:
|
Source code in melhorenvio/resources/store.py
get(store_id: str) -> dict
Get the store information .
This method retrieves detailed information about a specific store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
store_id |
The unique identifier of the store you want to retrieve information about.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing detailed information about the specified store.
TYPE:
|
Source code in melhorenvio/resources/store.py
create_address(store_id: str, body: dict) -> dict
Create an address for the given store .
This method allows you to add a new address to a specific store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
store_id |
The unique identifier of the store for which you want to create an address.
TYPE:
|
body |
A dictionary containing the address data.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the provided 'body' is not a dictionary. |
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about the newly created address.
TYPE:
|
Source code in melhorenvio/resources/store.py
list_address(store_id: str) -> dict
List all addresses of a store .
This method retrieves a list of all addresses associated with a specific store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
store_id |
The unique identifier of the store for which you want to list addresses.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about all addresses associated with the specified store.
TYPE:
|
Source code in melhorenvio/resources/store.py
create_phone(store_id: str, body: dict) -> dict
Create a phone for store.
This method allows you to add a phone number to a specific store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
store_id |
The unique identifier of the store for which you want to create a phone number.
TYPE:
|
body |
A dictionary containing the phone number data.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the provided 'body' is not a dictionary. |
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about the newly created phone number.
TYPE:
|
Source code in melhorenvio/resources/store.py
list_phone(store_id: str) -> dict
List all phone numbers for store.
This method retrieves a list of all phone numbers associated with a specific store associated with the user's account through the MelhorEnvio API.
Usage:
| PARAMETER | DESCRIPTION |
|---|---|
store_id |
The unique identifier of the store for which you want to list phone numbers.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
A dictionary containing information about all phone numbers associated with the specified store.
TYPE:
|