Class: Fog::Parsers::Redshift::AWS::DescribeReservedNodeOfferings
- Inherits:
-
Base
- Object
- Base
- Fog::Parsers::Redshift::AWS::DescribeReservedNodeOfferings
- Defined in:
- lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb
Instance Method Summary collapse
- #end_element(name) ⇒ Object
- #fresh_reserved_node_offering ⇒ Object
-
#reset ⇒ Object
:marker - (String) :reserved_node_offerings - (Array) :reserved_node_offering_id - (String) :node_type - (String) :duration - (Integer) :fixed_price - (Numeric) :usage_price - (Numeric) :currency_code - (String) :offering_type - (String) :recurring_charges - (Array) :recurring_charge_amount - (Numeric) :recurring_charge_frequency - (String).
- #start_element(name, attrs = []) ⇒ Object
Instance Method Details
#end_element(name) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb', line 36 def end_element(name) super case name when 'Marker' @response[name] = value when 'Duration' @reserved_node_offering[name] = value.to_i when 'FixedPrice', 'UsagePrice' @reserved_node_offering[name] = value.to_f when 'CurrencyCode', 'OfferingType', 'NodeType', 'ReservedNodeOfferingId' @reserved_node_offering[name] = value when 'RecurringChargeAmount' @recurring_charge[name] = value.to_f when 'RecurringChargeFrequency' @recurring_charge[name] = value when 'RecurringCharge' @reserved_node_offering['RecurringCharges'] << {name => @recurring_charge} @recurring_charge = {} when 'ReservedNodeOffering' @response['ReservedNodeOfferings'] << {name => @reserved_node_offering} @reserved_node_offering = fresh_reserved_node_offering end end |
#fresh_reserved_node_offering ⇒ Object
22 23 24 |
# File 'lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb', line 22 def fresh_reserved_node_offering {'RecurringCharges' => []} end |
#reset ⇒ Object
:marker - (String) :reserved_node_offerings - (Array)
:reserved_node_offering_id - (String)
:node_type - (String)
:duration - (Integer)
:fixed_price - (Numeric)
:usage_price - (Numeric)
:currency_code - (String)
:offering_type - (String)
:recurring_charges - (Array)
:recurring_charge_amount - (Numeric)
:recurring_charge_frequency - (String)
18 19 20 |
# File 'lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb', line 18 def reset @response = { 'ReservedNodeOfferings' => [] } end |
#start_element(name, attrs = []) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb', line 26 def start_element(name, attrs = []) super case name when 'ReservedNodeOfferings' @reserved_node_offering = fresh_reserved_node_offering when 'RecurringCharges' @recurring_charge = {} end end |