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.
73 74 75 76 77 |
# File 'lib/plivo/template.rb', line 73 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.
71 72 73 |
# File 'lib/plivo/template.rb', line 71 def amount_1000 @amount_1000 end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
71 72 73 |
# File 'lib/plivo/template.rb', line 71 def currency_code @currency_code end |
#fallback_value ⇒ Object
Returns the value of attribute fallback_value.
71 72 73 |
# File 'lib/plivo/template.rb', line 71 def fallback_value @fallback_value end |
Instance Method Details
#to_hash ⇒ Object
79 80 81 82 83 84 85 |
# File 'lib/plivo/template.rb', line 79 def to_hash { fallback_value: @fallback_value, currency_code: @currency_code, amount_1000: @amount_1000 }.reject { |_, v| v.nil? } end |