Subversion Repositories SmartDukaan

Rev

Rev 17470 | Rev 18578 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 ashish 1
namespace java in.shop2020.model.v1.order
95 ashish 2
namespace py shop2020.thriftpy.model.v1.order
3374 rajveer 3
 
4
include "GenericService.thrift"
5
 
68 ashish 6
/***
7
	Order objects.
8
*/
11173 vikram.rag 9
 
10
enum AmazonFCWarehouseLocation {
11
	Mumbai = 0,
12872 amit.gupta 12
	Bangalore = 1,
13
	Gurgaon = 2
11173 vikram.rag 14
}
15
 
13584 manish.sha 16
enum FlipkartFCWarehouseLocation {
17
	Delhi = 0
18
}
19
 
483 rajveer 20
enum OrderStatus{
845 chandransh 21
	PAYMENT_PENDING,
22
	PAYMENT_FAILED,
4661 rajveer 23
	COD_VERIFICATION_PENDING,
483 rajveer 24
	SUBMITTED_FOR_PROCESSING,
25
	ACCEPTED,
26
	INVENTORY_LOW,
495 rajveer 27
	REJECTED,
483 rajveer 28
	BILLED,
4245 rajveer 29
	PAYMENT_FLAGGED, 
483 rajveer 30
	SHIPPED_FROM_WH,
31
	SHIPPED_TO_LOGST,
4245 rajveer 32
	PAYMENT_FLAGGED_DENIED,      
483 rajveer 33
	DELIVERY_SUCCESS,
4245 rajveer 34
	CANCEL_REQUEST_RECEIVED,
35
	CANCEL_REQUEST_CONFIRMED,
36
	CANCELLED_ON_CUSTOMER_REQUEST,
4910 phani.kuma 37
	SHIPPED_TO_DESTINATION_CITY,
38
	REACHED_DESTINATION_CITY,
4682 rajveer 39
	COD_VERIFICATION_FAILED,
2537 chandransh 40
	FAILED,
4484 rajveer 41
	RTO_IN_TRANSIT,
42
	RTO_RECEIVED_PRESTINE,
4452 rajveer 43
	DOA_PICKUP_REQUEST_RAISED,
44
	DOA_PICKUP_CONFIRMED,
2537 chandransh 45
	DOA_RETURN_IN_TRANSIT,
4452 rajveer 46
	DOA_RECEIVED_PRESTINE,
2537 chandransh 47
	DOA_CERT_INVALID,
2614 chandransh 48
	DOA_CERT_VALID,
4484 rajveer 49
	RTO_RESHIPPED,
2614 chandransh 50
	DOA_INVALID_RESHIPPED,
4452 rajveer 51
	DOA_VALID_RESHIPPED,
4484 rajveer 52
	RTO_REFUNDED,
2614 chandransh 53
	DOA_VALID_REFUNDED,
54
	DOA_INVALID_REFUNDED,
4682 rajveer 55
	CANCELLED_DUE_TO_LOW_INVENTORY,
4303 rajveer 56
	LOW_INV_PO_RAISED,
57
	LOW_INV_REVERSAL_IN_PROCESS,
4369 rajveer 58
	LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
59
	LOW_INV_PO_RAISED_TIMEOUT,
4410 rajveer 60
	LOW_INV_REVERSAL_TIMEOUT,
4910 phani.kuma 61
	FIRST_DELIVERY_ATTEMPT_MADE,
4452 rajveer 62
	CAPTURE_IN_PROCESS,
63
	DOA_REQUEST_RECEIVED,
64
	DOA_REQUEST_AUTHORIZED,
65
	DOA_PICKUP_DENIED,
66
	DOA_RECEIVED_DAMAGED,
67
	DOA_LOST_IN_TRANSIT,
4459 rajveer 68
	DOA_RESHIPPED_RCVD_DAMAGED,
69
	DOA_REFUNDED_RCVD_DAMAGED,
70
	DOA_RESHIPPED_LOST_IN_TRANSIT,
4486 rajveer 71
	DOA_REFUNDED_LOST_IN_TRANSIT,
72
	RTO_RECEIVED_DAMAGED,
73
	RTO_LOST_IN_TRANSIT,
74
	RTO_DAMAGED_RESHIPPED,
75
	RTO_DAMAGED_REFUNDED,
76
	RTO_LOST_IN_TRANSIT_RESHIPPED,
77
	RTO_LOST_IN_TRANSIT_REFUNDED,
4488 rajveer 78
	RTO_INVENTORY_REVERSED,
79
	RET_REQUEST_RECEIVED,
80
	RET_REQUEST_AUTHORIZED,
81
	RET_PICKUP_REQUEST_RAISED,
82
	RET_PICKUP_DENIED,
83
	RET_PICKUP_CONFIRMED,
84
	RET_RETURN_IN_TRANSIT,
85
	RET_RECEIVED_PRESTINE,
86
	RET_RECEIVED_DAMAGED,
87
	RET_LOST_IN_TRANSIT,
88
	RET_PRODUCT_USABLE,
89
	RET_PRODUCT_UNUSABLE,
90
	RET_PRODUCT_USABLE_RESHIPPED,
91
	RET_PRODUCT_USABLE_REFUNDED,
92
	RET_PRODUCT_UNUSABLE_RESHIPPED,
93
	RET_PRODUCT_UNUSABLE_REFUNDED,
94
	RET_RESHIPPED_RCVD_DAMAGED,
95
	RET_REFUNDED_RCVD_DAMAGED,
96
	RET_RESHIPPED_LOST_IN_TRANSIT,
4661 rajveer 97
	RET_REFUNDED_LOST_IN_TRANSIT,
98
	LOST_IN_TRANSIT,
99
	LOST_IN_TRANSIT_RESHIPPED,
5553 rajveer 100
	LOST_IN_TRANSIT_REFUNDED,
101
	DELIVERED_AT_STORE,
102
	RECEIVED_AT_STORE
483 rajveer 103
}
104
 
105
enum TransactionStatus{
106
	INIT,
107
	IN_PROCESS,
108
	COMPLETED,
2964 chandransh 109
	FAILED,
3060 chandransh 110
	AUTHORIZED,
4245 rajveer 111
	COD_IN_PROCESS,
112
	FLAGGED
483 rajveer 113
}
114
 
5527 anupam.sin 115
enum OrderType{
6055 rajveer 116
	B2C,
117
	B2Cbulk,
118
	B2B,
7096 anupam.sin 119
	RECHARGE,
120
	RCH4HOTSPOT,
121
	WALLETCREDIT
5527 anupam.sin 122
}
123
 
4008 mandeep.dh 124
enum ExtraTransactionProcessingType {
125
    COD_VERIFICATION,
4245 rajveer 126
    DELAYED_DELIVERY,
6104 rajveer 127
    PAYMENT_FLAGGED,
128
    RECHARGE_UNKNOWN
4008 mandeep.dh 129
}
130
 
6289 anupam.sin 131
enum DenominationType {
132
	TOPUP = 1,
133
    SPECIAL = 2,
134
    DATA = 3
135
}
136
 
9159 amar.kumar 137
enum TaxType {
138
	VAT = 0,
139
	CST = 1,
140
	CFORM = 2
141
}
142
 
483 rajveer 143
struct LineItem{
144
	1:i64 id,
698 chandransh 145
	2:i64 item_id,
4008 mandeep.dh 146
	3:string productGroup,
956 chandransh 147
	4:string brand,
148
	5:string model_number,
4586 mandeep.dh 149
	6:string color,
956 chandransh 150
	7:string model_name,
151
	8:string extra_info,
152
	9:double quantity,
12280 amit.gupta 153
	10:double mrp,
154
	11:double unit_price,
155
	12:double unit_weight,
156
	13:double total_price,
157
	14:double transfer_price,
158
	15:double total_weight,
159
	16:optional string serial_number,
160
	17:optional string item_number,
161
	18:optional string dealText,
162
	19:i64 warrantry_expiry_timestamp,
163
	20:double vatRate,
164
	21:double nlc
483 rajveer 165
}
166
 
3553 chandransh 167
enum DelayReason {
168
	INVENTORY_LOW_PHASED_OUT,
169
	INVENTORY_LOW_COLOR_NOT_AVAILABLE,
170
	INVENTORY_LOW_REVERSAL_NOT_ON_TIME,
171
	INVENTORY_LOW_PRODUCT_NOT_SEALED,
172
	COURIER_DELAY_NOT_DELIVERED_TO_COURIER_ON_TIME,
173
	COURIER_DELAY_DID_NOT_CONNECT,
174
	COURIER_DELAY_CUSTOMER_NOT_AVAILABLE,
9416 amar.kumar 175
	COURIER_DELAY_INCORRECT_ADDRESS,
3553 chandransh 176
	COURIER_DELAY_OCTROI_DELAY,
177
	COURIER_DELAY_FORCES_OF_NATURE,
178
	COD_VERIFICATION_DELAY,
179
	PAYMENT_FLAGGED,
180
	OTHERS
181
}
483 rajveer 182
 
8717 amar.kumar 183
enum ProductCondition{
184
	GOOD,
185
	BAD
186
}
187
 
