Sha256: 098047b68b651d1ecf11f4812470df144c237940fa08ba31482365ee9008e16a

Contents?: true

Size: 545 Bytes

Versions: 13

Compression:

Stored size: 545 Bytes

Contents

require "fog/brightbox/models/compute/account"

module Fog
  module Compute
    class Brightbox
      class Accounts < Fog::Collection
        model Fog::Compute::Brightbox::Account

        def all(options = {})
          data = service.list_accounts(options)
          load(data)
        end

        def get(identifier)
          return nil if identifier.nil? || identifier == ""
          data = service.get_account(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

13 entries across 11 versions & 2 rubygems

Version Path
fog-brightbox-1.0.0.rc1 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.16.1 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.16.0 lib/fog/brightbox/models/compute/accounts.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-brightbox-0.15.0/lib/fog/brightbox/models/compute/accounts.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-brightbox-0.15.0/lib/fog/brightbox/models/compute/accounts.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-brightbox-0.15.0/lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.15.0 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.14.0 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.13.0 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.12.0 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.11.0 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.10.1 lib/fog/brightbox/models/compute/accounts.rb
fog-brightbox-0.10.0 lib/fog/brightbox/models/compute/accounts.rb