Subversion Repositories SmartDukaan

Rev

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