diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 94cfc36..a9b1ea9 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -1,5 +1,5 @@ { - "description": "gives the consumed feed and the amount the animal was entitled to. Amounts are real weights", + "description": "gives the consumed feed and the amount the animal/group was entitled to. Amounts are real weights", "type": "object", "required": [ "feedId" @@ -12,15 +12,23 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to receive" + "description": "The amount of feed the animal/group was entitled to receive" + }, + "delivered": { + "$ref": "../types/icarFeedQuantityType.json", + "description": "The amount of feed the animal/group received. If not present, it can be assumed that the delivered will be equal to entitlement" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal has consumed" + "description": "The amount of feed the animal/group has consumed" }, "dryMatterPercentage": { "type": "number", "description": "The dry matter content of the feed provided or consumed, expressed as a percentage." + }, + "totalCost": { + "$ref": "../types/icarCostType.json", + "description": "Total cost applied to this feeding. Based on the delivered or entitled amount" } } } diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index dbf3d30..d901609 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -1,5 +1,5 @@ { - "description": "Gives the consumed amount of a mixed ration, and the amount the animal was entitled to. Amounts are real weights.", + "description": "Gives the consumed amount of a mixed ration, and the amount the animal/group was entitled to. Amounts are real weights.", "type": "object", "required": [ @@ -13,15 +13,23 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to receive" + "description": "The amount of feed the animal/group was entitled to receive" + }, + "delivered": { + "$ref": "../types/icarFeedQuantityType.json", + "description": "The amount of feed the animal/group received. If not present, it can be assumed that the delivered will be equal to entitlement" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal has consumed" + "description": "The amount of feed the animal/group has consumed" }, "dryMatterPercentage": { "type": "number", "description": "The dry matter content of the ration provided or consumed, expressed as a percentage." + }, + "totalCost": { + "$ref": "../types/icarCostType.json", + "description": "Total cost applied to this feeding. Based on the delivered or entitled amount" } } } diff --git a/types/icarCostType.json b/types/icarCostType.json new file mode 100644 index 0000000..b5ca07d --- /dev/null +++ b/types/icarCostType.json @@ -0,0 +1,22 @@ +{ + "description": "The amount of costs", + + "type": "object", + + "required": [ + "currency", + "value" + ], + + "properties": { + "currency": { + "type": "string", + "description": "The currency of the cost expressed using the ISO 4217 3-character code (such as AUD, GBP, USD, EUR)." + }, + "value": { + "type": "number", + "format": "double", + "description": "The costs in the units specified." + } + } +}