Subversion Repositories SmartDukaan

Rev

Rev 13584 | Rev 13734 | 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,
903
	11:i64 slaDays
904
}
905
 
3374 rajveer 906
service TransactionService extends GenericService.GenericService{
483 rajveer 907
 
908
	i64 createTransaction(1:Transaction transaction) throws (1:TransactionServiceException ex),
909
 
910
	//	Get transaction methods.
911
	Transaction getTransaction(1:i64 id) throws (1:TransactionServiceException ex),
912
	list<Transaction> getTransactionsForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:TransactionStatus status) throws (1:TransactionServiceException ex),
913
	list<Transaction> getTransactionsForShoppingCartId(1:i64 shoppingCartId) throws (1:TransactionServiceException ex),
914
	TransactionStatus getTransactionStatus(1:i64 transactionId) throws (1:TransactionServiceException ex),
7293 anupam.sin 915
	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 916
 
1398 varun.gupt 917
	bool enqueueTransactionInfoEmail(1:i64 transactionId) throws (1:TransactionServiceException ex),
1382 varun.gupt 918
 
4801 anupam.sin 919
	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 920
 
1115 chandransh 921
	/**
4133 chandransh 922
	Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
923
	Pass the status as null and the limit as 0 to ignore them.
924
	*/
8303 amar.kumar 925
	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 926
 
927
	/**
928
	Returns the count of orders with the given statuses assigned to the given warehouse.
929
	*/
8303 amar.kumar 930
	i32 getOrderCount(1:list<OrderStatus> statuses, 2:i64 warehouseId, 3:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 931
 
932
	/**
1115 chandransh 933
	Returns orders within a range of their billing dates
934
	*/
1000 varun.gupt 935
	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 936
 
1382 varun.gupt 937
	/**
3427 chandransh 938
	Returns orders for a particular provider and warehouse which were shipped between the given dates.
3451 chandransh 939
	Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise. 
940
	Pass providerId and warehouseId as -1 to ignore both these parameters.
3427 chandransh 941
	*/
3451 chandransh 942
	list<Order> getOrdersByShippingDate(1:i64 fromShippingDate, 2:i64 toShippingDate, 3:i64 providerId, 4:i64 warehouseId, 5:bool cod) throws (1:TransactionServiceException ex),
3427 chandransh 943
 
944
	/**
1382 varun.gupt 945
	Returns order ids for orders which can be returned
946
	*/
947
	list<i64> getReturnableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
948
 
949
	/**
950
	Returns order ids for orders which can be cancelled
951
	*/
952
	list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
953
 
483 rajveer 954
	bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
1147 chandransh 955
 
956
	/**
1529 ankur.sing 957
	Returns list of orders for given transaction Id. Also filters based on customer Id so that
958
	only user who owns the transaction can view its order details.
959
	*/
960
	list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId)  throws (1:TransactionServiceException ex),
3014 chandransh 961
 
962
	/**
963
	Returns list of orders for the given customer created between the given dates and having the given statuses.
964
	Pass and empty list to ignore filtering on statuses.
965
	*/	
966
	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 967
 
483 rajveer 968
	i64 createOrder(1:Order order) throws (1:TransactionServiceException ex),
969
	Order getOrder(1:i64 id) throws (1:TransactionServiceException ex),
970
	list<LineItem> getLineItemsForOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
971
 
4999 phani.kuma 972
	list<Order> getOrderList(1:list<i64> order_ids),
1529 ankur.sing 973
 
5386 phani.kuma 974
	list<Order> getOrderListForVendor(1:list<i64> order_ids, 2:i64 vendorId),
975
 
757 chandransh 976
	/**
1529 ankur.sing 977
	Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
978
	Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
979
	*/
980
	Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
981
 
3060 chandransh 982
	//Alerts apis 
4444 rajveer 983
	list<Alert> getAlerts(1:i64 type, 2:i64 warehouseId, 3:i64 status, 4:i64 timestamp),
984
	void addAlert(1:i64 type, 2:i64 warehouseId, 3:string description),
985
	void markAlertsAsSeen(1:i64 warehouseId),
3060 chandransh 986
 
1529 ankur.sing 987
	/**
3060 chandransh 988
	Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
989
	*/
990
	i64 getValidOrderCount(),
991
 
992
	/**
993
	Returns the number of distinct customers who have done successful transactions
994
	*/
995
	i64 getNoOfCustomersWithSuccessfulTransaction(),
996
 
997
	/**
998
	Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
999
	List contains two values, first minimum amount and second maximum amount.	
1000
	*/
1001
	list<double> getValidOrdersAmountRange(),
1002
 
1003
	/**
1004
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
1005
	If limit is passed as 0, then all valid Orders are returned. 
1006
	*/
5874 rajveer 1007
	list<Order> getValidOrders(1:i64 limit, 2:bool onlyStore),
3060 chandransh 1008
 
1009
	/**
1010
	Create a batch of all the pending orders for the given warehouse.
1011
	The returned list is orderd by created_timestamp.
1012
	If there are no pending orders, an empty list is returned.
1013
	*/
1223 chandransh 1014
	list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
1015
 
1016
	/**
1017
	Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found. 
1244 chandransh 1018
	*/
1210 chandransh 1019
	bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
1020
 
1021
	/**
3060 chandransh 1022
	Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
1023
	timestamp. It is intended to be used for COD orders but can be harmlessly 
1024
	used for all other orders as well.
1025
	Throws an exception if no such order exists.
757 chandransh 1026
	*/
3060 chandransh 1027
	bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1115 chandransh 1028
 
1029
	/**
3060 chandransh 1030
	Marks the given order as ACCEPTED and updates the accepted timestamp. If the
1031
	given order is not a COD order, it also captures the payment if the same has
1032
	not been captured.
1033
	Throws an exception if no such order exists.
1034
	*/
1035
	bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1036
 
