Sha256: 30ce42f4585d4e12a99d59ba94305d5a369a5cdfcae80f3a5e28e51230bf42a7

Contents?: true

Size: 994 Bytes

Versions: 3

Compression:

Stored size: 994 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module Compute

        class DescribeReservedInstancesOfferings < Fog::Parsers::Base

          def reset
            @reserved_instances_offering = {}
            @response = { 'reservedInstancesOfferingsSet' => [] }
          end

          def end_element(name)
            case name
            when 'availabilityZone', 'instanceType', 'productDescription', 'reservedInstancesOfferingId'
              @reserved_instances_offering[name] = value
            when 'duration'
              @reserved_instances_offering[name] = value.to_i
            when 'fixedPrice', 'usagePrice'
              @reserved_instances_offering[name] = value.to_f
            when 'item'
              @response['reservedInstancesOfferingsSet'] << @reserved_instances_offering
              @reserved_instances_offering = {}
            when 'requestId'
              @response[name] = value
            end
          end

        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.8.1 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.8.0 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb