-
Notifications
You must be signed in to change notification settings - Fork 3
Add additional account types to add taza parity #133
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
base: main
Are you sure you want to change the base?
Add additional account types to add taza parity #133
Conversation
Greptile OverviewGreptile SummaryAdded support for four new regional account types (CAD, GBP, PHP, SGD) to achieve parity with Taza's supported payment methods. Key changes:
All new account types follow the established pattern:
The implementations include appropriate pattern validation where banking standards are well-defined (CAD, GBP, SGD SWIFT codes), while omitting rigid patterns where formats vary significantly (PHP account numbers). Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/CadAccountInfo.yaml | Added Canadian account type with proper validation patterns for institution number, transit number, and account number |
| openapi/components/schemas/common/GbpAccountInfo.yaml | Added UK account type with validation patterns for sort code (with optional hyphens) and 8-digit account number |
| openapi/components/schemas/common/PhpAccountInfo.yaml | Added Philippine account type with bank name and account number (no pattern validation) |
| openapi/components/schemas/common/SgdAccountInfo.yaml | Added Singapore account type with SWIFT/BIC code validation pattern matching IBAN standard |
| openapi/components/schemas/common/IbanAccountInfo.yaml | Added SWIFT/BIC code pattern validation (previously requested in earlier review) |
| openapi/components/schemas/external_accounts/ExternalAccountInfo.yaml | Registered all four new account types in discriminator mapping and oneOf union |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant Validator as Schema Validator
participant DB as Database
Client->>API: POST /external-accounts
Note over Client,API: accountType: CAD_ACCOUNT | GBP_ACCOUNT | PHP_ACCOUNT | SGD_ACCOUNT
API->>Validator: Validate account info
alt CAD Account
Validator->>Validator: Validate bankCode pattern (3 digits)
Validator->>Validator: Validate branchCode pattern (5 digits)
Validator->>Validator: Validate accountNumber pattern (7-12 digits)
else GBP Account
Validator->>Validator: Validate sortCode pattern (6 digits with optional hyphens)
Validator->>Validator: Validate accountNumber pattern (8 digits)
else PHP Account
Validator->>Validator: Validate bankName (required)
Validator->>Validator: Validate accountNumber (required, no pattern)
else SGD Account
Validator->>Validator: Validate bankName (required)
Validator->>Validator: Validate swiftCode pattern (SWIFT/BIC format)
Validator->>Validator: Validate accountNumber (required)
end
Validator->>Validator: Validate beneficiary (INDIVIDUAL or BUSINESS)
alt Validation Success
Validator-->>API: Valid
API->>DB: Store external account
DB-->>API: Account created
API-->>Client: 201 Created with account details
else Validation Failure
Validator-->>API: Invalid (pattern mismatch)
API-->>Client: 400 Bad Request with validation error
end
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.
4 files reviewed, 4 comments
20699b5 to
00952b4
Compare
00952b4 to
e47493e
Compare

No description provided.