Subversion Repositories SmartDukaan

Rev

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