feat: removing customerId from platformExternalAccount request#218
feat: removing customerId from platformExternalAccount request#218
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-python studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryCreates a dedicated
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/PlatformExternalAccountCreateRequest.yaml | New schema created for platform external account creation, properly excludes customer-specific fields |
| openapi/paths/platform/platform_external_accounts.yaml | Updated to use new schema; example incorrectly nests platformAccountId inside accountInfo (pre-existing issue) |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Client Request] --> B{Endpoint Type?}
B -->|Platform| C[POST /platform/external_accounts]
B -->|Customer| D[POST /customers/external_accounts]
C --> E[PlatformExternalAccountCreateRequest]
D --> F[ExternalAccountCreateRequest]
E --> G{Required Fields}
F --> H{Required Fields}
G --> I[currency]
G --> J[accountInfo]
G --> K[platformAccountId optional]
H --> L[currency]
H --> M[accountInfo]
H --> N[customerId optional]
H --> O[platformAccountId optional]
H --> P[defaultUmaDepositAccount optional]
E --> Q[Creates Platform Account]
F --> R[Creates Customer Account]
Last reviewed commit: fabaec1
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/platform/platform_external_accounts.yaml
Line: 94
Comment:
`platformAccountId` should be a top-level field, not nested inside `accountInfo`. Move it outside to align with the schema.
```suggestion
platformAccountId: ext_acc_123456
```
How can I resolve this? If you propose a fix, please make it concise. |

TL;DR
Added a new
PlatformExternalAccountCreateRequestschema with aplatformAccountIdfield and updated the platform external accounts endpoint to use this new schema instead of the genericExternalAccountCreateRequest.What changed?
PlatformExternalAccountCreateRequestschema that includes aplatformAccountIdfield for platform-specific account identificationcurrencyandaccountInfo) as the original but adds the optionalplatformAccountIdfieldHow to test?
platformAccountIdfieldplatformAccountIdstill work as expectedplatformAccountIdproperly store and reference the platform's identifierWhy make this change?
This change allows platforms to associate their own internal account identifiers with external accounts, enabling easier account management and reference within their own systems while maintaining compatibility with the existing API structure.