Subversion Repositories SmartDukaan

Rev

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

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