483 rajveer 188
struct Order{
189
	1:i64 id,
190
	2:i64 warehouse_id,
191
	/**
192
		item info
193
	**/
194
	3:list<LineItem> lineitems,
195
	/**
196
	  logistics info
197
	**/
198
	4:i64 logistics_provider_id,
199
	5:string airwaybill_no,
200
	6:string tracking_id,
201
	7:i64 expected_delivery_time,
202
	/**
203
	  customer info
204
	**/
205
	8:i64 customer_id,
206
	9:string customer_name,
207
	10:string customer_mobilenumber,
208
	11:string customer_pincode,
735 chandransh 209
	12:string customer_address1,
210
	13:string customer_address2,
211
	14:string customer_email,
212
	15:string customer_city,
213
	16:string customer_state,
483 rajveer 214
 
215
	/**
216
		status and misc info
217
	**/
735 chandransh 218
	17:OrderStatus status,
219
	18:string statusDescription,
220
	19:double total_amount,
221
	20:double total_weight,
483 rajveer 222
	/**
223
		billing info
224
	**/
735 chandransh 225
	21:string invoice_number,
226
	22:string billed_by,
483 rajveer 227
	/**
228
		timestamps
229
	**/
735 chandransh 230
	23:i64 created_timestamp,
231
	24:i64 accepted_timestamp,
232
	25:i64 billing_timestamp,
233
	26:i64 shipping_timestamp,
1115 chandransh 234
	27:i64 pickup_timestamp,
235
	28:i64 delivery_timestamp,
1210 chandransh 236
	29:i64 outofstock_timestamp,
237
	30:i64 jacket_number,
1223 chandransh 238
	31:string receiver,
239
	32:i64 batchNo,
2537 chandransh 240
	33:i64 serialNo,
241
	34:bool doaFlag,
2675 vikas 242
	35:string pickupRequestNo,
2819 chandransh 243
	36:i64 transactionId,
3060 chandransh 244
	37:string purchaseOrderNo,
3553 chandransh 245
	38:bool cod,
4004 chandransh 246
	39:DelayReason delayReason,
247
	40:i64 promised_delivery_time,
248
	41:i64 expected_shipping_time,
4102 chandransh 249
	42:i64 verification_timestamp,
4192 anupam.sin 250
	43:i64 promised_shipping_time,
251
	44:optional i64 reship_timestamp,
252
	45:optional i64 refund_timestamp,
4245 rajveer 253
	46:optional i64 new_order_id,
4269 anupam.sin 254
	47:OrderStatus previousStatus,
4506 phani.kuma 255
	48:i64 vendorId,
4647 rajveer 256
	49:optional i64 doa_auth_timestamp,
4709 rajveer 257
	50:string delayReasonText,
4758 mandeep.dh 258
	51:string refundReason,
4815 phani.kuma 259
	52:i64 purchaseOrderId,
5062 varun.gupt 260
	53:optional i64 doa_logistics_provider_id,
5110 mandeep.dh 261
	54:i64 originalOrderId,
5189 varun.gupt 262
	55:i64 fulfilmentWarehouseId,
5354 anupam.sin 263
	56:bool vendorPaid,
264
	57:optional i64 received_return_timestamp,
5527 anupam.sin 265
	58:optional i64 first_attempt_timestamp,
5553 rajveer 266
	59:OrderType orderType,
267
	60:i64 pickupStoreId,
6318 rajveer 268
	61:bool logisticsCod,
6525 rajveer 269
	62:i64 gvAmount,
6726 rajveer 270
	63:bool otg,
271
	64:i64 courier_delivery_time
6903 anupam.sin 272
	65:i64 insurer,
273
	66:double insuranceAmount,
274
	67:string dob,
7190 amar.kumar 275
	68:string guardianName,
7293 anupam.sin 276
	69:i64 freebieItemId,
277
	70:i64 source,
278
	71:double advanceAmount,
8717 amar.kumar 279
	72:i64 storeId,
9299 kshitij.so 280
	73:ProductCondition productCondition,
281
	74:i64 dataProtectionInsurer,
9416 amar.kumar 282
	75:double dataProtectionAmount,
13148 manish.sha 283
	76:TaxType taxType,
17470 manish.sha 284
	77:string logisticsTransactionId,
285
	78:double shippingCost,
286
	79:double codCharges
483 rajveer 287
}
288
 
5527 anupam.sin 289
struct Attribute{
290
	1:string name,
291
	2:string value
292
}
293
 
4245 rajveer 294
struct OrderStatusAuditTrail{
295
	1:i64 id,
296
	2:i64 orderId,
297
	3:i64 status,
298
	4:i64 timestamp,
299
	5:i64 description
300
}
301
 
7442 vikram.rag 302
struct AmazonOrdersToAcknowledge{
303
	1:string amazonOrderId,
304
	2:string amazonOrderItemId,
305
	3:string status,
306
	4:i64 transaction_id,
307
	5:i32 count
308
}
309
 
483 rajveer 310
struct Transaction{
311
	1:i64 id,
312
	2:list<Order> orders,
680 rajveer 313
	3:i64 createdOn,
314
	4:TransactionStatus transactionStatus,
315
	5:string statusDescription,
316
	6:i64 shoppingCartid,
2219 varun.gupt 317
	7:i64 customer_id,
2814 vikas 318
	8:string coupon_code,
319
	9:string sessionSource,
3858 vikas 320
	10:i64 sessionStartTime,
321
	11:string firstSource,
6389 rajveer 322
    12:i64 firstSourceTime,
17470 manish.sha 323
    13:i64 emiSchemeId,
324
    14:double totalShippingCost,
325
    15:double totalCodCharges
483 rajveer 326
}
327
 
4393 rajveer 328
enum AlertType{
329
	NEW_INVENTORY_ALERT,
330
	ORDER_READY_TO_ACCEPT
331
}
332
 
483 rajveer 333
struct Alert{
334
	1:i64 id,
4393 rajveer 335
	2:AlertType type,
336
	3:i64 status,
337
	4:i64 timestamp,
338
	5:string description
4444 rajveer 339
	6:i64 warehouseId
483 rajveer 340
}
341
 
2688 chandransh 342
struct ReturnOrder{
343
	1:i64 orderId,
2697 chandransh 344
	2:i64 warehouseId,
345
    3:i64 jacketNumber,
346
    4:string invoiceNumber,
347
    5:i64 itemId,
348
    6:string productGroup,
349
    7:string brand,
350
    8:string modelNumber,
351
    9:string modelName,
352
    10:string color,
353
    11:double totalPrice,
354
    12:double transferPrice,
355
    13:bool processedStatus,
356
    14:i64 createdAt,
357
    15:i64 processedAt
2688 chandransh 358
}
359
 
4600 varun.gupt 360
struct PaymentSettlement	{
361
    2:i64 paymentGatewayId,
4905 varun.gupt 362
    3:i64 referenceId,
4600 varun.gupt 363
    4:i64 settlementDate,
364
    5:double serviceTax,
365
    6:double otherCharges,
366
    7:double netCollection
367
}
368
 
4875 varun.gupt 369
struct CODPaymentSettlement	{
370
    1:i64 orderId,
371
    2:i64 settlementDate,
372
    3:double collection
373
}
374
 
4303 rajveer 375
enum HotspotAction{
376
	PO_RAISED,
377
	REVERSAL_INITIATED,
378
	NOT_AVAILABLE
379
}
380
 
4369 rajveer 381
struct TimeoutSummary{
382
	1:i32 poRaised,
383
	2:i32 poEstimate
384
	3:i32 reversalInitiated,
385
	4:i32 reversalEstimate
386
}
387
 
5447 anupam.sin 388
struct CODVerificationAgent{
389
	1:i64 orderId,
390
	2:string agentEmailId
391
}
392
 
6000 mandeep.dh 393
enum RechargeType {
394
    MOBILE = 1,
395
    DTH = 2
396
}
397
 
398
enum RechargeOrderStatus {
399
    PAYMENT_PENDING = 1,
6031 rajveer 400
    PAYMENT_FAILED = 2,
401
    PAYMENT_SUCCESSFUL = 3,
6000 mandeep.dh 402
    RECHARGE_FAILED = 4,
6235 rajveer 403
    RECHARGE_SUCCESSFUL = 5,
6507 anupam.sin 404
    RECHARGE_FAILED_REFUNDED = 6,
405
    REFUNDED = 7,
7073 anupam.sin 406
    PARTIALLY_REFUNDED = 8,
407
    INIT = 9,
12979 kshitij.so 408
    RECHARGE_UNKNOWN = 10,
409
    RECHARGE_IN_PROCESS = 11
6000 mandeep.dh 410
}
411
 
7293 anupam.sin 412
enum OrderSource {
413
	WEBSITE = 1,
7355 vikram.rag 414
	STORE = 2,
7410 amar.kumar 415
	AMAZON =3,
416
	HOMESHOP18  = 4,
417
	NAAPTOL = 5,
8488 amar.kumar 418
	EBAY = 6,
8983 vikram.rag 419
	SNAPDEAL = 7,
11524 amit.gupta 420
	FLIPKART = 8,
12580 amit.gupta 421
	MOBILESITE = 9,
422
	JUNGLEE = 10	
7293 anupam.sin 423
}
424
 
12979 kshitij.so 425
enum RechargeMode {
426
	SYNC = 1,
427
	ASYNC = 2
428
}
429
 
13941 amit.gupta 430
 
431
enum WalletSource {
432
	RECHARGE = 1,
433
	PHYSICAL = 2,
434
	DTR = 3
435
}
436
 
6000 mandeep.dh 437
struct RechargeOrder {
6031 rajveer 438
    1:i64 id,
439
    2:string displayId,
440
    3:i64 totalAmount,
441
    4:i64 walletAmount,
442
    5:i64 transactionId,
6077 anupam.sin 443
    6:i64 invoiceNumber,
6031 rajveer 444
    7:OrderType orderType,
445
    8:i64 operatorId,
446
    9:RechargeType rechargeType,
447
   10:RechargeOrderStatus status,
448
   11:string deviceNumber,
449
   12:i64 userId,
450
   13:string userEmailId,
6048 rajveer 451
   14:i64 creationTimestamp,
452
   15:string spiceTID,
6094 rajveer 453
   16:i64 responseTimestamp,
6159 rajveer 454
   17:string description,
6433 anupam.sin 455
   18:string plan,
456
   19:string couponCode,
6515 anupam.sin 457
   20:i64 couponAmount,
6591 anupam.sin 458
   21:i64 refundTimestamp,
459
   22:string ipAddress
6000 mandeep.dh 460
}
461
 
6188 rajveer 462
struct RechargeStatistics{
6190 rajveer 463
	1:map<i64, i64> statusCounts,
464
	2:map<i64, i64> operatorCounts,
6188 rajveer 465
    3:map<string, list<RechargeOrder>> currentOrders,
466
    4:map<string, i64> amounts
467
}
468
 
6159 rajveer 469
struct RechargePlan {
470
	1:i64 operatorId,
471
    2:string name,
472
    3:string displayName,
473
    4:string description
474
}
475
 
6289 anupam.sin 476
struct RechargeDenomination {
477
	1:i64 operatorId,
478
	2:i64 circleId,
479
	3:DenominationType denominationType,
480
	4:i64 amount,
481
	5:string validity,
482
	6:string description
483
}
484
 
485
struct DeviceNumberInfo {
486
	1:i64 operatorId,
6336 anupam.sin 487
	2:string circleCode
6310 anupam.sin 488
	3:string operatorName
6289 anupam.sin 489
}
490
 
6031 rajveer 491
struct UserWallet {
6000 mandeep.dh 492
    1:i64 id,
493
    2:i64 amount,
6031 rajveer 494
    3:i64 userId   
6000 mandeep.dh 495
}
496
 
6031 rajveer 497
struct UserWalletHistory {
498
	1:i64 id,
499
    2:i64 walletId,
500
    3:i64 orderId,
501
    4:i64 amount,
502
    5:i64 timestamp    
6000 mandeep.dh 503
}
504
 
6389 rajveer 505
enum EmiChargeType {
506
    FIXED = 1,
507
    PERCENTAGE = 2
508
}
509
 
510
struct EmiScheme{
511
    1:i64 id,
512
    2:i64 gatewayId,
513
	3:i64 bankId,
514
    4:i64 tenure,
515
    5:string bankName,
6392 amit.gupta 516
    6:i64 minAmount,
6389 rajveer 517
    7:string tenureDescription,
518
    8:EmiChargeType	chargeType,
8942 rajveer 519
    9:double chargeValue,
520
    10:double interestRate    
6389 rajveer 521
}
522
 
