Subversion Repositories SmartDukaan

Rev

Rev 21092 | Rev 21134 | 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,
18578 manish.sha 102
	RECEIVED_AT_STORE,
19691 manish.sha 103
	APPROVAL_PENDING,
104
	PARTIAL_RETURN_IN_PROCESS,
105
	PARTIAL_RETURN,
106
	COMPLETE_RETURN_IN_PROCESS,
20029 kshitij.so 107
	COMPLETE_RETURN,
108
	REFUNDED_WITHOUT_PICKUP,
109
	REPLACED_WITHOUT_PICKUP
483 rajveer 110
}
111
 
112
enum TransactionStatus{
113
	INIT,
114
	IN_PROCESS,
115
	COMPLETED,
2964 chandransh 116
	FAILED,
3060 chandransh 117
	AUTHORIZED,
4245 rajveer 118
	COD_IN_PROCESS,
119
	FLAGGED
483 rajveer 120
}
121
 
5527 anupam.sin 122
enum OrderType{
6055 rajveer 123
	B2C,
124
	B2Cbulk,
125
	B2B,
7096 anupam.sin 126
	RECHARGE,
127
	RCH4HOTSPOT,
128
	WALLETCREDIT
5527 anupam.sin 129
}
130
 
4008 mandeep.dh 131
enum ExtraTransactionProcessingType {
132
    COD_VERIFICATION,
4245 rajveer 133
    DELAYED_DELIVERY,
6104 rajveer 134
    PAYMENT_FLAGGED,
135
    RECHARGE_UNKNOWN
4008 mandeep.dh 136
}
137
 
6289 anupam.sin 138
enum DenominationType {
139
	TOPUP = 1,
140
    SPECIAL = 2,
141
    DATA = 3
142
}
143
 
9159 amar.kumar 144
enum TaxType {
145
	VAT = 0,
146
	CST = 1,
147
	CFORM = 2
148
}
149
 
483 rajveer 150
struct LineItem{
151
	1:i64 id,
698 chandransh 152
	2:i64 item_id,
4008 mandeep.dh 153
	3:string productGroup,
956 chandransh 154
	4:string brand,
155
	5:string model_number,
4586 mandeep.dh 156
	6:string color,
956 chandransh 157
	7:string model_name,
158
	8:string extra_info,
159
	9:double quantity,
12280 amit.gupta 160
	10:double mrp,
161
	11:double unit_price,
162
	12:double unit_weight,
163
	13:double total_price,
164
	14:double transfer_price,
165
	15:double total_weight,
166
	16:optional string serial_number,
167
	17:optional string item_number,
168
	18:optional string dealText,
169
	19:i64 warrantry_expiry_timestamp,
170
	20:double vatRate,
19421 manish.sha 171
	21:double nlc,
172
	22:double logisticsCost,
19691 manish.sha 173
	23:double codCollectionCharges,
19714 manish.sha 174
	24:double returnQty,
175
	25:i64 damaged_expiry_timestamp
483 rajveer 176
}
177
 
3553 chandransh 178
enum DelayReason {
179
	INVENTORY_LOW_PHASED_OUT,
180
	INVENTORY_LOW_COLOR_NOT_AVAILABLE,
181
	INVENTORY_LOW_REVERSAL_NOT_ON_TIME,
182
	INVENTORY_LOW_PRODUCT_NOT_SEALED,
183
	COURIER_DELAY_NOT_DELIVERED_TO_COURIER_ON_TIME,
184
	COURIER_DELAY_DID_NOT_CONNECT,
185
	COURIER_DELAY_CUSTOMER_NOT_AVAILABLE,
9416 amar.kumar 186
	COURIER_DELAY_INCORRECT_ADDRESS,
3553 chandransh 187
	COURIER_DELAY_OCTROI_DELAY,
188
	COURIER_DELAY_FORCES_OF_NATURE,
189
	COD_VERIFICATION_DELAY,
190
	PAYMENT_FLAGGED,
191
	OTHERS
192
}
483 rajveer 193
 
8717 amar.kumar 194
enum ProductCondition{
195
	GOOD,
196
	BAD
197
}
198
 
483 rajveer 199
struct Order{
200
	1:i64 id,
201
	2:i64 warehouse_id,
202
	/**
203
		item info
204
	**/
205
	3:list<LineItem> lineitems,
206
	/**
207
	  logistics info
208
	**/
209
	4:i64 logistics_provider_id,
210
	5:string airwaybill_no,
211
	6:string tracking_id,
212
	7:i64 expected_delivery_time,
213
	/**
214
	  customer info
215
	**/
216
	8:i64 customer_id,
217
	9:string customer_name,
218
	10:string customer_mobilenumber,
219
	11:string customer_pincode,
735 chandransh 220
	12:string customer_address1,
221
	13:string customer_address2,
222
	14:string customer_email,
223
	15:string customer_city,
224
	16:string customer_state,
483 rajveer 225
 
226
	/**
227
		status and misc info
228
	**/
735 chandransh 229
	17:OrderStatus status,
230
	18:string statusDescription,
231
	19:double total_amount,
232
	20:double total_weight,
483 rajveer 233
	/**
234
		billing info
235
	**/
735 chandransh 236
	21:string invoice_number,
237
	22:string billed_by,
483 rajveer 238
	/**
239
		timestamps
240
	**/
735 chandransh 241
	23:i64 created_timestamp,
242
	24:i64 accepted_timestamp,
243
	25:i64 billing_timestamp,
244
	26:i64 shipping_timestamp,
1115 chandransh 245
	27:i64 pickup_timestamp,
246
	28:i64 delivery_timestamp,
1210 chandransh 247
	29:i64 outofstock_timestamp,
248
	30:i64 jacket_number,
1223 chandransh 249
	31:string receiver,
250
	32:i64 batchNo,
2537 chandransh 251
	33:i64 serialNo,
252
	34:bool doaFlag,
2675 vikas 253
	35:string pickupRequestNo,
2819 chandransh 254
	36:i64 transactionId,
3060 chandransh 255
	37:string purchaseOrderNo,
3553 chandransh 256
	38:bool cod,
4004 chandransh 257
	39:DelayReason delayReason,
258
	40:i64 promised_delivery_time,
259
	41:i64 expected_shipping_time,
4102 chandransh 260
	42:i64 verification_timestamp,
4192 anupam.sin 261
	43:i64 promised_shipping_time,
262
	44:optional i64 reship_timestamp,
263
	45:optional i64 refund_timestamp,
4245 rajveer 264
	46:optional i64 new_order_id,
4269 anupam.sin 265
	47:OrderStatus previousStatus,
4506 phani.kuma 266
	48:i64 vendorId,
4647 rajveer 267
	49:optional i64 doa_auth_timestamp,
4709 rajveer 268
	50:string delayReasonText,
4758 mandeep.dh 269
	51:string refundReason,
4815 phani.kuma 270
	52:i64 purchaseOrderId,
5062 varun.gupt 271
	53:optional i64 doa_logistics_provider_id,
5110 mandeep.dh 272
	54:i64 originalOrderId,
5189 varun.gupt 273
	55:i64 fulfilmentWarehouseId,
5354 anupam.sin 274
	56:bool vendorPaid,
275
	57:optional i64 received_return_timestamp,
5527 anupam.sin 276
	58:optional i64 first_attempt_timestamp,
5553 rajveer 277
	59:OrderType orderType,
278
	60:i64 pickupStoreId,
6318 rajveer 279
	61:bool logisticsCod,
6525 rajveer 280
	62:i64 gvAmount,
6726 rajveer 281
	63:bool otg,
282
	64:i64 courier_delivery_time
6903 anupam.sin 283
	65:i64 insurer,
284
	66:double insuranceAmount,
285
	67:string dob,
7190 amar.kumar 286
	68:string guardianName,
7293 anupam.sin 287
	69:i64 freebieItemId,
288
	70:i64 source,
289
	71:double advanceAmount,
8717 amar.kumar 290
	72:i64 storeId,
9299 kshitij.so 291
	73:ProductCondition productCondition,
292
	74:i64 dataProtectionInsurer,
9416 amar.kumar 293
	75:double dataProtectionAmount,
13148 manish.sha 294
	76:TaxType taxType,
17470 manish.sha 295
	77:string logisticsTransactionId,
296
	78:double shippingCost,
19973 amit.gupta 297
	79:double codCharges,
19980 amit.gupta 298
	80:i64 seller_id,
20873 kshitij.so 299
	81:i64 warehouse_address_id,
300
	82:double wallet_amount,
301
	83:double net_payable_amount
483 rajveer 302
}
303
 
5527 anupam.sin 304
struct Attribute{
305
	1:string name,
306
	2:string value
307
}
308
 
19832 amit.gupta 309
struct PendingStoreOrder{
310
	1:i64 id,
311
	2:i64 storeId,
312
	3:i64 productId,
313
	4:string pincode,
314
	5:string name,
315
	6:string email,
316
	7:string phone,
317
	8:string line1,
318
	9:string line2,
319
	10:string city,
320
	11:string state,
321
	12:i64 createdOn
322
}
323
 
4245 rajveer 324
struct OrderStatusAuditTrail{
325
	1:i64 id,
326
	2:i64 orderId,
327
	3:i64 status,
328
	4:i64 timestamp,
329
	5:i64 description
330
}
331
 
7442 vikram.rag 332
struct AmazonOrdersToAcknowledge{
333
	1:string amazonOrderId,
334
	2:string amazonOrderItemId,
335
	3:string status,
336
	4:i64 transaction_id,
337
	5:i32 count
338
}
339
 
19973 amit.gupta 340
 
341
struct SellerInfo {
342
	1:i64 sellerId,
343
	2:string organisationName,
344
	3:string registeredAddress,
345
	4:string regId,
346
	5:string cinNumber,
20025 amit.gupta 347
	6:string tin,
348
	7:i64 stateId
19973 amit.gupta 349
}
350
 
20065 amit.gupta 351
struct WarehouseAddress{
352
	1:i64 id,
353
	2:string address,
354
	3:string pin,
355
	4:i64 state_id,
20818 kshitij.so 356
	5:i64 created,
357
	6:string contact_number
20065 amit.gupta 358
}
359
 
20025 amit.gupta 360
struct BuyerInfo {
361
	1:i64 buyerId,
362
	2:string organisationName,
363
	3:string registeredAddress,
364
	4:string regId,
365
	5:string cinNumber,
366
	6:string tin,
367
	7:i64 addressId,
20065 amit.gupta 368
	8:WarehouseAddress buyerAddress,
20025 amit.gupta 369
	9:i64 stateId
370
}
371
 
483 rajveer 372
struct Transaction{
373
	1:i64 id,
374
	2:list<Order> orders,
680 rajveer 375
	3:i64 createdOn,
376
	4:TransactionStatus transactionStatus,
377
	5:string statusDescription,
378
	6:i64 shoppingCartid,
2219 varun.gupt 379
	7:i64 customer_id,
2814 vikas 380
	8:string coupon_code,
381
	9:string sessionSource,
3858 vikas 382
	10:i64 sessionStartTime,
383
	11:string firstSource,
6389 rajveer 384
    12:i64 firstSourceTime,
18634 manish.sha 385
    13:i64 payment_option,
17470 manish.sha 386
    14:double totalShippingCost,
387
    15:double totalCodCharges
483 rajveer 388
}
389
 
19980 amit.gupta 390
struct WarehouseAddressMapping{
391
	1:i64 warehouse_id,
392
	2:i64 address_id,
393
	3:i64 created,
394
	4:i64 updated
395
}
396
 
397
 
398
 
399
 
4393 rajveer 400
enum AlertType{
401
	NEW_INVENTORY_ALERT,
402
	ORDER_READY_TO_ACCEPT
403
}
404
 
483 rajveer 405
struct Alert{
406
	1:i64 id,
4393 rajveer 407
	2:AlertType type,
408
	3:i64 status,
409
	4:i64 timestamp,
410
	5:string description
4444 rajveer 411
	6:i64 warehouseId
483 rajveer 412
}
413
 
2688 chandransh 414
struct ReturnOrder{
415
	1:i64 orderId,
2697 chandransh 416
	2:i64 warehouseId,
417
    3:i64 jacketNumber,
418
    4:string invoiceNumber,
419
    5:i64 itemId,
420
    6:string productGroup,
421
    7:string brand,
422
    8:string modelNumber,
423
    9:string modelName,
424
    10:string color,
425
    11:double totalPrice,
426
    12:double transferPrice,
427
    13:bool processedStatus,
428
    14:i64 createdAt,
429
    15:i64 processedAt
2688 chandransh 430
}
431
 
4600 varun.gupt 432
struct PaymentSettlement	{
433
    2:i64 paymentGatewayId,
4905 varun.gupt 434
    3:i64 referenceId,
4600 varun.gupt 435
    4:i64 settlementDate,
436
    5:double serviceTax,
437
    6:double otherCharges,
438
    7:double netCollection
439
}
440
 
4875 varun.gupt 441
struct CODPaymentSettlement	{
442
    1:i64 orderId,
443
    2:i64 settlementDate,
444
    3:double collection
445
}
446
 
4303 rajveer 447
enum HotspotAction{
448
	PO_RAISED,
449
	REVERSAL_INITIATED,
450
	NOT_AVAILABLE
451
}
452
 
4369 rajveer 453
struct TimeoutSummary{
454
	1:i32 poRaised,
455
	2:i32 poEstimate
456
	3:i32 reversalInitiated,
457
	4:i32 reversalEstimate
458
}
459
 
5447 anupam.sin 460
struct CODVerificationAgent{
461
	1:i64 orderId,
462
	2:string agentEmailId
463
}
464
 
6000 mandeep.dh 465
enum RechargeType {
466
    MOBILE = 1,
467
    DTH = 2
468
}
469
 
470
enum RechargeOrderStatus {
471
    PAYMENT_PENDING = 1,
6031 rajveer 472
    PAYMENT_FAILED = 2,
473
    PAYMENT_SUCCESSFUL = 3,
6000 mandeep.dh 474
    RECHARGE_FAILED = 4,
6235 rajveer 475
    RECHARGE_SUCCESSFUL = 5,
6507 anupam.sin 476
    RECHARGE_FAILED_REFUNDED = 6,
477
    REFUNDED = 7,
7073 anupam.sin 478
    PARTIALLY_REFUNDED = 8,
479
    INIT = 9,
12979 kshitij.so 480
    RECHARGE_UNKNOWN = 10,
481
    RECHARGE_IN_PROCESS = 11
6000 mandeep.dh 482
}
483
 
7293 anupam.sin 484
enum OrderSource {
485
	WEBSITE = 1,
7355 vikram.rag 486
	STORE = 2,
7410 amar.kumar 487
	AMAZON =3,
488
	HOMESHOP18  = 4,
489
	NAAPTOL = 5,
8488 amar.kumar 490
	EBAY = 6,
8983 vikram.rag 491
	SNAPDEAL = 7,
11524 amit.gupta 492
	FLIPKART = 8,
12580 amit.gupta 493
	MOBILESITE = 9,
494
	JUNGLEE = 10	
7293 anupam.sin 495
}
496
 
12979 kshitij.so 497
enum RechargeMode {
498
	SYNC = 1,
499
	ASYNC = 2
500
}
501
 
13941 amit.gupta 502
 
503
enum WalletSource {
504
	RECHARGE = 1,
505
	PHYSICAL = 2,
506
	DTR = 3
507
}
508
 
6000 mandeep.dh 509
struct RechargeOrder {
6031 rajveer 510
    1:i64 id,
511
    2:string displayId,
512
    3:i64 totalAmount,
513
    4:i64 walletAmount,
514
    5:i64 transactionId,
6077 anupam.sin 515
    6:i64 invoiceNumber,
6031 rajveer 516
    7:OrderType orderType,
517
    8:i64 operatorId,
518
    9:RechargeType rechargeType,
519
   10:RechargeOrderStatus status,
520
   11:string deviceNumber,
521
   12:i64 userId,
522
   13:string userEmailId,
6048 rajveer 523
   14:i64 creationTimestamp,
524
   15:string spiceTID,
6094 rajveer 525
   16:i64 responseTimestamp,
6159 rajveer 526
   17:string description,
6433 anupam.sin 527
   18:string plan,
528
   19:string couponCode,
6515 anupam.sin 529
   20:i64 couponAmount,
6591 anupam.sin 530
   21:i64 refundTimestamp,
531
   22:string ipAddress
6000 mandeep.dh 532
}
533
 
6188 rajveer 534
struct RechargeStatistics{
6190 rajveer 535
	1:map<i64, i64> statusCounts,
536
	2:map<i64, i64> operatorCounts,
6188 rajveer 537
    3:map<string, list<RechargeOrder>> currentOrders,
538
    4:map<string, i64> amounts
539
}
540
 
6159 rajveer 541
struct RechargePlan {
542
	1:i64 operatorId,
543
    2:string name,
544
    3:string displayName,
545
    4:string description
546
}
547
 
6289 anupam.sin 548
struct RechargeDenomination {
549
	1:i64 operatorId,
550
	2:i64 circleId,
551
	3:DenominationType denominationType,
552
	4:i64 amount,
553
	5:string validity,
554
	6:string description
555
}
556
 
557
struct DeviceNumberInfo {
558
	1:i64 operatorId,
6336 anupam.sin 559
	2:string circleCode
6310 anupam.sin 560
	3:string operatorName
6289 anupam.sin 561
}
562
 
6031 rajveer 563
struct UserWallet {
6000 mandeep.dh 564
    1:i64 id,
565
    2:i64 amount,
20954 kshitij.so 566
    3:i64 userId,
567
    4:i64 refundable_amount  
6000 mandeep.dh 568
}
569
 
6031 rajveer 570
struct UserWalletHistory {
571
	1:i64 id,
572
    2:i64 walletId,
573
    3:i64 orderId,
574
    4:i64 amount,
575
    5:i64 timestamp    
6000 mandeep.dh 576
}
577
 
6389 rajveer 578
enum EmiChargeType {
579
    FIXED = 1,
580
    PERCENTAGE = 2
581
}
582
 
583
struct EmiScheme{
584
    1:i64 id,
585
    2:i64 gatewayId,
586
	3:i64 bankId,
587
    4:i64 tenure,
588
    5:string bankName,
6392 amit.gupta 589
    6:i64 minAmount,
6389 rajveer 590
    7:string tenureDescription,
591
    8:EmiChargeType	chargeType,
8942 rajveer 592
    9:double chargeValue,
593
    10:double interestRate    
6389 rajveer 594
}
595
 
483 rajveer 596
exception TransactionServiceException{
597
	1:i32 errorCode,
598
	2:string message
599
}
600
 
7073 anupam.sin 601
struct Company{
602
    1:i64 id,
603
    2:string name,
604
    3:string Address
605
}
606
 
607
struct WalletForCompany{
608
    1:i64 id,
609
    2:i64 companyId,
610
    3:double amount
611
}
612
 
613
struct WalletHistoryForCompany{
614
    1:i64 id,
615
    2:i64 walletId,
616
    3:double amount,
617
    4:i64 transactionTime,
618
    5:double openingBal,
619
    6:double closingBal,
620
    7:i64 referenceNumber,
621
    8:string description
622
}
623
 
624
enum PayMethod{
625
	CASH = 1,
8008 anupam.sin 626
	CARD = 2,
627
	CHEQUE = 3
7073 anupam.sin 628
}
629
 
7080 anupam.sin 630
struct FRC {
631
    1:i64 id,
632
    2:i64 operatorId,
633
    3:i64 circleId,
634
    4:i64 denomination,
635
    5:i64 maxDiscount
636
}
637
 
7096 anupam.sin 638
struct HotspotStore {
639
	1:i64 id,
640
    2:string hotspotId,	
641
    3:i64 companyId,
642
    4:string name,
643
    5:string city,
644
    6:i64 collectedAmount,
645
    7:i64 availableLimit,
646
    8:i64 creditLimit,
647
    9:string salt,
648
    10:string password,
649
    11:bool isActive,
7169 anupam.sin 650
    12:i64 circleId,
7308 rajveer 651
    13:string email,
652
    14:string line1,
653
    15:string line2,
654
    16:string state,
655
    17:string pin,
656
    18:string phone,
657
    19:string approvalEmail
7096 anupam.sin 658
}
659
 
7967 anupam.sin 660
struct HotspotServiceMatrix {
661
	1:i64 storeId,
662
	2:string hotspotId,
663
	3:bool pickupFromStoreService,
664
	4:bool storeWebsiteService,
665
	5:bool rechargeService
666
}
667
 
7073 anupam.sin 668
struct RechargeTransaction{
669
    1:i64 id,
670
    2:i64 storeId,
671
    3:double amount,
672
    4:i64 transactionTime,
673
    5:string deviceNum,
674
    6:RechargeType deviceType,
675
    7:bool isFrc,
676
    8:string email,
677
    9:double discount,
678
    10:double paymentAmount,
679
    11:PayMethod payMethod,
680
    12:RechargeOrderStatus status,
681
    13:string invoiceNumber,
682
    14:i64 circleId,
683
    15:i64 operatorId,
684
    16:string plan,
685
    17:string ipAddress,
686
    18:string name,
687
    19:string cafNum,
7080 anupam.sin 688
    20:string simNum,
7096 anupam.sin 689
    21:string alternateNumber,
7169 anupam.sin 690
    22:string description,
7369 rajveer 691
    23:i64 responseTime,
692
	24:string spiceTID,
693
    25:string aggTID,
694
    26:string providerTID
7073 anupam.sin 695
}
696
 
7096 anupam.sin 697
struct TelecomCircle {
698
	1:i64 id,
699
    2:string name,
700
    3:string code
701
}
702
 
7263 anupam.sin 703
struct SourceDetail {
704
	1:i64 id,
705
    2:string name,
7410 amar.kumar 706
    3:string email,
7530 kshitij.so 707
    4:string tinNumber,
708
    5:i64 lastUpdatedOn
7263 anupam.sin 709
}
710
 
7311 kshitij.so 711
struct AmazonOrder {
712
    1:i64 orderId,
7322 vikram.rag 713
    2:string amazonOrderCode,
714
    3:string amazonOrderItemCode,
7311 kshitij.so 715
    4:i64 transactionId,
7715 vikram.rag 716
    5:i64 item_id,
717
    6:string status,
718
    7:i64 purchaseDateOnAmazon
7311 kshitij.so 719
}
720
 
7386 anupam.sin 721
enum StorePaymentStatus{
722
	ADV_RECEIVED = 1,
723
	ADV_REFUNDED = 2,
724
	FULL_PAY_RECEIVED = 3,
725
	REFUNDED = 4,
7423 anupam.sin 726
	REFUND_REQUESTED = 5,
727
	REFUND_INITIATED = 6
7386 anupam.sin 728
}
729
 
730
struct StoreOrderDetail {
731
	1:i64 orderId,
732
	2:i64 storeId,
733
	3:double advanceAmount,
734
	4:double cashAmount,
735
	5:double cardAmount,
7393 anupam.sin 736
	6:StorePaymentStatus payStatus,
737
	7:string edcBank,
738
	8:double cashRefundAmount,
7423 anupam.sin 739
	9:double cardRefundAmount,
7611 anupam.sin 740
	10:string approvalCode,
741
	11:string cardType
7386 anupam.sin 742
}
743
 
7423 anupam.sin 744
struct StoreOrderCollection {
745
    1:string hotspotId,
746
    2:i64 orderId,
747
    3:string collectionType,
748
    4:string productName,
749
    5:i64 advanceAmount,
750
    6:i64 cash,
751
    7:i64 card,
752
    8:i64 addedAt,
753
    9:i64 pushedAt,
754
    10:bool pushedToOcr
755
}
756
 
8182 amar.kumar 757
struct EbayOrder {
758
	1:i64 orderId,
759
	2:i64 salesRecordNumber,
760
	3:string paisaPayId,
761
	4:string ebayListingId,
762
	5:double subsidyAmount,
763
	6:i64 ebayTxnDate,
764
	7:string transactionId,
765
	8:string listingName,
8241 amar.kumar 766
	9:double listingPrice,
8247 amar.kumar 767
	10:string bluedartPaisaPayRef	
8182 amar.kumar 768
}
769
 
8532 vikram.rag 770
struct FbaItemPrices{
771
	 1:i64 item_id	
772
     2:double minFbaPrice,
773
     3:double minMfnPrice,
774
     4:double ourPrice,
775
     5:double salePrice,
776
     6:i64 minFbaPriceSnapshotDate
777
     7:i64 minMfnPriceSnapshotDate
778
     8:i64 ourPriceSnapshotDate
779
     9:i64 salePriceSnapshotDate
780
 
781
} 
782
 
8488 amar.kumar 783
struct SnapdealOrder {
784
	1:i64 orderId,
785
	2:string referenceCode,
9627 vikram.rag 786
	3:string subOrderId,
8488 amar.kumar 787
	4:double listingPrice,
788
	5:string productName,
789
	6:i64 snapdealTxnDate
9456 vikram.rag 790
	7:double maxNlc
8488 amar.kumar 791
}
792
 
8961 vikram.rag 793
struct FlipkartOrder {
794
	1:string flipkartOrderId,
795
	2:string flipkartSubOrderId,
796
	3:i64 flipkartTxnDate,
797
	4:i64 orderId,
798
	5:double shippingPrice,
799
	6:double octroiFee,  
800
	7:double emiFee
9456 vikram.rag 801
	8:double maxNlc 
8961 vikram.rag 802
}
803
 
