Sha256: bac956735cce8b861dadb904b73d5d490317f68ce23b9d759811f8966bfae3a1

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

module Fog
  module Support
    class StormOnDemand
      class Tickets < Fog::Collection
        model Fog::Support::StormOnDemand::Ticket

        def create(options)
          ticket = service.create_ticket(options).body
          new(ticket)
        end

        def get(ticket_id, secid)
          service.get_ticket_details(:id => ticket_id, :secid => secid).body
        end

        def all(options = {})
          tickets = service.list_tickets(options).body['items']
          load(tickets)
        end

        def types
          service.list_ticket_types.body['types']
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-storm_on_demand-0.1.0 lib/fog/support/storm_on_demand/models/tickets.rb
fog-storm_on_demand-0.0.1 lib/fog/support/storm_on_demand/models/tickets.rb