1037
	/**
1038
	Add billing details such as the bill number and the biller to the Order.
4658 mandeep.dh 1039
	Adds jacket number, item number and Serial no. to the order. Doesn't update
3060 chandransh 1040
	the IMEI no. if a -1 is supplied.
1041
	Also, it generates an invoice number for the order, marks the order as
1042
	BILLED and sets the billing timestamp.
1043
	Returns false if it doesn't find the order with the given ID.
1044
	*/
7190 amar.kumar 1045
	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 1046
 
1047
	/**
1048
	Add the invoice number to the order.
1049
	*/	
6747 amar.kumar 1050
	void addInvoiceNumber(1:i64 orderId, 2:string invoiceNumber, 3:string color, 4:string serialNumber, 5:string itemNumber) throws (1:TransactionServiceException ex),
4910 phani.kuma 1051
 
3060 chandransh 1052
	/**
1053
	Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
4410 rajveer 1054
	given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
1055
	*/
4788 rajveer 1056
	bool markOrdersAsShippedFromWarehouse(1:i64 warehouseId, 2:i64 providerId, 3:bool cod, 4:list<i64> orderIds) throws (1:TransactionServiceException ex),
5676 rajveer 1057
 
5713 rajveer 1058
	bool markOrdersAsReturnedFromStore(1:i64 providerId, 2:list<i64> orderIds, 3:list<string> awbs) throws (1:TransactionServiceException ex),
4410 rajveer 1059
 
1060
	/**
1115 chandransh 1061
	Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
4910 phani.kuma 1062
	Raises an exception if we encounter report for an AWB number that we did not ship.	
1063
	*/
1064
	void markOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails) throws (1:TransactionServiceException ex),
1065
 
1066
	/**
1115 chandransh 1067
	Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
1068
	*/
4910 phani.kuma 1069
	list<Order> getOrdersNotPickedUp(1:i64 providerId),
1134 chandransh 1070
 
1071
	/**
1072
	Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
1073
	the name of the receiver.
1074
	Raises an exception if we encounter report for an AWB number that we did not ship.
1075
	*/
1076
	void markOrdersAsDelivered(1:i64 providerId, 2:map<string, string> deliveredOrders) throws (1:TransactionServiceException ex),
1077
 
1078
	/**
4910 phani.kuma 1079
	Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
1134 chandransh 1080
	Raises an exception if we encounter report for an AWB number that we did not ship.
1081
	*/
4910 phani.kuma 1082
	void markAsRTOrders(1:i64 providerId, 2:map<string, string> returnedOrders) throws (1:TransactionServiceException ex),
1134 chandransh 1083
 
1244 chandransh 1084
	/**
4910 phani.kuma 1085
	Returns a list of orders that were returned by courier.
1086
	*/
1087
	list<Order> getRTOrders(1:i64 providerId),
1088
 
1089
	/**
1244 chandransh 1090
	Update the status description of orders whose AWB numbers are keys of the Map.
4910 phani.kuma 1091
	*/
1092
	void updateNonDeliveryReason(1:i64 providerId, 2:map<string, string> undeliveredOrders) throws (1:TransactionServiceException ex),
1093
 
1094
	/**
4581 phani.kuma 1095
	Returns a list of orders that were picked up or shipped four days ago but did not get delivered.
1244 chandransh 1096
	*/
4910 phani.kuma 1097
	list<Order> getNonDeliveredOrdersbyCourier(1:i64 providerId),
1244 chandransh 1098
 
1407 ankur.sing 1099
	/**
4910 phani.kuma 1100
	Mark all orders with AWBs in the given map as local connected. Also sets the local connected timestamp.
1101
	*/
1102
	void markOrdersAsLocalConnected(1:i64 providerId, 2:map<string, string> local_connected_orders) throws (1:TransactionServiceException ex),
1103
 
1104
	/**
1105
	Returns a list of orders that were picked up or shipped but pending local connection.
1106
	*/
1107
	list<Order> getOrdersNotLocalConnected(1:i64 providerId),
1108
 
1109
	/**
1110
	Mark all orders with AWBs in the given map as reached destination city. Also sets the reached destination timestamp.
1111
	*/
1112
	void markOrdersAsDestinationCityReached(1:i64 providerId, 2:map<string, string> destination_city_reached_orders) throws (1:TransactionServiceException ex),
1113
 
1114
	/**
1115
	Mark all orders with AWBs in the given map as first delivery attempt made. Also sets the first delivery attempted timestamp.
1116
	*/
1117
	void markOrdersAsFirstDeliveryAttempted(1:i64 providerId, 2:map<string, string> first_atdl_orders) throws (1:TransactionServiceException ex),
1118
 
1119
	/**
1407 ankur.sing 1120
	Returns the list of orders whose delivery time has passed but have not been
1121
	delivered yet for the given provider and warehouse. To get a complete list of
1122
	undelivered orders, pass them as -1. 
1123
	Returns an empty list if no such orders exist.
1124
	*/
1125
	list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
1126
 
1599 ankur.sing 1127
	/**
4783 phani.kuma 1128
	Returns the list of orders whose expected delivery date has passed but have not been
1129
	delivered yet.
1130
	Returns an empty list if no such orders exist.
1131
	*/
1132
	list<Order> getUndeliveredOrdersExpectedDeliveryDateNotMet(),
1133
 
1134
	/**
2537 chandransh 1135
	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.
1136
	Returns the final flag status.
1137
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
1138
	*/
1139
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
1140
 
4712 rajveer 1141
	void markOrderAsDelivered(1:i64 orderId, 2:i64 deliveryTimestamp, string receiver) throws (1:TransactionServiceException ex),
1142
 
5553 rajveer 1143
	void markOrderAsReceivedAtStore(1:i64 orderId, 2:i64 deliveryTimestamp) throws (1:TransactionServiceException ex),
1144
 
2537 chandransh 1145
	/**
4454 rajveer 1146
	 Once user raise the request for a DOA, order status will be changed from DELVIERY_SUCCESS to DOA_REQUEST_RECEIVED 
1147
	*/
