Skip to content

Remove deprecated .account method, update specs and README #142

Description

@marcosdemelo

Context

The `.account` method has been deprecated since PR #13, which added support for multiple accounts per OFX file.

Before that PR, the library assumed a single account per file — `account` was the primary API and `build_account` queried the entire document. PR #13 refactored `build_account` to receive a scoped node and introduced `accounts` (plural) as the correct replacement. The `account` method was kept for legacy support, explicitly marked `# DEPRECATED`, and changed to return only `.first` — but no runtime `warn` was ever emitted.

Issue #91 was filed by a user who was silently burned: `.account` kept working without errors but returned only the first account's transactions, corrupting financial data for a period without any indication of the problem.

Twelve years have passed since the deprecation. It is time to remove it.

Scope

1. Remove def account from lib/ofx/parser/ofx102.rb

2. Migrate specs — the following files still use @parser.account and need to be updated to @parser.accounts.first:

  • spec/ofx/account_spec.rb
  • spec/ofx/transaction_spec.rb
  • spec/ofx/ofx102_spec.rb

3. Update README Usage section (building on top of #141) — the current example still references the removed method:

# Before (deprecated)
OFX("file.ofx") do
  p account
  p account.balance
  p account.transactions
end
# After
OFX("file.ofx") do
  p accounts
  p accounts.first.balance
  p accounts.first.transactions
end

4. Version bump — this is a breaking change; bump to 1.0.0.

This version marks a meaningful milestone: the public API is now intentional, multi-account support is first-class, and legacy compatibility shims have been removed. The release notes for 1.0.0 should explicitly advise users to review recent changes before upgrading, as silent behavioral differences may affect existing integrations.

5. Formalize OFX version support — there is currently no document describing which OFX versions are supported, to what extent, and what the known limitations are. This should be addressed alongside the 1.0.0 release, either as a dedicated section in the README or as a separate document.


@annacruz, your evaluation would be very welcome on a few points in this issue: whether 1.0.0 feels like the right moment for this milestone, the scope of the OFX version support document, and any concerns about the release notes guidance for existing users. No rush — just want to make sure we're aligned before moving forward.

References

  • PR #13 — original deprecation
  • Issue #91 — user impact report
  • Issue #141 — pending README additions (predecessor for this README change)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions