Story
As a developer, I would like to expose an API so that a transfer can be created outside of inform.
Description
the APIs will be created in ~\inform\Mobile\Mx.API solution
For this story lets disable the Authentication. So that it will be easy to QA.
We will try to get a little data as possible from Signal side. That means we will have to do lot of property mappings so Redis caching would play an important role for the static data.
Here is the sample request json:
{
"Items": [
{ "ItemCode": "3581", "TransferUnit1": "36 Lb Case", "TransferUnit2": "6 Lb Bag", "TransferUnit3": "Pound", "TransferUnit4": "", // optional "InventoryUnitCost": 3.0633, "TransferQty1": "5", "TransferQty2": "4", "TransferQty3": "3" "TransferQty4": "0"}
optional
],
"SendingStoreNumber": “00440”,
"ReceivingStoreNumber ":”00442”,
}
Once the transfer is created we will return transfer id.
When implementing we shall try to reuse the same service layer.
AC
- Confirm that the transfer is created same way it is created from inform.
- Confirm that the newly created transfer id is returned.
- Confirm that the following properties are required and valid: ItemCode, TransferUnit1, TransferUnit2, TransferUnit3, InventoryUnitCost > 0, ToStoreNumber, FromStoreNumber
- Confirm that all static data should be cached in Redis
- Confirm that Created By field is populated with "Mx.Api" (or a better name, something # that indicates the transfer is created outside of inform)
- Confirm that the failure is logged as an error in the audit table
- Confirm that API returns exception details