Skip to content
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

Add advanced bank identifier validation and retrieval methods #185

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

neelesh-patil-4417
Copy link

Description

This feature adds advanced capabilities to handle bank identifiers, such as enhanced validation for existing identifier types and support for custom identifier formats like SWIFT, Routing Numbers, and IFSC codes. It introduces utility functions to retrieve bank details efficiently and improves error messaging for invalid cases.

Proposed solution

The system will ensure precise validation of input identifiers before processing. The changes modularize validation and retrieval logic into reusable functions. For example, introducing utility methods like IsValidBankIdentifier, GetBankNameFromShortCode, GetDefaultBankIdentifiersFromShortCode, will make the codebase more organized and extensible.

Envison - A consumer of the updated library calls IsValidBankIdentifier("MY", "SWIFT", "PHBMMYKLXXX"), and the function returns true if valid, or a descriptive error if not.
Another use case: GetBankNameFromIdentifier("US", "021000021") retrieves the bank name for the routing number directly, streamlining front-end data presentation in payment forms.

Copy link

changeset-bot bot commented Nov 26, 2024

⚠️ No Changeset found

Latest commit: 3bd063a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add this in some readme file rather than here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what data is this?

Comment on lines 37 to 40
const (
IdentifierTypeSWIFT = "SWIFT"
IdentifierTypeRoutingNumber = "routing_number"
IdentifierTypeIFSC = "IFSC"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets keep it consistant across either all upper case or lower snake case.

Copy link
Contributor

@varunkumark1997 varunkumark1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add UT's as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants