mirror of
https://github.com/we-promise/sure.git
synced 2026-04-14 09:34:05 +00:00
* Flatten Holding model * Flatten balance model * Entries domain renames * Fix valuations reference * Fix trades stream * Fix brakeman warnings * Fix tests * Replace existing entryable type references in DB
21 lines
352 B
Ruby
21 lines
352 B
Ruby
module Transaction::Provided
|
|
extend ActiveSupport::Concern
|
|
|
|
def fetch_enrichment_info
|
|
return nil unless provider
|
|
|
|
response = provider.enrich_transaction(
|
|
entry.name,
|
|
amount: entry.amount,
|
|
date: entry.date
|
|
)
|
|
|
|
response.data
|
|
end
|
|
|
|
private
|
|
def provider
|
|
Provider::Registry.get_provider(:synth)
|
|
end
|
|
end
|