Subversion Repositories SmartDukaan

Rev

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