Subversion Repositories SmartDukaan

Rev

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