4815 phani.kuma 804
struct OrderStatusGroups{
805
	1:list<OrderStatus> codCancellable = [OrderStatus.COD_VERIFICATION_PENDING,
806
										OrderStatus.SUBMITTED_FOR_PROCESSING,
807
										OrderStatus.ACCEPTED,
808
										OrderStatus.INVENTORY_LOW,
809
										OrderStatus.LOW_INV_PO_RAISED,
810
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
811
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
812
										OrderStatus.BILLED,
813
										OrderStatus.PAYMENT_FLAGGED],
4837 varun.gupt 814
 
4815 phani.kuma 815
	2:list<OrderStatus> prepaidCancellableBeforeBilled = [OrderStatus.COD_VERIFICATION_PENDING,
816
										OrderStatus.SUBMITTED_FOR_PROCESSING,
817
										OrderStatus.ACCEPTED,
818
										OrderStatus.INVENTORY_LOW,
819
										OrderStatus.LOW_INV_PO_RAISED,
820
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
821
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT],
4837 varun.gupt 822
 
823
	3:list<OrderStatus> prepaidCancellableAfterBilled = [OrderStatus.BILLED, OrderStatus.PAYMENT_FLAGGED],
824
 
825
	4:list<OrderStatus> openOrders = [
826
										OrderStatus.PAYMENT_PENDING,			OrderStatus.COD_VERIFICATION_PENDING,
827
										OrderStatus.SUBMITTED_FOR_PROCESSING,	OrderStatus.ACCEPTED,
828
										OrderStatus.INVENTORY_LOW,				OrderStatus.BILLED,
829
										OrderStatus.PAYMENT_FLAGGED,			OrderStatus.SHIPPED_FROM_WH,
830
										OrderStatus.SHIPPED_TO_LOGST,			OrderStatus.PAYMENT_FLAGGED_DENIED,
4910 phani.kuma 831
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
4837 varun.gupt 832
										OrderStatus.CANCEL_REQUEST_RECEIVED,	OrderStatus.CANCEL_REQUEST_CONFIRMED,
833
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
834
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
835
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
836
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
837
										OrderStatus.LOW_INV_PO_RAISED,			OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
838
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,	OrderStatus.LOW_INV_PO_RAISED_TIMEOUT,
4910 phani.kuma 839
										OrderStatus.LOW_INV_REVERSAL_TIMEOUT,	OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,
4837 varun.gupt 840
										OrderStatus.CAPTURE_IN_PROCESS,			OrderStatus.DOA_REQUEST_RECEIVED,
841
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
842
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
843
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
844
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
845
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
846
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
847
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
848
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 849
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 850
									],
5031 varun.gupt 851
	5:list<OrderStatus> refundedOrders = [
852
										OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST,	OrderStatus.RTO_REFUNDED,
853
										OrderStatus.DOA_VALID_REFUNDED,				OrderStatus.DOA_INVALID_REFUNDED,
854
										OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,	OrderStatus.DOA_REFUNDED_RCVD_DAMAGED,
855
										OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT,	OrderStatus.RTO_DAMAGED_REFUNDED,
856
										OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,	OrderStatus.RET_PRODUCT_USABLE_REFUNDED,
857
										OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED,	OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT,
858
										OrderStatus.RET_REFUNDED_RCVD_DAMAGED,		OrderStatus.LOST_IN_TRANSIT_REFUNDED
859
									],
860
	6:list<OrderStatus> shippedOrders = [
4983 phani.kuma 861
										OrderStatus.SHIPPED_FROM_WH,			OrderStatus.SHIPPED_TO_LOGST,
862
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
863
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
864
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
865
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
866
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
867
										OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,OrderStatus.DOA_REQUEST_RECEIVED,
868
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
869
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
870
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
871
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
872
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
873
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
874
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
875
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 876
										OrderStatus.RET_PRODUCT_UNUSABLE,		OrderStatus.LOST_IN_TRANSIT,
877
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 878
									],
5031 varun.gupt 879
	7:list<OrderStatus> failedOrders = [
4983 phani.kuma 880
										OrderStatus.PAYMENT_FAILED,				OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
881
										OrderStatus.REJECTED,					OrderStatus.DOA_INVALID_REFUNDED,
882
										OrderStatus.DOA_INVALID_RESHIPPED,		OrderStatus.DOA_VALID_REFUNDED,
883
										OrderStatus.DOA_VALID_RESHIPPED,		OrderStatus.RTO_REFUNDED,
6566 amit.gupta 884
										OrderStatus.RTO_RESHIPPED, OrderStatus.COD_VERIFICATION_FAILED
4837 varun.gupt 885
									]
4815 phani.kuma 886
}
887
 
8282 kshitij.so 888
struct AmazonFbaSalesSnapshot {
889
	1:i64 dateOfSale
890
	2:i64 item_id
8363 vikram.rag 891
	3:i32 totalOrderCount
8282 kshitij.so 892
	4:i64 amazonFbaInventory
893
	5:bool isOutOfStock
894
    6:double salePrice
895
    7:double minFbaPrice
8363 vikram.rag 896
    8:double minMfnPrice
897
    9:double totalSale
898
    10:double promotionSale
8445 vikram.rag 899
    11:i32 promotionOrderCount
900
    12:double ourPrice
8532 vikram.rag 901
    13:i64 minFbaPriceSnapshotDate
902
    14:i64 minMfnPriceSnapshotDate
903
    15:i64 ourPriceSnapshotDate
904
    16:i64 salePriceSnapshotDate
11173 vikram.rag 905
    17:AmazonFCWarehouseLocation fcLocation
8282 kshitij.so 906
}
907
 
12103 manish.sha 908
struct AmazonFbaOrderReturns {
909
	1:string amazonOrderId,
910
	2:i64 insertionTimestamp,
911
	3:i64 sku,
912
	4:i64 creationTimestamp,
913
	5:i64 shippedQuantity,
914
	6:i64 sellableReturnQuantity,
915
	7:i64 nonSellableReturnQuantity
916
}
917
 
12589 manish.sha 918
struct FlipkartAdvantageOrder {
919
	1:string fkOrderId,
920
	2:string fkOrderItemId,
12772 manish.sha 921
	3:i64 sku,
12589 manish.sha 922
	4:i64 creationTimestamp
923
	5:string customerName,
924
	6:string customerAddress,
925
	7:string pincode,
926
	8:string customerCity,
927
	9:string customerState
928
	10:string customerPhone
929
	11:string status,
930
	12:i64 quantity,
931
	13:double totalPrice,
932
	14:double listPrice,
933
	15:i64 modifiedDate,
934
	16:string listingId,
935
	17:string cancelReason,
936
	18:string returnReason,
937
	19:string freebieItemId,
938
	20:string productTitle
939
}
940
 
13148 manish.sha 941
struct FlipkartFaSalesSnapshot {
942
	1:i64 dateOfSale
943
	2:i64 item_id
944
	3:i32 totalOrderCount
945
	4:bool isOutOfStock
946
    5:double totalSale
947
    6:double ourPrice
13584 manish.sha 948
    7:FlipkartFCWarehouseLocation fcLocation
949
    8:i32 returnQuantity
950
    9:double returnValue
13148 manish.sha 951
}
952
 
13114 kshitij.so 953
struct AmazonHourlySaleSnapshot {
954
	1:i64 snapshotTime
955
	2:i64 item_id
956
	3:i32 totalOrderCount
957
	4:i64 amazonFbaInventory
958
	5:bool isOutOfStock
959
    6:double totalSale
960
    7:double promotionSale
961
    8:i32 promotionOrderCount
962
    9:AmazonFCWarehouseLocation fcLocation
963
}
964
 
13478 kshitij.so 965
struct AmazonFbaOrderItem {
966
	1:string amazonOrderId,
967
	2:i64 purchaseDate,
968
	3:string orderStatus,
969
	4:i64 item_id,
970
	5:AmazonFCWarehouseLocation fcLocation,
971
	6:double totalAmount,
972
	7:double promotionDiscount,
973
	8:i64 quantity
974
}
975
 
13691 manish.sha 976
struct HsOrder {
977
	1:i64 orderId,
978
	2:string hsOrderNo,
979
	3:string hsSubOrderNo,
980
	4:string catalogueName,
981
	5:i64 hsOrderDate,
982
	6:string hsProductId,
983
	7:string hsItemId,
984
	8:string sellerSku,
985
	9:string paymentMode,
986
	10:string courierName,
13734 manish.sha 987
	11:i64 slaDays,
988
	12:string shippingName
13691 manish.sha 989
}
18578 manish.sha 990
 
17470 manish.sha 991
/*
992
struct PaytmOrder {
993
	1:i64 orderId,
994
	2:string paytmOrderId,
995
	3:string paytmSubOrderId,
996
	4:
997
}*/
13691 manish.sha 998
 
18578 manish.sha 999
struct Creditor{
1000
	1:i64 id,
1001
	2:string name,
18674 amit.gupta 1002
	3:bool active,
1003
	4:double ticket_size,
1004
	5:i64 credit_due_days, 
1005
	6:i64 created,
1006
	7:i64 updated
18578 manish.sha 1007
}
1008
 
1009
struct UserSanction{
18634 manish.sha 1010
	1:i64 id,
1011
	2:i64 user_id, 
1012
	3:i64 creditor_id, 
1013
	4:string user_ref_id,
1014
	5:double credit_limit, 
1015
	6:double credit_blocked, 
1016
	7:double loan, 
1017
	8:bool active, 
1018
	9:i64 created, 
18674 amit.gupta 1019
	10:i64 updated,
1020
	11:double ticket_size,
1021
	12:i64 credit_due_days 
18578 manish.sha 1022
}
1023
 
18794 manish.sha 1024
struct PaginatedUserSanction{
1025
	1:bool hasMore,
1026
	2:i64 totalCount,
1027
	3:list<UserSanction> userSanctions
1028
}
1029
 
18578 manish.sha 1030
enum CreditTxnType{
1031
	BLOCKED,
18769 manish.sha 1032
	BLOCKED_REVERSED,
18578 manish.sha 1033
	LOAN,
18634 manish.sha 1034
	LOAN_CANCELLED,
18585 amit.gupta 1035
	PAID,
18634 manish.sha 1036
	DEFAULTED,
1037
	CORRECTION
18578 manish.sha 1038
}
1039
 
1040
struct CreditHistory{
18634 manish.sha 1041
	1:i64 id,
1042
	2:i64 user_id,
1043
	3:i64 creditor_id,
1044
	4:i64 payment_id, 
1045
	5:double  amount,
1046
	6:CreditTxnType credit_type, 
1047
	7:i64 created, 
1048
	8:string shipping_id
18578 manish.sha 1049
}
1050
 
18794 manish.sha 1051
struct PaginatedCreditHistory{
1052
	1:bool hasMore,
1053
	2:i64 totalCount,
1054
	3:list<CreditHistory> creditHistoryList
1055
}
1056
 
18634 manish.sha 1057
struct LoanHistory{
1058
	1:i64 id,
1059
	2:i64 user_id,
1060
	3:i64 creditor_id,
1061
	4:i64 payment_id, 
1062
	5:double  amount,
1063
	6:CreditTxnType credit_type, 
1064
	7:i64 created, 
1065
	8:i64 updated,
1066
	9:string loan_id, 
1067
	10:i64 due_date,
18769 manish.sha 1068
	11:i64 value_date,
1069
	12:string invoiceNumber
18634 manish.sha 1070
}
1071
 
18794 manish.sha 1072
struct PaginatedLoanHistory{
1073
	1:bool hasMore,
1074
	2:i64 totalCount,
1075
	3:list<LoanHistory> loanHistoryList
1076
}
1077
 
19888 manas 1078
 
1079
struct OutstandingPayments{
1080
	1:i64 user_id,
1081
	2:string counter_name
1082
	3:i64 creditor_id,
1083
	4:i64 payment_id,
1084
	5:double totalAmount,
1085
	6:i64 created
1086
}
1087
 
18578 manish.sha 1088
enum ReturnAction{
1089
	REPLACEMENT,
1090
	REFUND
1091
}
1092
 
1093
enum ReturnPickupType{
1094
	NOW,
1095
	LATER,
1096
	NOT_REQUIRED
1097
}
1098
 
1099
enum RefundType{
1100
	INIT,
1101
	CHEQUE,
1102
	WALLET,
1103
	COUPON,
1104
	GATEWAY,
1105
	REPLACEMENT
1106
}
1107
 
1108
enum ReplacementShippingType{
1109
	IMMEDIATE,
1110
	LATER
1111
}
1112
 
