-
Notifications
You must be signed in to change notification settings - Fork 4.2k
refactor(router): add domain type for merchant_connector_account id #5685
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
Merged
Gnanasundari24
merged 14 commits into
main
from
add-domain-type-for-merchant-connector-id
Aug 28, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e955322
add domain type for merchant_connector_account id
sai-harsha-vardhan 386963e
resolve conflicts
sai-harsha-vardhan ba178c3
fix schema_v2
sai-harsha-vardhan 99550ba
fix openapi
sai-harsha-vardhan d7e5cf3
fix openapi
sai-harsha-vardhan eea28b4
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 6f530db
Merge branch 'main' into add-domain-type-for-merchant-connector-id
sai-harsha-vardhan a569892
fix ci
sai-harsha-vardhan 683752a
ci: do not check `payment_methods_v2` feature for `storage_impl` crate
SanchithHegde 0c319d4
resolve comments
sai-harsha-vardhan 44ca997
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 89e5279
resolve conflicts
sai-harsha-vardhan e3e6fb6
Merge branch 'add-domain-type-for-merchant-connector-id' of github.co…
sai-harsha-vardhan 68b6dc0
resolve comments
sai-harsha-vardhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
crates/common_utils/src/id_type/merchant_connector_account.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use crate::errors::{CustomResult, ValidationError}; | ||
|
||
crate::id_type!( | ||
MerchantConnectorAccountId, | ||
"A type for merchant_connector_id that can be used for merchant_connector_account ids" | ||
); | ||
crate::impl_id_type_methods!(MerchantConnectorAccountId, "merchant_connector_id"); | ||
|
||
// This is to display the `MerchantConnectorAccountId` as MerchantConnectorAccountId(abcd) | ||
crate::impl_debug_id_type!(MerchantConnectorAccountId); | ||
crate::impl_generate_id_id_type!(MerchantConnectorAccountId, "mca"); | ||
crate::impl_try_from_cow_str_id_type!(MerchantConnectorAccountId, "merchant_connector_id"); | ||
|
||
crate::impl_serializable_secret_id_type!(MerchantConnectorAccountId); | ||
crate::impl_queryable_id_type!(MerchantConnectorAccountId); | ||
crate::impl_to_sql_from_sql_id_type!(MerchantConnectorAccountId); | ||
|
||
impl MerchantConnectorAccountId { | ||
/// Get a merchant connector account id from String | ||
pub fn wrap(merchant_connector_account_id: String) -> CustomResult<Self, ValidationError> { | ||
Self::try_from(std::borrow::Cow::from(merchant_connector_account_id)) | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.