mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 06:44:52 +00:00
* Feat(CoinStats): Scaffold implementation, not yet functional * Feat(CoinStats): Implement crypto wallet balance and transactions * Feat(CoinStats): Add tests, Minor improvements * Feat(CoinStats): Utilize bulk fetch API endpoints * Feat(CoinStats): Migrate strings to i8n * Feat(CoinStats): Fix error handling in wallet link modal * Feat(CoinStats): Implement hourly provider sync job * Feat(CoinStats): Generate docstrings * Fix(CoinStats): Validate API Key on provider update * Fix(Providers): Safely handle race condition in merchance creation * Fix(CoinStats): Don't catch system signals in account processor * Fix(CoinStats): Preload before iterating accounts * Fix(CoinStats): Add no opener / referrer to API dashboard link * Fix(CoinStats): Use strict matching for symbols * Fix(CoinStats): Remove dead code in transactions importer * Fix(CoinStats): Avoid transaction fallback ID collisions * Fix(CoinStats): Improve Blockchains fetch error handling * Fix(CoinStats): Enforce NOT NULL constraint for API Key schema * Fix(CoinStats): Migrate sync status strings to i8n * Fix(CoinStats): Use class name rather than hardcoded string * Fix(CoinStats): Use account currency rather than hardcoded USD * Fix(CoinStats): Migrate from standalone to Provider class * Fix(CoinStats): Fix test failures due to string changes
48 lines
1.3 KiB
Ruby
48 lines
1.3 KiB
Ruby
# Module for providers that provide institution/bank metadata
|
|
# Include this module in your adapter if the provider returns institution information
|
|
module Provider::InstitutionMetadata
|
|
extend ActiveSupport::Concern
|
|
|
|
# Returns the institution's domain (e.g., "chase.com")
|
|
# @return [String, nil] The institution domain or nil if not available
|
|
def institution_domain
|
|
nil
|
|
end
|
|
|
|
# Returns the institution's display name (e.g., "Chase Bank")
|
|
# @return [String, nil] The institution name or nil if not available
|
|
def institution_name
|
|
nil
|
|
end
|
|
|
|
# Returns the institution's website URL
|
|
# @return [String, nil] The institution URL or nil if not available
|
|
def institution_url
|
|
nil
|
|
end
|
|
|
|
# Returns the institution's brand color (for UI purposes)
|
|
# @return [String, nil] The hex color code or nil if not available
|
|
def institution_color
|
|
nil
|
|
end
|
|
|
|
# Returns the institution/account logo URL (direct image URL)
|
|
# @return [String, nil] The logo URL or nil if not available
|
|
def logo_url
|
|
nil
|
|
end
|
|
|
|
# Returns a hash of all institution metadata
|
|
# @return [Hash] Hash containing institution metadata
|
|
def institution_metadata
|
|
{
|
|
domain: institution_domain,
|
|
name: institution_name,
|
|
url: institution_url,
|
|
color: institution_color,
|
|
logo_url: logo_url
|
|
}.compact
|
|
end
|
|
end
|