mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 06:44:52 +00:00
* feat: add valuations API endpoints for managing account reconciliations * refactor: formatting * fix: make account extraction clearer * feat: validation and error handling improvements * feat: transaction * feat: error handling * Add API documentation LLM context * Make it easier for people * feat: transaction in creation * feat: add OpenAPI spec for Valuations API * fix: update notes validation to check for key presence * Prevent double render * All other docs use `apiKeyAuth` * More `apiKeyAuth` * Remove testing assertions from API doc specs * fix: correct valuation entry references --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
20 lines
540 B
Ruby
20 lines
540 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.id valuation.entry.id
|
|
json.date valuation.entry.date
|
|
json.amount valuation.entry.amount_money.format
|
|
json.currency valuation.entry.currency
|
|
json.notes valuation.entry.notes
|
|
json.kind valuation.kind
|
|
|
|
# Account information
|
|
json.account do
|
|
json.id valuation.entry.account.id
|
|
json.name valuation.entry.account.name
|
|
json.account_type valuation.entry.account.accountable_type.underscore
|
|
end
|
|
|
|
# Additional metadata
|
|
json.created_at valuation.created_at.iso8601
|
|
json.updated_at valuation.updated_at.iso8601
|