-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(payment_methods): add BankRedirect payment method data to new domain type to be used in connector module #4175
Conversation
…ent_method_data-to-be-used-in-connector-module
@@ -874,218 +874,220 @@ pub enum OnlineBankingSlovakiaBanks { | |||
Viamo, | |||
} | |||
|
|||
impl TryFrom<&api_enums::BankNames> for OnlineBankingSlovakiaBanks { | |||
impl TryFrom<&common_enums::enums::BankNames> for OnlineBankingSlovakiaBanks { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have common_enums::enums
can't we directly use common_enums
since there are re exports?
billing_details: billing_details.map(|billing| BankRedirectBilling { | ||
billing_name: billing.billing_name, | ||
email: billing.email, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can have a From impl for this since this is reused many times
fn map_billing_details( | ||
billing_details: Option<api_models::payments::BankRedirectBilling>, | ||
) -> Option<BankRedirectBilling> { | ||
billing_details.map(|billing| BankRedirectBilling { | ||
billing_name: billing.billing_name, | ||
email: billing.email, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could have been a From
impl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…w domain type to be used in connector module (#4175) Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
Type of Change
Description
We need to have separate types for api model and domain, currently we are using the api type in application as well.
This PR add a new domain type for BankRedirect payment_method_data to be used everywhere in the application.
Additional Changes
Motivation and Context
How did you test it?
Impact
Checklist
cargo +nightly fmt --all
cargo clippy