1113
enum ReturnTxnPickupStatus{
1114
	PENDING,
1115
	PICKUP_REQUESTED,
1116
	PICKUP_CONFIRMED,
1117
	PICKUP_SCHEDULED,
1118
	PICKUP_IN_TRANSIT,
1119
	PICKUP_RECEIVED
1120
}
1121
 
1122
struct ReturnPickupRequest{
1123
	1:i64 id,
1124
	2:i64 logisticsProviderId,
1125
	3:string pickupRequestNo,
1126
	4:i64 confirmedAt,
1127
	5:i64 promised_pickup_timestamp,
1128
	6:i64 pickedUpAt,
1129
	7:ReturnTxnPickupStatus pickupStatus
1130
}
1131
 
1132
enum ReceivedReturnType{
1133
	PRESTINE,
1134
	DAMAGED,
1135
	LOST_IN_TRANSIT
1136
}
1137
 
1138
enum ReturnTxnResolutionStatus{
1139
	PENDING,
1140
	AWAITING_PICKUP,
1141
	QUALITY_CHECK,
1142
	REPLACEMENT_ORDER_CREATED,
1143
	REPLACEMENT_DONE,
1144
	REFUND_IN_PROCESS,
1145
	REFUND_DONE,
1146
	CLOSED
1147
}
1148
 
1149
struct ReturnOrderInfo{
1150
	1:i64 id,
1151
	2:i64 returnTransactionId,
1152
	3:string masterOrderId,
1153
	4:i64 orderId,
1154
	5:i64 lineItemId,
1155
	6:i64 logisticsRequestId,	
1156
	7:i64 returnQuantity,
1157
	8:i64 receivedQuantity,
1158
	9:i64 createdAt,
1159
	10:i64 processedAt,
1160
	11:string returnStatus,
1161
	12:i64 reshippedAt,
1162
	13:i64 receivedAt,
1163
	14:string refundReason,
1164
	15:string refundedBy,
1165
	16:i64 refundedAt,
1166
	17:i64 warehouse_id,
1167
	18:double refundAmount,
1168
	19:RefundType refundType,
1169
	20:string refundDescription,
1170
	21:ReturnPickupType returnPickupType,
1171
	22:ReplacementShippingType shippingType,
1172
	23:i64 replacementOrderId,
1173
	24:ReceivedReturnType receivedReturnType,
1174
	25:i64 freebieItemId,
1175
	26:ReturnAction returnAction,
1176
	27:ReturnTxnResolutionStatus returnTxnResolutionStatus,
1177
	28:LineItem lineitem,
1178
	29:ReturnPickupRequest returnPickUpRequest
1179
}
1180
 
1181
enum ReturnTransactionStatus{
1182
	INITIATED,
1183
	AUTHORIZED,
1184
	INPROCESS,
1185
	REJECTED,
1186
	PROCESSED,
1187
	COMPLETED,
1188
	CLOSED
1189
}
1190
 
1191
struct ReturnTransaction{
1192
	1:i64 id,
1193
	2:ReturnTransactionStatus status,
1194
	3:string customer_email,
1195
	4:string customer_name,
1196
	5:i64 customer_id,
1197
	6:i64 address_id,
1198
	7:i64 ticketId
1199
	8:i64 createdAt,
1200
	9:i64 processedAt,
1201
	10:i64 authorizedAt,
1202
	11:i64 closedAt,
1203
	12:string customerAddress,
1204
	13:string pincode,
1205
	14:string customerCity,
1206
	15:string customerState,
1207
	16:string customerPhone,
1208
	17:list<ReturnOrderInfo> returnOrders
1209
}
1210
 
19474 manish.sha 1211
struct ShipmentLogisticsCostDetail{
1212
	1:string logisticsTransactionId,
1213
	2:string airwayBillNo,
1214
	3:double shipmentAmount,
1215
	4:double shipmentWeight,
1216
	5:double shipmentLogsiticsCost,
1217
	6:double shipmentCodCollectionCharges,
1218
	7:i64 createdAt,
20744 kshitij.so 1219
	8:i64 updatedAt,
1220
	9:string packageDimensions
19474 manish.sha 1221
}
1222
 
20029 kshitij.so 1223
struct ShipmentDelayDetail{
1224
	1:i64 orderId,
1225
	2:DelayReason delayReason,
1226
	3:string delayReasonText,
1227
	4:i64 delay
1228
}
1229
 
20927 kshitij.so 1230
enum WalletReferenceType{
1231
	RECHARGE,
1232
	PURCHASE,
21044 kshitij.so 1233
	CASHBACK,
1234
	REVERSAL,
1235
	REFUND,
21101 kshitij.so 1236
	FAILURE,
1237
	ADVANCE_AMOUNT
20927 kshitij.so 1238
}
1239
 
21090 kshitij.so 1240
struct Pmsa{
1241
	1:i64 id,
1242
	2:string name,
1243
	3:string phone,
1244
	4:string emailId,
1245
	5:string address,
1246
	6:string state,
1247
	7:string level,
1248
	8:string l1_email,
1249
	9:string l2_email,
1250
	10:bool activated,
1251
	11:string pin,
1252
	12:string code,
1253
	13:i64 createdAt
1254
}
1255
 
1256
struct PmsaSearchFilter{
1257
	1:string name,
1258
	2:string phone,
1259
	3:string emailId,
1260
	4:string code,
1261
	5:bool activated,
1262
	6:string l1_email,
1263
	7:string l2_email
1264
}
1265
 
3374 rajveer 1266
service TransactionService extends GenericService.GenericService{
483 rajveer 1267
 
1268
	i64 createTransaction(1:Transaction transaction) throws (1:TransactionServiceException ex),
1269
 
1270
	//	Get transaction methods.
1271
	Transaction getTransaction(1:i64 id) throws (1:TransactionServiceException ex),
1272
	list<Transaction> getTransactionsForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:TransactionStatus status) throws (1:TransactionServiceException ex),
1273
	list<Transaction> getTransactionsForShoppingCartId(1:i64 shoppingCartId) throws (1:TransactionServiceException ex),
1274
	TransactionStatus getTransactionStatus(1:i64 transactionId) throws (1:TransactionServiceException ex),
7293 anupam.sin 1275
	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 1276
 
1398 varun.gupt 1277
	bool enqueueTransactionInfoEmail(1:i64 transactionId) throws (1:TransactionServiceException ex),
1382 varun.gupt 1278
 
4801 anupam.sin 1279
	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 1280
 
1115 chandransh 1281
	/**
4133 chandransh 1282
	Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
1283
	Pass the status as null and the limit as 0 to ignore them.
1284
	*/
8303 amar.kumar 1285
	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 1286
 
1287
	/**
1288
	Returns the count of orders with the given statuses assigned to the given warehouse.
1289
	*/
8303 amar.kumar 1290
	i32 getOrderCount(1:list<OrderStatus> statuses, 2:i64 warehouseId, 3:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 1291
 
1292
	/**
1115 chandransh 1293
	Returns orders within a range of their billing dates
1294
	*/
1000 varun.gupt 1295
	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 1296
 
1382 varun.gupt 1297
	/**
3427 chandransh 1298
	Returns orders for a particular provider and warehouse which were shipped between the given dates.
3451 chandransh 1299
	Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise. 
1300
	Pass providerId and warehouseId as -1 to ignore both these parameters.
3427 chandransh 1301
	*/
3451 chandransh 1302
	list<Order> getOrdersByShippingDate(1:i64 fromShippingDate, 2:i64 toShippingDate, 3:i64 providerId, 4:i64 warehouseId, 5:bool cod) throws (1:TransactionServiceException ex),
3427 chandransh 1303
 
1304
	/**
1382 varun.gupt 1305
	Returns order ids for orders which can be returned
1306
	*/
1307
	list<i64> getReturnableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
1308
 
1309
	/**
1310
	Returns order ids for orders which can be cancelled
1311
	*/
1312
	list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
1313
 
483 rajveer 1314
	bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
1147 chandransh 1315
 
1316
	/**
1529 ankur.sing 1317
	Returns list of orders for given transaction Id. Also filters based on customer Id so that
1318
	only user who owns the transaction can view its order details.
1319
	*/
1320
	list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId)  throws (1:TransactionServiceException ex),
3014 chandransh 1321
 
1322
	/**
1323
	Returns list of orders for the given customer created between the given dates and having the given statuses.
1324
	Pass and empty list to ignore filtering on statuses.
1325
	*/	
1326
	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 1327
 
483 rajveer 1328
	i64 createOrder(1:Order order) throws (1:TransactionServiceException ex),
1329
	Order getOrder(1:i64 id) throws (1:TransactionServiceException ex),
1330
	list<LineItem> getLineItemsForOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1331
 
4999 phani.kuma 1332
	list<Order> getOrderList(1:list<i64> order_ids),
1529 ankur.sing 1333
 
5386 phani.kuma 1334
	list<Order> getOrderListForVendor(1:list<i64> order_ids, 2:i64 vendorId),
1335
 
757 chandransh 1336
	/**
1529 ankur.sing 1337
	Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
1338
	Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
1339
	*/
1340
	Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
1341
 
3060 chandransh 1342
	//Alerts apis 
4444 rajveer 1343
	list<Alert> getAlerts(1:i64 type, 2:i64 warehouseId, 3:i64 status, 4:i64 timestamp),
1344
	void addAlert(1:i64 type, 2:i64 warehouseId, 3:string description),
1345
	void markAlertsAsSeen(1:i64 warehouseId),
3060 chandransh 1346
 
1529 ankur.sing 1347
	/**
3060 chandransh 1348
	Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1349
	*/
1350
	i64 getValidOrderCount(),
1351
 
1352
	/**
1353
	Returns the number of distinct customers who have done successful transactions
1354
	*/
1355
	i64 getNoOfCustomersWithSuccessfulTransaction(),
1356
 
1357
	/**
1358
	Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1359
	List contains two values, first minimum amount and second maximum amount.	
1360
	*/
1361
	list<double> getValidOrdersAmountRange(),
1362
 
1363
	/**
1364
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
1365
	If limit is passed as 0, then all valid Orders are returned. 
1366
	*/
5874 rajveer 1367
	list<Order> getValidOrders(1:i64 limit, 2:bool onlyStore),
3060 chandransh 1368
 
1369
	/**
1370
	Create a batch of all the pending orders for the given warehouse.
1371
	The returned list is orderd by created_timestamp.
1372
	If there are no pending orders, an empty list is returned.
1373
	*/
1223 chandransh 1374
	list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
1375
 
1376
	/**
1377
	Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found. 
1244 chandransh 1378
	*/
1210 chandransh 1379
	bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
1380
 
1381
	/**
3060 chandransh 1382
	Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
1383
	timestamp. It is intended to be used for COD orders but can be harmlessly 
1384
	used for all other orders as well.
1385
	Throws an exception if no such order exists.
757 chandransh 1386
	*/
3060 chandransh 1387
	bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1115 chandransh 1388
 
1389
	/**
3060 chandransh 1390
	Marks the given order as ACCEPTED and updates the accepted timestamp. If the
1391
	given order is not a COD order, it also captures the payment if the same has
1392
	not been captured.
1393
	Throws an exception if no such order exists.
1394
	*/
1395
	bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
19832 amit.gupta 1396
 
1397
	bool unacceptOrder(1:i64 orderId),
3060 chandransh 1398
 
1399
	/**
1400
	Add billing details such as the bill number and the biller to the Order.
4658 mandeep.dh 1401
	Adds jacket number, item number and Serial no. to the order. Doesn't update
3060 chandransh 1402
	the IMEI no. if a -1 is supplied.
1403
	Also, it generates an invoice number for the order, marks the order as
1404
	BILLED and sets the billing timestamp.
1405
	Returns false if it doesn't find the order with the given ID.
1406
	*/
7190 amar.kumar 1407
	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 1408
 
1409
	/**
1410
	Add the invoice number to the order.
1411
	*/	
6747 amar.kumar 1412
	void addInvoiceNumber(1:i64 orderId, 2:string invoiceNumber, 3:string color, 4:string serialNumber, 5:string itemNumber) throws (1:TransactionServiceException ex),
4910 phani.kuma 1413
 
3060 chandransh 1414
	/**
1415
	Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
4410 rajveer 1416
	given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
1417
	*/
4788 rajveer 1418
	bool markOrdersAsShippedFromWarehouse(1:i64 warehouseId, 2:i64 providerId, 3:bool cod, 4:list<i64> orderIds) throws (1:TransactionServiceException ex),
5676 rajveer 1419
 
5713 rajveer 1420
	bool markOrdersAsReturnedFromStore(1:i64 providerId, 2:list<i64> orderIds, 3:list<string> awbs) throws (1:TransactionServiceException ex),
4410 rajveer 1421
 
1422
	/**
1115 chandransh 1423
	Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
4910 phani.kuma 1424
	Raises an exception if we encounter report for an AWB number that we did not ship.	
1425
	*/
1426
	void markOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails) throws (1:TransactionServiceException ex),
1427
 
1428
	/**
1115 chandransh 1429
	Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
1430
	*/
4910 phani.kuma 1431
	list<Order> getOrdersNotPickedUp(1:i64 providerId),
1134 chandransh 1432
 
1433
	/**
1434
	Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
1435
	the name of the receiver.
1436
	Raises an exception if we encounter report for an AWB number that we did not ship.
1437
	*/
1438
	void markOrdersAsDelivered(1:i64 providerId, 2:map<string, string> deliveredOrders) throws (1:TransactionServiceException ex),
1439
 
1440
	/**
4910 phani.kuma 1441
	Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
1134 chandransh 1442
	Raises an exception if we encounter report for an AWB number that we did not ship.
1443
	*/
4910 phani.kuma 1444
	void markAsRTOrders(1:i64 providerId, 2:map<string, string> returnedOrders) throws (1:TransactionServiceException ex),
1134 chandransh 1445
 
1244 chandransh 1446
	/**
4910 phani.kuma 1447
	Returns a list of orders that were returned by courier.
1448
	*/
1449
	list<Order> getRTOrders(1:i64 providerId),
1450
 
1451
	/**
1244 chandransh 1452
	Update the status description of orders whose AWB numbers are keys of the Map.
4910 phani.kuma 1453
	*/
1454
	void updateNonDeliveryReason(1:i64 providerId, 2:map<string, string> undeliveredOrders) throws (1:TransactionServiceException ex),
1455
 
1456
	/**
4581 phani.kuma 1457
	Returns a list of orders that were picked up or shipped four days ago but did not get delivered.
1244 chandransh 1458
	*/
4910 phani.kuma 1459
	list<Order> getNonDeliveredOrdersbyCourier(1:i64 providerId),
1244 chandransh 1460
 
1407 ankur.sing 1461
	/**
4910 phani.kuma 1462
	Mark all orders with AWBs in the given map as local connected. Also sets the local connected timestamp.
1463
	*/
1464
	void markOrdersAsLocalConnected(1:i64 providerId, 2:map<string, string> local_connected_orders) throws (1:TransactionServiceException ex),
1465
 
1466
	/**
1467
	Returns a list of orders that were picked up or shipped but pending local connection.
1468
	*/
1469
	list<Order> getOrdersNotLocalConnected(1:i64 providerId),
1470
 
1471
	/**
1472
	Mark all orders with AWBs in the given map as reached destination city. Also sets the reached destination timestamp.
1473
	*/
1474
	void markOrdersAsDestinationCityReached(1:i64 providerId, 2:map<string, string> destination_city_reached_orders) throws (1:TransactionServiceException ex),
1475
 
1476
	/**
1477
	Mark all orders with AWBs in the given map as first delivery attempt made. Also sets the first delivery attempted timestamp.
1478
	*/
1479
	void markOrdersAsFirstDeliveryAttempted(1:i64 providerId, 2:map<string, string> first_atdl_orders) throws (1:TransactionServiceException ex),
1480
 
1481
	/**
1407 ankur.sing 1482
	Returns the list of orders whose delivery time has passed but have not been
1483
	delivered yet for the given provider and warehouse. To get a complete list of
1484
	undelivered orders, pass them as -1. 
1485
	Returns an empty list if no such orders exist.
1486
	*/
1487
	list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
1488
 
1599 ankur.sing 1489
	/**
4783 phani.kuma 1490
	Returns the list of orders whose expected delivery date has passed but have not been
1491
	delivered yet.
1492
	Returns an empty list if no such orders exist.
1493
	*/
1494
	list<Order> getUndeliveredOrdersExpectedDeliveryDateNotMet(),
1495
 
1496
	/**
2537 chandransh 1497
	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.
1498
	Returns the final flag status.
1499
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
1500
	*/
1501
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
1502
 
4712 rajveer 1503
	void markOrderAsDelivered(1:i64 orderId, 2:i64 deliveryTimestamp, string receiver) throws (1:TransactionServiceException ex),
1504
 
5553 rajveer 1505
	void markOrderAsReceivedAtStore(1:i64 orderId, 2:i64 deliveryTimestamp) throws (1:TransactionServiceException ex),
1506
 
2537 chandransh 1507
	/**
4454 rajveer 1508
	 Once user raise the request for a DOA, order status will be changed from DELVIERY_SUCCESS to DOA_REQUEST_RECEIVED 
1509
	*/
1510
	bool markOrderDoaRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1511
 
1512
	/**
1513
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from DOA_REQUEST_RECEIVED 
1514
	 to DOA_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1515
	*/
7645 anupam.sin 1516
	bool markOrderDoaRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4454 rajveer 1517
 
1518
	/**
4488 rajveer 1519
	 Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED 
1520
	*/
1521
	bool markOrderReturnRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1522
 
1523
	/**
1524
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED 
1525
	 to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1526
	*/
7645 anupam.sin 1527
	bool markOrderReturnRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4488 rajveer 1528
 
1529
	/**
2537 chandransh 1530
	Sends out an email to the account manager of the original courier provider used to ship the order.
4452 rajveer 1531
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
1532
	If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2537 chandransh 1533
	For any other status, it returns false.
1534
	Throws an exception if the order with the given id couldn't be found.
1535
	*/
4579 rajveer 1536
	bool requestPickupNumber(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
2537 chandransh 1537
 
1538
	/**
4452 rajveer 1539
	If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
2537 chandransh 1540
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1541
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1542
		3. Returns true
2589 chandransh 1543
	If the order is in any other status, it returns false.
2537 chandransh 1544
	Throws an exception if the order with the given id couldn't be found.
1545
	*/
4602 rajveer 1546
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber, 3:i64 providerId) throws (1:TransactionServiceException ex),
2589 chandransh 1547
 
1548
	/**
2765 chandransh 1549
	Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
4910 phani.kuma 1550
	*/
1551
	void markDoasAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1552
 
1553
	/**
2765 chandransh 1554
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1555
	*/
4910 phani.kuma 1556
	list<Order> getDoasNotPickedUp(1:i64 providerId),
2765 chandransh 1557
 
1558
	/**
4741 phani.kuma 1559
	Marks all RET_PICKUP_CONFIRMED orders of the previous day for a provider as RET_RETURN_IN_TRANSIT.
4910 phani.kuma 1560
	*/
1561
	void markReturnOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1562
 
1563
	/**
4741 phani.kuma 1564
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1565
	*/
4910 phani.kuma 1566
	list<Order> getReturnOrdersNotPickedUp(1:i64 providerId),
4741 phani.kuma 1567
 
1568
	/**
4452 rajveer 1569
	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 1570
	If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2589 chandransh 1571
	If the order is in any other state, it returns false.
1572
	Throws an exception if the order with the given id couldn't be found.
1573
	*/
13276 manish.sha 1574
	bool receiveReturn(1:i64 orderId, 2:i64 receiveCondition, 3:bool receiveFreebie, 4:string serialNumbers) throws (1:TransactionServiceException ex),
2589 chandransh 1575
 
1576
	/**
4452 rajveer 1577
	Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
2614 chandransh 1578
	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 1579
	If the order is in any other state, it returns false.
1580
	Throws an exception if the order with the given id couldn't be found.
1581
	*/
1582
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
2614 chandransh 1583
 
4495 rajveer 1584
	bool validateReturnProduct(1:i64 orderId, 2:bool isUsable) throws (1:TransactionServiceException ex),
1585
 
2614 chandransh 1586
	/**
4484 rajveer 1587
	If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1588
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
4484 rajveer 1589
		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 1590
 
1591
	If the order is in DOA_CERT_VALID state, it does the following:
1592
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
1593
		2. Creates a return order for the warehouse executive to return the DOA material.
4452 rajveer 1594
		3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2614 chandransh 1595
 
1596
	Returns the id of the newly created order.
1597
 
1598
	Throws an exception if the order with the given id couldn't be found.
1599
	*/
1600
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1601
 
1602
	/**
4484 rajveer 1603
	If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1604
		1. Creates a refund request for batch processing.
1605
		2. Creates a return order for the warehouse executive to return the shipped material.
4484 rajveer 1606
		3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2614 chandransh 1607
 
1608
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1609
		1. Creates a refund request for batch processing.
3226 chandransh 1610
		2. Cancels the reservation of the item in the warehouse.
1611
		3. Marks the current order as the REFUNDED final state.
2614 chandransh 1612
 
3226 chandransh 1613
	For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1614
		1. Cancels the reservation of the item in the warehouse.
1615
		2. Marks the current order as CANCELED.	
1616
 
1617
	In all cases, it updates the reason for cancellation or refund and the person who performed the action.
1618
 
2614 chandransh 1619
	Returns True if it is successful, False otherwise.
1620
 
1621
	Throws an exception if the order with the given id couldn't be found.
1622
	*/
3226 chandransh 1623
	bool refundOrder(1:i64 orderId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
2688 chandransh 1624
 
1625
	/**
1626
	Get all return orders created between the from and to dates for the given warehouse.
1627
	Ignores the warehouse if it is passed as -1.
1628
	*/
1629
	list<ReturnOrder> getReturnOrders(1:i64 warehouseId, 2:i64 fromDate, 3:i64 toDate),
1630
 
1631
	/**
5481 phani.kuma 1632
	Get all return orders created between the from and to dates.
1633
	*/
1634
	list<ReturnOrder> getAllReturnOrders(1:bool onlyNotProcessed, 2:i64 fromDate, 3:i64 toDate),
1635
 
1636
	/**
2700 chandransh 1637
	Returns the ReturnOrder corresponding to the given id.
1638
	Throws an exception if the return order with the given id couldn't be found.
1639
	*/
1640
	ReturnOrder getReturnOrder(1:i64 id) throws (1:TransactionServiceException ex),
1641
 
1642
	/**
2688 chandransh 1643
	Marks the return order with the given id as processed. Raises an exception if no such return order exists. 
1644
	*/
2819 chandransh 1645
	void processReturn(1:i64 returnOrderId) throws (1:TransactionServiceException ex),
1646
 
1647
	/**
3451 chandransh 1648
	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.
1649
	*/
3469 chandransh 1650
	Order updateWeight(1:i64 orderId, 2:double weight) throws (1:TransactionServiceException ex),
1651
 
1652
	/**
1653
	Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
1654
	Currently, it also ensures that only a different color of the given item is shipped.
1655
	*/
1656
	Order changeItem(1:i64 orderId, 2:i64 itemId) throws (1:TransactionServiceException ex),
1657
 
7560 rajveer 1658
	Order changeCourierProvider(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
1659
 
3469 chandransh 1660
	/**
1661
	Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
1662
	*/
3553 chandransh 1663
	Order shiftToWarehouse(1:i64 orderId, 2:i64 warehouseId) throws (1:TransactionServiceException ex),
1664
 
1665
	/**
1666
	Adds the given delay reason to the given order.
3986 chandransh 1667
	Increases the expected delivery time of the given order by the given no. of days.
3553 chandransh 1668
	Raises an exception if no order with the given id can be found.
1669
	*/
4647 rajveer 1670
	bool addDelayReason(1:i64 orderId, 2:DelayReason delayReason, 3:i64 furtherDelay, 4:string delayReasonText) throws (1:TransactionServiceException ex),
3956 chandransh 1671
 
1672
	/**
1673
	Marks the COD orders with given AWB nos. as having been processed.
1674
	Updates the captured amount for the corresponding payment.
1675
 
1676
	Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
1677
	1. There is no order corresponding to an AWB number.
1678
	2. The captured amount for a payment exceeds the total payment.
1679
	3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
1680
	*/
4008 mandeep.dh 1681
	map<string, string> reconcileCodCollection(1:map<string, double> collectedAmountMap, 2:string xferBy, 3:string xferTxnId, 4:i64 xferDate) throws (1:TransactionServiceException ex),
1682
 
1683
    /**
4065 mandeep.dh 1684
     * Returns the list of transaction ids that require some extra processing and
4008 mandeep.dh 1685
     * which belong to a particular category. This is currently used by CRM
4065 mandeep.dh 1686
     * application. If no such transaction ids are present, it returns an empty list.
4008 mandeep.dh 1687
     */
1688
    list<i64> getTransactionsRequiringExtraProcessing(1:ExtraTransactionProcessingType category),
1689
 
1690
	/**
1691
	 * Marks a particular transaction as processed for a particular cateogory.
4065 mandeep.dh 1692
	 * It essentially deletes the transaction id record for a particular
1693
	 * processing type category (if present) from DB.
1694
	 * This is currently used by CRM application.
4008 mandeep.dh 1695
	 */
4018 chandransh 1696
	void markTransactionAsProcessed(1:i64 transactionId, 2:ExtraTransactionProcessingType category),
1697
 
1698
	/**
1699
	Returns a map containing the number of risky orders keyed by item id. A risky order
1700
	is defined as one whose shipping date is about to expire.
1701
	*/
4245 rajveer 1702
	map<i64, i64> getItemWiseRiskyOrdersCount(),
1703
 
1704
	/**
4295 varun.gupt 1705
	Returns a list of all orders which have items with given id
1706
	*/
1707
	list<Order> getOrdersForItemIds(1:list<i64> itemIds),
1708
 
1709
	/**
4245 rajveer 1710
	 * Mark order as cancellation request received. If customer sends request of cancellation of 
1711
	 * a particular order, this method will be called. It will just change status of the order 
1712
	 * depending on its current status. It also records the previous status, so that we can move 
1713
	 * back to that status if cancellation request is denied.
1714
	 */
1715
	void markOrderCancellationRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1716
 
1717
	/**
1718
	 * If we decide to to cancel order, CRM will call this method to move the status of order to 
1719
	 * cancellation request confirmed. After this OM will be able to cancel the order. 	
1720
	 */
1721
	void markOrderCancellationRequestConfirmed(1:i64 orderId) throws (1:TransactionServiceException ex),
1722
 
1723
	/**
1724
	 * If we decide to not to cancel order, we will move the order ro previous status.	
1725
	 */
1726
	void markOrderCancellationRequestDenied(1:i64 orderId) throws (1:TransactionServiceException ex),
1727
 
1728
	/**
4258 rajveer 1729
	 * If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1730
	 * Changed transaction and all orders status to payment accepted.  
4245 rajveer 1731
	 */
4285 rajveer 1732
	void markTransactionAsPaymentFlagRemoved(1:i64 transactionId) throws (1:TransactionServiceException ex),
4245 rajveer 1733
 
4259 anupam.sin 1734
	/**
1735
	* This method is called when a flagged payment is deemed unserviceable and the corresponding orders
1736
	* need to be cancelled
1737
	*/
4285 rajveer 1738
	void refundTransaction(1:i64 transactionId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
4324 mandeep.dh 1739
 
1740
	/**
1741
	 * Updates shipment address of an order. Delivery and shipping date estimates
1742
	 * etc. are also updated here.
1743
	 *
1744
	 * Throws TransactionServiceException in case address change is not
1745
	 * possible due to certain reasons such as new pincode in address is
1746
	 * not serviceable etc.
1747
	 */
1748
	void updateShipmentAddress(1:i64 orderId, 2:i64 addressId) throws (1:TransactionServiceException ex)
4285 rajveer 1749
 
1750
	/**
1751
	Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
1752
	given order is not a COD order, it also captures the payment if the same has not been captured.
1753
	*/
4303 rajveer 1754
	bool acceptOrdersForItemId(1:i64 itemId, 2:i64 inventory) throws (1:TransactionServiceException ex),
4285 rajveer 1755
 
4369 rajveer 1756
	void markOrdersAsPORaised(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1757
	void markOrdersAsReversalInitiated(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1758
	void markOrdersAsNotAvailabke(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1759
 
4386 anupam.sin 1760
	map<i32, TimeoutSummary> markOrdersAsTimeout(1:i64 vendorId) throws (1:TransactionServiceException ex),
4661 rajveer 1761
 
4386 anupam.sin 1762
	/**
4661 rajveer 1763
	Mark order as LOST_IN_TRANSIT
1764
	*/
1765
	bool markOrderAsLostInTransit(1:i64 orderId) throws (1:TransactionServiceException ex),
1766
 
1767
	/**
4386 anupam.sin 1768
	Returns the order corresponding to an AWB number
1769
	*/
13276 manish.sha 1770
	list<Order> getOrderForAwb(1:string awb) throws (1:TransactionServiceException ex),
4506 phani.kuma 1771
 
1772
	/**
4910 phani.kuma 1773
	Returns the order corresponding to a logistics provider id for a given list of order status
4506 phani.kuma 1774
	*/
4910 phani.kuma 1775
	list<Order> getOrdersForProviderForStatus(1:i64 logistics_provider_id, 2:list<OrderStatus> order_status_list) throws (1:TransactionServiceException ex)
4600 varun.gupt 1776
 
1777
	/**
1778
	Returns list of orders fullfiled from a certain vendor and billed in a given date range
1779
	*/
1780
	list<Order> getBilledOrdersForVendor(1:i64 vendorId, 2:i64 billingDateFrom, 3:i64 billingDateTo) throws (1:TransactionServiceException ex),
1781
 
4607 rajveer 1782
	list<Order> getSlippedSippingDateOrders() throws (1:TransactionServiceException ex),
1783
 
4709 rajveer 1784
	list<Order> getCancelledOrders(1:i64 cancelDateFrom, 2:i64 cancelDateTo) throws (1:TransactionServiceException ex),
1785
 
4600 varun.gupt 1786
	void saveBluedartSettlements(1:map<i64, double> mapAWBAndAmount) throws (1:TransactionServiceException ex),
1787
 
4905 varun.gupt 1788
	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 1789
 
1790
	void saveEBSSettlementSummary(1:i64 settlementId, 2:i64 settlementDate, 3:i64 transactionDateFrom, 4:i64 transactionDateTo, 5:double amount) throws (1:TransactionServiceException ex),
1791
 
5386 phani.kuma 1792
	PaymentSettlement getSettlementForPrepaid(1:i64 referenceId, 2:bool isRefund) throws (1:TransactionServiceException ex),
4600 varun.gupt 1793
 
5386 phani.kuma 1794
	PaymentSettlement getSettlementForCod(1:i64 orderId, 2:bool isRefund) throws (1:TransactionServiceException ex),
1795
 
4600 varun.gupt 1796
	map<i64, string> getEBSSettlementSummaries() throws (1:TransactionServiceException ex),
1797
 
1798
	void markEBSSettlementUploaded(1:i64 settlementId) throws (1:TransactionServiceException ex),
1799
 
4715 varun.gupt 1800
	i64 getEBSSettlementDate(1:i64 settlementId) throws (1:TransactionServiceException ex),
1801
 
1802
	list<PaymentSettlement> getSettlementsByDate(1:i64 settlementDateFrom, 2:i64 settlementDateTo, 3:bool isRefund) throws (1:TransactionServiceException ex),
1803
 
1804
	/**
1805
	Returns list of Order Ids, which belong to reshiped orders, shortlisted from a given list of Order Ids 
1806
	*/
4875 varun.gupt 1807
	list<i64> getReshippedOrderIds(1:list<i64> orderIds) throws (1:TransactionServiceException ex),
1808
 
5481 phani.kuma 1809
	list<Order> getBilledOrders(1:i64 vendorId, 2:bool onlyVendorNotPaid, 3:i64 billingDateFrom, 4:i64 billingDateTo) throws (1:TransactionServiceException ex),
5031 varun.gupt 1810
 
5067 varun.gupt 1811
	map<i64, i64> getStatusDistributionOfOrders(1:i64 startDate, 2:i64 endDate) throws (1:TransactionServiceException ex),
1812
 
5099 varun.gupt 1813
	list<i64> getOrderIdsForStatus(1:i64 status, 2:i64 startDatetime, 3:i64 endDatetime) throws (1:TransactionServiceException ex),
1814
 
5348 anupam.sin 1815
	/**
1816
	 * Updates the agent who handled the COD verification call
1817
	 */
1818
	void updateCODAgent(1:string agent, 2:i64 orderId) throws (1:TransactionServiceException ex),
1819
 
5208 varun.gupt 1820
	void updateOrderAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1821
 
5386 phani.kuma 1822
	void updateOrderOnlyAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1823
 
5447 anupam.sin 1824
	list<Order> getRefundedOrdersMarkedPaid() throws (1:TransactionServiceException ex),
1825
 
1826
	/**
1827
	* gets all COD Verification Agents for all orderIds from a minId to maxId
1828
	*
1829
	*/
5527 anupam.sin 1830
	list<CODVerificationAgent> getAllVerificationAgents(1:i64 minOrderId, 2:i64 maxOrderId),
1831
 
1832
	/**
1833
	* gets all attributes for a given orderId
1834
	*/
1835
	list<Attribute> getAllAttributesForOrderId(1:i64 orderId),
1836
 
1837
	/**
5676 rajveer 1838
	* sets attributes for an order
1839
	*/
1840
	void setOrderAttributes(1:i64 orderId, list<Attribute> attributes),
1841
 
1842
	/**
5527 anupam.sin 1843
	* sets attributes for all orders in a transaction
1844
	*/
5553 rajveer 1845
	void setOrderAttributeForTransaction(1:i64 transactionId, Attribute attribute),
1846
 
1847
	list<Order> getReceivePendingOrders(1:i64 storeId),
1848
 
5593 mandeep.dh 1849
	list<Order> getReceivedAtStoreOrders(1:i64 storeId),
5713 rajveer 1850
 
1851
	list<Order> getOrdersCollectionAtStore(1:i64 storeId, 2:i64 fromDate, 3:i64 toDate, 4:bool onlyCod),
5593 mandeep.dh 1852
 
5833 rajveer 1853
	string getOrderAttributeValue(1:i64 orderId, string attributeName),
6019 rajveer 1854
 
1855
	bool changeJacketNumber(1:i64 orderId, 2:i64 jacketNumber),
1856
 
1857
	bool markOrderAsRtoInTransit(1:i64 orderId),
1858
 
5593 mandeep.dh 1859
	/**
1860
	 * Accepts appropriate order for an item in a given billingWarehouse. Usually
1861
	 * invoked while scanning IN of items.
1862
	 */
6000 mandeep.dh 1863
	 void acceptOrderForItem(1:i64 itemId, 2:i64 quantity, 3:i64 fulfilmentWarehouseId, 4:i64 billingWarehouseId);
1864
 
1865
	 RechargeOrder createRechargeOrder(1:RechargeOrder rechargeOrder) throws  (1:TransactionServiceException ex);
6031 rajveer 1866
	 RechargeOrder getRechargeOrder(1:i64 rechargeRrderId) throws  (1:TransactionServiceException ex);
1867
	 list<RechargeOrder> getRechargeOrders(1:i64 userId);
1868
 
1869
	 bool updateRechargeOrderStatus(1:i64 rechargeOrderId, 2:RechargeOrderStatus rechargeOrderStatus) throws  (1:TransactionServiceException ex);
1870
	 bool activateRechargeTxn(1:i64 rechargeOrderId) throws  (1:TransactionServiceException ex);
1871
	 UserWallet getUserWallet(1:i64 userId);
1872
	 list<UserWalletHistory> getUserWalletHistory(1:i64 userId);
6050 anupam.sin 1873
	 /**
1874
	 Returns a recharge order for a given transactionId
1875
	 */
1876
	 RechargeOrder getRechargeOrdersForTransaction(1:i64 txnId) throws (1:TransactionServiceException ex);
6206 rajveer 1877
	 map<i64, string> getServiceProviders(1:RechargeType rechargeType, 2:bool onlyActive);
6289 anupam.sin 1878
	 DeviceNumberInfo getServiceProviderForDevice(1:RechargeType rechargeType, 2:string deviceNumber);
6591 anupam.sin 1879
	 string validateRecharge(1:RechargeType rechargeType, 2:string deviceNumber, 3:i64 userSelectedProviderId, 4:string clientAddress);
6094 rajveer 1880
	 list<RechargeOrder> getRechargeOrdersForDevice(1:string deviceNumber);
20929 kshitij.so 1881
	 //void addAmountToWallet(1:i64 userId, 2:i64 orderId, 3:i64 amount);
13941 amit.gupta 1882
	 void creditBatch(1:i64 batchId, 2:string userAmount);
6188 rajveer 1883
 
1884
	 RechargeStatistics getRechargeStatistics();
1885
 
6154 rajveer 1886
	 list<RechargeOrder> getRechargeOrdersForStatus(1:i64 status);
6159 rajveer 1887
	 list<RechargePlan> getPlansForOperator(1:i64 operatorId);
6289 anupam.sin 1888
 
1889
	 /**
1890
	 Returns denominations for a given operator and circle
1891
	 */
6307 anupam.sin 1892
	 list<RechargeDenomination> getRechargeDenominations(1:i64 operatorId, 2:string circleCode, 3:DenominationType denominationType) throws (1:TransactionServiceException ex);
6371 rajveer 1893
 
1894
	 void updateAvailabilityStatus(1:i64 operatorId, 2:i64 circleId, 3:bool isAvailable);
6389 rajveer 1895
 
1896
	 list<EmiScheme> getAvailableEmiSchemes();
1897
 
6412 rajveer 1898
	 map<i64, double> getMiscCharges(1:i64 transactionId);
6507 anupam.sin 1899
 
1900
	 bool refundRechargeOrder(1:i64 rechargeOrderId) throws (1:TransactionServiceException ex);
6821 amar.kumar 1901
 
6906 rajveer 1902
	 list<Order> getPhysicalOrders(1:i64 fromDate, 2:i64 toDate);
1903
 
1904
	 binary getDocument(1:i64 docType, 2:i64  docSource);
6985 anupam.sin 1905
 
1906
	 bool changeShippingAddress(1:i64 orderId, 2:string line1, 3:string line2, 4:string city, 5:string state, 6:string pin);
6988 rajveer 1907
 
7075 rajveer 1908
	 binary retrieveInvoice(1:i64 orderId, 2:i64 userId);
6988 rajveer 1909
 
7026 rajveer 1910
	 list<string> receiveUpdatesForRedExpress(1:string awbNumber);
7073 anupam.sin 1911
 
1912
	 RechargeTransaction createRechargeTransaction(1:RechargeTransaction thriftRechargeTransaction);
7080 anupam.sin 1913
 
7084 rajveer 1914
	 list<RechargeTransaction> getRechargeTransactions(1:i64 storeId);
7151 amit.gupta 1915
 
1916
	 list<RechargeTransaction> getRechargeTrans(1:i64 storeId, 2:i64 startDate, 3:i64 endDate, 4:RechargeOrderStatus status);
7084 rajveer 1917
 
7080 anupam.sin 1918
	 RechargeTransaction getRechargeTransaction(1:i64 rechargeId);
1919
 
1920
	 list<FRC> getFRCs(1:i64 circleId, 2:i64 operatorId);
7096 anupam.sin 1921
 
1922
	 HotspotStore getHotspotStore(1:i64 id, 2:string hotspotid);
1923
 
1924
	 TelecomCircle getTelecomCircle(1:i64 id, 2:string code);
7109 anupam.sin 1925
 
1926
	 binary retrieveHotspotRechargeInvoice(1:i64 rechargeId);
7169 anupam.sin 1927
 
7190 amar.kumar 1928
	 Order splitFreebieOrder(1:i64 orderId, 2:string splitReason, 3:i64 shippingDate);
1929
 
7172 anupam.sin 1930
	 list<RechargeTransaction> getRechargeTransactionsByNumber(1:string number, 2:i64 storeId);
7169 anupam.sin 1931
 
1932
	 bool updateHotspotStorePassword(1:i64 storeId, 2:string password);
7263 anupam.sin 1933
 
7285 rajveer 1934
	 i64 topupCompanyWallet(1:i64 companyId, 2:i64 amount);
1935
 
1936
	 i64 getWalletBalanceForCompany(1:i64 companyId);
7363 rajveer 1937
 
1938
	 i64 getSaholicRechargeBalance();
7285 rajveer 1939
 
7263 anupam.sin 1940
	 SourceDetail getSourceDetail(1:i64 source);
7267 anupam.sin 1941
 
1942
	 list<TelecomCircle> getAllCircles();
1943
 
1944
	 bool deleteFrcs(1:list<i64> frcIdsToDelete);
7311 kshitij.so 1945
 
1946
	 void addAmazonOrder(1:AmazonOrder amazonOrder);
1947
 
7322 vikram.rag 1948
	 bool updateAmazonOrderStatus(1:i64 orderId,2:string status);
7311 kshitij.so 1949
 
7686 vikram.rag 1950
	 list<Order> getAmazonOrdersShipped();
7311 kshitij.so 1951
 
1952
	 list<Order> getAmazonOrdersCancelled(1:i64 interval);
1953
 
7343 anupam.sin 1954
	 AmazonOrder getAmazonOrder(1:i64 orderId);
7322 vikram.rag 1955
 
7542 vikram.rag 1956
	 list<AmazonOrder> getAmazonOrderByAmazonOrderId(1:string amazonOrderId);
1957
 
7343 anupam.sin 1958
	 list<Order> getOrdersForStore(1:i64 id, 2:i64 storeId, 3:i64 startDate, 4:i64 endDate, 5:list<OrderStatus> statuses);
1959
 
7386 anupam.sin 1960
	 binary getStoreOrderAdvanceInvoice(1:i64 orderId, 2:i64 storeId);
7355 vikram.rag 1961
 
7370 anupam.sin 1962
	 bool addFrc(1:i64 circleId, 2:i64 operatorId, 3:i64 denomination, 4:i64 maxDiscount);
7371 anupam.sin 1963
 
1964
	 string addSeries(1:i64 circle, 2:i64 operatorId, 3:i64 series);
7386 anupam.sin 1965
 
1966
	 bool saveStoreOrderDetail(1:StoreOrderDetail storeOrderDetail);
1967
 
1968
	 StoreOrderDetail getStoreOrderDetail(1:i64 orderId, 2:i64 storeId);
1969
 
1970
	 list<string> getAllEdcBanks();
7393 anupam.sin 1971
 
1972
	 bool saveRefundAmountsForStoreOrder(1:i64 orderId, 2:i64 storeId, 3:double cashRefundAmount, 4:double cardRefundAmount);
7427 anupam.sin 1973
 
1974
	 list<StoreOrderCollection> getCollectionsForStore(1:i64 storeId, 2:i64 startDate, 3:i64 endDate);
7442 vikram.rag 1975
 
12614 amit.gupta 1976
	 list<AmazonOrdersToAcknowledge> getAmazonOrdersToAcknowledge(1:OrderSource source);
7442 vikram.rag 1977
 
7460 kshitij.so 1978
	 void changeAmazonOrderStatus(1:string amazonOrderCode,2:string status);
1979
 
7762 kshitij.so 1980
	 bool updateTimestampForAmazonOrder(1:map<i64, map<string,string>> amazonOrderDelivery);
7530 kshitij.so 1981
 
1982
	 bool updateSourceDetailTimestamp(1:i64 id , 2:i64 lastUpdatedOn);
7572 anupam.sin 1983
 
1984
	 list<Order> getOrdersByMobileNumber(1:string mobileNumber);
1985
 
7645 anupam.sin 1986
	 list<Order> getOrdersByAmazonOrderCode(1:string amazonId);
7730 anupam.sin 1987
 
1988
	 bool convertStoreToNormal(1:i64 orderId);
7822 amar.kumar 1989
 
1990
	 Order updateFreebieItem(1:i64 orderId, 2:i64 newFreebieItemId);
7939 manish.sha 1991
 
7967 anupam.sin 1992
	 list<HotspotServiceMatrix> getHotspotServiceMatrices();
1993
 
7939 manish.sha 1994
	 Order updateOrderAWB(1:i64 orderId, 2:string airwayBillNo);
8182 amar.kumar 1995
 
1996
	 list<Order> getOrdersByVendor(1:list<i64> vendors, 2:list<OrderStatus> statuses) throws (1:TransactionServiceException ex);
1997
 
1998
	 void createEbayOrder(1:EbayOrder ebayOrder);
1999
 
2000
	 EbayOrder getEbayOrderByOrderId(1:i64 orderId);
2001
 
2002
	 EbayOrder getEbayOrderBySalesRecNumber(1:i64 salesRecordNumber);
2003
 
8241 amar.kumar 2004
	 list<EbayOrder> getEbayOrder(1:i64 salesRecordNumber, 2:string listingId, 3:string paisapayId);
8182 amar.kumar 2005
 
2006
	 void updateEbayOrder(1:EbayOrder ebayOrder);
2007
 
2008
	 bool ebayOrderExists(1:i64 salesRecNumber, 2:string ebayListingId);
2009
 
2010
	 void updateOrderForEbay(1:Order order);
2011
 
2012
	 Order splitEbayOrder(1:i64 orderId, 2:i64 splitOrderQty, 3:i64 splitOrderItemId, 4:bool usePowerShip);
8282 kshitij.so 2013
 
2014
	 void addOrUpdateAmazonFbaSalesSnapshot(1:AmazonFbaSalesSnapshot amazonfbasalessnapshot);
2015
 
2016
	 list<AmazonFbaSalesSnapshot> getAmazonFbaSalesSnapshotForDays(1:i32 days);
2017
 
8488 amar.kumar 2018
     AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItem(1:i64 item_id);
2019
 
2020
     void createSnapdealOrder(1:SnapdealOrder snapdealOrder);
2021
 
11424 kshitij.so 2022
     list<SnapdealOrder> getSnapdealOrder(1:i64 orderId, 2:string referenceCode, 3:string subrderId)
8488 amar.kumar 2023
 
9630 vikram.rag 2024
     bool snapdealOrderExists(1:string subOrderId, 2:string referenceCode);
8488 amar.kumar 2025
 
8532 vikram.rag 2026
     void updateLatestFbaPricesForItem(1:FbaItemPrices fbaitemprices)
2027
 
8961 vikram.rag 2028
     bool flipkartOrderExists(1:string flipkartOrderId, 2:string flipkartSubOrderId)
2029
 
2030
     void createFlipkartOrder(1:FlipkartOrder flipkartOrder)
2031
 
9107 vikram.rag 2032
     FlipkartOrder getFlipkartOrder(1:i64 orderId)
8990 vikram.rag 2033
 
9159 amar.kumar 2034
     FlipkartOrder getFlipkartOrderByOrderItemId(1:string flipkartOrderItemId)
2035
 
9107 vikram.rag 2036
     void updateFlipkartOrderDatesAndAWB(1:string flipkartOrderId,2:string flipkartSubOrderId,3:i64 date,4:string awb)
9404 vikram.rag 2037
 
9571 vikram.rag 2038
     map<i64,i64> getOrdersCreatedAfterTimestampForSource(1:i64 timestamp,2:i64 source)
9404 vikram.rag 2039
 
13276 manish.sha 2040
     list<Order> getOrderForAirwayBillNo(1:string airwaybillNo) throws (1:TransactionServiceException ex)
9651 manish.sha 2041
 
2042
	 i64 getMinCreatedTimeStampUndeliveredOrdersForSource(1:i32 source)
2043
 
9880 manish.sha 2044
	 void updateSnapdealOrdersStatus(1:map<string, list<list<string>>> orders)  throws (1:TransactionServiceException ex)
9651 manish.sha 2045
 
2046
	 void updateFlipkartOrdersStatus(1:list<list<string>> delivered_orders)  throws (1:TransactionServiceException ex)
9801 manish.sha 2047
 
2048
	 void bulkAddOrUpdateAmazonFbaSalesSnapshot(1:list<AmazonFbaSalesSnapshot> amazonfbasalessnapshotlist)
9945 vikram.rag 2049
 
2050
	 map<i64,i64> getCreatedOrdersForFlipkart(list<string> flipkartorderids)
2051
 
11896 amit.gupta 2052
	 bool isPrivateDealTransaction(1:i64 transactionId)
2053
 
12396 kshitij.so 2054
	 AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItemLocationWise(1:i64 item_id,2:i64 location);
2055
 
12103 manish.sha 2056
	 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)
2057
 
2058
	 void updateAmazonFbaOrdersReturns(1:list<AmazonFbaOrderReturns> fbaOrderReturns) throws (1:TransactionServiceException ex)
2059
 
2060
	 list<AmazonFbaOrderReturns> getAllAmazonFbaOrderReturnsByCurrentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
2061
 
2062
	 map<i64, map<string, i64>> getTotalSaleReturnsFbaSkusCurentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
2063
 
12589 manish.sha 2064
	 list<FlipkartOrder> getVerificationPendingOrdersFK() throws (1:TransactionServiceException ex)
2065
 
12772 manish.sha 2066
	 FlipkartAdvantageOrder getFAOrderByFkOrderId(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12589 manish.sha 2067
 
12772 manish.sha 2068
	 list<FlipkartAdvantageOrder> getAllFAOrdersList(1:string status) throws (1:TransactionServiceException ex)
12589 manish.sha 2069
 
12653 manish.sha 2070
	 void addUpdateFaOrdersBulk(1:list<FlipkartAdvantageOrder> faOrdersList) throws (1:TransactionServiceException ex)
2071
 
2072
	 void addInvoiceDetailsToOrders(1:i64 transactionId, 2:i64 customerId) throws (1:TransactionServiceException ex)
12772 manish.sha 2073
 
12980 kshitij.so 2074
	 bool flipkartFaOrderExists(1:string fkOrderId, 2:string fkOrderItemId) throws (1:TransactionServiceException ex)
12979 kshitij.so 2075
 
2076
	 RechargeOrder getRcgOrderStatus(1:i64 rechargeOrderId,2:bool isFinal)
2077
 
2078
	 RechargeTransaction getRcgTransactionStatus(1:i64 rechargeTransactionId,2:bool isFinal)
13148 manish.sha 2079
 
2080
	 void bulkAddOrUpdateFlipkartFaSalesSnapshot(1:list<FlipkartFaSalesSnapshot> flipkartfasalessnapshotlist)
2081
 
2082
	 list<FlipkartFaSalesSnapshot> getFlipkartFaSalesSnapshotForDays(1:i32 days)
2083
 
2084
	 FlipkartFaSalesSnapshot getFlipkartFaSalesSnapshotBySkuAndSaleDate(1:i64 item_id, 2:i64 dateOfSale)
2085
 
2086
	 bool acceptPackageOrders(list<i64> orders) throws (1:TransactionServiceException ex)
2087
 
2088
	 list<Order> getGroupOrdersByLogisticsTxnId(1:string logisticsTxnId) throws (1:TransactionServiceException ex)
2089
 
20811 kshitij.so 2090
	 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)
13276 manish.sha 2091
 
2092
	 string getInvoiceFormatLogisticsTxnId(1:i64 transactionId, 2:i64 shipementSeq) throws (1:TransactionServiceException ex)
13691 manish.sha 2093
 
2094
	 void createHomeShopOrder(1:HsOrder snapdealOrder);
2095
 
2096
     list<HsOrder> getHomeShopOrder(1:i64 orderId, 2:string hsOrderNo, 3:string hsSubOrderNo);
2097
 
2098
     bool homeShopOrderExists(1:string hsOrderNo, 2:string hsSubOrderNo);
17470 manish.sha 2099
 
2100
     Order splitBulkOrder(1:i64 orderId, 2:i64 splitOrderQty);
18041 manish.sha 2101
 
2102
     string moveOrdersToCorrectWarehouse();
18578 manish.sha 2103
 
2104
     Creditor getCreditorInfo(1:i64 id, 2:string name)
2105
 
2106
    bool updateCreditorInfo(1:Creditor creditor) 
2107
 
2108
    list<UserSanction> getUserSanctionDetails(1:i64 userId)
2109
 
2110
    UserSanction getUserSanctionDetailsForCreditor(1:i64 userId, i64 creditorId)
2111
 
2112
    bool updateUserSanction(1:UserSanction userSanaction) throws (1:TransactionServiceException pe)
2113
 
18634 manish.sha 2114
    list<CreditHistory> getCreditHistoryRecordsForTransaction(1:i64 paymentId, 2:CreditTxnType creditTxnType)
18578 manish.sha 2115
 
18634 manish.sha 2116
    list<CreditHistory> getCreditHistoryRecordsForUserAndCreditor(1:i64 userId, 2:i64 creditorId, 3:CreditTxnType creditTxnType)
18578 manish.sha 2117
 
18634 manish.sha 2118
    bool processCreditTransaction(1:i64 paymentId, 2:i64 userId, 3:i64 creditorId, 4:list<CreditHistory> creditTxns) throws (1:TransactionServiceException pe)
18578 manish.sha 2119
 
18634 manish.sha 2120
    double getLoanPayableForUserToCreditor(1:i64 userId, 2:i64 creditorId, 3:i64 dueDate)
18578 manish.sha 2121
 
18634 manish.sha 2122
    list<LoanHistory> getLoanHistoryRecordsForTransaction(1:i64 paymentId, 2:CreditTxnType creditTxnType)
2123
 
2124
    list<LoanHistory> getLoanHistoryRecordsForUserAndCreditor(1:i64 userId, 2:i64 creditorId, 3:CreditTxnType creditTxnType)
2125
 
2126
    bool processLoanTransaction(1:i64 paymentId, 2:i64 userId, 3:i64 creditorId, 4:list<LoanHistory> creditTxns) throws (1:TransactionServiceException pe)
2127
 
18794 manish.sha 2128
    PaginatedCreditHistory getLimitedCreditHistoryRecords(1:i64 paymentId, 2:i64 userId, 3:i64 creditorId, 4:i64 limit, 5:i64 offset)
18769 manish.sha 2129
 
18794 manish.sha 2130
    PaginatedLoanHistory getLimitedLoanHistoryRecords(1:i64 paymentId, 2:i64 userId, 3:i64 creditorId, 4:i64 limit, 5:i64 offset)
18769 manish.sha 2131
 
19869 manas 2132
    PaginatedUserSanction getUserSanctionsDetailsAsPerLimit(1:i64 userId, 2:i64 creditorId, 3:i64 limit, 4:i64 offset,5:string sort)
18794 manish.sha 2133
 
19888 manas 2134
    list<OutstandingPayments> getOutstandingPayments(1:string fetchType, 2:i64 userId, 3:i64 limit)
2135
 
19912 manas 2136
    map<bool,string> markPaymentSettled(1:i64 userId,2:i64 paymentId,3:double totalAmount,4:i64 repaymentDate)
2137
 
18578 manish.sha 2138
    ReturnOrderInfo getReturnOrderInfo(1:i64 id) throws (1:TransactionServiceException ex);
2139
 
2140
     map<i64,list<ReturnOrderInfo>> getReturnOrderInfoList(1:list<i64> order_ids);
2141
 
2142
	 map<i64,list<ReturnOrderInfo>> getReturnOrderInfoListAsByStatus(1:list<i64> order_ids, 2:list<string> statuses);
2143
 
2144
     bool updateReturnOrderInfo(1:ReturnOrderInfo returnInfo) throws (1:TransactionServiceException ex);
2145
 
2146
     map<i64, bool> bulkUpdateReturnOrderInfo(1:map<i64,list<ReturnOrderInfo>> orderReturnInfosMap) throws (1:TransactionServiceException ex);
2147
 
2148
     list<ReturnOrderInfo> getReturnOrdersAsPerWarehouseId(1:i64 warehouseId);
2149
 
19817 manish.sha 2150
     ReturnTransaction createReturnTransaction(1:ReturnTransaction returnTransaction, 2:string itemCondition, 3:bool overrideWarranty) throws (1:TransactionServiceException ex);
18578 manish.sha 2151
 
2152
     ReturnTransaction getReturnTransaction(1:i64 id) throws (1:TransactionServiceException ex);
2153
 
2154
	 list<ReturnOrderInfo> getReturnOrdersForReturnTransaction(1:i64 returnTransactionId)  throws (1:TransactionServiceException ex);
2155
 
2156
	 bool changeReturnTransactionStatus(1:i64 returnTransactionId, 2:ReturnTransactionStatus status, 3:list<i64> returnOrderIds) throws (1:TransactionServiceException ex);
2157
 
20111 kshitij.so 2158
	 i64 createReturnPickupRequest(1:list<i64> returnOrderIds) throws (1:TransactionServiceException ex);
18578 manish.sha 2159
 
2160
	 bool updateReturnPickupRequest(1:ReturnPickupRequest returnPickupRequest) throws (1:TransactionServiceException ex);
2161
 
2162
	 list<ReturnOrderInfo> getAllReturnOrdersForReturnPickupRequest(1:i64 logisticsRequestId) throws (1:TransactionServiceException ex);
2163
 
2164
	 bool receiveReturnPickup(1:map<i64,map<string, string>> returnOrdersMap, 2:i64 id) throws (1:TransactionServiceException ex);
2165
 
2166
	 bool validateReturnPickup(1:i64 returnPickupId, 2:map<i64, bool>returnOrdersMap) throws (1:TransactionServiceException ex);
2167
 
2168
	 bool processReturnPickup(1:i64 returnPickupId, 2:map<i64, map<string, string>> returnOrdersMap) throws (1:TransactionServiceException ex);
2169
 
2170
	 bool markReturnTransactionComplete(1:i64 returnTransactionId) throws (1:TransactionServiceException ex);
2171
 
2172
	 bool refundReturnTransactionPayment(1:map<i64, map<string, string>> refundOrdersMap, 2:i64 returntransactionId) throws (1:TransactionServiceException ex);
2173
 
2174
	 list<ReturnTransaction> getReturnTransactionsForCustomer(1:list<ReturnTransactionStatus> statusList, 2:string customerMobile, 3:string customerEmail, 4:i64 returnTransactionId, 5:i64 customerId) throws (1:TransactionServiceException ex);
2175
 
2176
	 bool verifyOrderForTransaction(1:i64 transactionId) throws (1:TransactionServiceException ex);
19004 manish.sha 2177
 
2178
	 /**
2179
	 Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
2180
	 These orders should be in order of promised shipping time. 
2181
	 Pass the status as null and the limit as 0 to ignore them.
2182
	 */
2183
	 list<Order> getOrdersInBatchAsPromisedShipping(1:list<OrderStatus> statuses, 2:i64 offset, 3:i64 limit, 4:i64 warehouse_id, 5:i64 source) throws (1:TransactionServiceException ex),
19421 manish.sha 2184
 
2185
	/**
2186
	* sets attributes for all orders in a Master Order Id or Shipment Id
2187
	*/
2188
	void setOrderAttributeForMasterOrderId(1:string logisticsTransactionId, 2:list<Attribute> attributes)
2189
 
2190
	bool updateMasterOrderAWB(1:string logisticsTransactionId, 2:string airwayBillNo);
19474 manish.sha 2191
 
2192
	bool addOrUpdateShipmentLogisticsCostDetails(1:list<ShipmentLogisticsCostDetail>  shipmentLogisticsCostDetails)
19714 manish.sha 2193
 
2194
	list<Order> getEligibleOrdersForReturn(1:i64 customerId, 2:string itemCondition, 3:bool overrideWarranty) 
2195
 
2196
	list<ReturnOrderInfo> getEligibleReturnOrdersForPickup(1:i64 customerId)
19735 manish.sha 2197
 
2198
	bool validateReturnTransaction(1:i64 customerId, 2:map<i64,i64> returnOrdersMap, 3:string itemCondition, 4:bool overrideWarranty)
19817 manish.sha 2199
 
20029 kshitij.so 2200
	list<PendingStoreOrder> getPendingStoreOrders(1:i64 storeId);
19817 manish.sha 2201
 
19973 amit.gupta 2202
	SellerInfo getSellerInfo(1:i64 sellerId);
20029 kshitij.so 2203
 
19980 amit.gupta 2204
	WarehouseAddress getWarehouseAddress(1:i64 address_id);
2205
 
20030 kshitij.so 2206
	BuyerInfo getBuyerByWarehouse(1:i64 warehouse_id);
2207
 
20029 kshitij.so 2208
	bool markReturnNotRequiredOrdersProcessed(1:ReturnOrderInfo returnOrderInfo) throws (1:TransactionServiceException ex);
2209
 
2210
	ReturnPickupRequest getReturnPickupRequest(1:i64 returnPickupId);
2211
 
2212
	ReturnOrderInfo splitReturnOrderInfo(1:i64 returnOrderId, 2:i64 splitOrderQty);
2213
 
20744 kshitij.so 2214
	bool deleteReturnOrder(1:i64 returnOrderId);
20029 kshitij.so 2215
 
20744 kshitij.so 2216
	bool refundReturnOrder(1:ReturnOrderInfo returnOrderInfo, 2:list<Attribute> attributes);
20029 kshitij.so 2217
 
20744 kshitij.so 2218
	list<i64> addShipmentDelay(1:list<ShipmentDelayDetail> shipmentDelayDetail);
20029 kshitij.so 2219
 
20744 kshitij.so 2220
	ShipmentLogisticsCostDetail getCostDetailForLogisticsTxnId(1:string logisticsTxnId);
2221
 
20811 kshitij.so 2222
	void addShipmentLogisticDetail(1:ShipmentLogisticsCostDetail shipmentLogisticsCostDetail)
2223
 
20873 kshitij.so 2224
	i64 createPayment(1:i64 userId, 2:i64 txnId, 3:i32 gatewayId)
2225
 
2226
	double calculatePaymentAmount(1:i64 txnId)
2227
 
20954 kshitij.so 2228
	list<Order> getBilledOrdersForManifestGen(1:i64 warehouse_id, 2:i64 logistics_provider_id, 3:bool cod)
2229
 
21044 kshitij.so 2230
	bool registerRsa(1:i64 userId,2:string activation_code)
2231
 
21090 kshitij.so 2232
	string addSalesAssociate(1:Pmsa pmsa,2:string referrerEmail, 3:string l1_userEmail)
2233
 
2234
	list<Pmsa> searchPmsa(1:PmsaSearchFilter pmsaSearchFilter,2:string associateEmail)
2235
 
2236
	Pmsa getPmsaUser(1:i64 id, 2:string associateEmail);
2237
 
2238
	string updatePmsaUser(1:Pmsa pmsa, 2:string associateEmail);
2239
 
2240
	list<Pmsa> getPmsaUsers(1:string associateEmail);
2241
 
2242
	list<Pmsa> getPendingAssociates(1:string associateEmail)
2243
 
2244
	list<i64> getStatsForAssociates(1:string associateEmail)
21092 kshitij.so 2245
 
2246
	Pmsa getmypmsaprofile(1:string associateEmail)
21101 kshitij.so 2247
 
2248
	bool creditUserWallet(1:i64 userId, 2:i64 amount)
20029 kshitij.so 2249
}