Class: Rafflesia::FoundryModelPrice
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryModelPrice
- Defined in:
- lib/rafflesia/foundry/foundry_model_price.rb
Constant Summary collapse
- HASH_ATTRS =
{ currency: :currency, display: :display, unit: :unit, unit_amount_microusd: :unit_amount_microusd }.freeze
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#display ⇒ Object
Returns the value of attribute display.
-
#unit ⇒ Object
Returns the value of attribute unit.
-
#unit_amount_microusd ⇒ Object
Returns the value of attribute unit_amount_microusd.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryModelPrice
constructor
A new instance of FoundryModelPrice.
Constructor Details
#initialize(json) ⇒ FoundryModelPrice
Returns a new instance of FoundryModelPrice.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/foundry/foundry_model_price.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @currency = hash[:currency] @display = hash[:display] @unit = hash[:unit] @unit_amount_microusd = hash[:unit_amount_microusd] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_model_price.rb', line 15 def currency @currency end |
#display ⇒ Object
Returns the value of attribute display.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_model_price.rb', line 15 def display @display end |
#unit ⇒ Object
Returns the value of attribute unit.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_model_price.rb', line 15 def unit @unit end |
#unit_amount_microusd ⇒ Object
Returns the value of attribute unit_amount_microusd.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_model_price.rb', line 15 def unit_amount_microusd @unit_amount_microusd end |