1148
	bool markOrderDoaRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1149
 
1150
	/**
1151
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from DOA_REQUEST_RECEIVED 
1152
	 to DOA_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1153
	*/
7645 anupam.sin 1154
	bool markOrderDoaRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4454 rajveer 1155
 
1156
	/**
4488 rajveer 1157
	 Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED 
1158
	*/
1159
	bool markOrderReturnRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1160
 
1161
	/**
1162
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED 
1163
	 to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1164
	*/
7645 anupam.sin 1165
	bool markOrderReturnRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4488 rajveer 1166
 
1167
	/**
2537 chandransh 1168
	Sends out an email to the account manager of the original courier provider used to ship the order.
4452 rajveer 1169
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
1170
	If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2537 chandransh 1171
	For any other status, it returns false.
1172
	Throws an exception if the order with the given id couldn't be found.
1173
	*/
4579 rajveer 1174
	bool requestPickupNumber(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
2537 chandransh 1175
 
1176
	/**
4452 rajveer 1177
	If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
2537 chandransh 1178
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1179
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1180
		3. Returns true
2589 chandransh 1181
	If the order is in any other status, it returns false.
2537 chandransh 1182
	Throws an exception if the order with the given id couldn't be found.
1183
	*/
4602 rajveer 1184
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber, 3:i64 providerId) throws (1:TransactionServiceException ex),
2589 chandransh 1185
 
1186
	/**
2765 chandransh 1187
	Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
4910 phani.kuma 1188
	*/
1189
	void markDoasAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1190
 
1191
	/**
2765 chandransh 1192
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1193
	*/
4910 phani.kuma 1194
	list<Order> getDoasNotPickedUp(1:i64 providerId),
2765 chandransh 1195
 
1196
	/**
4741 phani.kuma 1197
	Marks all RET_PICKUP_CONFIRMED orders of the previous day for a provider as RET_RETURN_IN_TRANSIT.
4910 phani.kuma 1198
	*/
1199
	void markReturnOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1200
 
1201
	/**
4741 phani.kuma 1202
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1203
	*/
4910 phani.kuma 1204
	list<Order> getReturnOrdersNotPickedUp(1:i64 providerId),
4741 phani.kuma 1205
 
1206
	/**
4452 rajveer 1207
	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 1208
	If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2589 chandransh 1209
	If the order is in any other state, it returns false.
1210
	Throws an exception if the order with the given id couldn't be found.
1211
	*/
13276 manish.sha 1212
	bool receiveReturn(1:i64 orderId, 2:i64 receiveCondition, 3:bool receiveFreebie, 4:string serialNumbers) throws (1:TransactionServiceException ex),
2589 chandransh 1213
 
1214
	/**
4452 rajveer 1215
	Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
2614 chandransh 1216
	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 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
	*/
1220
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
2614 chandransh 1221
 
4495 rajveer 1222
	bool validateReturnProduct(1:i64 orderId, 2:bool isUsable) throws (1:TransactionServiceException ex),
1223
 
2614 chandransh 1224
	/**
4484 rajveer 1225
	If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1226
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
4484 rajveer 1227
		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 1228
 
1229
	If the order is in DOA_CERT_VALID state, it does the following:
1230
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
1231
		2. Creates a return order for the warehouse executive to return the DOA material.
4452 rajveer 1232
		3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2614 chandransh 1233
 
1234
	Returns the id of the newly created order.
1235
 
1236
	Throws an exception if the order with the given id couldn't be found.
1237
	*/
1238
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1239
 
1240
	/**
4484 rajveer 1241
	If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1242
		1. Creates a refund request for batch processing.
1243
		2. Creates a return order for the warehouse executive to return the shipped material.
4484 rajveer 1244
		3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2614 chandransh 1245
 
1246
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1247
		1. Creates a refund request for batch processing.
3226 chandransh 1248
		2. Cancels the reservation of the item in the warehouse.
1249
		3. Marks the current order as the REFUNDED final state.
2614 chandransh 1250
 
3226 chandransh 1251
	For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1252
		1. Cancels the reservation of the item in the warehouse.
1253
		2. Marks the current order as CANCELED.	
1254
 
1255
	In all cases, it updates the reason for cancellation or refund and the person who performed the action.
1256
 
2614 chandransh 1257
	Returns True if it is successful, False otherwise.
1258
 
1259
	Throws an exception if the order with the given id couldn't be found.
1260
	*/
