-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(core): Add support for cards bin update #7194
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
Conversation
Changed Files
|
e63dea3
to
35c3d59
Compare
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.
Added nitpicks
CreateCardsInfo, | ||
/// Update Cards Info flow | ||
UpdateCardsInfo, | ||
/// Cards Info migrate flow | ||
CardsInfoMigrate, |
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.
nit - use single naming convention
CreateCardsInfo, | |
/// Update Cards Info flow | |
UpdateCardsInfo, | |
/// Cards Info migrate flow | |
CardsInfoMigrate, | |
CardsInfoCreate, | |
/// Update Cards Info flow | |
CardsInfoUpdate, | |
/// Cards Info migrate flow | |
CardsInfoMigrate, |
crates/router/src/core/cards_info.rs
Outdated
let cards_info_api_types::CardInfoUpdateRequest { | ||
card_iin, | ||
card_issuer, | ||
card_network, | ||
card_type, | ||
card_subtype, | ||
card_issuing_country, | ||
bank_code_id, | ||
bank_code, | ||
country_code, | ||
last_updated_provider, | ||
.. | ||
} = card_info_request; | ||
CardsInfoInterface::update_card_info( |
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.
nit - better to use a transformer? We can add a From
impl
@@ -21,3 +29,23 @@ pub struct CardInfo { | |||
pub last_updated: Option<PrimitiveDateTime>, | |||
pub last_updated_provider: Option<String>, | |||
} | |||
|
|||
impl ApiEventMetric for CardInfo {} |
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.
Is CardInfo
and UpdateCardInfo
are API models?
If these are API models we need to create separate types in API Models and implement ApiEventMetric
there and not in diesel_models
972773b
to
8f9c49e
Compare
ec0dedb
to
8866dcf
Compare
crates/api_models/src/cards_info.rs
Outdated
use utoipa::ToSchema; | ||
|
||
use crate::enums as storage_enums; |
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.
use crate::enums as storage_enums; | |
use crate::enums; |
Type of Change
Description
Add create and update, bulk update APIs for cards_info table. These APIs will be used to update card bin details stored in cards_info table.
Additional Changes
Motivation and Context
How did you test it?
Cypress tests not needed, Tests should be done using below added curls.
Curl to test migration-btach
Curl to test update card-info entry
Curl to test create card-info entry
Checklist
cargo +nightly fmt --all
cargo clippy