Subversion Repositories SmartDukaan

Rev

Rev 21364 | Rev 21844 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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