Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
oneOf:
- title: US Account
$ref: ./UsAccountExternalAccountInfo.yaml
- title: CLABE Account
$ref: ./ClabeAccountExternalAccountInfo.yaml
- title: PIX Account
$ref: ./PixAccountExternalAccountInfo.yaml
- title: IBAN Account
$ref: ./IbanAccountExternalAccountInfo.yaml
- title: UPI Account
$ref: ./UpiAccountExternalAccountInfo.yaml
- title: NGN Account
$ref: ./NgnAccountExternalAccountInfo.yaml
- title: CAD Account
$ref: ./CadAccountExternalAccountInfo.yaml
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
- title: SGD Account
$ref: ./SgdAccountExternalAccountInfo.yaml
- title: Spark Wallet
$ref: ./SparkWalletExternalAccountInfo.yaml
- title: Lightning
$ref: ./LightningExternalAccountInfo.yaml
- title: Solana Wallet
$ref: ./SolanaWalletExternalAccountInfo.yaml
- title: Tron Wallet
$ref: ./TronWalletExternalAccountInfo.yaml
- title: Polygon Wallet
$ref: ./PolygonWalletExternalAccountInfo.yaml
- title: Base Wallet
$ref: ./BaseWalletExternalAccountInfo.yaml
- title: US Account
$ref: ./UsAccountExternalAccountInfo.yaml
- title: CLABE Account
$ref: ./ClabeAccountExternalAccountInfo.yaml
- title: PIX Account
$ref: ./PixAccountExternalAccountInfo.yaml
- title: IBAN Account
$ref: ./IbanAccountExternalAccountInfo.yaml
- title: UPI Account
$ref: ./UpiAccountExternalAccountInfo.yaml
- title: NGN Account
$ref: ./NgnAccountExternalAccountInfo.yaml
- title: CAD Account
$ref: ./CadAccountExternalAccountInfo.yaml
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
- title: SGD Account
$ref: ./SgdAccountExternalAccountInfo.yaml
- title: Spark Wallet
$ref: ./SparkWalletExternalAccountInfo.yaml
- title: Lightning
$ref: ./LightningExternalAccountInfo.yaml
- title: Solana Wallet
$ref: ./SolanaWalletExternalAccountInfo.yaml
- title: Tron Wallet
$ref: ./TronWalletExternalAccountInfo.yaml
- title: Polygon Wallet
$ref: ./PolygonWalletExternalAccountInfo.yaml
- title: Base Wallet
$ref: ./BaseWalletExternalAccountInfo.yaml
- title: INR Account
$ref: ./InrAccountInfo.yaml
- title: MXN Account
$ref: ./MxnAccountInfo.yaml
discriminator:
propertyName: accountType
mapping:
Expand All @@ -50,3 +54,5 @@ discriminator:
TRON_WALLET: ./TronWalletExternalAccountInfo.yaml
POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml
BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml
INR_ACCOUNT: ./InrAccountInfo.yaml
MXN_ACCOUNT: ./MxnAccountInfo.yaml
59 changes: 59 additions & 0 deletions openapi/components/schemas/external_accounts/InrAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
type: object
title: INR Account
description: 'Required fields for USD -> INR corridor. Supported payment rails: Upi.'
required:
- accountType
- vpa
- beneficiary
properties:
accountType:
type: string
enum:
- INR_ACCOUNT
example: INR_ACCOUNT
payment_rails:
type: array
items:
type: string
const:
- Upi
description: Supported payment rails for this currency. Auto-populated based on
account type.
receivingCurrency:
type: string
const: INR
description: Receiving currency code. Auto-populated based on account type.
vpa:
type: string
description: The VPA of the bank
beneficiary:
type: object
required:
- birthDate
- fullName
- nationality
properties:
fullName:
type: string
description: The full name of the beneficiary
birthDate:
type: string
description: The birth date of the beneficiary
nationality:
type: string
description: The nationality of the beneficiary
email:
type: string
description: The email of the beneficiary
phoneNumber:
type: string
description: The phone number of the beneficiary
registrationNumber:
type: string
description: The registration number of the beneficiary
countryOfResidence:
type: string
description: The country of residence of the beneficiary
address:
type: string
description: The address of the beneficiary
Comment on lines +1 to +59
Copy link
Contributor

Choose a reason for hiding this comment

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

Schema doesn't follow the existing architecture pattern used by other account types. Compare with UpiAccountExternalAccountInfo.yaml (lines 1-9) which uses allOf to compose BaseExternalAccountInfo.yaml, common/UpiAccountInfo.yaml, and adds beneficiary requirements. This schema duplicates the VPA field definition instead of referencing the common schema.

