Class: Rafflesia::DeploymentOffer

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/deployment_offer.rb

Constant Summary collapse

HASH_ATTRS =
{
  currency: :currency,
  deployment_id: :deployment_id,
  display: :display,
  effective_from: :effective_from,
  effective_until: :effective_until,
  id: :id,
  object: :object,
  unit: :unit,
  unit_amount_microusd: :unit_amount_microusd
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DeploymentOffer

Returns a new instance of DeploymentOffer.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @currency = hash[:currency]
  @deployment_id = hash[:deployment_id]
  @display = hash[:display]
  @effective_from = hash[:effective_from]
  @effective_until = hash[:effective_until]
  @id = hash[:id]
  @object = hash[:object]
  @unit = hash[:unit]
  @unit_amount_microusd = hash[:unit_amount_microusd]
end

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def currency
  @currency
end

#deployment_idObject

Returns the value of attribute deployment_id.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def deployment_id
  @deployment_id
end

#displayObject

Returns the value of attribute display.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def display
  @display
end

#effective_fromObject

Returns the value of attribute effective_from.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def effective_from
  @effective_from
end

#effective_untilObject

Returns the value of attribute effective_until.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def effective_until
  @effective_until
end

#idObject

Returns the value of attribute id.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def id
  @id
end

#objectObject

Returns the value of attribute object.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def object
  @object
end

#unitObject

Returns the value of attribute unit.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def unit
  @unit
end

#unit_amount_microusdObject

Returns the value of attribute unit_amount_microusd.



20
21
22
# File 'lib/rafflesia/foundry/deployment_offer.rb', line 20

def unit_amount_microusd
  @unit_amount_microusd
end