Skip to content

Sync SDK DTOs with Unit API docs (automated, 2026-05-14)#77

Open
cursor[bot] wants to merge 5 commits into
masterfrom
cursor/unit-sdk-dto-documentation-b995
Open

Sync SDK DTOs with Unit API docs (automated, 2026-05-14)#77
cursor[bot] wants to merge 5 commits into
masterfrom
cursor/unit-sdk-dto-documentation-b995

Conversation

@cursor

@cursor cursor Bot commented May 14, 2026

Copy link
Copy Markdown

Summary

Automated sync against https://docs.unit.co/resources covering 5 resource DTOs. Each resource is a separate commit so reviewers can split or cherry-pick.

Resources synced

1. AccountEndOfDayDTO (unit/models/account_end_of_day.py)

Source: https://docs.unit.co/resources#account-end-of-day

Added optional fields

Field Type Docs note
overdraftLimit integer Optional. The overdraft limit amount.

Manual review needed

  • None.

2. AchPaymentDTO (unit/models/payment.py)

Source: https://docs.unit.co/resources#ach-payment

Added optional fields

Field Type Docs note
expectedCompletionDate RFC3339 Date string Optional. For ACH credit with statuses Pending, Sent, the date on which the counterparty will handle the request.
counterpartyVerificationMethod string Optional. Counterparty verification method (e.g. Plaid).

Manual review needed

  • sameDay (boolean): present in docs as a non-Optional attribute but missing from AchPaymentDTO. Adding it as required would be a breaking change for any caller currently constructing the DTO; flagging for human triage.
  • secCode (string, one of WEB/CCD/PPD): present in docs as a non-Optional attribute but missing from AchPaymentDTO. Same breaking-change concern as sameDay.

3. AchReceivedPaymentDTO (unit/models/payment.py)

Source: https://docs.unit.co/resources#ach-received-payment

Added optional fields

Field Type Docs note
originatorEntityId string Optional. A unique identifier by which the originator is formally recognized within the ACH network.
receivingEntityName string Optional. The name of the recipient as declared by the originator.

Manual review needed

  • isAdvanceable (boolean): docs list this as a non-Optional attribute but it's missing from AchReceivedPaymentDTO. Adding as required would be a breaking change.
  • direction (string Debit/Credit): docs list this as a non-Optional attribute but it's missing from AchReceivedPaymentDTO. Adding as required would be a breaking change.

4. DepositAccountDTO (unit/models/account.py)

Source: https://docs.unit.co/resources#depositaccount

Added optional fields

Field Type Docs note
updatedAt RFC3339 Date string Optional. The date the resource was updated.
freezeReason string Optional. The reason the account was frozen, either Fraud, ByBank, or free-text.
fraudReason string Optional. Expanded fraud reason when Fraud is the close reason.
dacaStatus string Optional. DACA status (Entered, Activated, etc.).

Manual review needed

  • interestTerms (Interest Terms): docs list this as a non-Optional nested attribute but the field is missing from DepositAccountDTO. The docs also note "only available if extraFields[account] is used", suggesting it is in practice optional, but the table doesn't mark it so. Flagging for human triage; if added, it would also need an InterestTerms sub-object class.

5. IndividualApplicationDTO (unit/models/application.py)

Source: https://docs.unit.co/resources#individualapplication

Added optional fields

Field Type Docs note
updatedAt RFC3339 Date string Optional. The date the resource was updated.
nationality ISO31661-Alpha2 string Optional when SSN is populated; required when passport is populated.
industry Industry Optional. Industry of the sole proprietor, if specified.
idTheftScore number Optional. Score (0-1000) for ID theft verification.

Manual review needed

  • passport (string): docs list this as a non-Optional attribute (with the note "Either ssn or passport will be populated") but it is currently absent from IndividualApplicationDTO. Whether to add it as a required or optional kwarg is a human call.
  • archived (boolean): docs list this as a non-Optional attribute but it is currently absent from IndividualApplicationDTO. Same triage question.

Backward compatibility

All additions are optional kwargs with None defaults; existing callers are unaffected.

Queued for next run

The following resources also have drift versus the docs but were deferred to keep this run scoped to 5 resources (cap defined by the docs-sync automation):

  • BusinessApplicationDTO — missing optional updatedAt, industry; manual review for archived.
  • CounterpartyDTOtags exists in docs but is not formally marked Optional; manual review.
  • WirePaymentDTOimadOmad exists in docs but is not formally marked Optional; manual review.
  • Several resource families not yet present in the SDK (AccountHold, WireReceivedPayment, account limit overrides, repayments, recurring payments, credit applications, fraud cases, etc.) — adding these requires new DTO files plus codec entries and is left for a follow-up.

Opened by the docs-sync automation. Mirror automation will open a paired API PR against Truss-pmts/api once this PR is opened.

Open in Web View Automation 

cursoragent and others added 5 commits May 14, 2026 22:01
Adds optional fields documented at https://docs.unit.co/resources#account-end-of-day:
- overdraftLimit (Optional integer)

Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Adds optional fields documented at https://docs.unit.co/resources#ach-payment:
- expectedCompletionDate (Optional RFC3339 Date string)
- counterpartyVerificationMethod (Optional string)

Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Adds optional fields documented at https://docs.unit.co/resources#ach-received-payment:
- originatorEntityId (Optional string)
- receivingEntityName (Optional string)

Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Adds optional fields documented at https://docs.unit.co/resources#depositaccount:
- updatedAt (Optional RFC3339 Date string)
- freezeReason (Optional string)
- fraudReason (Optional string)
- dacaStatus (Optional string)

Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Adds optional fields documented at https://docs.unit.co/resources#individualapplication:
- updatedAt (Optional RFC3339 Date string)
- nationality (Optional ISO31661-Alpha2 string)
- industry (Optional Industry)
- idTheftScore (Optional number)

Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
@cursor cursor Bot marked this pull request as ready for review May 14, 2026 22:05
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.

1 participant