-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #385 from cookeac/Develop
Inventory transaction resources. Resolves #369
- Loading branch information
Showing
18 changed files
with
1,401 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"description": "Represents a collection of feed inventory transactions. Based on icarResourceCollection to provide paging etc.", | ||
|
||
"allOf": [{ | ||
"$ref": "../collections/icarResourceCollection.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"properties": { | ||
"member": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "../resources/icarFeedTransactionResource.json" | ||
}, | ||
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"description": "Represents a collection of inventory transactions. Based on icarResourceCollection to provide paging etc.", | ||
|
||
"allOf": [{ | ||
"$ref": "../collections/icarResourceCollection.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"properties": { | ||
"member": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "../resources/icarInventoryTransactionResource.json" | ||
}, | ||
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"description": "Represents a collection of medicine inventory transactions. Based on icarResourceCollection to provide paging etc.", | ||
|
||
"allOf": [{ | ||
"$ref": "../collections/icarResourceCollection.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"properties": { | ||
"member": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "../resources/icarMedicineTransactionResource.json" | ||
}, | ||
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"description": "Defines the kinds of inventory transaction, which can represent items received, disposed of (including sale or destruction), used, counted in a stocktake or calculated on hand.", | ||
"type": "string", | ||
"enum": [ | ||
"Receipt", | ||
"Disposal", | ||
"OnHand", | ||
"StockTake", | ||
"Use" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"description": "Defines the families of products", | ||
"type": "string", | ||
"enum": [ | ||
"Animal Feeds", | ||
"Animal Reproductive Products", | ||
"Veterinary Supplies", | ||
"Seed and Plant Material", | ||
"Fertilisers and Nutrients", | ||
"Pest Control Products", | ||
"Other Animal Products", | ||
"Milking Supplies", | ||
"Fencing Supplies", | ||
"Water System Supplies" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"description": "An inventory transaction resource for a feed product.", | ||
"type": "object", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarInventoryTransactionType.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"required": [ | ||
"product" | ||
], | ||
|
||
"properties": { | ||
"product": { | ||
"$ref": "../types/icarFeedReferenceType.json", | ||
"description": "The feed product in this transaction." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"description": "Generic inventory transaction resource. Some product families have specific transaction resources (e.g. medicines, feeds).", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarInventoryTransactionType.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"required": [ | ||
"product" | ||
], | ||
"properties": { | ||
"product": { | ||
"$ref": "../types/icarProductReferenceType.json", | ||
"description": "The product in this inventory transaction." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"description": "An inventory transaction resource for a medicine product.", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarInventoryTransactionType.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"required": [ | ||
"product" | ||
], | ||
|
||
"properties": { | ||
"product": { | ||
"$ref": "../types/icarMedicineReferenceType.json", | ||
"description": "The medicine product in this transaction." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"description": "Feed Reference defines a feed product.", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarProductReferenceType.json" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"category": { | ||
"$ref": "../enums/icarFeedCategoryType.json", | ||
"description": "Defines the category of the feed product." | ||
}, | ||
"type": { | ||
"$ref": "../types/icarFeedIdentifierType.json", | ||
"description": "The scheme + id identifying the type of feed." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"description": "Inventory Transaction defines a transaction on a product inventory where the transaction may be a receipt, disposal, on hand, stocktake, use", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../resources/icarEventCoreResource.json" | ||
} | ||
, | ||
{ | ||
"type": "object", | ||
|
||
"required": [ | ||
"transactionKind", | ||
"quantity", | ||
"units" | ||
], | ||
|
||
"properties": { | ||
"transactionKind": { | ||
"$ref": "../enums/icarInventoryTransactionKindType.json", | ||
"description": "Identifies the transaction kind." | ||
}, | ||
"quantity": { | ||
"type": "number", | ||
"description": "The overall volume, weight or count of the product in the transaction in the units defined." | ||
}, | ||
"units": { | ||
"description": "The units of the quantity specified. Where applicable it is recommended that uncefact mass and volume units are used.", | ||
"type": "string" | ||
}, | ||
"supplierName": { | ||
"type": "string", | ||
"description": "The supplier of the product in this transaction. This is particularly relevant if the transaction is a receipt." | ||
}, | ||
"expiryDate": { | ||
"$ref": "../types/icarDateTimeType.json", | ||
"description": "The expiry date of the product supplied in the transaction." | ||
}, | ||
"totalCost": { | ||
"type": "number", | ||
"description": "Total cost applied to this transaction" | ||
}, | ||
"currency": { | ||
"type": "string", | ||
"description": "The currency of the cost expressed using the ISO 4217 3-character code (such as AUD, GBP, USD, EUR)." | ||
}, | ||
"packSize": { | ||
"type": "number", | ||
"description": "The volume or weight of the product in a pack in the units defined. Especially relevant for Vet Medicines." | ||
}, | ||
"numberOfPacks": { | ||
"type": "number", | ||
"description": "The number of packs of the product in the transaction. Especially relevant for Vet Medicines. Could be a decimal number for a part-pack." | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"description": "Provides a scheme + identifier mechanism for product types.", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarIdentifierType.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"description": "Product Reference refers to a specific product. It is based on the generalised resource reference type.", | ||
"type": "object", | ||
|
||
"allOf": [ | ||
{ | ||
"$ref": "../types/icarResourceReferenceType.json" | ||
}, | ||
{ | ||
"type": "object", | ||
|
||
"required": [ | ||
"identifier", | ||
"family" | ||
], | ||
|
||
"properties": { | ||
"identifiers": { | ||
"type": "array", | ||
"description": "An array of product identifiers. This allows a product to have multiple identifiers for manufacturers, distributors, official registrations, etc.", | ||
"items": { | ||
"$ref": "../types/icarProductIdentifierType.json" | ||
} | ||
}, | ||
"family": { | ||
"$ref": "../enums/icarProductFamilyType.json", | ||
"description": "The product family to which this product belongs." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the product." | ||
}, | ||
"gtin": { | ||
"type": "string", | ||
"description": "GS1 global trade item number." | ||
}, | ||
"unspc": { | ||
"type": "string", | ||
"description": "UN service and product code (the code, not the accompanying description)." | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.