Class: WhittakerTech::Midas::Exchange
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- WhittakerTech::Midas::Exchange
- Includes:
- Bankable
- Defined in:
- app/models/whittaker_tech/midas/exchange.rb
Overview
Exchange is an immutable audit record of a single currency conversion.
It owns two Coins via the standard Bankable DSL — from (a copy of the
value being converted) and to (the converted result) — plus the rate,
provider, and timestamp used.
Exchange is write-only: nothing reads it back to resolve future conversions. It exists purely as an auditable record of what was converted, at what rate, using which provider, and when.