483 rajveer 523
exception TransactionServiceException{
524
	1:i32 errorCode,
525
	2:string message
526
}
527
 
7073 anupam.sin 528
struct Company{
529
    1:i64 id,
530
    2:string name,
531
    3:string Address
532
}
533
 
534
struct WalletForCompany{
535
    1:i64 id,
536
    2:i64 companyId,
537
    3:double amount
538
}
539
 
540
struct WalletHistoryForCompany{
541
    1:i64 id,
542
    2:i64 walletId,
543
    3:double amount,
544
    4:i64 transactionTime,
545
    5:double openingBal,
546
    6:double closingBal,
547
    7:i64 referenceNumber,
548
    8:string description
549
}
550
 
551
enum PayMethod{
552
	CASH = 1,
8008 anupam.sin 553
	CARD = 2,
554
	CHEQUE = 3
7073 anupam.sin 555
}
556
 
7080 anupam.sin 557
struct FRC {
558
    1:i64 id,
559
    2:i64 operatorId,
560
    3:i64 circleId,
561
    4:i64 denomination,
562
    5:i64 maxDiscount
563
}
564
 
7096 anupam.sin 565
struct HotspotStore {
566
	1:i64 id,
567
    2:string hotspotId,	
568
    3:i64 companyId,
569
    4:string name,
570
    5:string city,
571
    6:i64 collectedAmount,
572
    7:i64 availableLimit,
573
    8:i64 creditLimit,
574
    9:string salt,
575
    10:string password,
576
    11:bool isActive,
7169 anupam.sin 577
    12:i64 circleId,
7308 rajveer 578
    13:string email,
579
    14:string line1,
580
    15:string line2,
581
    16:string state,
582
    17:string pin,
583
    18:string phone,
584
    19:string approvalEmail
7096 anupam.sin 585
}
586
 
7967 anupam.sin 587
struct HotspotServiceMatrix {
588
	1:i64 storeId,
589
	2:string hotspotId,
590
	3:bool pickupFromStoreService,
591
	4:bool storeWebsiteService,
592
	5:bool rechargeService
593
}
594
 
7073 anupam.sin 595
struct RechargeTransaction{
596
    1:i64 id,
597
    2:i64 storeId,
598
    3:double amount,
599
    4:i64 transactionTime,
600
    5:string deviceNum,
601
    6:RechargeType deviceType,
602
    7:bool isFrc,
603
    8:string email,
604
    9:double discount,
605
    10:double paymentAmount,
606
    11:PayMethod payMethod,
607
    12:RechargeOrderStatus status,
608
    13:string invoiceNumber,
609
    14:i64 circleId,
610
    15:i64 operatorId,
611
    16:string plan,
612
    17:string ipAddress,
613
    18:string name,
614
    19:string cafNum,
7080 anupam.sin 615
    20:string simNum,
7096 anupam.sin 616
    21:string alternateNumber,
7169 anupam.sin 617
    22:string description,
7369 rajveer 618
    23:i64 responseTime,
619
	24:string spiceTID,
620
    25:string aggTID,
621
    26:string providerTID
7073 anupam.sin 622
}
623
 
7096 anupam.sin 624
struct TelecomCircle {
625
	1:i64 id,
626
    2:string name,
627
    3:string code
628
}
629
 
7263 anupam.sin 630
struct SourceDetail {
631
	1:i64 id,
632
    2:string name,
7410 amar.kumar 633
    3:string email,
7530 kshitij.so 634
    4:string tinNumber,
635
    5:i64 lastUpdatedOn
7263 anupam.sin 636
}
637
 
7311 kshitij.so 638
struct AmazonOrder {
639
    1:i64 orderId,
7322 vikram.rag 640
    2:string amazonOrderCode,
641
    3:string amazonOrderItemCode,
7311 kshitij.so 642
    4:i64 transactionId,
7715 vikram.rag 643
    5:i64 item_id,
644
    6:string status,
645
    7:i64 purchaseDateOnAmazon
7311 kshitij.so 646
}
647
 
7386 anupam.sin 648
enum StorePaymentStatus{
649
	ADV_RECEIVED = 1,
650
	ADV_REFUNDED = 2,
651
	FULL_PAY_RECEIVED = 3,
652
	REFUNDED = 4,
7423 anupam.sin 653
	REFUND_REQUESTED = 5,
654
	REFUND_INITIATED = 6
7386 anupam.sin 655
}
656
 
657
struct StoreOrderDetail {
658
	1:i64 orderId,
659
	2:i64 storeId,
660
	3:double advanceAmount,
661
	4:double cashAmount,
662
	5:double cardAmount,
7393 anupam.sin 663
	6:StorePaymentStatus payStatus,
664
	7:string edcBank,
665
	8:double cashRefundAmount,
7423 anupam.sin 666
	9:double cardRefundAmount,
7611 anupam.sin 667
	10:string approvalCode,
668
	11:string cardType
7386 anupam.sin 669
}
670
 
7423 anupam.sin 671
struct StoreOrderCollection {
672
    1:string hotspotId,
673
    2:i64 orderId,
674
    3:string collectionType,
675
    4:string productName,
676
    5:i64 advanceAmount,
677
    6:i64 cash,
678
    7:i64 card,
679
    8:i64 addedAt,
680
    9:i64 pushedAt,
681
    10:bool pushedToOcr
682
}
683
 
8182 amar.kumar 684
struct EbayOrder {
685
	1:i64 orderId,
686
	2:i64 salesRecordNumber,
687
	3:string paisaPayId,
688
	4:string ebayListingId,
689
	5:double subsidyAmount,
690
	6:i64 ebayTxnDate,
691
	7:string transactionId,
692
	8:string listingName,
8241 amar.kumar 693
	9:double listingPrice,
8247 amar.kumar 694
	10:string bluedartPaisaPayRef	
8182 amar.kumar 695
}
696
 
8532 vikram.rag 697
struct FbaItemPrices{
698
	 1:i64 item_id	
699
     2:double minFbaPrice,
700
     3:double minMfnPrice,
701
     4:double ourPrice,
702
     5:double salePrice,
703
     6:i64 minFbaPriceSnapshotDate
704
     7:i64 minMfnPriceSnapshotDate
705
     8:i64 ourPriceSnapshotDate
706
     9:i64 salePriceSnapshotDate
707
 
708
} 
709
 
8488 amar.kumar 710
struct SnapdealOrder {
711
	1:i64 orderId,
712
	2:string referenceCode,
9627 vikram.rag 713
	3:string subOrderId,
8488 amar.kumar 714
	4:double listingPrice,
715
	5:string productName,
716
	6:i64 snapdealTxnDate
9456 vikram.rag 717
	7:double maxNlc
8488 amar.kumar 718
}
719
 
8961 vikram.rag 720
struct FlipkartOrder {
721
	1:string flipkartOrderId,
722
	2:string flipkartSubOrderId,
723
	3:i64 flipkartTxnDate,
724
	4:i64 orderId,
725
	5:double shippingPrice,
726
	6:double octroiFee,  
727
	7:double emiFee
9456 vikram.rag 728
	8:double maxNlc 
8961 vikram.rag 729
}
730
 
4815 phani.kuma 731
struct OrderStatusGroups{
732
	1:list<OrderStatus> codCancellable = [OrderStatus.COD_VERIFICATION_PENDING,
733
										OrderStatus.SUBMITTED_FOR_PROCESSING,
734
										OrderStatus.ACCEPTED,
735
										OrderStatus.INVENTORY_LOW,
736
										OrderStatus.LOW_INV_PO_RAISED,
737
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
738
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
739
										OrderStatus.BILLED,
740
										OrderStatus.PAYMENT_FLAGGED],
4837 varun.gupt 741
 
4815 phani.kuma 742
	2:list<OrderStatus> prepaidCancellableBeforeBilled = [OrderStatus.COD_VERIFICATION_PENDING,
743
										OrderStatus.SUBMITTED_FOR_PROCESSING,
744
										OrderStatus.ACCEPTED,
745
										OrderStatus.INVENTORY_LOW,
746
										OrderStatus.LOW_INV_PO_RAISED,
747
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
748
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT],
4837 varun.gupt 749
 
750
	3:list<OrderStatus> prepaidCancellableAfterBilled = [OrderStatus.BILLED, OrderStatus.PAYMENT_FLAGGED],
751
 
752
	4:list<OrderStatus> openOrders = [
753
										OrderStatus.PAYMENT_PENDING,			OrderStatus.COD_VERIFICATION_PENDING,
754
										OrderStatus.SUBMITTED_FOR_PROCESSING,	OrderStatus.ACCEPTED,
755
										OrderStatus.INVENTORY_LOW,				OrderStatus.BILLED,
756
										OrderStatus.PAYMENT_FLAGGED,			OrderStatus.SHIPPED_FROM_WH,
757
										OrderStatus.SHIPPED_TO_LOGST,			OrderStatus.PAYMENT_FLAGGED_DENIED,
4910 phani.kuma 758
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
4837 varun.gupt 759
										OrderStatus.CANCEL_REQUEST_RECEIVED,	OrderStatus.CANCEL_REQUEST_CONFIRMED,
760
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
761
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
762
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
763
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
764
										OrderStatus.LOW_INV_PO_RAISED,			OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
765
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,	OrderStatus.LOW_INV_PO_RAISED_TIMEOUT,
4910 phani.kuma 766
										OrderStatus.LOW_INV_REVERSAL_TIMEOUT,	OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,
4837 varun.gupt 767
										OrderStatus.CAPTURE_IN_PROCESS,			OrderStatus.DOA_REQUEST_RECEIVED,
768
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
769
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
770
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
771
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
772
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
773
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
774
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
775
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 776
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 777
									],
5031 varun.gupt 778
	5:list<OrderStatus> refundedOrders = [
779
										OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST,	OrderStatus.RTO_REFUNDED,
780
										OrderStatus.DOA_VALID_REFUNDED,				OrderStatus.DOA_INVALID_REFUNDED,
781
										OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,	OrderStatus.DOA_REFUNDED_RCVD_DAMAGED,
782
										OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT,	OrderStatus.RTO_DAMAGED_REFUNDED,
783
										OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,	OrderStatus.RET_PRODUCT_USABLE_REFUNDED,
784
										OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED,	OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT,
785
										OrderStatus.RET_REFUNDED_RCVD_DAMAGED,		OrderStatus.LOST_IN_TRANSIT_REFUNDED
786
									],
787
	6:list<OrderStatus> shippedOrders = [
4983 phani.kuma 788
										OrderStatus.SHIPPED_FROM_WH,			OrderStatus.SHIPPED_TO_LOGST,
789
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
790
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
791
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
792
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
793
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
794
										OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,OrderStatus.DOA_REQUEST_RECEIVED,
795
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
796
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
797
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
798
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
799
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
800
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
801
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
802
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 803
										OrderStatus.RET_PRODUCT_UNUSABLE,		OrderStatus.LOST_IN_TRANSIT,
804
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 805
									],
5031 varun.gupt 806
	7:list<OrderStatus> failedOrders = [
4983 phani.kuma 807
										OrderStatus.PAYMENT_FAILED,				OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
808
										OrderStatus.REJECTED,					OrderStatus.DOA_INVALID_REFUNDED,
809
										OrderStatus.DOA_INVALID_RESHIPPED,		OrderStatus.DOA_VALID_REFUNDED,
810
										OrderStatus.DOA_VALID_RESHIPPED,		OrderStatus.RTO_REFUNDED,
6566 amit.gupta 811
										OrderStatus.RTO_RESHIPPED, OrderStatus.COD_VERIFICATION_FAILED
4837 varun.gupt 812
									]
4815 phani.kuma 813
}
814
 
