Skip to content

use enum for purpose of account#295

Merged
wuvictor-95 merged 1 commit intomainfrom
03-24-use_enum_for_purpose_of_account
Mar 25, 2026
Merged

use enum for purpose of account#295
wuvictor-95 merged 1 commit intomainfrom
03-24-use_enum_for_purpose_of_account

Conversation

@wuvictor-95
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 25, 2026 1:12am

Request Review

@wuvictor-95 wuvictor-95 marked this pull request as ready for review March 25, 2026 01:11
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

fix(types): change purposeOfAccount to enum in BusinessInfo/BusinessCustomerFields

openapi

fix(types): convert purposeOfAccount to enum in BusinessInfo/BusinessInfoUpdate

python

fix(types): change purpose_of_account to enum in business_customer_fields/business_info

typescript

fix(types): specify purposeOfAccount enum values in customers
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

pip install https://pkg.stainless.com/s/grid-python/65a7b28c65b3244ddcbf608c6fe8458cccc6fbfd/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-typescript studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/3fd2bcb5f1f90fb69bb4f7217bb21918f8bb27f8/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-25 01:21:39 UTC

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 25, 2026

Greptile Summary

(ノ◕ヮ◕)ノ*:・゚✧  cute change alert!  ✧゚・: *ヽ(◕ヮ◕ヽ)
   /|、
  (˚ˎ 。7
   |、˜〵
   じしˍ,)ノ  meow~ great work victor!

This PR replaces the purposeOfAccount field in BusinessInfo and BusinessInfoUpdate from a free-text string to a strongly-typed enum (PurposeOfAccount). The old coarse-grained values (PAYMENTS, PAYROLL, TREASURY, TRADING, LENDING, COLLECTIONS) are replaced with 12 more descriptive, use-case-specific values better aligned with Grid's payments use cases.

Changes:

  • New PurposeOfAccount.yaml enum schema with 12 granular values replacing the previous 6
  • BusinessInfo and BusinessInfoUpdate now $ref the enum instead of inlining a plain string
  • Example values updated from free-text ("Payout to contractors") to the correct enum value (CONTRACTOR_PAYOUTS)
  • Both generated bundles (openapi.yaml, mintlify/openapi.yaml) are correctly in sync with the source

Notable: This is a breaking change — the old enum values (PAYMENTS, PAYROLL, TREASURY, TRADING, LENDING, COLLECTIONS) are completely removed. Existing API consumers using those values will need to migrate to the new set. Consider documenting a migration mapping (e.g. PAYROLLEMPLOYEE_PAYOUTS, PAYMENTS → context-specific value) in a changelog or migration guide.

Confidence Score: 4/5

  • Safe to merge — changes are technically correct and well-structured; the only consideration is communicating the breaking enum change to existing API consumers.
  • All source files, both generated bundles, and the example values are consistent and correct. The enum expansion is well thought out. Score is 4 rather than 5 because this is a breaking change (old enum values fully removed) and there is no accompanying migration guide or changelog entry to help existing consumers transition.
  • No files require special attention — all changed files are in sync and correct.

Important Files Changed

Filename Overview
openapi/components/schemas/customers/PurposeOfAccount.yaml Replaces 6 old enum values (PAYMENTS, PAYROLL, TREASURY, TRADING, LENDING, COLLECTIONS) with 12 more granular ones; OTHER is preserved. Breaking change — well-structured and complete.
openapi/components/schemas/customers/BusinessInfo.yaml Switches purposeOfAccount from an inline free-text string to a $ref to PurposeOfAccount.yaml — correct and consistent with the enum-first approach.
openapi/components/schemas/customers/BusinessInfoUpdate.yaml Same purposeOfAccount inline-to-$ref migration as BusinessInfo.yaml; change is clean and consistent.
openapi/paths/customers/customers.yaml Example value updated from free-text "Payout to contractors" to the correct enum value CONTRACTOR_PAYOUTS.
openapi.yaml Generated bundle — reflects all source changes correctly; PurposeOfAccount schema added, both BusinessInfo and BusinessInfoUpdate updated, example updated.
mintlify/openapi.yaml Generated Mintlify bundle — identical changes to openapi.yaml, correctly in sync.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[POST /customers request] --> B{purposeOfAccount field}
    B --> C[PurposeOfAccount enum]
    C --> D[CONTRACTOR_PAYOUTS]
    C --> E[CREATOR_PAYOUTS]
    C --> F[EMPLOYEE_PAYOUTS]
    C --> G[MARKETPLACE_SELLER_PAYOUTS]
    C --> H[SUPPLIER_PAYMENTS]
    C --> I[CROSS_BORDER_B2B]
    C --> J[AR_AUTOMATION]
    C --> K[AP_AUTOMATION]
    C --> L[EMBEDDED_PAYMENTS]
    C --> M[PLATFORM_FEE_COLLECTION]
    C --> N[P2P_TRANSFERS]
    C --> O[CHARITABLE_DONATIONS]
    C --> P[OTHER]
    Q[BusinessInfo] -- $ref --> C
    R[BusinessInfoUpdate] -- $ref --> C
Loading

Reviews (1): Last reviewed commit: "use enum for purpose of account" | Re-trigger Greptile

@wuvictor-95 wuvictor-95 merged commit fdcb412 into main Mar 25, 2026
8 of 9 checks passed
Copy link
Copy Markdown
Contributor Author

Merge activity

@wuvictor-95 wuvictor-95 deleted the 03-24-use_enum_for_purpose_of_account branch March 25, 2026 01:15
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