Sync SDK DTOs with Unit API docs (automated, 2026-05-14)#76
Closed
cursor[bot] wants to merge 5 commits into
Closed
Sync SDK DTOs with Unit API docs (automated, 2026-05-14)#76cursor[bot] wants to merge 5 commits into
cursor[bot] wants to merge 5 commits into
Conversation
Add the following optional fields to IndividualApplicationDTO, sourced from https://docs.unit.co/resources#individualapplication: - updatedAt (RFC3339 Date string) -- date the resource was last updated - passport (string) -- individual passport number, set when ssn absent - nationality (ISO 3166-1 alpha-2) -- always set when passport is populated - industry (Industry) -- sole-prop business industry - idTheftScore (number 0-1000) -- ID theft verification score Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Add the following optional fields to DepositAccountDTO, sourced from https://docs.unit.co/resources#depositaccount: - updatedAt (RFC3339 Date string) -- date the resource was last updated - freezeReason (string) -- reason an account was frozen (Fraud, ByBank, or free-text description) - fraudReason (FraudReason) -- expanded fraud reason when Fraud is the close/freeze reason - dacaStatus (Entered | Activated) -- Deposit Account Control Agreement status Also exposes a DacaStatus literal type for consumers. Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Add the following optional fields to BusinessApplicationDTO, sourced from https://docs.unit.co/resources#businessapplication: - updatedAt (RFC3339 Date string) -- date the resource was last updated - industry (Industry) -- business industry, when specified - stockSymbol (string) -- stock symbol (ticker) of the business Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Add the following optional fields to AchPaymentDTO, sourced from https://docs.unit.co/resources#ach-payment: - expectedCompletionDate (RFC3339 Date string) -- only for ACH credit with statuses Pending or Sent; date the counterparty will handle the request - counterpartyVerificationMethod (string) -- verification method of the counterparty (e.g. 'Plaid') Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
Add the following optional fields to AchReceivedPaymentDTO, sourced from https://docs.unit.co/resources#ach-received-payment: - originatorEntityId (string) -- unique identifier by which the originator is formally recognized within the ACH network - receivingEntityName (string) -- name of the recipient as declared by the originator of the payment Co-authored-by: Avery Kushner <avesk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. All additions are optional kwargs with
Nonedefaults.Resources synced
1.
IndividualApplicationDTO(unit/models/application.py)Source: https://docs.unit.co/resources#individualapplication
Added optional fields
updatedAtpassportssnorpassportwill be populated.nationalitypassportis populated, optional withssn.industryIndustryidTheftScoreManual review needed
archived(boolean, non-Optional) which is missing from the DTO. Possible new required field — flag as breaking-change candidate before adding.2.
DepositAccountDTO(unit/models/account.py)Source: https://docs.unit.co/resources#depositaccount
Added optional fields
updatedAtfreezeReasonFraud,ByBank, or free-text).fraudReasonFraudReasonFraudis the reason (e.g.CardActivity,IdentityTheft, ...).dacaStatusEntered|ActivatedDacaStatusliteral alias added.Manual review needed
interestTerms(Interest Terms object) as non-Optional but conditionally returned (only whenextraFields[account]is requested). Skipped to avoid creating a new nested type without spec; flag for follow-up if SDK callers need typed access.3.
BusinessApplicationDTO(unit/models/application.py)Source: https://docs.unit.co/resources#businessapplication
Added optional fields
updatedAtindustryIndustrystockSymbolManual review needed
archived(boolean, non-Optional) which is missing from the DTO. Possible new required field — flag as breaking-change candidate before adding.businessVerticalas non-Optional, but the DTO has it Optional. Required ↔ Optional flip; defer to humans.4.
AchPaymentDTO(unit/models/payment.py)Source: https://docs.unit.co/resources#ach-payment
Added optional fields
expectedCompletionDatecounterpartyVerificationMethodPlaid).Manual review needed
sameDay(boolean) andsecCode(string) as non-Optional but they aren't on the DTO. Possible new required fields — flag as breaking-change candidates.5.
AchReceivedPaymentDTO(unit/models/payment.py)Source: https://docs.unit.co/resources#ach-received-payment
Added optional fields
originatorEntityIdreceivingEntityNameManual review needed
direction(string) andisAdvanceable(boolean) as non-Optional but they aren't on the DTO. Possible new required fields — flag as breaking-change candidates.Backward compatibility
All additions are optional kwargs with
Nonedefaults; existing callers are unaffected.python -c "from unit.models.codecs import DtoDecoder, mappings; print(len(mappings))"returns 117 (unchanged).Queued for next run
Resources with detected optional drift that did not fit in this run (5-resource cap):
IndividualCustomerDTO(unit/models/customer.py) — missingeligibleProducts,ein. Also: docsarchiveReasonenum addsFraudLinkedToFraudulentCustomernot in code (manual review).BusinessCustomerDTO(unit/models/customer.py) — missingeligibleProducts. SamearchiveReasonenum drift (manual review).IndividualDebitCardDTO/BusinessDebitCardDTO(unit/models/card.py) — missingupdatedAt. Docs also listbinas non-Optional (manual review).WirePaymentDTO(unit/models/payment.py) — missingimadOmad.BusinessVirtualDebitCardDTO(unit/models/card.py) — missingupdatedAt,shippingAddress,tags,design.Opened by the docs-sync automation. Mirror automation will open a paired API PR against Truss-pmts/api once this PR is opened.