Companies
albert.resources.companies
Company
Bases: BaseResource
A manufacturing company or supplier tracked in Albert.
A Company is the organization that makes or supplies a material. It is the
company linked on raw-material inventory items: each raw material points
back to the Company that manufactures it (see
InventoryItem). Companies are managed
through CompanyCollection, accessed as
client.companies.
Companies are identified by a Company ID (format COM...). A Company is
typically minimal: a name plus its assigned ID. You construct one directly
(Company(name="Acme Chemicals")) to create it or to attach it to an
inventory item.
Example
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "A manufacturing company or supplier tracked in Albert.\n\nA Company is the organization that makes or supplies a material. It is the\n``company`` linked on raw-material inventory items: each raw material points\nback to the Company that manufactures it (see\n[`InventoryItem`][albert.resources.inventory.InventoryItem]). Companies are managed\nthrough [`CompanyCollection`][albert.collections.companies.CompanyCollection], accessed as\n``client.companies``.\n\nCompanies are identified by a Company ID (format ``COM...``). A Company is\ntypically minimal: a name plus its assigned ID. You construct one directly\n(``Company(name=\"Acme Chemicals\")``) to create it or to attach it to an\ninventory item.\n\n!!! example\n ```python\n from albert.resources.companies import Company\n\n # Build a company to create or attach to an inventory item\n company = Company(name=\"Acme Chemicals\")\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The company's name. This is the primary identifier used when searching for or creating a company.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Company ID (format ``COM...``). ``None`` until the company is created in or retrieved from Albert.",
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Search-relevance score returned when the company comes back as a search result. Read-only; not set on companies you build yourself.",
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
name(str) -
id(str | None) -
distance(float | None)
name
name: str
The company's name. This is the primary identifier used when searching for or creating a company.
id
id: str | None = None
The Albert Company ID (format COM...). None until the company is created in or retrieved from Albert.
distance
distance: float | None = None
Search-relevance score returned when the company comes back as a search result. Read-only; not set on companies you build yourself.