Subversion Repositories SmartDukaan

Rev

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