Subversion Repositories SmartDukaan

Rev

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