@@ -7,11 +7,11 @@ use serde::{Deserialize, Serialize};
7
7
use time:: PrimitiveDateTime ;
8
8
9
9
use crate :: enums as storage_enums;
10
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
10
+ #[ cfg( feature = "v1" ) ]
11
11
use crate :: schema:: refund;
12
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
12
+ #[ cfg( feature = "v2" ) ]
13
13
use crate :: schema_v2:: refund;
14
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
14
+ #[ cfg( feature = "v1" ) ]
15
15
#[ derive(
16
16
Clone ,
17
17
Debug ,
@@ -68,7 +68,7 @@ pub struct Refund {
68
68
pub issuer_error_message : Option < String > ,
69
69
}
70
70
71
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
71
+ #[ cfg( feature = "v2" ) ]
72
72
#[ derive(
73
73
Clone ,
74
74
Debug ,
@@ -119,7 +119,7 @@ pub struct Refund {
119
119
pub connector_id : Option < common_utils:: id_type:: MerchantConnectorAccountId > ,
120
120
}
121
121
122
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
122
+ #[ cfg( feature = "v1" ) ]
123
123
#[ derive(
124
124
Clone ,
125
125
Debug ,
@@ -166,7 +166,7 @@ pub struct RefundNew {
166
166
pub processor_transaction_data : Option < String > ,
167
167
}
168
168
169
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
169
+ #[ cfg( feature = "v2" ) ]
170
170
#[ derive(
171
171
Clone ,
172
172
Debug ,
@@ -213,7 +213,7 @@ pub struct RefundNew {
213
213
pub processor_transaction_data : Option < String > ,
214
214
}
215
215
216
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
216
+ #[ cfg( feature = "v1" ) ]
217
217
#[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
218
218
pub enum RefundUpdate {
219
219
Update {
@@ -257,7 +257,7 @@ pub enum RefundUpdate {
257
257
} ,
258
258
}
259
259
260
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
260
+ #[ cfg( feature = "v2" ) ]
261
261
#[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
262
262
pub enum RefundUpdate {
263
263
Update {
@@ -299,7 +299,7 @@ pub enum RefundUpdate {
299
299
} ,
300
300
}
301
301
302
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
302
+ #[ cfg( feature = "v1" ) ]
303
303
#[ derive( Clone , Debug , AsChangeset , router_derive:: DebugAsDisplay ) ]
304
304
#[ diesel( table_name = refund) ]
305
305
pub struct RefundUpdateInternal {
@@ -320,7 +320,7 @@ pub struct RefundUpdateInternal {
320
320
issuer_error_message : Option < String > ,
321
321
}
322
322
323
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
323
+ #[ cfg( feature = "v2" ) ]
324
324
#[ derive( Clone , Debug , AsChangeset , router_derive:: DebugAsDisplay ) ]
325
325
#[ diesel( table_name = refund) ]
326
326
pub struct RefundUpdateInternal {
@@ -339,7 +339,7 @@ pub struct RefundUpdateInternal {
339
339
unified_message : Option < String > ,
340
340
}
341
341
342
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
342
+ #[ cfg( feature = "v1" ) ]
343
343
impl RefundUpdateInternal {
344
344
pub fn create_refund ( self , source : Refund ) -> Refund {
345
345
Refund {
@@ -361,7 +361,7 @@ impl RefundUpdateInternal {
361
361
}
362
362
}
363
363
364
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
364
+ #[ cfg( feature = "v2" ) ]
365
365
impl RefundUpdateInternal {
366
366
pub fn create_refund ( self , source : Refund ) -> Refund {
367
367
Refund {
@@ -383,7 +383,7 @@ impl RefundUpdateInternal {
383
383
}
384
384
}
385
385
386
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
386
+ #[ cfg( feature = "v1" ) ]
387
387
impl From < RefundUpdate > for RefundUpdateInternal {
388
388
fn from ( refund_update : RefundUpdate ) -> Self {
389
389
match refund_update {
@@ -510,7 +510,7 @@ impl From<RefundUpdate> for RefundUpdateInternal {
510
510
}
511
511
}
512
512
513
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
513
+ #[ cfg( feature = "v2" ) ]
514
514
impl From < RefundUpdate > for RefundUpdateInternal {
515
515
fn from ( refund_update : RefundUpdate ) -> Self {
516
516
match refund_update {
@@ -625,7 +625,7 @@ impl From<RefundUpdate> for RefundUpdateInternal {
625
625
}
626
626
}
627
627
628
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
628
+ #[ cfg( feature = "v1" ) ]
629
629
impl RefundUpdate {
630
630
pub fn apply_changeset ( self , source : Refund ) -> Refund {
631
631
let RefundUpdateInternal {
@@ -666,7 +666,7 @@ impl RefundUpdate {
666
666
}
667
667
}
668
668
669
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
669
+ #[ cfg( feature = "v2" ) ]
670
670
impl RefundUpdate {
671
671
pub fn apply_changeset ( self , source : Refund ) -> Refund {
672
672
let RefundUpdateInternal {
@@ -777,7 +777,7 @@ impl RefundUpdate {
777
777
}
778
778
}
779
779
780
- #[ cfg( all ( any ( feature = "v1" , feature = "v2" ) , not ( feature = "refunds_v2" ) ) ) ]
780
+ #[ cfg( feature = "v1" ) ]
781
781
#[ derive( Debug , Eq , PartialEq , Deserialize , Serialize ) ]
782
782
pub struct RefundCoreWorkflow {
783
783
pub refund_internal_reference_id : String ,
@@ -787,7 +787,7 @@ pub struct RefundCoreWorkflow {
787
787
pub processor_transaction_data : Option < String > ,
788
788
}
789
789
790
- #[ cfg( all ( feature = "v2" , feature = "refunds_v2" ) ) ]
790
+ #[ cfg( feature = "v2" ) ]
791
791
#[ derive( Debug , Eq , PartialEq , Deserialize , Serialize ) ]
792
792
pub struct RefundCoreWorkflow {
793
793
pub refund_id : common_utils:: id_type:: GlobalRefundId ,
0 commit comments