| Line 126... |
Line 126... |
| 126 |
1:i64 vendorId,
|
126 |
1:i64 vendorId,
|
| 127 |
2:string itemKey,
|
127 |
2:string itemKey,
|
| 128 |
3:i64 itemId,
|
128 |
3:i64 itemId,
|
| 129 |
4:string vendorCategory
|
129 |
4:string vendorCategory
|
| 130 |
}
|
130 |
}
|
| - |
|
131 |
|
| - |
|
132 |
struct ItemShippingInfo{
|
| - |
|
133 |
1:bool isActive,
|
| - |
|
134 |
2:optional bool isRisky,
|
| - |
|
135 |
3:optional i64 quantity
|
| 131 |
|
136 |
}
|
| - |
|
137 |
|
| 132 |
exception InventoryServiceException{
|
138 |
exception InventoryServiceException{
|
| 133 |
1:i64 id,
|
139 |
1:i64 id,
|
| 134 |
2:string message
|
140 |
2:string message
|
| 135 |
}
|
141 |
}
|
| 136 |
|
142 |
|
| Line 146... |
Line 152... |
| 146 |
*/
|
152 |
*/
|
| 147 |
//all add and update methods - added by Ashish
|
153 |
//all add and update methods - added by Ashish
|
| 148 |
i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
|
154 |
i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
|
| 149 |
i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
|
155 |
i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
|
| 150 |
i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
|
156 |
i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
|
| - |
|
157 |
|
| - |
|
158 |
/**
|
| - |
|
159 |
Checks if the item given to the corresponding itemId is active. If it's active,
|
| - |
|
160 |
whether it's risky and if it's risky, its inventory position.
|
| - |
|
161 |
*/
|
| 151 |
bool isActive(1:i64 itemId) throws (1:InventoryServiceException isex),
|
162 |
ItemShippingInfo isActive(1:i64 itemId) throws (1:InventoryServiceException isex),
|
| - |
|
163 |
|
| 152 |
string getItemStatusDescription(1:i64 itemId) throws (1:InventoryServiceException isex),
|
164 |
string getItemStatusDescription(1:i64 itemId) throws (1:InventoryServiceException isex),
|
| 153 |
void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
|
165 |
void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
|
| 154 |
// commented right now. write on based of requirement
|
- |
|
| 155 |
// void updatePrice(1:i64 item_id, 2:i64 warehouse_id, 3:double price) throws (1:InventoryServiceException cex),
|
- |
|
| - |
|
166 |
|
| 156 |
//all delete methods
|
167 |
//all delete methods
|
| 157 |
void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
|
168 |
void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
|
| 158 |
|
169 |
|
| 159 |
//Item management apis
|
170 |
//Item management apis
|
| 160 |
void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
|
171 |
void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
|