Class: Plivo::Currency
- Inherits:
-
Object
- Object
- Plivo::Currency
- Defined in:
- lib/plivo/template.rb
Instance Attribute Summary collapse
-
#amount_1000 ⇒ Object
Returns the value of attribute amount_1000.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#fallback_value ⇒ Object
Returns the value of attribute fallback_value.
Instance Method Summary collapse
-
#initialize(fallback_value: nil, currency_code: nil, amount_1000: nil) ⇒ Currency
constructor
A new instance of Currency.
- #to_hash ⇒ Object
Constructor Details
#initialize(fallback_value: nil, currency_code: nil, amount_1000: nil) ⇒ Currency
Returns a new instance of Currency.
68 69 70 71 72 |
# File 'lib/plivo/template.rb', line 68 def initialize(fallback_value: nil, currency_code: nil, amount_1000: nil) @fallback_value = fallback_value @currency_code = currency_code @amount_1000 = amount_1000 end |
Instance Attribute Details
#amount_1000 ⇒ Object
Returns the value of attribute amount_1000.
66 67 68 |
# File 'lib/plivo/template.rb', line 66 def amount_1000 @amount_1000 end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
66 67 68 |
# File 'lib/plivo/template.rb', line 66 def currency_code @currency_code end |
#fallback_value ⇒ Object
Returns the value of attribute fallback_value.
66 67 68 |
# File 'lib/plivo/template.rb', line 66 def fallback_value @fallback_value end |
Instance Method Details
#to_hash ⇒ Object
74 75 76 77 78 79 80 |
# File 'lib/plivo/template.rb', line 74 def to_hash { fallback_value: @fallback_value, currency_code: @currency_code, amount_1000: @amount_1000 }.reject { |_, v| v.nil? } end |