8282 kshitij.so 815
struct AmazonFbaSalesSnapshot {
816
	1:i64 dateOfSale
817
	2:i64 item_id
8363 vikram.rag 818
	3:i32 totalOrderCount
8282 kshitij.so 819
	4:i64 amazonFbaInventory
820
	5:bool isOutOfStock
821
    6:double salePrice
822
    7:double minFbaPrice
8363 vikram.rag 823
    8:double minMfnPrice
824
    9:double totalSale
825
    10:double promotionSale
8445 vikram.rag 826
    11:i32 promotionOrderCount
827
    12:double ourPrice
8532 vikram.rag 828
    13:i64 minFbaPriceSnapshotDate
829
    14:i64 minMfnPriceSnapshotDate
830
    15:i64 ourPriceSnapshotDate
831
    16:i64 salePriceSnapshotDate
11173 vikram.rag 832
    17:AmazonFCWarehouseLocation fcLocation
8282 kshitij.so 833
}
834
 
12103 manish.sha 835
struct AmazonFbaOrderReturns {
836
	1:string amazonOrderId,
837
	2:i64 insertionTimestamp,
838
	3:i64 sku,
839
	4:i64 creationTimestamp,
840
	5:i64 shippedQuantity,
841
	6:i64 sellableReturnQuantity,
842
	7:i64 nonSellableReturnQuantity
843
}
844
 
12589 manish.sha 845
struct FlipkartAdvantageOrder {
846
	1:string fkOrderId,
847
	2:string fkOrderItemId,
12772 manish.sha 848
	3:i64 sku,
12589 manish.sha 849
	4:i64 creationTimestamp
850
	5:string customerName,
851
	6:string customerAddress,
852
	7:string pincode,
853
	8:string customerCity,
854
	9:string customerState
855
	10:string customerPhone
856
	11:string status,
857
	12:i64 quantity,
858
	13:double totalPrice,
859
	14:double listPrice,
860
	15:i64 modifiedDate,
861
	16:string listingId,
862
	17:string cancelReason,
863
	18:string returnReason,
864
	19:string freebieItemId,
865
	20:string productTitle
866
}
867
 
13148 manish.sha 868
struct FlipkartFaSalesSnapshot {
869
	1:i64 dateOfSale
870
	2:i64 item_id
871
	3:i32 totalOrderCount
872
	4:bool isOutOfStock
873
    5:double totalSale
874
    6:double ourPrice
13584 manish.sha 875
    7:FlipkartFCWarehouseLocation fcLocation
876
    8:i32 returnQuantity
877
    9:double returnValue
13148 manish.sha 878
}
879
 
13114 kshitij.so 880
struct AmazonHourlySaleSnapshot {
881
	1:i64 snapshotTime
882
	2:i64 item_id
883
	3:i32 totalOrderCount
884
	4:i64 amazonFbaInventory
885
	5:bool isOutOfStock
886
    6:double totalSale
887
    7:double promotionSale
888
    8:i32 promotionOrderCount
889
    9:AmazonFCWarehouseLocation fcLocation
890
}
891
 
13478 kshitij.so 892
struct AmazonFbaOrderItem {
893
	1:string amazonOrderId,
894
	2:i64 purchaseDate,
895
	3:string orderStatus,
896
	4:i64 item_id,
897
	5:AmazonFCWarehouseLocation fcLocation,
898
	6:double totalAmount,
899
	7:double promotionDiscount,
900
	8:i64 quantity
901
}
902
 
13691 manish.sha 903
struct HsOrder {
904
	1:i64 orderId,
905
	2:string hsOrderNo,
906
	3:string hsSubOrderNo,
907
	4:string catalogueName,
908
	5:i64 hsOrderDate,
909
	6:string hsProductId,
910
	7:string hsItemId,
911
	8:string sellerSku,
912
	9:string paymentMode,
913
	10:string courierName,
13734 manish.sha 914
	11:i64 slaDays,
915
	12:string shippingName
13691 manish.sha 916
}
17470 manish.sha 917
/*
918
struct PaytmOrder {
919
	1:i64 orderId,
920
	2:string paytmOrderId,
921
	3:string paytmSubOrderId,
922
	4:
923
}*/
13691 manish.sha 924
 
3374 rajveer 925
service TransactionService extends GenericService.GenericService{
483 rajveer 926
 
927
	i64 createTransaction(1:Transaction transaction) throws (1:TransactionServiceException ex),
928
 
929
	//	Get transaction methods.
930
	Transaction getTransaction(1:i64 id) throws (1:TransactionServiceException ex),
931
	list<Transaction> getTransactionsForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:TransactionStatus status) throws (1:TransactionServiceException ex),
932
	list<Transaction> getTransactionsForShoppingCartId(1:i64 shoppingCartId) throws (1:TransactionServiceException ex),
933
	TransactionStatus getTransactionStatus(1:i64 transactionId) throws (1:TransactionServiceException ex),
7293 anupam.sin 934
	bool changeTransactionStatus(1:i64 transactionId, 2:TransactionStatus status, 3:string description, 4:i64 pickUp, 5:OrderType orderType, 6:OrderSource source) throws (1:TransactionServiceException ex),
1382 varun.gupt 935
 
1398 varun.gupt 936
	bool enqueueTransactionInfoEmail(1:i64 transactionId) throws (1:TransactionServiceException ex),
1382 varun.gupt 937
 
4801 anupam.sin 938
	list<Order> getAllOrders(1:list<OrderStatus> statuses, 2:i64 from_date, 3:i64 to_date, 4:i64 warehouse_id) throws (1:TransactionServiceException ex),
1111 varun.gupt 939
 
1115 chandransh 940
	/**
4133 chandransh 941
	Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
942
	Pass the status as null and the limit as 0 to ignore them.
943
	*/
8303 amar.kumar 944
	list<Order> getOrdersInBatch(1:list<OrderStatus> statuses, 2:i64 offset, 3:i64 limit, 4:i64 warehouse_id, 5:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 945
 
946
	/**
947
	Returns the count of orders with the given statuses assigned to the given warehouse.
948
	*/
8303 amar.kumar 949
	i32 getOrderCount(1:list<OrderStatus> statuses, 2:i64 warehouseId, 3:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 950
 
951
	/**
1115 chandransh 952
	Returns orders within a range of their billing dates
953
	*/
1000 varun.gupt 954
	list<Order> getOrdersByBillingDate(1:OrderStatus status, 2:i64 start_billing_date, 3:i64 end_billing_date, 4:i64 warehouse_id) throws (1:TransactionServiceException ex),
1111 varun.gupt 955
 
1382 varun.gupt 956
	/**
3427 chandransh 957
	Returns orders for a particular provider and warehouse which were shipped between the given dates.
3451 chandransh 958
	Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise. 
959
	Pass providerId and warehouseId as -1 to ignore both these parameters.
3427 chandransh 960
	*/
3451 chandransh 961
	list<Order> getOrdersByShippingDate(1:i64 fromShippingDate, 2:i64 toShippingDate, 3:i64 providerId, 4:i64 warehouseId, 5:bool cod) throws (1:TransactionServiceException ex),
3427 chandransh 962
 
963
	/**
1382 varun.gupt 964
	Returns order ids for orders which can be returned
965
	*/
966
	list<i64> getReturnableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
967
 
968
	/**
969
	Returns order ids for orders which can be cancelled
970
	*/
971
	list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
972
 
483 rajveer 973
	bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
1147 chandransh 974
 
975
	/**
1529 ankur.sing 976
	Returns list of orders for given transaction Id. Also filters based on customer Id so that
977
	only user who owns the transaction can view its order details.
978
	*/
979
	list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId)  throws (1:TransactionServiceException ex),
3014 chandransh 980
 
981
	/**
982
	Returns list of orders for the given customer created between the given dates and having the given statuses.
983
	Pass and empty list to ignore filtering on statuses.
984
	*/	
985
	list<Order> getOrdersForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:list<OrderStatus> statuses) throws (1:TransactionServiceException ex),
1529 ankur.sing 986
 
483 rajveer 987
	i64 createOrder(1:Order order) throws (1:TransactionServiceException ex),
988
	Order getOrder(1:i64 id) throws (1:TransactionServiceException ex),
989
	list<LineItem> getLineItemsForOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
990
 
4999 phani.kuma 991
	list<Order> getOrderList(1:list<i64> order_ids),
1529 ankur.sing 992
 
5386 phani.kuma 993
	list<Order> getOrderListForVendor(1:list<i64> order_ids, 2:i64 vendorId),
994
 
757 chandransh 995
	/**
1529 ankur.sing 996
	Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
997
	Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
998
	*/
999
	Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
1000
 
3060 chandransh 1001
	//Alerts apis 
4444 rajveer 1002
	list<Alert> getAlerts(1:i64 type, 2:i64 warehouseId, 3:i64 status, 4:i64 timestamp),
1003
	void addAlert(1:i64 type, 2:i64 warehouseId, 3:string description),
1004
	void markAlertsAsSeen(1:i64 warehouseId),
3060 chandransh 1005
 
1529 ankur.sing 1006
	/**
3060 chandransh 1007
	Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1008
	*/
1009
	i64 getValidOrderCount(),
1010
 
1011
	/**
1012
	Returns the number of distinct customers who have done successful transactions
1013
	*/
1014
	i64 getNoOfCustomersWithSuccessfulTransaction(),
1015
 
1016
	/**
1017
	Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1018
	List contains two values, first minimum amount and second maximum amount.	
1019
	*/
1020
	list<double> getValidOrdersAmountRange(),
1021
 
1022
	/**
1023
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
1024
	If limit is passed as 0, then all valid Orders are returned. 
1025
	*/
5874 rajveer 1026
	list<Order> getValidOrders(1:i64 limit, 2:bool onlyStore),
3060 chandransh 1027
 
1028
	/**
1029
	Create a batch of all the pending orders for the given warehouse.
1030
	The returned list is orderd by created_timestamp.
1031
	If there are no pending orders, an empty list is returned.
1032
	*/
1223 chandransh 1033
	list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
1034
 
1035
	/**
1036
	Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found. 
1244 chandransh 1037
	*/
