Repository navigation
feat(budget): account_category filter and typed source_anomalies - #10
Draft
makegov-mark[bot] wants to merge 2 commits into
Draft
makegov-mark[bot] wants to merge 2 commits into
makegov-mark[bot] wants to merge 2 commits into
Conversation
Tango API 5.7.0 adds `account_category` and `source_anomalies` to the default shape of `/api/budget/accounts/`. - `ListBudgetAccountsOptions` gains `AccountCategory` and `AccountCategoryIn`. - `BudgetSourceAnomalies(row)` decodes `source_anomalies` into `[]BudgetSourceAnomaly` (pointer fields, `Extra` for unknown keys), with typed source and source-row structs. - Constants name today's categories and anomaly codes; both stay open strings. - `ShapeBudgetAccountsMinimal` now names both fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tango API 5.8.0 adds `data_through_period` to the default shape of `/api/budget/accounts/`: the File A fiscal period (1-12) an account-year's figures run through, null with no File A data. - `ListBudgetAccountsOptions` gains `DataThroughPeriod`, `DataThroughPeriodGte`, `DataThroughPeriodLte` and `DataThroughPeriodIsNull`. - `BudgetDataThroughPeriod(row)` reads the field as `(period, ok)`. - `ShapeBudgetAccountsMinimal` names it right after `fiscal_year`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What
Support for the Tango API 5.7.0 and 5.8.0 budget-account contract changes:
account_category,source_anomalies, anddata_through_period(the File A fiscal period, 1–12, an account-year's figures run through; null with no File A data), read withBudgetDataThroughPeriodand filtered withDataThroughPeriod/Gte/Lte/IsNull./api/budget/accounts/now servesaccount_category(budgetary|credit_financingtoday, an open string) andsource_anomalies(a list of source-data problems,[]when clean) in its default shape.ListBudgetAccountsOptionsgainsAccountCategory(account_category) andAccountCategoryIn(account_category__in, comma-joined).BudgetSourceAnomalies(row Record) ([]BudgetSourceAnomaly, error)decodes the list.BudgetSourceAnomaly,BudgetSourceAnomalySourceandBudgetSourceAnomalyRowfollow the SDK's typed-model pattern: every field optional (pointer or slice), unknown keys inExtra. It returns nil when the key is absent or null and an empty slice when the row is clean.BudgetAccountCategory*) and anomaly codes (BudgetAnomaly*).ShapeBudgetAccountsMinimalnow namesaccount_categoryandsource_anomalies, so a cappedcontract_obligatedarrives with the anomaly explaining it.enacted_balast; documented, no code change needed. There is no anomaly filter.Testing
go vet ./...andgo test -race ./...pass.BudgetSourceAnomalies(full element, nested source rows, unknown keys inExtra, a clean[]row), absent/null keys, and a malformed value.🤖 Generated with Claude Code