Pricings
albert.resources.pricings
LeadTimeUnit
Pricing
Bases: BaseResource
A Price of a given InventoryItem at a given Location.
Attributes:
Name | Type | Description |
---|---|---|
id |
str | None
|
The Albert ID of the pricing. Set when the pricing is retrieved from Albert. |
inventory_id |
str
|
The Albert ID of the inventory item. |
company |
Company
|
The company that the pricing belongs to. |
location |
Location
|
The location that the pricing belongs to. |
description |
str | None
|
The description of the pricing. Optional. |
pack_size |
str | None
|
The pack size of the pricing. Optional. Used to calculate the cost per unit. |
price |
float
|
The price of the pricing IN CURRENCY/ KG or CURRENCY/L! Must do the conversion! Depends on InventoryItem's unit of measure. |
currency |
str
|
The currency of the pricing. Defaults to |
fob |
str | None
|
The FOB of the pricing. Optional. |
lead_time |
int | None
|
The lead time of the pricing. Optional. |
lead_time_unit |
LeadTimeUnit | None
|
The unit of measure for the provided lead time. Optional. |
expiration_date |
str | None
|
The expiration date of the pricing. YYYY-MM-DD format. |
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"
},
"Company": {
"description": "Company is a Pydantic model representing a company entity.\n\nAttributes\n----------\nname : str\n The name of the company.\nid : str | None\n The Albert ID of the company. Set when the company is retrieved from Albert.\ndistance : float | None\n The scores of a company in a search result, optional. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"LeadTimeUnit": {
"description": "The unit of measure for the provided lead time.",
"enum": [
"Days",
"Weeks",
"Months"
],
"title": "LeadTimeUnit",
"type": "string"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "A Price of a given InventoryItem at a given Location.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the pricing. Set when the pricing is retrieved from Albert.\ninventory_id : str\n The Albert ID of the inventory item.\ncompany : Company\n The company that the pricing belongs to.\nlocation : Location\n The location that the pricing belongs to.\ndescription : str | None\n The description of the pricing. Optional.\npack_size : str | None\n The pack size of the pricing. Optional. Used to calculate the cost per unit.\nprice : float\n The price of the pricing IN CURRENCY/ KG or CURRENCY/L! Must do the conversion! Depends on InventoryItem's unit of measure.\ncurrency : str\n The currency of the pricing. Defaults to `USD`.\nfob : str | None\n The FOB of the pricing. Optional.\nlead_time : int | None\n The lead time of the pricing. Optional.\nlead_time_unit : LeadTimeUnit | None\n The unit of measure for the provided lead time. Optional.\nexpiration_date : str | None\n The expiration date of the pricing. YYYY-MM-DD format.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentid"
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "Company"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "Location"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"packSize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Packsize"
},
"price": {
"maximum": 9999999999,
"minimum": 0,
"title": "Price",
"type": "number"
},
"currency": {
"default": "USD",
"title": "Currency",
"type": "string"
},
"fob": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fob"
},
"leadTime": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Leadtime"
},
"leadTimeUnit": {
"anyOf": [
{
"$ref": "#/$defs/LeadTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"expirationDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expirationdate"
},
"default": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Default"
}
},
"required": [
"Company",
"Location",
"price"
],
"title": "Pricing",
"type": "object"
}
Fields:
-
status
(Status | None
) -
created
(AuditFields | None
) -
updated
(AuditFields | None
) -
id
(str | None
) -
inventory_id
(str | None
) -
company
(SerializeAsEntityLink[Company]
) -
location
(SerializeAsEntityLink[Location]
) -
description
(str | None
) -
pack_size
(str | None
) -
price
(float
) -
currency
(str
) -
fob
(str | None
) -
lead_time
(int | None
) -
lead_time_unit
(LeadTimeUnit | None
) -
expiration_date
(str | None
) -
default
(int | None
)
InventoryPricings
Bases: BaseAlbertModel
Pricings for a given InventoryItem.
Attributes:
Name | Type | Description |
---|---|---|
inventory_id |
Inventory
|
The inventory ID the pricings belong to. |
pricings |
list[Pricing]
|
The list of pricings. |
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"
},
"Company": {
"description": "Company is a Pydantic model representing a company entity.\n\nAttributes\n----------\nname : str\n The name of the company.\nid : str | None\n The Albert ID of the company. Set when the company is retrieved from Albert.\ndistance : float | None\n The scores of a company in a search result, optional. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"LeadTimeUnit": {
"description": "The unit of measure for the provided lead time.",
"enum": [
"Days",
"Weeks",
"Months"
],
"title": "LeadTimeUnit",
"type": "string"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Pricing": {
"description": "A Price of a given InventoryItem at a given Location.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the pricing. Set when the pricing is retrieved from Albert.\ninventory_id : str\n The Albert ID of the inventory item.\ncompany : Company\n The company that the pricing belongs to.\nlocation : Location\n The location that the pricing belongs to.\ndescription : str | None\n The description of the pricing. Optional.\npack_size : str | None\n The pack size of the pricing. Optional. Used to calculate the cost per unit.\nprice : float\n The price of the pricing IN CURRENCY/ KG or CURRENCY/L! Must do the conversion! Depends on InventoryItem's unit of measure.\ncurrency : str\n The currency of the pricing. Defaults to `USD`.\nfob : str | None\n The FOB of the pricing. Optional.\nlead_time : int | None\n The lead time of the pricing. Optional.\nlead_time_unit : LeadTimeUnit | None\n The unit of measure for the provided lead time. Optional.\nexpiration_date : str | None\n The expiration date of the pricing. YYYY-MM-DD format.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentid"
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "Company"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "Location"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"packSize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Packsize"
},
"price": {
"maximum": 9999999999,
"minimum": 0,
"title": "Price",
"type": "number"
},
"currency": {
"default": "USD",
"title": "Currency",
"type": "string"
},
"fob": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fob"
},
"leadTime": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Leadtime"
},
"leadTimeUnit": {
"anyOf": [
{
"$ref": "#/$defs/LeadTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"expirationDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expirationdate"
},
"default": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Default"
}
},
"required": [
"Company",
"Location",
"price"
],
"title": "Pricing",
"type": "object"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "Pricings for a given InventoryItem.\n\nAttributes\n----------\ninventory_id : Inventory\n The inventory ID the pricings belong to.\npricings : list[Pricing]\n The list of pricings.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"pricings": {
"items": {
"$ref": "#/$defs/Pricing"
},
"title": "Pricings",
"type": "array"
}
},
"required": [
"id",
"pricings"
],
"title": "InventoryPricings",
"type": "object"
}
Fields: