Subversion Repositories SmartDukaan

Rev

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