Subversion Repositories SmartDukaan

Rev

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