@@ -606,65 +606,6 @@ pub struct ResponseRouterData<Flow, R, Request, Response> {
606
606
pub http_code : u16 ,
607
607
}
608
608
609
- #[ derive( Debug , Clone , serde:: Deserialize , serde:: Serialize ) ]
610
- #[ serde( rename_all = "snake_case" ) ]
611
- pub enum MerchantAccountDataResponse {
612
- Iban {
613
- iban : Secret < String > ,
614
- name : String ,
615
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
616
- connector_recipient_id : Option < Secret < String > > ,
617
- } ,
618
- Bacs {
619
- account_number : Secret < String > ,
620
- sort_code : Secret < String > ,
621
- name : String ,
622
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
623
- connector_recipient_id : Option < Secret < String > > ,
624
- } ,
625
- }
626
-
627
- impl From < MerchantAccountData > for MerchantAccountDataResponse {
628
- fn from ( value : MerchantAccountData ) -> Self {
629
- match value {
630
- MerchantAccountData :: Bacs {
631
- account_number,
632
- sort_code,
633
- name,
634
- connector_recipient_id,
635
- } => Self :: Bacs {
636
- account_number,
637
- sort_code,
638
- name,
639
- connector_recipient_id : if let Some ( conn) = connector_recipient_id {
640
- match conn {
641
- RecipientIdType :: ConnectorId ( id) => Some ( id) ,
642
- RecipientIdType :: LockerId ( _id) => None ,
643
- }
644
- } else {
645
- None
646
- } ,
647
- } ,
648
- MerchantAccountData :: Iban {
649
- iban,
650
- name,
651
- connector_recipient_id,
652
- } => Self :: Iban {
653
- iban,
654
- name,
655
- connector_recipient_id : if let Some ( conn) = connector_recipient_id {
656
- match conn {
657
- RecipientIdType :: ConnectorId ( id) => Some ( id) ,
658
- RecipientIdType :: LockerId ( _id) => None ,
659
- }
660
- } else {
661
- None
662
- } ,
663
- } ,
664
- }
665
- }
666
- }
667
-
668
609
#[ derive( Debug , Clone , serde:: Deserialize , serde:: Serialize ) ]
669
610
pub enum RecipientIdType {
670
611
ConnectorId ( Secret < String > ) ,
@@ -673,7 +614,6 @@ pub enum RecipientIdType {
673
614
674
615
#[ derive( Debug , Clone , serde:: Deserialize , serde:: Serialize ) ]
675
616
#[ serde( rename_all = "snake_case" ) ]
676
- #[ serde( into = "MerchantAccountDataResponse" ) ]
677
617
pub enum MerchantAccountData {
678
618
Iban {
679
619
iban : Secret < String > ,
@@ -798,6 +738,18 @@ impl ForeignFrom<api_models::admin::AdditionalMerchantData> for AdditionalMercha
798
738
}
799
739
}
800
740
741
+ impl ForeignFrom < AdditionalMerchantData > for api_models:: admin:: AdditionalMerchantData {
742
+ fn foreign_from ( value : AdditionalMerchantData ) -> Self {
743
+ match value {
744
+ AdditionalMerchantData :: OpenBankingRecipientData ( data) => {
745
+ Self :: OpenBankingRecipientData (
746
+ api_models:: admin:: MerchantRecipientData :: foreign_from ( data) ,
747
+ )
748
+ }
749
+ }
750
+ }
751
+ }
752
+
801
753
impl ForeignFrom < api_models:: admin:: ConnectorAuthType > for ConnectorAuthType {
802
754
fn foreign_from ( value : api_models:: admin:: ConnectorAuthType ) -> Self {
803
755
match value {
0 commit comments