Ítems¶
Recurso client.items (endpoint items): productos y servicios. Usa únicamente las operaciones estándar de Actions.
alegrapy.items.Items
¶
Bases: Actions
Operations related to items (productos/servicios) endpoint.
__init__(client=None)
¶
Initialize the resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
AlegraClient
|
The AlegraClient instance. |
None
|
find_by_reference(reference, **filters)
¶
Find every item whose reference exactly matches reference.
The server is narrowed with reference=, but its match mode is undocumented,
so every page is read and only exact matches are kept. Comparison strips
whitespace and is case-sensitive (SKUs may differ only by case). Both a string
reference and the Costa Rica {"reference": ...} object are accepted.
Duplicates are possible and are all returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference
|
str
|
Reference (SKU) to look for. Must not be blank. |
required |
**filters
|
Any
|
Extra query parameters forwarded to the server. |
{}
|
Returns:
| Type | Description |
|---|---|
List[Dict[str, Any]]
|
List[Dict[str, Any]]: Matching items; empty when there is none. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |