Subversion Repositories SmartDukaan

Rev

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