Also missing INR_ACCOUNT from ExternalAccountType.yaml enum and BaseExternalAccountInfo.yaml discriminator mapping.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/InrAccountInfo.yaml
Line: 1:59

Comment:
Schema doesn't follow the existing architecture pattern used by other account types. Compare with `UpiAccountExternalAccountInfo.yaml` (lines 1-9) which uses `allOf` to compose `BaseExternalAccountInfo.yaml`, `common/UpiAccountInfo.yaml`, and adds beneficiary requirements. This schema duplicates the VPA field definition instead of referencing the common schema.

Also missing `INR_ACCOUNT` from `ExternalAccountType.yaml` enum and `BaseExternalAccountInfo.yaml` discriminator mapping.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +29 to +59
Copy link
Contributor

Choose a reason for hiding this comment

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

Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., ClabeAccountExternalAccountInfo.yaml:8, UpiAccountExternalAccountInfo.yaml:8) reference BeneficiaryOneOf.yaml which provides proper discriminator-based typing between INDIVIDUAL and BUSINESS beneficiaries with beneficiaryType property.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/InrAccountInfo.yaml
Line: 29:59

Comment:
Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., `ClabeAccountExternalAccountInfo.yaml:8`, `UpiAccountExternalAccountInfo.yaml:8`) reference `BeneficiaryOneOf.yaml` which provides proper discriminator-based typing between `INDIVIDUAL` and `BUSINESS` beneficiaries with `beneficiaryType` property.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

61 changes: 61 additions & 0 deletions openapi/components/schemas/external_accounts/MxnAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
type: object
title: MXN Account
description: 'Required fields for USD -> MXN corridor. Supported payment rails: Spei.'
required:
- accountType
- clabeNumber
- beneficiary
properties:
accountType:
type: string
enum:
- MXN_ACCOUNT
example: MXN_ACCOUNT
payment_rails:
type: array
items:
type: string
const:
- Spei
description: Supported payment rails for this currency. Auto-populated based on
account type.
receivingCurrency:
type: string
const: MXN
description: Receiving currency code. Auto-populated based on account type.
clabeNumber:
type: string
description: The CLABE number of the bank
example: '123456789012345678'
minLength: 18
maxLength: 18
pattern: ^[0-9]{18}$
beneficiary:
type: object
required:
- fullName
properties:
fullName:
type: string
description: The full name of the beneficiary
birthDate:
type: string
description: The birth date of the beneficiary
nationality:
type: string
description: The nationality of the beneficiary
email:
type: string
description: The email of the beneficiary
phoneNumber:
type: string
description: The phone number of the beneficiary
registrationNumber:
type: string
description: The registration number of the beneficiary
countryOfResidence:
type: string
description: The country of residence of the beneficiary
address:
type: string
description: The address of the beneficiary
Comment on lines +1 to +61
Copy link
Contributor

Choose a reason for hiding this comment

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

Schema doesn't follow the existing architecture pattern used by other account types. Compare with ClabeAccountExternalAccountInfo.yaml (lines 1-9) which uses allOf to compose BaseExternalAccountInfo.yaml, common/ClabeAccountInfo.yaml, and adds beneficiary requirements. This schema duplicates the CLABE field definition instead of referencing the common schema.

Also missing MXN_ACCOUNT from ExternalAccountType.yaml enum and BaseExternalAccountInfo.yaml discriminator mapping.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnAccountInfo.yaml
Line: 1:61

Comment:
Schema doesn't follow the existing architecture pattern used by other account types. Compare with `ClabeAccountExternalAccountInfo.yaml` (lines 1-9) which uses `allOf` to compose `BaseExternalAccountInfo.yaml`, `common/ClabeAccountInfo.yaml`, and adds beneficiary requirements. This schema duplicates the CLABE field definition instead of referencing the common schema.

Also missing `MXN_ACCOUNT` from `ExternalAccountType.yaml` enum and `BaseExternalAccountInfo.yaml` discriminator mapping.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +33 to +61
Copy link
Contributor

Choose a reason for hiding this comment

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

Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., ClabeAccountExternalAccountInfo.yaml:8, UpiAccountExternalAccountInfo.yaml:8) reference BeneficiaryOneOf.yaml which provides proper discriminator-based typing between INDIVIDUAL and BUSINESS beneficiaries with beneficiaryType property.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnAccountInfo.yaml
Line: 33:61

Comment:
Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., `ClabeAccountExternalAccountInfo.yaml:8`, `UpiAccountExternalAccountInfo.yaml:8`) reference `BeneficiaryOneOf.yaml` which provides proper discriminator-based typing between `INDIVIDUAL` and `BUSINESS` beneficiaries with `beneficiaryType` property.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.