Subversion Repositories SmartDukaan

Rev

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