| Line 19... |
Line 19... |
| 19 |
CONTENT_COMPLETE = 5, //The content for this item has been completed. We can start selling the item now.
|
19 |
CONTENT_COMPLETE = 5, //The content for this item has been completed. We can start selling the item now.
|
| 20 |
PAUSED_BY_RISK = 6, //Item's sale has been automatically paused since it was marked as risky
|
20 |
PAUSED_BY_RISK = 6, //Item's sale has been automatically paused since it was marked as risky
|
| 21 |
COMING_SOON= 7 //Item is now in Coming Soon Page and will move to ACTIVE gradually as it achieves the Start date.
|
21 |
COMING_SOON= 7 //Item is now in Coming Soon Page and will move to ACTIVE gradually as it achieves the Start date.
|
| 22 |
}
|
22 |
}
|
| 23 |
|
23 |
|
| 24 |
enum WarehouseLocation {
|
- |
|
| 25 |
Mumbai = 0,
|
- |
|
| 26 |
Delhi = 1,
|
- |
|
| 27 |
Bangalore = 2,
|
- |
|
| 28 |
Kolkata = 3
|
- |
|
| 29 |
}
|
- |
|
| 30 |
|
- |
|
| 31 |
struct Vendor {
|
- |
|
| 32 |
1:i64 id,
|
- |
|
| 33 |
2:string name
|
- |
|
| 34 |
}
|
- |
|
| 35 |
|
- |
|
| 36 |
enum BillingType {
|
- |
|
| 37 |
OURS = 0,
|
- |
|
| 38 |
EXTERNAL = 1
|
- |
|
| 39 |
}
|
- |
|
| 40 |
|
- |
|
| 41 |
enum WarehouseType {
|
- |
|
| 42 |
OURS = 0,
|
- |
|
| 43 |
THIRD_PARTY = 1
|
- |
|
| 44 |
}
|
- |
|
| 45 |
|
- |
|
| 46 |
enum InventoryType {
|
- |
|
| 47 |
GOOD = 0,
|
- |
|
| 48 |
BAD = 1,
|
- |
|
| 49 |
VIRTUAL = 2
|
- |
|
| 50 |
}
|
- |
|
| 51 |
|
- |
|
| 52 |
enum HolidayType {
|
- |
|
| 53 |
WEEKLY = 0,
|
- |
|
| 54 |
MONTHLY = 1,
|
- |
|
| 55 |
SPECIFIC = 2
|
- |
|
| 56 |
}
|
- |
|
| 57 |
|
- |
|
| 58 |
/*
|
- |
|
| 59 |
Warehouse fields details
|
- |
|
| 60 |
location: it is full address
|
- |
|
| 61 |
vendorString: some key for the warehouse
|
- |
|
| 62 |
*/
|
- |
|
| 63 |
struct Warehouse {
|
- |
|
| 64 |
1:i64 id,
|
- |
|
| 65 |
2:string displayName,
|
- |
|
| 66 |
3:string location,
|
- |
|
| 67 |
5:i64 addedOn,
|
- |
|
| 68 |
6:i64 lastCheckedOn,
|
- |
|
| 69 |
7:string tinNumber,
|
- |
|
| 70 |
8:string pincode,
|
- |
|
| 71 |
9:string vendorString,
|
- |
|
| 72 |
10:WarehouseLocation logisticsLocation,
|
- |
|
| 73 |
12:BillingType billingType,
|
- |
|
| 74 |
13:WarehouseType warehouseType,
|
- |
|
| 75 |
14:InventoryType inventoryType,
|
- |
|
| 76 |
15:Vendor vendor,
|
- |
|
| 77 |
16:i64 shippingWarehouseId,
|
- |
|
| 78 |
17:i64 billingWarehouseId,
|
- |
|
| 79 |
18:bool isAvailabilityMonitored,
|
- |
|
| 80 |
19:i64 transferDelayInHours
|
- |
|
| 81 |
}
|
- |
|
| 82 |
|
- |
|
| 83 |
/* */
|
- |
|
| 84 |
struct ItemInventory{
|
- |
|
| 85 |
1:i64 id,
|
- |
|
| 86 |
2:map<i64,i64> availability,
|
- |
|
| 87 |
3:map<i64,i64> reserved
|
- |
|
| 88 |
}
|
- |
|
| 89 |
|
- |
|
| 90 |
|
- |
|
| 91 |
struct ItemInventoryHistory{
|
- |
|
| 92 |
1:i64 item_id,
|
- |
|
| 93 |
2:i64 warehouse_id,
|
- |
|
| 94 |
3:i64 timestamp,
|
- |
|
| 95 |
4:i64 availability
|
- |
|
| 96 |
}
|
- |
|
| 97 |
|
- |
|
| 98 |
enum ItemType {
|
24 |
enum ItemType {
|
| 99 |
SERIALIZED = 1,
|
25 |
SERIALIZED = 1,
|
| 100 |
NON_SERIALIZED = 2
|
26 |
NON_SERIALIZED = 2
|
| 101 |
}
|
27 |
}
|
| 102 |
|
28 |
|
| Line 110... |
Line 36... |
| 110 |
7:i64 category,
|
36 |
7:i64 category,
|
| 111 |
8:string comments,
|
37 |
8:string comments,
|
| 112 |
9:i64 catalogItemId,
|
38 |
9:i64 catalogItemId,
|
| 113 |
10:i64 featureId,
|
39 |
10:i64 featureId,
|
| 114 |
11:string featureDescription,
|
40 |
11:string featureDescription,
|
| 115 |
12:ItemInventory itemInventory,
|
- |
|
| 116 |
13:optional double mrp, //maxmimum retail price
|
41 |
13:optional double mrp, //maxmimum retail price
|
| 117 |
14:optional double sellingPrice, //Selling price
|
42 |
14:optional double sellingPrice, //Selling price
|
| 118 |
15:optional double weight,
|
43 |
15:optional double weight,
|
| 119 |
16:i64 addedOn,
|
44 |
16:i64 addedOn,
|
| 120 |
17:optional i64 startDate,
|
45 |
17:optional i64 startDate,
|
| Line 137... |
Line 62... |
| 137 |
34:optional i64 expectedArrivalDate,
|
62 |
34:optional i64 expectedArrivalDate,
|
| 138 |
35:bool hasItemNo,
|
63 |
35:bool hasItemNo,
|
| 139 |
36:bool clearance
|
64 |
36:bool clearance
|
| 140 |
}
|
65 |
}
|
| 141 |
|
66 |
|
| 142 |
struct VendorItemPricing{
|
- |
|
| 143 |
1:i64 vendorId,
|
- |
|
| 144 |
2:i64 itemId,
|
- |
|
| 145 |
3:double transferPrice,
|
- |
|
| 146 |
4:double mop,
|
- |
|
| 147 |
5:double dealerPrice
|
- |
|
| 148 |
}
|
- |
|
| 149 |
|
- |
|
| 150 |
struct Category{
|
67 |
struct Category{
|
| 151 |
1:i64 id,
|
68 |
1:i64 id,
|
| 152 |
2:string label,
|
69 |
2:string label,
|
| 153 |
3:string description,
|
70 |
3:string description,
|
| 154 |
4:i64 parent_category_id,
|
71 |
4:i64 parent_category_id,
|
| Line 157... |
Line 74... |
| 157 |
*/
|
74 |
*/
|
| 158 |
5:list<i64> children_category_ids
|
75 |
5:list<i64> children_category_ids
|
| 159 |
6:string display_name
|
76 |
6:string display_name
|
| 160 |
}
|
77 |
}
|
| 161 |
|
78 |
|
| 162 |
struct VendorItemMapping{
|
- |
|
| 163 |
1:i64 vendorId,
|
- |
|
| 164 |
2:string itemKey,
|
- |
|
| 165 |
3:i64 itemId
|
- |
|
| 166 |
}
|
- |
|
| 167 |
|
- |
|
| 168 |
struct ItemShippingInfo{
|
79 |
struct ItemShippingInfo{
|
| 169 |
1:bool isActive,
|
80 |
1:bool isActive,
|
| 170 |
2:optional bool isRisky,
|
81 |
2:optional bool isRisky,
|
| 171 |
3:optional i64 quantity
|
82 |
3:optional i64 quantity
|
| 172 |
}
|
83 |
}
|
| Line 182... |
Line 93... |
| 182 |
2:i64 itemId,
|
93 |
2:i64 itemId,
|
| 183 |
3:double mrp,
|
94 |
3:double mrp,
|
| 184 |
4:double sellingPrice
|
95 |
4:double sellingPrice
|
| 185 |
}
|
96 |
}
|
| 186 |
|
97 |
|
| 187 |
struct AvailableAndReservedStock {
|
- |
|
| 188 |
1:i64 itemId,
|
- |
|
| 189 |
2:i64 available,
|
- |
|
| 190 |
3:i64 reserved,
|
- |
|
| 191 |
4:i64 minimumStock
|
- |
|
| 192 |
}
|
- |
|
| 193 |
|
- |
|
| 194 |
struct ProductNotificationRequest {
|
98 |
struct ProductNotificationRequest {
|
| 195 |
1:Item item,
|
99 |
1:Item item,
|
| 196 |
2:string email,
|
100 |
2:string email,
|
| 197 |
3:i64 addedOn
|
101 |
3:i64 addedOn
|
| 198 |
}
|
102 |
}
|
| Line 206... |
Line 110... |
| 206 |
1:i64 voucherType,
|
110 |
1:i64 voucherType,
|
| 207 |
2:i64 itemId,
|
111 |
2:i64 itemId,
|
| 208 |
3:i64 amount
|
112 |
3:i64 amount
|
| 209 |
}
|
113 |
}
|
| 210 |
|
114 |
|
| 211 |
exception InventoryServiceException{
|
115 |
exception CatalogServiceException{
|
| 212 |
1:i64 id,
|
116 |
1:i64 id,
|
| 213 |
2:string message
|
117 |
2:string message
|
| 214 |
}
|
118 |
}
|
| 215 |
|
119 |
|
| 216 |
service InventoryService extends GenericService.GenericService{
|
120 |
service CatalogService extends GenericService.GenericService{
|
| 217 |
|
121 |
|
| 218 |
/**
|
122 |
/**
|
| 219 |
Availability and inventory attributes
|
123 |
Availability and inventory attributes
|
| 220 |
*/
|
124 |
*/
|
| 221 |
//all add and update methods - added by Ashish
|
125 |
//all add and update methods - added by Ashish
|
| 222 |
i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
|
126 |
i64 addItem(1:Item item) throws (1:CatalogServiceException cex),
|
| 223 |
i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
|
127 |
i64 updateItem(1:Item item) throws (1:CatalogServiceException cex),
|
| 224 |
i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
|
- |
|
| 225 |
|
- |
|
| 226 |
/**
|
- |
|
| 227 |
add a new vendor
|
- |
|
| 228 |
*/
|
- |
|
| 229 |
i64 addVendor(1:Vendor vendor) throws (1:InventoryServiceException cex),
|
- |
|
| 230 |
|
128 |
|
| 231 |
/**
|
129 |
/**
|
| 232 |
Checks if the item given to the corresponding itemId is active. If it's active,
|
130 |
Checks if the item given to the corresponding itemId is active. If it's active,
|
| 233 |
whether it's risky and if it's risky, its inventory position.
|
131 |
whether it's risky and if it's risky, its inventory position.
|
| 234 |
*/
|
132 |
*/
|
| 235 |
ItemShippingInfo isActive(1:i64 itemId) throws (1:InventoryServiceException isex),
|
133 |
ItemShippingInfo isActive(1:i64 itemId) throws (1:CatalogServiceException isex),
|
| 236 |
|
- |
|
| 237 |
string getItemStatusDescription(1:i64 itemId) throws (1:InventoryServiceException isex),
|
- |
|
| 238 |
|
- |
|
| 239 |
/**
|
- |
|
| 240 |
Stores the incremental warehouse updates of items.
|
- |
|
| 241 |
*/
|
- |
|
| 242 |
void updateInventoryHistory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
|
- |
|
| 243 |
|
134 |
|
| 244 |
/**
|
- |
|
| 245 |
Stores the final inventory stocks of items.
|
- |
|
| 246 |
*/
|
- |
|
| 247 |
void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
|
- |
|
| 248 |
|
- |
|
| 249 |
/**
|
- |
|
| 250 |
Add the inventory to existing stock.
|
- |
|
| 251 |
*/
|
- |
|
| 252 |
void addInventory(1:i64 itemId, 2:i64 warehouseId, 3:i64 quantity) throws (1:InventoryServiceException cex),
|
- |
|
| 253 |
|
- |
|
| 254 |
//all delete methods
|
- |
|
| 255 |
void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
|
135 |
string getItemStatusDescription(1:i64 itemId) throws (1:CatalogServiceException isex),
|
| 256 |
|
136 |
|
| 257 |
//Item management apis
|
137 |
//Item management apis
|
| 258 |
void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
|
138 |
void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:CatalogServiceException cex),
|
| 259 |
void retireItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
|
139 |
void retireItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:CatalogServiceException cex),
|
| 260 |
void changeItemStatus(1:i64 item_id, 2:i64 timestamp, 3:status newstatus) throws (1:InventoryServiceException cex),
|
140 |
void changeItemStatus(1:i64 item_id, 2:i64 timestamp, 3:status newstatus) throws (1:CatalogServiceException cex),
|
| 261 |
//Other accessor methods - added by Ashish
|
141 |
//Other accessor methods - added by Ashish
|
| 262 |
Item getItem(1:i64 item_id) throws (1:InventoryServiceException cex),
|
142 |
Item getItem(1:i64 item_id) throws (1:CatalogServiceException cex),
|
| 263 |
list<Item> getItemsByCatalogId(1:i64 catalog_item_id) throws (1:InventoryServiceException cex),
|
143 |
list<Item> getItemsByCatalogId(1:i64 catalog_item_id) throws (1:CatalogServiceException cex),
|
| 264 |
list<Item> getValidItemsByCatalogId(1:i64 catalog_item_id) throws (1:InventoryServiceException cex),
|
144 |
list<Item> getValidItemsByCatalogId(1:i64 catalog_item_id) throws (1:CatalogServiceException cex),
|
| 265 |
list<Item> getAllItems(1:bool isActive) throws (1:InventoryServiceException cex),
|
145 |
list<Item> getAllItems(1:bool isActive) throws (1:CatalogServiceException cex),
|
| 266 |
list<Item> getAllItemsByStatus(1:status itemStatus) throws (1:InventoryServiceException cex),
|
146 |
list<Item> getAllItemsByStatus(1:status itemStatus) throws (1:CatalogServiceException cex),
|
| 267 |
//ItemInventory getItemInventory(1:i64 item_id) throws (1:InventoryServiceException cex),
|
- |
|
| 268 |
ItemInventory getItemInventoryByItemId(1:i64 item_id) throws (1:InventoryServiceException cex),
|
- |
|
| 269 |
//ItemInventory getItemInventoryByCatalogId(1:i64 item_id) throws (1:InventoryServiceException cex),
|
- |
|
| 270 |
i64 getItemAvailibilityAtWarehouse(1:i64 warehouse_id, 2:i64 item_id) throws (1:InventoryServiceException cex),
|
- |
|
| 271 |
bool markItemAsContentComplete(1:i64 entityId, 2:i64 category, 3:string brand, 4:string modelName, 5:string modelNumber) throws (1:InventoryServiceException cex),
|
147 |
bool markItemAsContentComplete(1:i64 entityId, 2:i64 category, 3:string brand, 4:string modelName, 5:string modelNumber) throws (1:CatalogServiceException cex),
|
| 272 |
|
148 |
|
| 273 |
/**
|
149 |
/**
|
| 274 |
Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.
|
150 |
Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.
|
| 275 |
*/
|
151 |
*/
|
| 276 |
list<Item> getAllItemsInRange(1:i64 offset, 2:i64 limit) throws (1:InventoryServiceException cex),
|
152 |
list<Item> getAllItemsInRange(1:i64 offset, 2:i64 limit) throws (1:CatalogServiceException cex),
|
| 277 |
|
153 |
|
| 278 |
/**
|
154 |
/**
|
| 279 |
Gets at most 'limit' items starting at the given offset in the given status. Returns an empty list if there are no more items at the given offset.
|
155 |
Gets at most 'limit' items starting at the given offset in the given status. Returns an empty list if there are no more items at the given offset.
|
| 280 |
*/
|
156 |
*/
|
| 281 |
list<Item> getAllItemsByStatusInRange(1:status itemStatus, 2:i64 offset, 3:i64 limit) throws (1:InventoryServiceException cex),
|
157 |
list<Item> getAllItemsByStatusInRange(1:status itemStatus, 2:i64 offset, 3:i64 limit) throws (1:CatalogServiceException cex),
|
| 282 |
|
158 |
|
| 283 |
/**
|
159 |
/**
|
| 284 |
Gets a count of all items by status
|
160 |
Gets a count of all items by status
|
| 285 |
*/
|
161 |
*/
|
| 286 |
i32 getItemCountByStatus(1:bool useStatus, 2:status itemStatus),
|
162 |
i32 getItemCountByStatus(1:bool useStatus, 2:status itemStatus),
|
| 287 |
/**
|
- |
|
| 288 |
Determines the warehouse that should be used to fulfil an order for the given item.
|
- |
|
| 289 |
It first checks all the warehouses which are in the logistics location given by the
|
- |
|
| 290 |
warehouse_loc parameter. If none of the warehouses there have any inventory, then the
|
- |
|
| 291 |
preferred warehouse for the item is used.
|
- |
|
| 292 |
|
- |
|
| 293 |
Returns an ordered list of size 4 with following elements in the given order:
|
- |
|
| 294 |
1. Id of the fulfillment warehouse which was finally picked up.
|
- |
|
| 295 |
2. Expected delay added by the category manager.
|
- |
|
| 296 |
3. Id of the billing warehouse which was finally picked up.
|
- |
|
| 297 |
*/
|
- |
|
| 298 |
list<i64> getItemAvailabilityAtLocation(1:i64 itemId) throws (1:InventoryServiceException isex),
|
- |
|
| 299 |
|
- |
|
| 300 |
list<Warehouse> getAllWarehouses(1:bool isActive) throws (1:InventoryServiceException cex),
|
- |
|
| 301 |
|
- |
|
| 302 |
/**
|
- |
|
| 303 |
Returns the warehouse with the given id.
|
- |
|
| 304 |
*/
|
- |
|
| 305 |
Warehouse getWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
|
- |
|
| 306 |
list<Warehouse> getAllWarehousesForItem(1:i64 item_id) throws (1:InventoryServiceException cex),
|
- |
|
| 307 |
list<Item> getAllItemsForWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
|
- |
|
| 308 |
|
- |
|
| 309 |
/**
|
- |
|
| 310 |
Increases the reservation count for an item in a warehouse. Should always succeed normally.
|
- |
|
| 311 |
*/
|
- |
|
| 312 |
bool reserveItemInWarehouse(1:i64 itemId, 2:i64 warehouseId, 3:double quantity) throws (1:InventoryServiceException cex),
|
- |
|
| 313 |
|
- |
|
| 314 |
/**
|
- |
|
| 315 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
- |
|
| 316 |
*/
|
- |
|
| 317 |
bool reduceReservationCount(1:i64 itemId, 2:i64 warehouseId, 3:double quantity) throws (1:InventoryServiceException cex),
|
- |
|
| 318 |
|
163 |
|
| 319 |
// for home page .... best deals, best sellers and latest arrivals
|
164 |
// for home page .... best deals, best sellers and latest arrivals
|
| 320 |
list<Item> getBestSellers() throws (1:InventoryServiceException isex),
|
165 |
list<Item> getBestSellers() throws (1:CatalogServiceException isex),
|
| 321 |
list<i64> getBestSellersCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:InventoryServiceException cex),
|
166 |
list<i64> getBestSellersCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
|
| 322 |
i64 getBestSellersCount() throws (1:InventoryServiceException cex),
|
167 |
i64 getBestSellersCount() throws (1:CatalogServiceException cex),
|
| 323 |
|
168 |
|
| 324 |
list<Item> getBestDeals() throws (1:InventoryServiceException isex),
|
169 |
list<Item> getBestDeals() throws (1:CatalogServiceException isex),
|
| 325 |
list<i64> getBestDealsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:InventoryServiceException cex),
|
170 |
list<i64> getBestDealsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
|
| 326 |
i64 getBestDealsCount() throws (1:InventoryServiceException cex),
|
171 |
i64 getBestDealsCount() throws (1:CatalogServiceException cex),
|
| 327 |
|
172 |
|
| 328 |
list<Item> getComingSoon() throws (1:InventoryServiceException isex),
|
173 |
list<Item> getComingSoon() throws (1:CatalogServiceException isex),
|
| 329 |
list<i64> getComingSoonCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:InventoryServiceException cex),
|
174 |
list<i64> getComingSoonCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
|
| 330 |
i64 getComingSoonCount() throws (1:InventoryServiceException cex),
|
175 |
i64 getComingSoonCount() throws (1:CatalogServiceException cex),
|
| 331 |
|
176 |
|
| 332 |
/**
|
177 |
/**
|
| 333 |
Returns a list of items sorted in the descending order by start date.
|
178 |
Returns a list of items sorted in the descending order by start date.
|
| 334 |
The list is limited to the 'latest_arrivals_count' configuraiton parameter.
|
179 |
The list is limited to the 'latest_arrivals_count' configuraiton parameter.
|
| 335 |
*/
|
180 |
*/
|
| 336 |
list<Item> getLatestArrivals() throws (1:InventoryServiceException isex),
|
181 |
list<Item> getLatestArrivals() throws (1:CatalogServiceException isex),
|
| 337 |
|
182 |
|
| 338 |
/**
|
183 |
/**
|
| 339 |
Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
|
184 |
Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
|
| 340 |
To ignore the categories, pass the list as empty. To ignore brand, pass it as null.
|
185 |
To ignore the categories, pass the list as empty. To ignore brand, pass it as null.
|
| 341 |
*/
|
186 |
*/
|
| 342 |
list<i64> getLatestArrivalsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:list<i64> categories) throws (1:InventoryServiceException cex),
|
187 |
list<i64> getLatestArrivalsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:list<i64> categories) throws (1:CatalogServiceException cex),
|
| 343 |
|
188 |
|
| 344 |
/**
|
189 |
/**
|
| 345 |
Get the total number of latest arrivals we are willing to show.
|
190 |
Get the total number of latest arrivals we are willing to show.
|
| 346 |
The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
|
191 |
The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
|
| 347 |
*/
|
192 |
*/
|
| 348 |
i64 getLatestArrivalsCount() throws (1:InventoryServiceException cex),
|
193 |
i64 getLatestArrivalsCount() throws (1:CatalogServiceException cex),
|
| 349 |
|
194 |
|
| 350 |
|
195 |
|
| 351 |
i64 generateNewEntityID(),
|
196 |
i64 generateNewEntityID(),
|
| 352 |
|
197 |
|
| 353 |
/**
|
198 |
/**
|
| 354 |
Returns the pricing information of an item associated with the vendor of the given warehouse.
|
- |
|
| 355 |
Raises an exception if either the item, vendor or the associated pricing information can't be found.
|
- |
|
| 356 |
*/
|
- |
|
| 357 |
VendorItemPricing getItemPricing(1:i64 itemId, 2:i64 vendorId) throws (1:InventoryServiceException cex),
|
- |
|
| 358 |
|
- |
|
| 359 |
/**
|
- |
|
| 360 |
* Store category object and retrieve it
|
- |
|
| 361 |
*/
|
- |
|
| 362 |
/**
|
- |
|
| 363 |
bool putCategoryObject(1:binary object),
|
- |
|
| 364 |
binary getCategoryObject()
|
- |
|
| 365 |
*/
|
- |
|
| 366 |
|
- |
|
| 367 |
/**
|
- |
|
| 368 |
* All category related functions
|
199 |
* All category related functions
|
| 369 |
*/
|
200 |
*/
|
| 370 |
bool addCategory(1:Category category),
|
201 |
bool addCategory(1:Category category),
|
| 371 |
Category getCategory(1:i64 id),
|
202 |
Category getCategory(1:i64 id),
|
| 372 |
list<Category> getAllCategories(),
|
203 |
list<Category> getAllCategories(),
|
| 373 |
|
204 |
|
| 374 |
/**
|
205 |
/**
|
| 375 |
Returns the list of vendor pricing information of an item.
|
- |
|
| 376 |
Raises an exception if item not found corresponding to itemId
|
- |
|
| 377 |
*/
|
- |
|
| 378 |
list<VendorItemPricing> getAllItemPricing(1:i64 itemId) throws (1:InventoryServiceException cex),
|
- |
|
| 379 |
|
- |
|
| 380 |
|
- |
|
| 381 |
/**
|
- |
|
| 382 |
Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
|
- |
|
| 383 |
Raises an exception if either the item or vendor can't be found corresponding to their ids.
|
- |
|
| 384 |
*/
|
- |
|
| 385 |
void addVendorItemPricing(1:VendorItemPricing vendorItemPricing) throws (1:InventoryServiceException cex),
|
- |
|
| 386 |
|
- |
|
| 387 |
/**
|
- |
|
| 388 |
Return list of all vendors
|
- |
|
| 389 |
*/
|
- |
|
| 390 |
list<Vendor> getAllVendors(),
|
- |
|
| 391 |
|
- |
|
| 392 |
/**
|
- |
|
| 393 |
Returns the list of similar items.
|
206 |
Returns the list of similar items.
|
| 394 |
*/
|
207 |
*/
|
| 395 |
list<Item> getAllSimilarItems(1:i64 itemId),
|
208 |
list<Item> getAllSimilarItems(1:i64 itemId),
|
| 396 |
|
209 |
|
| 397 |
/**
|
210 |
/**
|
| 398 |
Adds similar item.
|
211 |
Adds similar item.
|
| 399 |
*/
|
212 |
*/
|
| 400 |
Item addSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:InventoryServiceException cex),
|
213 |
Item addSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:CatalogServiceException cex),
|
| 401 |
|
214 |
|
| 402 |
/**
|
215 |
/**
|
| 403 |
Delete similar item.
|
216 |
Delete similar item.
|
| 404 |
*/
|
217 |
*/
|
| 405 |
bool deleteSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:InventoryServiceException cex),
|
218 |
bool deleteSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:CatalogServiceException cex),
|
| 406 |
|
- |
|
| 407 |
/**
|
- |
|
| 408 |
Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.
|
- |
|
| 409 |
*/
|
- |
|
| 410 |
void addVendorItemMapping(1:string key, 2:VendorItemMapping vendorItemMapping) throws (1:InventoryServiceException cex),
|
- |
|
| 411 |
|
- |
|
| 412 |
/**
|
- |
|
| 413 |
Returns the list of vendor item mapping corresponding to itemId passed as parameter.
|
- |
|
| 414 |
Raises an exception if item not found corresponding to itemId
|
- |
|
| 415 |
*/
|
- |
|
| 416 |
list<VendorItemMapping> getVendorItemMappings(1:i64 itemId) throws (1:InventoryServiceException cex),
|
- |
|
| 417 |
|
219 |
|
| 418 |
/**
|
220 |
/**
|
| 419 |
Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
|
221 |
Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
|
| 420 |
If yes, returns the itemId else returns 0
|
222 |
If yes, returns the itemId else returns 0
|
| 421 |
*/
|
223 |
*/
|
| 422 |
i64 checkSimilarItem(1:string brand, 2:string modelNumber, 3:string modelName, 4:string color),
|
224 |
i64 checkSimilarItem(1:string brand, 2:string modelNumber, 3:string modelName, 4:string color),
|
| 423 |
|
225 |
|
| 424 |
/**
|
226 |
/**
|
| 425 |
Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.
|
227 |
Check wether item is risky and change status if inventory is not available for risky items
|
| 426 |
*/
|
228 |
*/
|
| 427 |
void changeItemRiskyFlag(1:i64 itemId, 2:bool risky),
|
229 |
void validateRiskyStatus(1:i64 itemId),
|
| 428 |
|
230 |
|
| 429 |
/**
|
231 |
/**
|
| - |
|
232 |
Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.
|
| - |
|
233 |
*/
|
| - |
|
234 |
void changeItemRiskyFlag(1:i64 itemId, 2:bool risky),
|
| - |
|
235 |
|
| - |
|
236 |
|
| - |
|
237 |
/**
|
| 430 |
Returns list of items marked as risky.
|
238 |
Returns list of items marked as risky.
|
| 431 |
*/
|
239 |
*/
|
| 432 |
list<Item> getItemsByRiskyFlag(),
|
240 |
list<Item> getItemsByRiskyFlag(),
|
| 433 |
|
241 |
|
| 434 |
/**
|
242 |
/**
|
| Line 467... |
Line 275... |
| 467 |
list<Source> getAllSources(),
|
275 |
list<Source> getAllSources(),
|
| 468 |
|
276 |
|
| 469 |
/**
|
277 |
/**
|
| 470 |
Returns the pricing information of an item. If no information is found, exception will be thrown.
|
278 |
Returns the pricing information of an item. If no information is found, exception will be thrown.
|
| 471 |
*/
|
279 |
*/
|
| 472 |
SourceItemPricing getItemPricingBySource(1:i64 itemId, 2:i64 sourceId) throws (1:InventoryServiceException cex),
|
280 |
SourceItemPricing getItemPricingBySource(1:i64 itemId, 2:i64 sourceId) throws (1:CatalogServiceException cex),
|
| 473 |
|
281 |
|
| 474 |
/**
|
282 |
/**
|
| 475 |
Adds prices to be displayed corresponding to the item if user comes from a source.
|
283 |
Adds prices to be displayed corresponding to the item if user comes from a source.
|
| 476 |
If item is not found or source is not found, it will throw exception.
|
284 |
If item is not found or source is not found, it will throw exception.
|
| 477 |
*/
|
285 |
*/
|
| 478 |
void addSourceItemPricing(1:SourceItemPricing sourceItemPricing) throws (1:InventoryServiceException cex),
|
286 |
void addSourceItemPricing(1:SourceItemPricing sourceItemPricing) throws (1:CatalogServiceException cex),
|
| 479 |
|
287 |
|
| 480 |
/**
|
288 |
/**
|
| 481 |
Returns the list of source pricing information of an item.
|
289 |
Returns the list of source pricing information of an item.
|
| 482 |
Raises an exception if item not found corresponding to itemId
|
290 |
Raises an exception if item not found corresponding to itemId
|
| 483 |
*/
|
291 |
*/
|
| 484 |
list<SourceItemPricing> getAllSourcePricing(1:i64 itemId) throws (1:InventoryServiceException cex),
|
292 |
list<SourceItemPricing> getAllSourcePricing(1:i64 itemId) throws (1:CatalogServiceException cex),
|
| 485 |
|
293 |
|
| 486 |
/**
|
294 |
/**
|
| 487 |
Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.
|
295 |
Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.
|
| 488 |
*/
|
296 |
*/
|
| 489 |
Item getItemForSource(1:i64 item_id, 2:optional i64 sourceId) throws (1:InventoryServiceException cex),
|
297 |
Item getItemForSource(1:i64 item_id, 2:optional i64 sourceId) throws (1:CatalogServiceException cex),
|
| 490 |
|
298 |
|
| 491 |
/**
|
299 |
/**
|
| 492 |
Searches items matching the the given terms in the catalog and returns results within the specified range.
|
300 |
Searches items matching the the given terms in the catalog and returns results within the specified range.
|
| 493 |
*/
|
301 |
*/
|
| 494 |
list<Item> searchItemsInRange(1:list<string> searchTerms, 2:i64 offset, 3:i64 limit),
|
302 |
list<Item> searchItemsInRange(1:list<string> searchTerms, 2:i64 offset, 3:i64 limit),
|
| Line 497... |
Line 305... |
| 497 |
Gets the count of search results for the given search terms so that the user can go through all the pages.
|
305 |
Gets the count of search results for the given search terms so that the user can go through all the pages.
|
| 498 |
*/
|
306 |
*/
|
| 499 |
i32 getSearchResultCount(1:list<string> searchTerms),
|
307 |
i32 getSearchResultCount(1:list<string> searchTerms),
|
| 500 |
|
308 |
|
| 501 |
/**
|
309 |
/**
|
| 502 |
Returns a list of inventory stock for items for which there are pending orders for the given vendor.
|
- |
|
| 503 |
*/
|
- |
|
| 504 |
list<AvailableAndReservedStock> getPendingOrdersInventory(1:i64 vendorid),
|
- |
|
| 505 |
|
- |
|
| 506 |
/**
|
- |
|
| 507 |
Returns a list of product notifications added after a supplied datetime
|
310 |
Returns a list of product notifications added after a supplied datetime
|
| 508 |
*/
|
311 |
*/
|
| 509 |
list<ProductNotificationRequest> getProductNotifications(1:i64 startDateTime),
|
312 |
list<ProductNotificationRequest> getProductNotifications(1:i64 startDateTime),
|
| 510 |
|
313 |
|
| 511 |
/**
|
314 |
/**
|
| Line 514... |
Line 317... |
| 514 |
list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime)
|
317 |
list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime)
|
| 515 |
|
318 |
|
| 516 |
/**
|
319 |
/**
|
| 517 |
This method adds a log to authorize table with Item Id, username who authorized the change, reason.
|
320 |
This method adds a log to authorize table with Item Id, username who authorized the change, reason.
|
| 518 |
*/
|
321 |
*/
|
| 519 |
bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:InventoryServiceException cex),
|
322 |
bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:CatalogServiceException cex),
|
| 520 |
|
- |
|
| 521 |
/**
|
- |
|
| 522 |
This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
|
- |
|
| 523 |
getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
|
- |
|
| 524 |
getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
|
- |
|
| 525 |
getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
|
- |
|
| 526 |
getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
|
- |
|
| 527 |
*/
|
- |
|
| 528 |
list<Warehouse> getWarehouses(1:WarehouseType warehouseType, 2:InventoryType inventoryType, 3:i64 vendorId, 4:i64 billingWarehouseId, 5:i64 shippingWarehouseId);
|
- |
|
| 529 |
|
- |
|
| 530 |
/**
|
- |
|
| 531 |
* Resets availability of an item to the quantity mentioned in a warehouse.
|
- |
|
| 532 |
*/
|
- |
|
| 533 |
void resetAvailability(1:string itemKey, 2:i64 vendorId, 3:i64 quantity, 4:i64 warehouseId) throws (1:InventoryServiceException cex);
|
- |
|
| 534 |
|
- |
|
| 535 |
/**
|
- |
|
| 536 |
* Resets availability of a warehouse to zero.
|
- |
|
| 537 |
*/
|
- |
|
| 538 |
void resetAvailabilityForWarehouse(1:i64 warehouseId) throws (1:InventoryServiceException cex);
|
- |
|
| 539 |
|
- |
|
| 540 |
/**
|
- |
|
| 541 |
* Returns the list of item keys which need to be processed for a given warehouse.
|
- |
|
| 542 |
* This is currently used by Support application to send item keys whose inventory needs
|
- |
|
| 543 |
* to be updated from PLB
|
- |
|
| 544 |
*/
|
- |
|
| 545 |
list<string> getItemKeysToBeProcessed(1:i64 warehouseId);
|
- |
|
| 546 |
|
- |
|
| 547 |
/**
|
- |
|
| 548 |
* Marks/Deletes missed inventory updates for a given key and warehouse.
|
- |
|
| 549 |
* This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
|
- |
|
| 550 |
*/
|
- |
|
| 551 |
void markMissedInventoryUpdatesAsProcessed(1:string itemKey, 2:i64 warehouseId);
|
- |
|
| 552 |
|
- |
|
| 553 |
/**
|
- |
|
| 554 |
* Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
|
- |
|
| 555 |
* and the timestamp from where alert was raised.
|
- |
|
| 556 |
*/
|
- |
|
| 557 |
map<string, map<i64, i64>> getIgnoredItemKeys();
|
- |
|
| 558 |
|
- |
|
| 559 |
/**
|
- |
|
| 560 |
Add the BAD type inventory to existing stock.
|
- |
|
| 561 |
*/
|
- |
|
| 562 |
void addBadInventory(1:i64 itemId, 2:i64 warehouseId, 3:i64 quantity) throws (1:InventoryServiceException cex);
|
- |
|
| 563 |
|
- |
|
| 564 |
/**
|
- |
|
| 565 |
Returns all shipping locations
|
- |
|
| 566 |
*/
|
- |
|
| 567 |
list<Warehouse> getShippingLocations();
|
- |
|
| 568 |
|
- |
|
| 569 |
/**
|
- |
|
| 570 |
* Fetches all the vendor item mappings present.
|
- |
|
| 571 |
*/
|
- |
|
| 572 |
list<VendorItemMapping> getAllVendorItemMappings();
|
- |
|
| 573 |
|
- |
|
| 574 |
/**
|
- |
|
| 575 |
* Gets items' inventory for a warehouse
|
- |
|
| 576 |
* If warehouse is passed as zero, items' inventory across all warehouses is sent
|
- |
|
| 577 |
*/
|
- |
|
| 578 |
map<i64, ItemInventory> getInventorySnapshot(1:i64 warehouseId);
|
- |
|
| 579 |
|
323 |
|
| 580 |
/**
|
- |
|
| 581 |
* Clear item availability cache.
|
- |
|
| 582 |
*/
|
- |
|
| 583 |
void clearItemAvailabilityCache();
|
- |
|
| 584 |
|
- |
|
| 585 |
list<i64> getClearanceSaleCatalogIds() throws (1:InventoryServiceException cex),
|
324 |
list<i64> getClearanceSaleCatalogIds() throws (1:CatalogServiceException cex),
|
| 586 |
|
325 |
|
| 587 |
bool addupdateVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType, 3:i64 voucherAmount) throws (1:InventoryServiceException cex),
|
326 |
bool addupdateVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType, 3:i64 voucherAmount) throws (1:CatalogServiceException cex),
|
| 588 |
|
327 |
|
| 589 |
bool deleteVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType) throws (1:InventoryServiceException cex),
|
328 |
bool deleteVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType) throws (1:CatalogServiceException cex),
|
| 590 |
|
329 |
|
| 591 |
i64 getVoucherAmount(1:i64 itemId, 2:i64 voucherType),
|
330 |
i64 getVoucherAmount(1:i64 itemId, 2:i64 voucherType),
|
| 592 |
|
331 |
|
| 593 |
list<VoucherItemMapping> getAllItemVouchers(1:i64 itemId),
|
332 |
list<VoucherItemMapping> getAllItemVouchers(1:i64 itemId),
|
| 594 |
|
333 |
|
| 595 |
bool isValidCatalogItemId(1:i64 catalog_item_id),
|
334 |
bool isValidCatalogItemId(1:i64 catalog_item_id)
|
| 596 |
|
- |
|
| 597 |
void updateVendorString(1:i64 warehouseId, 2:string vendorString);
|
- |
|
| 598 |
}
|
335 |
}
|