Sha256: 7d072f1c0ee08a86eabe83dbb02d8b3767f9484594e112995c0210acf64c5ddd

Contents?: true

Size: 1.22 KB

Versions: 15

Compression:

Stored size: 1.22 KB

Contents

require 'fog/storm_on_demand/core'
require 'fog/storm_on_demand/shared'

module Fog
  module Billing
    class StormOnDemand < Fog::Service
      requires :storm_on_demand_username, :storm_on_demand_password
      recognizes :storm_on_demand_auth_url

      model_path 'fog/storm_on_demand/models/billing'
      model      :invoice
      collection :invoices
      model      :payment
      collection :payments

      request_path 'fog/storm_on_demand/requests/billing'
      request :list_invoices
      request :get_invoice
      request :next_invoice
      request :make_payment

      class Mock
        def self.data
          @data ||= Hash.new
        end

        def self.reset
          @data = nil
        end

        def self.reset_data(keys=data.keys)
          for key in [*keys]
            data.delete(key)
          end
        end

        def initialize(options={})
          @storm_on_demand_username = options[:storm_on_demand_username]
        end

        def data
          self.class.data[@storm_on_demand_username]
        end

        def reset_data
          self.class.data.delete(@storm_on_demand_username)
        end
      end

      class Real
        include Fog::StormOnDemand::RealShared
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/storm_on_demand/billing.rb
fog-1.25.0 lib/fog/storm_on_demand/billing.rb
nsidc-fog-1.24.1 lib/fog/storm_on_demand/billing.rb
fog-1.24.0 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.11 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.10 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.9 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.8 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.7 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.6 lib/fog/storm_on_demand/billing.rb
fog-1.23.0 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.4 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.3 lib/fog/storm_on_demand/billing.rb
ns-fog-1.22.2 lib/fog/storm_on_demand/billing.rb
fog-1.22.1 lib/fog/storm_on_demand/billing.rb