Skip to content

Dev 1885: sandbox-simulations schemas + GET customer sole prop variant#52

Merged
ShreyaThapa merged 7 commits into
mainfrom
DEV-1885
Mar 26, 2026
Merged

Dev 1885: sandbox-simulations schemas + GET customer sole prop variant#52
ShreyaThapa merged 7 commits into
mainfrom
DEV-1885

Conversation

@ShreyaThapa
Copy link
Copy Markdown
Contributor

Updates the Dwolla OpenAPI source so bundled specs and generated clients match real Sandbox and customer payloads.

  • POST /sandbox-simulations

    • Replaces bare type: object request/response with explicit schemas in specs/schemas/sandbox/SandboxSimulations.yml and wires them from specs/resources/sandbox-simulations.yml.
    • Documents three behaviors:
      • Bank transfer processing
        • request: omit body, {}, or JSON null;
        • response: 200 HAL with _links.self and total.
      • VAN / virtual transfers
        • request: type: virtual and transfers (1–10 items);
        • response: 202 Accepted.
      • Customer verification directives
        • request: type: customer-verification, _links.customer.href, and errorCode (PersonalIDRequired, POBoxNotAllowed, AddressNotAssociatedWithBusiness, EINDocumentRequired) for business verified customers in retry or document;
        • response: 200 HAL with _links.self and errorCode (clients should still GET the customer for _embedded.errors).
    • 200 response body is modeled as oneOf the bank-processing response and the customer-verification response so total-only vs errorCode-only shapes stay distinct without inventing a shared empty body.
    • Adds named response examples for bank processing and verification directives.
  • GET /customers/{id}

    • Adds VerifiedSolePropCustomer to the 200 oneOf before VerifiedBusinessCustomer in specs/resources/customers/retrieveUpdateCustomer.yml, aligned with list/update customer schemas, so sole proprietorship customers validate instead of being forced through the controller-based business schema.

Follow-up: regenerate downstream SDKs from the updated bundle

SandboxSimulationBankProcessingRequest:
title: SandboxSimulationBankProcessingRequest
description: |
Omit the body, send JSON null, or an empty JSON object. Triggers processing (or failure) for the last
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Haven't tested this but do we accept JSON null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for flagging this! Sorry, I missed it in the first pass. We don’t accept JSON null as the body; it returns 400 Bad Request error. I’ve updated the spec so bank processing only allows omitting the body or {} (which is supported), removed the null branch from the schema, and documented 400 with BadRequestError.

spencerhunter
spencerhunter previously approved these changes Mar 26, 2026
@ShreyaThapa ShreyaThapa merged commit 5f6e2ff into main Mar 26, 2026
2 checks passed
@ShreyaThapa ShreyaThapa deleted the DEV-1885 branch March 26, 2026 19:01
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.

3 participants