Subversion Repositories SmartDukaan

Rev

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