1210 chandransh 1038
	bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
1039
 
1040
	/**
3060 chandransh 1041
	Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
1042
	timestamp. It is intended to be used for COD orders but can be harmlessly 
1043
	used for all other orders as well.
1044
	Throws an exception if no such order exists.
757 chandransh 1045
	*/
3060 chandransh 1046
	bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1115 chandransh 1047
 
1048
	/**
3060 chandransh 1049
	Marks the given order as ACCEPTED and updates the accepted timestamp. If the
1050
	given order is not a COD order, it also captures the payment if the same has
1051
	not been captured.
1052
	Throws an exception if no such order exists.
1053
	*/
1054
	bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1055
 
1056
	/**
1057
	Add billing details such as the bill number and the biller to the Order.
4658 mandeep.dh 1058
	Adds jacket number, item number and Serial no. to the order. Doesn't update
3060 chandransh 1059
	the IMEI no. if a -1 is supplied.
1060
	Also, it generates an invoice number for the order, marks the order as
1061
	BILLED and sets the billing timestamp.
1062
	Returns false if it doesn't find the order with the given ID.
1063
	*/
7190 amar.kumar 1064
	bool addBillingDetails(1:i64 orderId, 2:string invoice_number, 3:list<string> serialNumber, 4:list<string> itemNumber, 5:i64 freebieWarehouseId, 6:string billed_by, 7:i64 jacketNumber, 8:i64 billingType, 9:i64 fulfilmentWarehouseId, 10:bool authorize) throws (1:TransactionServiceException ex),
4579 rajveer 1065
 
1066
	/**
1067
	Add the invoice number to the order.
1068
	*/	
6747 amar.kumar 1069
	void addInvoiceNumber(1:i64 orderId, 2:string invoiceNumber, 3:string color, 4:string serialNumber, 5:string itemNumber) throws (1:TransactionServiceException ex),
4910 phani.kuma 1070
 
3060 chandransh 1071
	/**
1072
	Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
4410 rajveer 1073
	given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
1074
	*/
4788 rajveer 1075
	bool markOrdersAsShippedFromWarehouse(1:i64 warehouseId, 2:i64 providerId, 3:bool cod, 4:list<i64> orderIds) throws (1:TransactionServiceException ex),
5676 rajveer 1076
 
5713 rajveer 1077
	bool markOrdersAsReturnedFromStore(1:i64 providerId, 2:list<i64> orderIds, 3:list<string> awbs) throws (1:TransactionServiceException ex),
4410 rajveer 1078
 
1079
	/**
1115 chandransh 1080
	Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
4910 phani.kuma 1081
	Raises an exception if we encounter report for an AWB number that we did not ship.	
1082
	*/
1083
	void markOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails) throws (1:TransactionServiceException ex),
1084
 
1085
	/**
1115 chandransh 1086
	Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
1087
	*/
4910 phani.kuma 1088
	list<Order> getOrdersNotPickedUp(1:i64 providerId),
1134 chandransh 1089
 
1090
	/**
1091
	Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
1092
	the name of the receiver.
1093
	Raises an exception if we encounter report for an AWB number that we did not ship.
1094
	*/
1095
	void markOrdersAsDelivered(1:i64 providerId, 2:map<string, string> deliveredOrders) throws (1:TransactionServiceException ex),
1096
 
1097
	/**
4910 phani.kuma 1098
	Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
1134 chandransh 1099
	Raises an exception if we encounter report for an AWB number that we did not ship.
1100
	*/
4910 phani.kuma 1101
	void markAsRTOrders(1:i64 providerId, 2:map<string, string> returnedOrders) throws (1:TransactionServiceException ex),
1134 chandransh 1102
 
1244 chandransh 1103
	/**
4910 phani.kuma 1104
	Returns a list of orders that were returned by courier.
1105
	*/
1106
	list<Order> getRTOrders(1:i64 providerId),
1107
 
1108
	/**
1244 chandransh 1109
	Update the status description of orders whose AWB numbers are keys of the Map.
4910 phani.kuma 1110
	*/
1111
	void updateNonDeliveryReason(1:i64 providerId, 2:map<string, string> undeliveredOrders) throws (1:TransactionServiceException ex),
1112
 
1113
	/**
4581 phani.kuma 1114
	Returns a list of orders that were picked up or shipped four days ago but did not get delivered.
1244 chandransh 1115
	*/
4910 phani.kuma 1116
	list<Order> getNonDeliveredOrdersbyCourier(1:i64 providerId),
1244 chandransh 1117
 
1407 ankur.sing 1118
	/**
4910 phani.kuma 1119
	Mark all orders with AWBs in the given map as local connected. Also sets the local connected timestamp.
1120
	*/
1121
	void markOrdersAsLocalConnected(1:i64 providerId, 2:map<string, string> local_connected_orders) throws (1:TransactionServiceException ex),
1122
 
1123
	/**
1124
	Returns a list of orders that were picked up or shipped but pending local connection.
1125
	*/
1126
	list<Order> getOrdersNotLocalConnected(1:i64 providerId),
1127
 
1128
	/**
1129
	Mark all orders with AWBs in the given map as reached destination city. Also sets the reached destination timestamp.
1130
	*/
1131
	void markOrdersAsDestinationCityReached(1:i64 providerId, 2:map<string, string> destination_city_reached_orders) throws (1:TransactionServiceException ex),
1132
 
1133
	/**
1134
	Mark all orders with AWBs in the given map as first delivery attempt made. Also sets the first delivery attempted timestamp.
1135
	*/
1136
	void markOrdersAsFirstDeliveryAttempted(1:i64 providerId, 2:map<string, string> first_atdl_orders) throws (1:TransactionServiceException ex),
1137
 
1138
	/**
1407 ankur.sing 1139
	Returns the list of orders whose delivery time has passed but have not been
1140
	delivered yet for the given provider and warehouse. To get a complete list of
1141
	undelivered orders, pass them as -1. 
1142
	Returns an empty list if no such orders exist.
1143
	*/
1144
	list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
1145
 
1599 ankur.sing 1146
	/**
4783 phani.kuma 1147
	Returns the list of orders whose expected delivery date has passed but have not been
1148
	delivered yet.
1149
	Returns an empty list if no such orders exist.
1150
	*/
1151
	list<Order> getUndeliveredOrdersExpectedDeliveryDateNotMet(),
1152
 
1153
	/**
2537 chandransh 1154
	Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
1155
	Returns the final flag status.
1156
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
1157
	*/
1158
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
1159
 
4712 rajveer 1160
	void markOrderAsDelivered(1:i64 orderId, 2:i64 deliveryTimestamp, string receiver) throws (1:TransactionServiceException ex),
1161
 
5553 rajveer 1162
	void markOrderAsReceivedAtStore(1:i64 orderId, 2:i64 deliveryTimestamp) throws (1:TransactionServiceException ex),
1163
 
2537 chandransh 1164
	/**
4454 rajveer 1165
	 Once user raise the request for a DOA, order status will be changed from DELVIERY_SUCCESS to DOA_REQUEST_RECEIVED 
1166
	*/
1167
	bool markOrderDoaRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1168
 
1169
	/**
1170
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from DOA_REQUEST_RECEIVED 
1171
	 to DOA_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1172
	*/
7645 anupam.sin 1173
	bool markOrderDoaRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4454 rajveer 1174
 
1175
	/**
4488 rajveer 1176
	 Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED 
1177
	*/
1178
	bool markOrderReturnRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1179
 
1180
	/**
1181
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED 
1182
	 to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1183
	*/
7645 anupam.sin 1184
	bool markOrderReturnRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4488 rajveer 1185
 
1186
	/**
2537 chandransh 1187
	Sends out an email to the account manager of the original courier provider used to ship the order.
4452 rajveer 1188
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
1189
	If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2537 chandransh 1190
	For any other status, it returns false.
1191
	Throws an exception if the order with the given id couldn't be found.
1192
	*/
4579 rajveer 1193
	bool requestPickupNumber(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
2537 chandransh 1194
 
1195
	/**
4452 rajveer 1196
	If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
2537 chandransh 1197
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1198
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1199
		3. Returns true
2589 chandransh 1200
	If the order is in any other status, it returns false.
2537 chandransh 1201
	Throws an exception if the order with the given id couldn't be found.
1202
	*/
4602 rajveer 1203
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber, 3:i64 providerId) throws (1:TransactionServiceException ex),
2589 chandransh 1204
 
1205
	/**
2765 chandransh 1206
	Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
4910 phani.kuma 1207
	*/
1208
	void markDoasAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1209
 
1210
	/**
2765 chandransh 1211
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1212
	*/
4910 phani.kuma 1213
	list<Order> getDoasNotPickedUp(1:i64 providerId),
2765 chandransh 1214
 
1215
	/**
4741 phani.kuma 1216
	Marks all RET_PICKUP_CONFIRMED orders of the previous day for a provider as RET_RETURN_IN_TRANSIT.
4910 phani.kuma 1217
	*/
1218
	void markReturnOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1219
 
1220
	/**
4741 phani.kuma 1221
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1222
	*/
4910 phani.kuma 1223
	list<Order> getReturnOrdersNotPickedUp(1:i64 providerId),
4741 phani.kuma 1224
 
1225
	/**
4452 rajveer 1226
	If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
4484 rajveer 1227
	If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2589 chandransh 1228
	If the order is in any other state, it returns false.
1229
	Throws an exception if the order with the given id couldn't be found.
1230
	*/
13276 manish.sha 1231
	bool receiveReturn(1:i64 orderId, 2:i64 receiveCondition, 3:bool receiveFreebie, 4:string serialNumbers) throws (1:TransactionServiceException ex),
2589 chandransh 1232
 
1233
	/**
4452 rajveer 1234
	Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
2614 chandransh 1235
	the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
2589 chandransh 1236
	If the order is in any other state, it returns false.
1237
	Throws an exception if the order with the given id couldn't be found.
1238
	*/
1239
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
2614 chandransh 1240
 
4495 rajveer 1241
	bool validateReturnProduct(1:i64 orderId, 2:bool isUsable) throws (1:TransactionServiceException ex),
1242
 
2614 chandransh 1243
	/**
4484 rajveer 1244
	If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1245
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
4484 rajveer 1246
		2. Marks the current order as one of the final states RTO_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
2614 chandransh 1247
 
1248
	If the order is in DOA_CERT_VALID state, it does the following:
1249
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
1250
		2. Creates a return order for the warehouse executive to return the DOA material.
4452 rajveer 1251
		3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2614 chandransh 1252
 
1253
	Returns the id of the newly created order.
1254
 
1255
	Throws an exception if the order with the given id couldn't be found.
1256
	*/
1257
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1258
 
