Class: LockstepSdk::CurrencyModel
- Inherits:
-
Object
- Object
- LockstepSdk::CurrencyModel
- Defined in:
- lib/lockstep_sdk/models/currency_model.rb
Overview
Represents an ISO-4217 currency code definition
Instance Attribute Summary collapse
-
#alpha_code ⇒ String
Alphabetic code for the given currency.
-
#currency_name ⇒ String
Name of currency.
-
#minor_unit ⇒ Int32
Number of places after the decimal for this currency.
-
#numeric_code ⇒ String
Numeric code for the given currency.
-
#symbol ⇒ String
Symbol for the given currency.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ CurrencyModel
constructor
Initialize the CurrencyModel using the provided prototype.
Constructor Details
#initialize(params = {}) ⇒ CurrencyModel
Initialize the CurrencyModel using the provided prototype
24 25 26 27 28 29 30 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 24 def initialize(params = {}) @alpha_code = params.dig(:alpha_code) @numeric_code = params.dig(:numeric_code) @currency_name = params.dig(:currency_name) @minor_unit = params.dig(:minor_unit) @symbol = params.dig(:symbol) end |
Instance Attribute Details
#alpha_code ⇒ String
Returns Alphabetic code for the given currency.
33 34 35 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 33 def alpha_code @alpha_code end |
#currency_name ⇒ String
Returns Name of currency.
37 38 39 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 37 def currency_name @currency_name end |
#minor_unit ⇒ Int32
Returns Number of places after the decimal for this currency.
39 40 41 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 39 def minor_unit @minor_unit end |
#numeric_code ⇒ String
Returns Numeric code for the given currency.
35 36 37 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 35 def numeric_code @numeric_code end |
#symbol ⇒ String
Returns Symbol for the given currency.
41 42 43 |
# File 'lib/lockstep_sdk/models/currency_model.rb', line 41 def symbol @symbol end |