Class: ThePlaidApi::IsoCurrencyCode1

Inherits:
Object
  • Object
show all
Defined in:
lib/the_plaid_api/models/iso_currency_code1.rb

Overview

An ISO-4217 currency code.

Constant Summary collapse

ISO_CURRENCY_CODE1 =
[
  # TODO: Write general description for USD
  USD = 'USD'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = USD) ⇒ Object



20
21
22
23
24
# File 'lib/the_plaid_api/models/iso_currency_code1.rb', line 20

def self.from_value(value, default_value = USD)
  return default_value if value.nil?

  default_value
end

.validate(value) ⇒ Object



14
15
16
17
18
# File 'lib/the_plaid_api/models/iso_currency_code1.rb', line 14

def self.validate(value)
  return false if value.nil?

  ISO_CURRENCY_CODE1.include?(value)
end