1259
	/**
4484 rajveer 1260
	If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1261
		1. Creates a refund request for batch processing.
1262
		2. Creates a return order for the warehouse executive to return the shipped material.
4484 rajveer 1263
		3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2614 chandransh 1264
 
1265
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1266
		1. Creates a refund request for batch processing.
3226 chandransh 1267
		2. Cancels the reservation of the item in the warehouse.
1268
		3. Marks the current order as the REFUNDED final state.
2614 chandransh 1269
 
3226 chandransh 1270
	For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1271
		1. Cancels the reservation of the item in the warehouse.
1272
		2. Marks the current order as CANCELED.	
1273
 
1274
	In all cases, it updates the reason for cancellation or refund and the person who performed the action.
1275
 
2614 chandransh 1276
	Returns True if it is successful, False otherwise.
1277
 
1278
	Throws an exception if the order with the given id couldn't be found.
1279
	*/
3226 chandransh 1280
	bool refundOrder(1:i64 orderId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
2688 chandransh 1281
 
1282
	/**
1283
	Get all return orders created between the from and to dates for the given warehouse.
1284
	Ignores the warehouse if it is passed as -1.
1285
	*/
1286
	list<ReturnOrder> getReturnOrders(1:i64 warehouseId, 2:i64 fromDate, 3:i64 toDate),
1287
 
1288
	/**
5481 phani.kuma 1289
	Get all return orders created between the from and to dates.
1290
	*/
1291
	list<ReturnOrder> getAllReturnOrders(1:bool onlyNotProcessed, 2:i64 fromDate, 3:i64 toDate),
1292
 
1293
	/**
2700 chandransh 1294
	Returns the ReturnOrder corresponding to the given id.
1295
	Throws an exception if the return order with the given id couldn't be found.
1296
	*/
1297
	ReturnOrder getReturnOrder(1:i64 id) throws (1:TransactionServiceException ex),
1298
 
1299
	/**
2688 chandransh 1300
	Marks the return order with the given id as processed. Raises an exception if no such return order exists. 
1301
	*/
2819 chandransh 1302
	void processReturn(1:i64 returnOrderId) throws (1:TransactionServiceException ex),
1303
 
1304
	/**
3451 chandransh 1305
	Set the weight of the given order to the provided value. Will attempt to update the weight of the item in the catalog as well.
1306
	*/
3469 chandransh 1307
	Order updateWeight(1:i64 orderId, 2:double weight) throws (1:TransactionServiceException ex),
1308
 
1309
	/**
1310
	Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
1311
	Currently, it also ensures that only a different color of the given item is shipped.
1312
	*/
1313
	Order changeItem(1:i64 orderId, 2:i64 itemId) throws (1:TransactionServiceException ex),
1314
 
7560 rajveer 1315
	Order changeCourierProvider(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
1316
 
3469 chandransh 1317
	/**
1318
	Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
1319
	*/
3553 chandransh 1320
	Order shiftToWarehouse(1:i64 orderId, 2:i64 warehouseId) throws (1:TransactionServiceException ex),
1321
 
1322
	/**
1323
	Adds the given delay reason to the given order.
3986 chandransh 1324
	Increases the expected delivery time of the given order by the given no. of days.
3553 chandransh 1325
	Raises an exception if no order with the given id can be found.
1326
	*/
4647 rajveer 1327
	bool addDelayReason(1:i64 orderId, 2:DelayReason delayReason, 3:i64 furtherDelay, 4:string delayReasonText) throws (1:TransactionServiceException ex),
3956 chandransh 1328
 
1329
	/**
1330
	Marks the COD orders with given AWB nos. as having been processed.
1331
	Updates the captured amount for the corresponding payment.
1332
 
1333
	Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
1334
	1. There is no order corresponding to an AWB number.
1335
	2. The captured amount for a payment exceeds the total payment.
1336
	3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
1337
	*/
4008 mandeep.dh 1338
	map<string, string> reconcileCodCollection(1:map<string, double> collectedAmountMap, 2:string xferBy, 3:string xferTxnId, 4:i64 xferDate) throws (1:TransactionServiceException ex),
1339
 
1340
    /**
4065 mandeep.dh 1341
     * Returns the list of transaction ids that require some extra processing and
4008 mandeep.dh 1342
     * which belong to a particular category. This is currently used by CRM
4065 mandeep.dh 1343
     * application. If no such transaction ids are present, it returns an empty list.
4008 mandeep.dh 1344
     */
1345
    list<i64> getTransactionsRequiringExtraProcessing(1:ExtraTransactionProcessingType category),
1346
 
1347
	/**
1348
	 * Marks a particular transaction as processed for a particular cateogory.
4065 mandeep.dh 1349
	 * It essentially deletes the transaction id record for a particular
1350
	 * processing type category (if present) from DB.
1351
	 * This is currently used by CRM application.
4008 mandeep.dh 1352
	 */
4018 chandransh 1353
	void markTransactionAsProcessed(1:i64 transactionId, 2:ExtraTransactionProcessingType category),
1354
 
1355
	/**
1356
	Returns a map containing the number of risky orders keyed by item id. A risky order
1357
	is defined as one whose shipping date is about to expire.
1358
	*/
4245 rajveer 1359
	map<i64, i64> getItemWiseRiskyOrdersCount(),
1360
 
1361
	/**
4295 varun.gupt 1362
	Returns a list of all orders which have items with given id
1363
	*/
1364
	list<Order> getOrdersForItemIds(1:list<i64> itemIds),
1365
 
1366
	/**
4245 rajveer 1367
	 * Mark order as cancellation request received. If customer sends request of cancellation of 
1368
	 * a particular order, this method will be called. It will just change status of the order 
1369
	 * depending on its current status. It also records the previous status, so that we can move 
1370
	 * back to that status if cancellation request is denied.
1371
	 */
1372
	void markOrderCancellationRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1373
 
1374
	/**
1375
	 * If we decide to to cancel order, CRM will call this method to move the status of order to 
1376
	 * cancellation request confirmed. After this OM will be able to cancel the order. 	
1377
	 */
1378
	void markOrderCancellationRequestConfirmed(1:i64 orderId) throws (1:TransactionServiceException ex),
1379
 
1380
	/**
1381
	 * If we decide to not to cancel order, we will move the order ro previous status.	
1382
	 */
1383
	void markOrderCancellationRequestDenied(1:i64 orderId) throws (1:TransactionServiceException ex),
1384
 
1385
	/**
4258 rajveer 1386
	 * If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1387
	 * Changed transaction and all orders status to payment accepted.  
4245 rajveer 1388
	 */
4285 rajveer 1389
	void markTransactionAsPaymentFlagRemoved(1:i64 transactionId) throws (1:TransactionServiceException ex),
4245 rajveer 1390
 
4259 anupam.sin 1391
	/**
1392
	* This method is called when a flagged payment is deemed unserviceable and the corresponding orders
1393
	* need to be cancelled
1394
	*/
4285 rajveer 1395
	void refundTransaction(1:i64 transactionId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
4324 mandeep.dh 1396
 
1397
	/**
1398
	 * Updates shipment address of an order. Delivery and shipping date estimates
1399
	 * etc. are also updated here.
1400
	 *
1401
	 * Throws TransactionServiceException in case address change is not
1402
	 * possible due to certain reasons such as new pincode in address is
1403
	 * not serviceable etc.
1404
	 */
1405
	void updateShipmentAddress(1:i64 orderId, 2:i64 addressId) throws (1:TransactionServiceException ex)
4285 rajveer 1406
 
1407
	/**
1408
	Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
1409
	given order is not a COD order, it also captures the payment if the same has not been captured.
1410
	*/
4303 rajveer 1411
	bool acceptOrdersForItemId(1:i64 itemId, 2:i64 inventory) throws (1:TransactionServiceException ex),
4285 rajveer 1412
 
4369 rajveer 1413
	void markOrdersAsPORaised(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1414
	void markOrdersAsReversalInitiated(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1415
	void markOrdersAsNotAvailabke(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1416
 
4386 anupam.sin 1417
	map<i32, TimeoutSummary> markOrdersAsTimeout(1:i64 vendorId) throws (1:TransactionServiceException ex),
4661 rajveer 1418
 
4386 anupam.sin 1419
	/**
4661 rajveer 1420
	Mark order as LOST_IN_TRANSIT
1421
	*/
1422
	bool markOrderAsLostInTransit(1:i64 orderId) throws (1:TransactionServiceException ex),
1423
 
1424
	/**
4386 anupam.sin 1425
	Returns the order corresponding to an AWB number
1426
	*/
13276 manish.sha 1427
	list<Order> getOrderForAwb(1:string awb) throws (1:TransactionServiceException ex),
4506 phani.kuma 1428
 
1429
	/**
4910 phani.kuma 1430
	Returns the order corresponding to a logistics provider id for a given list of order status
4506 phani.kuma 1431
	*/
4910 phani.kuma 1432
	list<Order> getOrdersForProviderForStatus(1:i64 logistics_provider_id, 2:list<OrderStatus> order_status_list) throws (1:TransactionServiceException ex)
4600 varun.gupt 1433
 
1434
	/**
1435
	Returns list of orders fullfiled from a certain vendor and billed in a given date range
1436
	*/
1437
	list<Order> getBilledOrdersForVendor(1:i64 vendorId, 2:i64 billingDateFrom, 3:i64 billingDateTo) throws (1:TransactionServiceException ex),
1438
 
4607 rajveer 1439
	list<Order> getSlippedSippingDateOrders() throws (1:TransactionServiceException ex),
1440
 
4709 rajveer 1441
	list<Order> getCancelledOrders(1:i64 cancelDateFrom, 2:i64 cancelDateTo) throws (1:TransactionServiceException ex),
1442
 
4600 varun.gupt 1443
	void saveBluedartSettlements(1:map<i64, double> mapAWBAndAmount) throws (1:TransactionServiceException ex),
1444
 
4905 varun.gupt 1445
	void savePaymentSettlements(1:i64 settlementDate, 2:i64 paymentGatewayId, 3:i64 referenceId, 4:double serviceTax, 5:double otherCharges, 6:double netCollection) throws (1:TransactionServiceException ex),
4600 varun.gupt 1446
 
1447
	void saveEBSSettlementSummary(1:i64 settlementId, 2:i64 settlementDate, 3:i64 transactionDateFrom, 4:i64 transactionDateTo, 5:double amount) throws (1:TransactionServiceException ex),
1448
 
5386 phani.kuma 1449
	PaymentSettlement getSettlementForPrepaid(1:i64 referenceId, 2:bool isRefund) throws (1:TransactionServiceException ex),
4600 varun.gupt 1450
 
5386 phani.kuma 1451
	PaymentSettlement getSettlementForCod(1:i64 orderId, 2:bool isRefund) throws (1:TransactionServiceException ex),
1452
 
4600 varun.gupt 1453
	map<i64, string> getEBSSettlementSummaries() throws (1:TransactionServiceException ex),
1454
 
1455
	void markEBSSettlementUploaded(1:i64 settlementId) throws (1:TransactionServiceException ex),
1456
 
4715 varun.gupt 1457
	i64 getEBSSettlementDate(1:i64 settlementId) throws (1:TransactionServiceException ex),
1458
 
1459
	list<PaymentSettlement> getSettlementsByDate(1:i64 settlementDateFrom, 2:i64 settlementDateTo, 3:bool isRefund) throws (1:TransactionServiceException ex),
1460
 
1461
	/**
1462
	Returns list of Order Ids, which belong to reshiped orders, shortlisted from a given list of Order Ids 
1463
	*/
4875 varun.gupt 1464
	list<i64> getReshippedOrderIds(1:list<i64> orderIds) throws (1:TransactionServiceException ex),
1465
 
5481 phani.kuma 1466
	list<Order> getBilledOrders(1:i64 vendorId, 2:bool onlyVendorNotPaid, 3:i64 billingDateFrom, 4:i64 billingDateTo) throws (1:TransactionServiceException ex),
5031 varun.gupt 1467
 
5067 varun.gupt 1468
	map<i64, i64> getStatusDistributionOfOrders(1:i64 startDate, 2:i64 endDate) throws (1:TransactionServiceException ex),
1469
 
5099 varun.gupt 1470
	list<i64> getOrderIdsForStatus(1:i64 status, 2:i64 startDatetime, 3:i64 endDatetime) throws (1:TransactionServiceException ex),
1471
 
5348 anupam.sin 1472
	/**
1473
	 * Updates the agent who handled the COD verification call
1474
	 */
1475
	void updateCODAgent(1:string agent, 2:i64 orderId) throws (1:TransactionServiceException ex),
1476
 
5208 varun.gupt 1477
	void updateOrderAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1478
 
5386 phani.kuma 1479
	void updateOrderOnlyAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1480
 
5447 anupam.sin 1481
	list<Order> getRefundedOrdersMarkedPaid() throws (1:TransactionServiceException ex),
1482
 
1483
	/**
1484
	* gets all COD Verification Agents for all orderIds from a minId to maxId
1485
	*
1486
	*/
5527 anupam.sin 1487
	list<CODVerificationAgent> getAllVerificationAgents(1:i64 minOrderId, 2:i64 maxOrderId),
1488
 
1489
	/**
1490
	* gets all attributes for a given orderId
1491
	*/
1492
	list<Attribute> getAllAttributesForOrderId(1:i64 orderId),
1493
 
1494
	/**
5676 rajveer 1495
	* sets attributes for an order
1496
	*/
1497
	void setOrderAttributes(1:i64 orderId, list<Attribute> attributes),
1498
 
1499
	/**
5527 anupam.sin 1500
	* sets attributes for all orders in a transaction
1501
	*/
5553 rajveer 1502
	void setOrderAttributeForTransaction(1:i64 transactionId, Attribute attribute),
1503
 
1504
	list<Order> getReceivePendingOrders(1:i64 storeId),
1505
 
5593 mandeep.dh 1506
	list<Order> getReceivedAtStoreOrders(1:i64 storeId),
5713 rajveer 1507
 
1508
	list<Order> getOrdersCollectionAtStore(1:i64 storeId, 2:i64 fromDate, 3:i64 toDate, 4:bool onlyCod),
5593 mandeep.dh 1509
 
5833 rajveer 1510
	string getOrderAttributeValue(1:i64 orderId, string attributeName),
6019 rajveer 1511
 
1512
	bool changeJacketNumber(1:i64 orderId, 2:i64 jacketNumber),
1513
 
1514
	bool markOrderAsRtoInTransit(1:i64 orderId),
1515
 
5593 mandeep.dh 1516
	/**
1517
	 * Accepts appropriate order for an item in a given billingWarehouse. Usually
1518
	 * invoked while scanning IN of items.
1519
	 */
6000 mandeep.dh 1520
	 void acceptOrderForItem(1:i64 itemId, 2:i64 quantity, 3:i64 fulfilmentWarehouseId, 4:i64 billingWarehouseId);
1521
 
1522
	 RechargeOrder createRechargeOrder(1:RechargeOrder rechargeOrder) throws  (1:TransactionServiceException ex);
6031 rajveer 1523
	 RechargeOrder getRechargeOrder(1:i64 rechargeRrderId) throws  (1:TransactionServiceException ex);
1524
	 list<RechargeOrder> getRechargeOrders(1:i64 userId);
1525
 
1526
	 bool updateRechargeOrderStatus(1:i64 rechargeOrderId, 2:RechargeOrderStatus rechargeOrderStatus) throws  (1:TransactionServiceException ex);
1527
	 bool activateRechargeTxn(1:i64 rechargeOrderId) throws  (1:TransactionServiceException ex);
1528
	 UserWallet getUserWallet(1:i64 userId);
1529
	 list<UserWalletHistory> getUserWalletHistory(1:i64 userId);
6050 anupam.sin 1530
	 /**
1531
	 Returns a recharge order for a given transactionId
1532
	 */
1533
	 RechargeOrder getRechargeOrdersForTransaction(1:i64 txnId) throws (1:TransactionServiceException ex);
6206 rajveer 1534
	 map<i64, string> getServiceProviders(1:RechargeType rechargeType, 2:bool onlyActive);
6289 anupam.sin 1535
	 DeviceNumberInfo getServiceProviderForDevice(1:RechargeType rechargeType, 2:string deviceNumber);
6591 anupam.sin 1536
	 string validateRecharge(1:RechargeType rechargeType, 2:string deviceNumber, 3:i64 userSelectedProviderId, 4:string clientAddress);
6094 rajveer 1537
	 list<RechargeOrder> getRechargeOrdersForDevice(1:string deviceNumber);
1538
	 void addAmountToWallet(1:i64 userId, 2:i64 orderId, 3:i64 amount);
13941 amit.gupta 1539
	 void creditBatch(1:i64 batchId, 2:string userAmount);
6188 rajveer 1540
 
1541
	 RechargeStatistics getRechargeStatistics();
1542
 
6154 rajveer 1543
	 list<RechargeOrder> getRechargeOrdersForStatus(1:i64 status);
6159 rajveer 1544
	 list<RechargePlan> getPlansForOperator(1:i64 operatorId);
6289 anupam.sin 1545
 
1546
	 /**
1547
	 Returns denominations for a given operator and circle
1548
	 */
6307 anupam.sin 1549
	 list<RechargeDenomination> getRechargeDenominations(1:i64 operatorId, 2:string circleCode, 3:DenominationType denominationType) throws (1:TransactionServiceException ex);
6371 rajveer 1550
 
1551
	 void updateAvailabilityStatus(1:i64 operatorId, 2:i64 circleId, 3:bool isAvailable);
6389 rajveer 1552
 
1553
	 list<EmiScheme> getAvailableEmiSchemes();
1554
 
6412 rajveer 1555
	 map<i64, double> getMiscCharges(1:i64 transactionId);
6507 anupam.sin 1556
 
1557
	 bool refundRechargeOrder(1:i64 rechargeOrderId) throws (1:TransactionServiceException ex);
6821 amar.kumar 1558
 
6906 rajveer 1559
	 list<Order> getPhysicalOrders(1:i64 fromDate, 2:i64 toDate);
1560
 
1561
	 binary getDocument(1:i64 docType, 2:i64  docSource);
6985 anupam.sin 1562
 
1563
	 bool changeShippingAddress(1:i64 orderId, 2:string line1, 3:string line2, 4:string city, 5:string state, 6:string pin);
6988 rajveer 1564
 
7075 rajveer 1565
	 binary retrieveInvoice(1:i64 orderId, 2:i64 userId);
6988 rajveer 1566
 
7026 rajveer 1567
	 list<string> receiveUpdatesForRedExpress(1:string awbNumber);
7073 anupam.sin 1568
 
1569
	 RechargeTransaction createRechargeTransaction(1:RechargeTransaction thriftRechargeTransaction);
7080 anupam.sin 1570
 
7084 rajveer 1571
	 list<RechargeTransaction> getRechargeTransactions(1:i64 storeId);
7151 amit.gupta 1572
 
1573
	 list<RechargeTransaction> getRechargeTrans(1:i64 storeId, 2:i64 startDate, 3:i64 endDate, 4:RechargeOrderStatus status);
7084 rajveer 1574
 
7080 anupam.sin 1575
	 RechargeTransaction getRechargeTransaction(1:i64 rechargeId);
1576
 
1577
	 list<FRC> getFRCs(1:i64 circleId, 2:i64 operatorId);
7096 anupam.sin 1578
 
1579
	 HotspotStore getHotspotStore(1:i64 id, 2:string hotspotid);
1580
 
1581
	 TelecomCircle getTelecomCircle(1:i64 id, 2:string code);
7109 anupam.sin 1582
 
1583
	 binary retrieveHotspotRechargeInvoice(1:i64 rechargeId);
7169 anupam.sin 1584
 
7190 amar.kumar 1585
	 Order splitFreebieOrder(1:i64 orderId, 2:string splitReason, 3:i64 shippingDate);
1586
 
7172 anupam.sin 1587
	 list<RechargeTransaction> getRechargeTransactionsByNumber(1:string number, 2:i64 storeId);
7169 anupam.sin 1588
 
1589
	 bool updateHotspotStorePassword(1:i64 storeId, 2:string password);
7263 anupam.sin 1590
 
7285 rajveer 1591
	 i64 topupCompanyWallet(1:i64 companyId, 2:i64 amount);
1592
 
1593
	 i64 getWalletBalanceForCompany(1:i64 companyId);
7363 rajveer 1594
 
1595
	 i64 getSaholicRechargeBalance();
7285 rajveer 1596
 
7263 anupam.sin 1597
	 SourceDetail getSourceDetail(1:i64 source);
7267 anupam.sin 1598
 
1599
	 list<TelecomCircle> getAllCircles();
1600
 
1601
	 bool deleteFrcs(1:list<i64> frcIdsToDelete);
7311 kshitij.so 1602
 
1603
	 void addAmazonOrder(1:AmazonOrder amazonOrder);
1604
 
7322 vikram.rag 1605
	 bool updateAmazonOrderStatus(1:i64 orderId,2:string status);
7311 kshitij.so 1606
 
7686 vikram.rag 1607
	 list<Order> getAmazonOrdersShipped();
7311 kshitij.so 1608
 
1609
	 list<Order> getAmazonOrdersCancelled(1:i64 interval);
1610
 
7343 anupam.sin 1611
	 AmazonOrder getAmazonOrder(1:i64 orderId);
7322 vikram.rag 1612
 
7542 vikram.rag 1613
	 list<AmazonOrder> getAmazonOrderByAmazonOrderId(1:string amazonOrderId);
1614
 
7343 anupam.sin 1615
	 list<Order> getOrdersForStore(1:i64 id, 2:i64 storeId, 3:i64 startDate, 4:i64 endDate, 5:list<OrderStatus> statuses);
1616
 
7386 anupam.sin 1617
	 binary getStoreOrderAdvanceInvoice(1:i64 orderId, 2:i64 storeId);
7355 vikram.rag 1618
 
7370 anupam.sin 1619
	 bool addFrc(1:i64 circleId, 2:i64 operatorId, 3:i64 denomination, 4:i64 maxDiscount);
7371 anupam.sin 1620
 
1621
	 string addSeries(1:i64 circle, 2:i64 operatorId, 3:i64 series);
7386 anupam.sin 1622
 
1623
	 bool saveStoreOrderDetail(1:StoreOrderDetail storeOrderDetail);
1624
 
1625
	 StoreOrderDetail getStoreOrderDetail(1:i64 orderId, 2:i64 storeId);
1626
 
1627
	 list<string> getAllEdcBanks();
7393 anupam.sin 1628
 
1629
	 bool saveRefundAmountsForStoreOrder(1:i64 orderId, 2:i64 storeId, 3:double cashRefundAmount, 4:double cardRefundAmount);
7427 anupam.sin 1630
 
1631
	 list<StoreOrderCollection> getCollectionsForStore(1:i64 storeId, 2:i64 startDate, 3:i64 endDate);
7442 vikram.rag 1632
 
12614 amit.gupta 1633
	 list<AmazonOrdersToAcknowledge> getAmazonOrdersToAcknowledge(1:OrderSource source);
7442 vikram.rag 1634
 
7460 kshitij.so 1635
	 void changeAmazonOrderStatus(1:string amazonOrderCode,2:string status);
1636
 
7762 kshitij.so 1637
	 bool updateTimestampForAmazonOrder(1:map<i64, map<string,string>> amazonOrderDelivery);
7530 kshitij.so 1638
 
1639
	 bool updateSourceDetailTimestamp(1:i64 id , 2:i64 lastUpdatedOn);
7572 anupam.sin 1640
 
1641
	 list<Order> getOrdersByMobileNumber(1:string mobileNumber);
1642
 
7645 anupam.sin 1643
	 list<Order> getOrdersByAmazonOrderCode(1:string amazonId);
7730 anupam.sin 1644
 
1645
	 bool convertStoreToNormal(1:i64 orderId);
7822 amar.kumar 1646
 
1647
	 Order updateFreebieItem(1:i64 orderId, 2:i64 newFreebieItemId);
7939 manish.sha 1648
 
7967 anupam.sin 1649
	 list<HotspotServiceMatrix> getHotspotServiceMatrices();
1650
 
7939 manish.sha 1651
	 Order updateOrderAWB(1:i64 orderId, 2:string airwayBillNo);
8182 amar.kumar 1652
 
1653
	 list<Order> getOrdersByVendor(1:list<i64> vendors, 2:list<OrderStatus> statuses) throws (1:TransactionServiceException ex);
1654
 
1655
	 void createEbayOrder(1:EbayOrder ebayOrder);
1656
 
1657
	 EbayOrder getEbayOrderByOrderId(1:i64 orderId);
1658
 
1659
	 EbayOrder getEbayOrderBySalesRecNumber(1:i64 salesRecordNumber);
1660
 
8241 amar.kumar 1661
	 list<EbayOrder> getEbayOrder(1:i64 salesRecordNumber, 2:string listingId, 3:string paisapayId);
8182 amar.kumar 1662
 
1663
	 void updateEbayOrder(1:EbayOrder ebayOrder);
1664
 
1665
	 bool ebayOrderExists(1:i64 salesRecNumber, 2:string ebayListingId);
1666
 
1667
	 void updateOrderForEbay(1:Order order);
1668
 
1669
	 Order splitEbayOrder(1:i64 orderId, 2:i64 splitOrderQty, 3:i64 splitOrderItemId, 4:bool usePowerShip);
8282 kshitij.so 1670
 
1671
	 void addOrUpdateAmazonFbaSalesSnapshot(1:AmazonFbaSalesSnapshot amazonfbasalessnapshot);
1672
 
1673
	 list<AmazonFbaSalesSnapshot> getAmazonFbaSalesSnapshotForDays(1:i32 days);
1674
 
8488 amar.kumar 1675
     AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItem(1:i64 item_id);
1676
 
1677
     void createSnapdealOrder(1:SnapdealOrder snapdealOrder);
1678
 
11424 kshitij.so 1679
     list<SnapdealOrder> getSnapdealOrder(1:i64 orderId, 2:string referenceCode, 3:string subrderId)
8488 amar.kumar 1680
 
9630 vikram.rag 1681
     bool snapdealOrderExists(1:string subOrderId, 2:string referenceCode);
8488 amar.kumar 1682
 
8532 vikram.rag 1683
     void updateLatestFbaPricesForItem(1:FbaItemPrices fbaitemprices)
1684
 
8961 vikram.rag 1685
     bool flipkartOrderExists(1:string flipkartOrderId, 2:string flipkartSubOrderId)
1686
 
1687
     void createFlipkartOrder(1:FlipkartOrder flipkartOrder)
1688
 
9107 vikram.rag 1689
     FlipkartOrder getFlipkartOrder(1:i64 orderId)
8990 vikram.rag 1690
 
9159 amar.kumar 1691
     FlipkartOrder getFlipkartOrderByOrderItemId(1:string flipkartOrderItemId)
1692
 
9107 vikram.rag 1693
     void updateFlipkartOrderDatesAndAWB(1:string flipkartOrderId,2:string flipkartSubOrderId,3:i64 date,4:string awb)
9404 vikram.rag 1694
 
9571 vikram.rag 1695
     map<i64,i64> getOrdersCreatedAfterTimestampForSource(1:i64 timestamp,2:i64 source)
9404 vikram.rag 1696
 
13276 manish.sha 1697
     list<Order> getOrderForAirwayBillNo(1:string airwaybillNo) throws (1:TransactionServiceException ex)
9651 manish.sha 1698
 
1699
	 i64 getMinCreatedTimeStampUndeliveredOrdersForSource(1:i32 source)
1700
 
9880 manish.sha 1701
	 void updateSnapdealOrdersStatus(1:map<string, list<list<string>>> orders)  throws (1:TransactionServiceException ex)
9651 manish.sha 1702
 
1703
	 void updateFlipkartOrdersStatus(1:list<list<string>> delivered_orders)  throws (1:TransactionServiceException ex)
9801 manish.sha 1704
 
1705
	 void bulkAddOrUpdateAmazonFbaSalesSnapshot(1:list<AmazonFbaSalesSnapshot> amazonfbasalessnapshotlist)
9945 vikram.rag 1706
 
1707
	 map<i64,i64> getCreatedOrdersForFlipkart(list<string> flipkartorderids)
1708
 
11896 amit.gupta 1709
	 bool isPrivateDealTransaction(1:i64 transactionId)
1710
 
12396 kshitij.so 1711
	 AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItemLocationWise(1:i64 item_id,2:i64 location);
1712
 
12103 manish.sha 1713
	 bool changeEasyshipMfnOrderTxnStatus(1:i64 transactionId, 2:TransactionStatus status, 3:string description, 4:i64 pickUp, 5:OrderType orderType, 6:OrderSource source, 7:i64 shipTimestamp, 8:i64 deliveryTimeStamp) throws (1:TransactionServiceException ex)
1714
 
1715
	 void updateAmazonFbaOrdersReturns(1:list<AmazonFbaOrderReturns> fbaOrderReturns) throws (1:TransactionServiceException ex)
1716
 
1717
	 list<AmazonFbaOrderReturns> getAllAmazonFbaOrderReturnsByCurrentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1718
 
1719
	 map<i64, map<string, i64>> getTotalSaleReturnsFbaSkusCurentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1720
 
12589 manish.sha 1721
	 list<FlipkartOrder> getVerificationPendingOrdersFK() throws (1:TransactionServiceException ex)
1722
 
12772 manish.sha 1723
	 FlipkartAdvantageOrder getFAOrderByFkOrderId(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12589 manish.sha 1724
 
12772 manish.sha 1725
	 list<FlipkartAdvantageOrder> getAllFAOrdersList(1:string status) throws (1:TransactionServiceException ex)
12589 manish.sha 1726
 
12653 manish.sha 1727
	 void addUpdateFaOrdersBulk(1:list<FlipkartAdvantageOrder> faOrdersList) throws (1:TransactionServiceException ex)
1728
 
1729
	 void addInvoiceDetailsToOrders(1:i64 transactionId, 2:i64 customerId) throws (1:TransactionServiceException ex)
12772 manish.sha 1730
 
12980 kshitij.so 1731
	 bool flipkartFaOrderExists(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12979 kshitij.so 1732
 
1733
	 RechargeOrder getRcgOrderStatus(1:i64 rechargeOrderId,2:bool isFinal)
1734
 
1735
	 RechargeTransaction getRcgTransactionStatus(1:i64 rechargeTransactionId,2:bool isFinal)
13148 manish.sha 1736
 
1737
	 void bulkAddOrUpdateFlipkartFaSalesSnapshot(1:list<FlipkartFaSalesSnapshot> flipkartfasalessnapshotlist)
1738
 
1739
	 list<FlipkartFaSalesSnapshot> getFlipkartFaSalesSnapshotForDays(1:i32 days)
1740
 
1741
	 FlipkartFaSalesSnapshot getFlipkartFaSalesSnapshotBySkuAndSaleDate(1:i64 item_id, 2:i64 dateOfSale)
1742
 
1743
	 bool acceptPackageOrders(list<i64> orders) throws (1:TransactionServiceException ex)
1744
 
1745
	 list<Order> getGroupOrdersByLogisticsTxnId(1:string logisticsTxnId) throws (1:TransactionServiceException ex)
1746
 
13276 manish.sha 1747
	 bool addBillingDetailsForGrouppedOrders(1:list<i64> order_ids, 2:string invoice_number, 3:map<i64,list<string>> itemNumbersMap, 4:map<i64,list<string>> serialNumbersMap, 5:map<i64,list<i64>> freebieWarehouseIdMap, 6:string billed_by, 7:i64 jacketNumber, 8:i64 billingType, 9:bool authorize, 10:string invoiceType) throws (1:TransactionServiceException ex)
1748
 
1749
	 string getInvoiceFormatLogisticsTxnId(1:i64 transactionId, 2:i64 shipementSeq) throws (1:TransactionServiceException ex)
13691 manish.sha 1750
 
1751
	 void createHomeShopOrder(1:HsOrder snapdealOrder);
1752
 
1753
     list<HsOrder> getHomeShopOrder(1:i64 orderId, 2:string hsOrderNo, 3:string hsSubOrderNo);
1754
 
1755
     bool homeShopOrderExists(1:string hsOrderNo, 2:string hsSubOrderNo);
17470 manish.sha 1756
 
1757
     Order splitBulkOrder(1:i64 orderId, 2:i64 splitOrderQty);
18041 manish.sha 1758
 
1759
     string moveOrdersToCorrectWarehouse();
12103 manish.sha 1760
}