3226 chandransh 1261
	bool refundOrder(1:i64 orderId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
2688 chandransh 1262
 
1263
	/**
1264
	Get all return orders created between the from and to dates for the given warehouse.
1265
	Ignores the warehouse if it is passed as -1.
1266
	*/
1267
	list<ReturnOrder> getReturnOrders(1:i64 warehouseId, 2:i64 fromDate, 3:i64 toDate),
1268
 
1269
	/**
5481 phani.kuma 1270
	Get all return orders created between the from and to dates.
1271
	*/
1272
	list<ReturnOrder> getAllReturnOrders(1:bool onlyNotProcessed, 2:i64 fromDate, 3:i64 toDate),
1273
 
1274
	/**
2700 chandransh 1275
	Returns the ReturnOrder corresponding to the given id.
1276
	Throws an exception if the return order with the given id couldn't be found.
1277
	*/
1278
	ReturnOrder getReturnOrder(1:i64 id) throws (1:TransactionServiceException ex),
1279
 
1280
	/**
2688 chandransh 1281
	Marks the return order with the given id as processed. Raises an exception if no such return order exists. 
1282
	*/
2819 chandransh 1283
	void processReturn(1:i64 returnOrderId) throws (1:TransactionServiceException ex),
1284
 
1285
	/**
3451 chandransh 1286
	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.
1287
	*/
3469 chandransh 1288
	Order updateWeight(1:i64 orderId, 2:double weight) throws (1:TransactionServiceException ex),
1289
 
1290
	/**
1291
	Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
1292
	Currently, it also ensures that only a different color of the given item is shipped.
1293
	*/
1294
	Order changeItem(1:i64 orderId, 2:i64 itemId) throws (1:TransactionServiceException ex),
1295
 
7560 rajveer 1296
	Order changeCourierProvider(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
1297
 
3469 chandransh 1298
	/**
1299
	Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
1300
	*/
3553 chandransh 1301
	Order shiftToWarehouse(1:i64 orderId, 2:i64 warehouseId) throws (1:TransactionServiceException ex),
1302
 
1303
	/**
1304
	Adds the given delay reason to the given order.
3986 chandransh 1305
	Increases the expected delivery time of the given order by the given no. of days.
3553 chandransh 1306
	Raises an exception if no order with the given id can be found.
1307
	*/
4647 rajveer 1308
	bool addDelayReason(1:i64 orderId, 2:DelayReason delayReason, 3:i64 furtherDelay, 4:string delayReasonText) throws (1:TransactionServiceException ex),
3956 chandransh 1309
 
1310
	/**
1311
	Marks the COD orders with given AWB nos. as having been processed.
1312
	Updates the captured amount for the corresponding payment.
1313
 
1314
	Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
1315
	1. There is no order corresponding to an AWB number.
1316
	2. The captured amount for a payment exceeds the total payment.
1317
	3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
1318
	*/
4008 mandeep.dh 1319
	map<string, string> reconcileCodCollection(1:map<string, double> collectedAmountMap, 2:string xferBy, 3:string xferTxnId, 4:i64 xferDate) throws (1:TransactionServiceException ex),
1320
 
1321
    /**
4065 mandeep.dh 1322
     * Returns the list of transaction ids that require some extra processing and
4008 mandeep.dh 1323
     * which belong to a particular category. This is currently used by CRM
4065 mandeep.dh 1324
     * application. If no such transaction ids are present, it returns an empty list.
4008 mandeep.dh 1325
     */
1326
    list<i64> getTransactionsRequiringExtraProcessing(1:ExtraTransactionProcessingType category),
1327
 
1328
	/**
1329
	 * Marks a particular transaction as processed for a particular cateogory.
4065 mandeep.dh 1330
	 * It essentially deletes the transaction id record for a particular
1331
	 * processing type category (if present) from DB.
1332
	 * This is currently used by CRM application.
4008 mandeep.dh 1333
	 */
4018 chandransh 1334
	void markTransactionAsProcessed(1:i64 transactionId, 2:ExtraTransactionProcessingType category),
1335
 
1336
	/**
1337
	Returns a map containing the number of risky orders keyed by item id. A risky order
1338
	is defined as one whose shipping date is about to expire.
1339
	*/
4245 rajveer 1340
	map<i64, i64> getItemWiseRiskyOrdersCount(),
1341
 
1342
	/**
4295 varun.gupt 1343
	Returns a list of all orders which have items with given id
1344
	*/
1345
	list<Order> getOrdersForItemIds(1:list<i64> itemIds),
1346
 
1347
	/**
4245 rajveer 1348
	 * Mark order as cancellation request received. If customer sends request of cancellation of 
1349
	 * a particular order, this method will be called. It will just change status of the order 
1350
	 * depending on its current status. It also records the previous status, so that we can move 
1351
	 * back to that status if cancellation request is denied.
1352
	 */
1353
	void markOrderCancellationRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1354
 
1355
	/**
1356
	 * If we decide to to cancel order, CRM will call this method to move the status of order to 
1357
	 * cancellation request confirmed. After this OM will be able to cancel the order. 	
1358
	 */
1359
	void markOrderCancellationRequestConfirmed(1:i64 orderId) throws (1:TransactionServiceException ex),
1360
 
1361
	/**
1362
	 * If we decide to not to cancel order, we will move the order ro previous status.	
1363
	 */
1364
	void markOrderCancellationRequestDenied(1:i64 orderId) throws (1:TransactionServiceException ex),
1365
 
1366
	/**
4258 rajveer 1367
	 * If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1368
	 * Changed transaction and all orders status to payment accepted.  
4245 rajveer 1369
	 */
4285 rajveer 1370
	void markTransactionAsPaymentFlagRemoved(1:i64 transactionId) throws (1:TransactionServiceException ex),
4245 rajveer 1371
 
4259 anupam.sin 1372
	/**
1373
	* This method is called when a flagged payment is deemed unserviceable and the corresponding orders
1374
	* need to be cancelled
1375
	*/
4285 rajveer 1376
	void refundTransaction(1:i64 transactionId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
4324 mandeep.dh 1377
 
1378
	/**
1379
	 * Updates shipment address of an order. Delivery and shipping date estimates
1380
	 * etc. are also updated here.
1381
	 *
1382
	 * Throws TransactionServiceException in case address change is not
1383
	 * possible due to certain reasons such as new pincode in address is
1384
	 * not serviceable etc.
1385
	 */
1386
	void updateShipmentAddress(1:i64 orderId, 2:i64 addressId) throws (1:TransactionServiceException ex)
4285 rajveer 1387
 
1388
	/**
1389
	Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
1390
	given order is not a COD order, it also captures the payment if the same has not been captured.
1391
	*/
4303 rajveer 1392
	bool acceptOrdersForItemId(1:i64 itemId, 2:i64 inventory) throws (1:TransactionServiceException ex),
4285 rajveer 1393
 
4369 rajveer 1394
	void markOrdersAsPORaised(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1395
	void markOrdersAsReversalInitiated(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1396
	void markOrdersAsNotAvailabke(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1397
 
4386 anupam.sin 1398
	map<i32, TimeoutSummary> markOrdersAsTimeout(1:i64 vendorId) throws (1:TransactionServiceException ex),
4661 rajveer 1399
 
4386 anupam.sin 1400
	/**
4661 rajveer 1401
	Mark order as LOST_IN_TRANSIT
1402
	*/
1403
	bool markOrderAsLostInTransit(1:i64 orderId) throws (1:TransactionServiceException ex),
1404
 
1405
	/**
4386 anupam.sin 1406
	Returns the order corresponding to an AWB number
1407
	*/
13276 manish.sha 1408
	list<Order> getOrderForAwb(1:string awb) throws (1:TransactionServiceException ex),
4506 phani.kuma 1409
 
1410
	/**
4910 phani.kuma 1411
	Returns the order corresponding to a logistics provider id for a given list of order status
4506 phani.kuma 1412
	*/
4910 phani.kuma 1413
	list<Order> getOrdersForProviderForStatus(1:i64 logistics_provider_id, 2:list<OrderStatus> order_status_list) throws (1:TransactionServiceException ex)
4600 varun.gupt 1414
 
1415
	/**
1416
	Returns list of orders fullfiled from a certain vendor and billed in a given date range
1417
	*/
1418
	list<Order> getBilledOrdersForVendor(1:i64 vendorId, 2:i64 billingDateFrom, 3:i64 billingDateTo) throws (1:TransactionServiceException ex),
1419
 
4607 rajveer 1420
	list<Order> getSlippedSippingDateOrders() throws (1:TransactionServiceException ex),
1421
 
4709 rajveer 1422
	list<Order> getCancelledOrders(1:i64 cancelDateFrom, 2:i64 cancelDateTo) throws (1:TransactionServiceException ex),
1423
 
4600 varun.gupt 1424
	void saveBluedartSettlements(1:map<i64, double> mapAWBAndAmount) throws (1:TransactionServiceException ex),
1425
 
4905 varun.gupt 1426
	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 1427
 
1428
	void saveEBSSettlementSummary(1:i64 settlementId, 2:i64 settlementDate, 3:i64 transactionDateFrom, 4:i64 transactionDateTo, 5:double amount) throws (1:TransactionServiceException ex),
1429
 
5386 phani.kuma 1430
	PaymentSettlement getSettlementForPrepaid(1:i64 referenceId, 2:bool isRefund) throws (1:TransactionServiceException ex),
4600 varun.gupt 1431
 
5386 phani.kuma 1432
	PaymentSettlement getSettlementForCod(1:i64 orderId, 2:bool isRefund) throws (1:TransactionServiceException ex),
1433
 
4600 varun.gupt 1434
	map<i64, string> getEBSSettlementSummaries() throws (1:TransactionServiceException ex),
1435
 
1436
	void markEBSSettlementUploaded(1:i64 settlementId) throws (1:TransactionServiceException ex),
1437
 
4715 varun.gupt 1438
	i64 getEBSSettlementDate(1:i64 settlementId) throws (1:TransactionServiceException ex),
1439
 
1440
	list<PaymentSettlement> getSettlementsByDate(1:i64 settlementDateFrom, 2:i64 settlementDateTo, 3:bool isRefund) throws (1:TransactionServiceException ex),
1441
 
1442
	/**
1443
	Returns list of Order Ids, which belong to reshiped orders, shortlisted from a given list of Order Ids 
1444
	*/
4875 varun.gupt 1445
	list<i64> getReshippedOrderIds(1:list<i64> orderIds) throws (1:TransactionServiceException ex),
1446
 
5481 phani.kuma 1447
	list<Order> getBilledOrders(1:i64 vendorId, 2:bool onlyVendorNotPaid, 3:i64 billingDateFrom, 4:i64 billingDateTo) throws (1:TransactionServiceException ex),
5031 varun.gupt 1448
 
5067 varun.gupt 1449
	map<i64, i64> getStatusDistributionOfOrders(1:i64 startDate, 2:i64 endDate) throws (1:TransactionServiceException ex),
1450
 
5099 varun.gupt 1451
	list<i64> getOrderIdsForStatus(1:i64 status, 2:i64 startDatetime, 3:i64 endDatetime) throws (1:TransactionServiceException ex),
1452
 
5348 anupam.sin 1453
	/**
1454
	 * Updates the agent who handled the COD verification call
1455
	 */
1456
	void updateCODAgent(1:string agent, 2:i64 orderId) throws (1:TransactionServiceException ex),
1457
 
5208 varun.gupt 1458
	void updateOrderAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1459
 
5386 phani.kuma 1460
	void updateOrderOnlyAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1461
 
5447 anupam.sin 1462
	list<Order> getRefundedOrdersMarkedPaid() throws (1:TransactionServiceException ex),
1463
 
1464
	/**
1465
	* gets all COD Verification Agents for all orderIds from a minId to maxId
1466
	*
1467
	*/
5527 anupam.sin 1468
	list<CODVerificationAgent> getAllVerificationAgents(1:i64 minOrderId, 2:i64 maxOrderId),
1469
 
1470
	/**
1471
	* gets all attributes for a given orderId
1472
	*/
1473
	list<Attribute> getAllAttributesForOrderId(1:i64 orderId),
1474
 
1475
	/**
5676 rajveer 1476
	* sets attributes for an order
1477
	*/
1478
	void setOrderAttributes(1:i64 orderId, list<Attribute> attributes),
1479
 
1480
	/**
5527 anupam.sin 1481
	* sets attributes for all orders in a transaction
1482
	*/
5553 rajveer 1483
	void setOrderAttributeForTransaction(1:i64 transactionId, Attribute attribute),
1484
 
1485
	list<Order> getReceivePendingOrders(1:i64 storeId),
1486
 
5593 mandeep.dh 1487
	list<Order> getReceivedAtStoreOrders(1:i64 storeId),
5713 rajveer 1488
 
1489
	list<Order> getOrdersCollectionAtStore(1:i64 storeId, 2:i64 fromDate, 3:i64 toDate, 4:bool onlyCod),
5593 mandeep.dh 1490
 
5833 rajveer 1491
	string getOrderAttributeValue(1:i64 orderId, string attributeName),
6019 rajveer 1492
 
1493
	bool changeJacketNumber(1:i64 orderId, 2:i64 jacketNumber),
1494
 
1495
	bool markOrderAsRtoInTransit(1:i64 orderId),
1496
 
5593 mandeep.dh 1497
	/**
1498
	 * Accepts appropriate order for an item in a given billingWarehouse. Usually
1499
	 * invoked while scanning IN of items.
1500
	 */
6000 mandeep.dh 1501
	 void acceptOrderForItem(1:i64 itemId, 2:i64 quantity, 3:i64 fulfilmentWarehouseId, 4:i64 billingWarehouseId);
1502
 
1503
	 RechargeOrder createRechargeOrder(1:RechargeOrder rechargeOrder) throws  (1:TransactionServiceException ex);
6031 rajveer 1504
	 RechargeOrder getRechargeOrder(1:i64 rechargeRrderId) throws  (1:TransactionServiceException ex);
1505
	 list<RechargeOrder> getRechargeOrders(1:i64 userId);
1506
 
1507
	 bool updateRechargeOrderStatus(1:i64 rechargeOrderId, 2:RechargeOrderStatus rechargeOrderStatus) throws  (1:TransactionServiceException ex);
1508
	 bool activateRechargeTxn(1:i64 rechargeOrderId) throws  (1:TransactionServiceException ex);
1509
	 UserWallet getUserWallet(1:i64 userId);
1510
	 list<UserWalletHistory> getUserWalletHistory(1:i64 userId);
6050 anupam.sin 1511
	 /**
1512
	 Returns a recharge order for a given transactionId
1513
	 */
1514
	 RechargeOrder getRechargeOrdersForTransaction(1:i64 txnId) throws (1:TransactionServiceException ex);
6206 rajveer 1515
	 map<i64, string> getServiceProviders(1:RechargeType rechargeType, 2:bool onlyActive);
6289 anupam.sin 1516
	 DeviceNumberInfo getServiceProviderForDevice(1:RechargeType rechargeType, 2:string deviceNumber);
6591 anupam.sin 1517
	 string validateRecharge(1:RechargeType rechargeType, 2:string deviceNumber, 3:i64 userSelectedProviderId, 4:string clientAddress);
6094 rajveer 1518
	 list<RechargeOrder> getRechargeOrdersForDevice(1:string deviceNumber);
1519
	 void addAmountToWallet(1:i64 userId, 2:i64 orderId, 3:i64 amount);
6188 rajveer 1520
 
1521
	 RechargeStatistics getRechargeStatistics();
1522
 
6154 rajveer 1523
	 list<RechargeOrder> getRechargeOrdersForStatus(1:i64 status);
6159 rajveer 1524
	 list<RechargePlan> getPlansForOperator(1:i64 operatorId);
6289 anupam.sin 1525
 
1526
	 /**
1527
	 Returns denominations for a given operator and circle
1528
	 */
6307 anupam.sin 1529
	 list<RechargeDenomination> getRechargeDenominations(1:i64 operatorId, 2:string circleCode, 3:DenominationType denominationType) throws (1:TransactionServiceException ex);
6371 rajveer 1530
 
1531
	 void updateAvailabilityStatus(1:i64 operatorId, 2:i64 circleId, 3:bool isAvailable);
6389 rajveer 1532
 
1533
	 list<EmiScheme> getAvailableEmiSchemes();
1534
 
6412 rajveer 1535
	 map<i64, double> getMiscCharges(1:i64 transactionId);
6507 anupam.sin 1536
 
1537
	 bool refundRechargeOrder(1:i64 rechargeOrderId) throws (1:TransactionServiceException ex);
6821 amar.kumar 1538
 
6906 rajveer 1539
	 list<Order> getPhysicalOrders(1:i64 fromDate, 2:i64 toDate);
1540
 
1541
	 binary getDocument(1:i64 docType, 2:i64  docSource);
6985 anupam.sin 1542
 
1543
	 bool changeShippingAddress(1:i64 orderId, 2:string line1, 3:string line2, 4:string city, 5:string state, 6:string pin);
6988 rajveer 1544
 
7075 rajveer 1545
	 binary retrieveInvoice(1:i64 orderId, 2:i64 userId);
6988 rajveer 1546
 
7026 rajveer 1547
	 list<string> receiveUpdatesForRedExpress(1:string awbNumber);
7073 anupam.sin 1548
 
1549
	 RechargeTransaction createRechargeTransaction(1:RechargeTransaction thriftRechargeTransaction);
7080 anupam.sin 1550
 
7084 rajveer 1551
	 list<RechargeTransaction> getRechargeTransactions(1:i64 storeId);
7151 amit.gupta 1552
 
1553
	 list<RechargeTransaction> getRechargeTrans(1:i64 storeId, 2:i64 startDate, 3:i64 endDate, 4:RechargeOrderStatus status);
7084 rajveer 1554
 
7080 anupam.sin 1555
	 RechargeTransaction getRechargeTransaction(1:i64 rechargeId);
1556
 
1557
	 list<FRC> getFRCs(1:i64 circleId, 2:i64 operatorId);
7096 anupam.sin 1558
 
1559
	 HotspotStore getHotspotStore(1:i64 id, 2:string hotspotid);
1560
 
1561
	 TelecomCircle getTelecomCircle(1:i64 id, 2:string code);
7109 anupam.sin 1562
 
1563
	 binary retrieveHotspotRechargeInvoice(1:i64 rechargeId);
7169 anupam.sin 1564
 
7190 amar.kumar 1565
	 Order splitFreebieOrder(1:i64 orderId, 2:string splitReason, 3:i64 shippingDate);
1566
 
7172 anupam.sin 1567
	 list<RechargeTransaction> getRechargeTransactionsByNumber(1:string number, 2:i64 storeId);
7169 anupam.sin 1568
 
1569
	 bool updateHotspotStorePassword(1:i64 storeId, 2:string password);
7263 anupam.sin 1570
 
7285 rajveer 1571
	 i64 topupCompanyWallet(1:i64 companyId, 2:i64 amount);
1572
 
1573
	 i64 getWalletBalanceForCompany(1:i64 companyId);
7363 rajveer 1574
 
1575
	 i64 getSaholicRechargeBalance();
7285 rajveer 1576
 
7263 anupam.sin 1577
	 SourceDetail getSourceDetail(1:i64 source);
7267 anupam.sin 1578
 
1579
	 list<TelecomCircle> getAllCircles();
1580
 
1581
	 bool deleteFrcs(1:list<i64> frcIdsToDelete);
7311 kshitij.so 1582
 
1583
	 void addAmazonOrder(1:AmazonOrder amazonOrder);
1584
 
7322 vikram.rag 1585
	 bool updateAmazonOrderStatus(1:i64 orderId,2:string status);
7311 kshitij.so 1586
 
7686 vikram.rag 1587
	 list<Order> getAmazonOrdersShipped();
7311 kshitij.so 1588
 
1589
	 list<Order> getAmazonOrdersCancelled(1:i64 interval);
1590
 
7343 anupam.sin 1591
	 AmazonOrder getAmazonOrder(1:i64 orderId);
7322 vikram.rag 1592
 
7542 vikram.rag 1593
	 list<AmazonOrder> getAmazonOrderByAmazonOrderId(1:string amazonOrderId);
1594
 
7343 anupam.sin 1595
	 list<Order> getOrdersForStore(1:i64 id, 2:i64 storeId, 3:i64 startDate, 4:i64 endDate, 5:list<OrderStatus> statuses);
1596
 
7386 anupam.sin 1597
	 binary getStoreOrderAdvanceInvoice(1:i64 orderId, 2:i64 storeId);
7355 vikram.rag 1598
 
7370 anupam.sin 1599
	 bool addFrc(1:i64 circleId, 2:i64 operatorId, 3:i64 denomination, 4:i64 maxDiscount);
7371 anupam.sin 1600
 
1601
	 string addSeries(1:i64 circle, 2:i64 operatorId, 3:i64 series);
7386 anupam.sin 1602
 
1603
	 bool saveStoreOrderDetail(1:StoreOrderDetail storeOrderDetail);
1604
 
1605
	 StoreOrderDetail getStoreOrderDetail(1:i64 orderId, 2:i64 storeId);
1606
 
1607
	 list<string> getAllEdcBanks();
7393 anupam.sin 1608
 
1609
	 bool saveRefundAmountsForStoreOrder(1:i64 orderId, 2:i64 storeId, 3:double cashRefundAmount, 4:double cardRefundAmount);
7427 anupam.sin 1610
 
1611
	 list<StoreOrderCollection> getCollectionsForStore(1:i64 storeId, 2:i64 startDate, 3:i64 endDate);
7442 vikram.rag 1612
 
12614 amit.gupta 1613
	 list<AmazonOrdersToAcknowledge> getAmazonOrdersToAcknowledge(1:OrderSource source);
7442 vikram.rag 1614
 
7460 kshitij.so 1615
	 void changeAmazonOrderStatus(1:string amazonOrderCode,2:string status);
1616
 
7762 kshitij.so 1617
	 bool updateTimestampForAmazonOrder(1:map<i64, map<string,string>> amazonOrderDelivery);
7530 kshitij.so 1618
 
1619
	 bool updateSourceDetailTimestamp(1:i64 id , 2:i64 lastUpdatedOn);
7572 anupam.sin 1620
 
1621
	 list<Order> getOrdersByMobileNumber(1:string mobileNumber);
1622
 
7645 anupam.sin 1623
	 list<Order> getOrdersByAmazonOrderCode(1:string amazonId);
7730 anupam.sin 1624
 
1625
	 bool convertStoreToNormal(1:i64 orderId);
7822 amar.kumar 1626
 
1627
	 Order updateFreebieItem(1:i64 orderId, 2:i64 newFreebieItemId);
7939 manish.sha 1628
 
7967 anupam.sin 1629
	 list<HotspotServiceMatrix> getHotspotServiceMatrices();
1630
 
7939 manish.sha 1631
	 Order updateOrderAWB(1:i64 orderId, 2:string airwayBillNo);
8182 amar.kumar 1632
 
1633
	 list<Order> getOrdersByVendor(1:list<i64> vendors, 2:list<OrderStatus> statuses) throws (1:TransactionServiceException ex);
1634
 
1635
	 void createEbayOrder(1:EbayOrder ebayOrder);
1636
 
1637
	 EbayOrder getEbayOrderByOrderId(1:i64 orderId);
1638
 
1639
	 EbayOrder getEbayOrderBySalesRecNumber(1:i64 salesRecordNumber);
1640
 
8241 amar.kumar 1641
	 list<EbayOrder> getEbayOrder(1:i64 salesRecordNumber, 2:string listingId, 3:string paisapayId);
8182 amar.kumar 1642
 
1643
	 void updateEbayOrder(1:EbayOrder ebayOrder);
1644
 
1645
	 bool ebayOrderExists(1:i64 salesRecNumber, 2:string ebayListingId);
1646
 
1647
	 void updateOrderForEbay(1:Order order);
1648
 
1649
	 Order splitEbayOrder(1:i64 orderId, 2:i64 splitOrderQty, 3:i64 splitOrderItemId, 4:bool usePowerShip);
8282 kshitij.so 1650
 
1651
	 void addOrUpdateAmazonFbaSalesSnapshot(1:AmazonFbaSalesSnapshot amazonfbasalessnapshot);
1652
 
1653
	 list<AmazonFbaSalesSnapshot> getAmazonFbaSalesSnapshotForDays(1:i32 days);
1654
 
8488 amar.kumar 1655
     AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItem(1:i64 item_id);
1656
 
1657
     void createSnapdealOrder(1:SnapdealOrder snapdealOrder);
1658
 
11424 kshitij.so 1659
     list<SnapdealOrder> getSnapdealOrder(1:i64 orderId, 2:string referenceCode, 3:string subrderId)
8488 amar.kumar 1660
 
9630 vikram.rag 1661
     bool snapdealOrderExists(1:string subOrderId, 2:string referenceCode);
8488 amar.kumar 1662
 
8532 vikram.rag 1663
     void updateLatestFbaPricesForItem(1:FbaItemPrices fbaitemprices)
1664
 
8961 vikram.rag 1665
     bool flipkartOrderExists(1:string flipkartOrderId, 2:string flipkartSubOrderId)
1666
 
1667
     void createFlipkartOrder(1:FlipkartOrder flipkartOrder)
1668
 
9107 vikram.rag 1669
     FlipkartOrder getFlipkartOrder(1:i64 orderId)
8990 vikram.rag 1670
 
9159 amar.kumar 1671
     FlipkartOrder getFlipkartOrderByOrderItemId(1:string flipkartOrderItemId)
1672
 
9107 vikram.rag 1673
     void updateFlipkartOrderDatesAndAWB(1:string flipkartOrderId,2:string flipkartSubOrderId,3:i64 date,4:string awb)
9404 vikram.rag 1674
 
9571 vikram.rag 1675
     map<i64,i64> getOrdersCreatedAfterTimestampForSource(1:i64 timestamp,2:i64 source)
9404 vikram.rag 1676
 
13276 manish.sha 1677
     list<Order> getOrderForAirwayBillNo(1:string airwaybillNo) throws (1:TransactionServiceException ex)
9651 manish.sha 1678
 
1679
	 i64 getMinCreatedTimeStampUndeliveredOrdersForSource(1:i32 source)
1680
 
9880 manish.sha 1681
	 void updateSnapdealOrdersStatus(1:map<string, list<list<string>>> orders)  throws (1:TransactionServiceException ex)
9651 manish.sha 1682
 
1683
	 void updateFlipkartOrdersStatus(1:list<list<string>> delivered_orders)  throws (1:TransactionServiceException ex)
9801 manish.sha 1684
 
1685
	 void bulkAddOrUpdateAmazonFbaSalesSnapshot(1:list<AmazonFbaSalesSnapshot> amazonfbasalessnapshotlist)
9945 vikram.rag 1686
 
1687
	 map<i64,i64> getCreatedOrdersForFlipkart(list<string> flipkartorderids)
1688
 
11896 amit.gupta 1689
	 bool isPrivateDealTransaction(1:i64 transactionId)
1690
 
12396 kshitij.so 1691
	 AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItemLocationWise(1:i64 item_id,2:i64 location);
1692
 
12103 manish.sha 1693
	 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)
1694
 
1695
	 void updateAmazonFbaOrdersReturns(1:list<AmazonFbaOrderReturns> fbaOrderReturns) throws (1:TransactionServiceException ex)
1696
 
1697
	 list<AmazonFbaOrderReturns> getAllAmazonFbaOrderReturnsByCurrentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1698
 
1699
	 map<i64, map<string, i64>> getTotalSaleReturnsFbaSkusCurentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1700
 
12589 manish.sha 1701
	 list<FlipkartOrder> getVerificationPendingOrdersFK() throws (1:TransactionServiceException ex)
1702
 
12772 manish.sha 1703
	 FlipkartAdvantageOrder getFAOrderByFkOrderId(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12589 manish.sha 1704
 
12772 manish.sha 1705
	 list<FlipkartAdvantageOrder> getAllFAOrdersList(1:string status) throws (1:TransactionServiceException ex)
12589 manish.sha 1706
 
12653 manish.sha 1707
	 void addUpdateFaOrdersBulk(1:list<FlipkartAdvantageOrder> faOrdersList) throws (1:TransactionServiceException ex)
1708
 
1709
	 void addInvoiceDetailsToOrders(1:i64 transactionId, 2:i64 customerId) throws (1:TransactionServiceException ex)
12772 manish.sha 1710
 
12980 kshitij.so 1711
	 bool flipkartFaOrderExists(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12979 kshitij.so 1712
 
1713
	 RechargeOrder getRcgOrderStatus(1:i64 rechargeOrderId,2:bool isFinal)
1714
 
1715
	 RechargeTransaction getRcgTransactionStatus(1:i64 rechargeTransactionId,2:bool isFinal)
13148 manish.sha 1716
 
1717
	 void bulkAddOrUpdateFlipkartFaSalesSnapshot(1:list<FlipkartFaSalesSnapshot> flipkartfasalessnapshotlist)
1718
 
1719
	 list<FlipkartFaSalesSnapshot> getFlipkartFaSalesSnapshotForDays(1:i32 days)
1720
 
1721
	 FlipkartFaSalesSnapshot getFlipkartFaSalesSnapshotBySkuAndSaleDate(1:i64 item_id, 2:i64 dateOfSale)
1722
 
1723
	 bool acceptPackageOrders(list<i64> orders) throws (1:TransactionServiceException ex)
1724
 
1725
	 list<Order> getGroupOrdersByLogisticsTxnId(1:string logisticsTxnId) throws (1:TransactionServiceException ex)
1726
 
13276 manish.sha 1727
	 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)
1728
 
1729
	 string getInvoiceFormatLogisticsTxnId(1:i64 transactionId, 2:i64 shipementSeq) throws (1:TransactionServiceException ex)
13691 manish.sha 1730
 
1731
	 void createHomeShopOrder(1:HsOrder snapdealOrder);
1732
 
1733
     list<HsOrder> getHomeShopOrder(1:i64 orderId, 2:string hsOrderNo, 3:string hsSubOrderNo);
1734
 
1735
     bool homeShopOrderExists(1:string hsOrderNo, 2:string hsSubOrderNo);
12103 manish.sha 1736
}