Class: Fog::Support::StormOnDemand::Ticket

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/support/storm_on_demand/models/ticket.rb

Instance Method Summary collapse

Instance Method Details

#add_feedback(options) ⇒ Object



19
20
21
22
23
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 19

def add_feedback(options)
  requires :identity
  res = service.add_feedback({:id => identity}.merge!(options)).body
  res["feedback"].to_i == 1 ? true : false
end

#add_transaction_feedback(options) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 25

def add_transaction_feedback(options)
  requires :identity
  requires :secid
  params = {:ticket_id => identity,
            :secid => secid}.merge!(options)
  service.add_transaction_feedback(params).body
end

#authenticate(options) ⇒ Object



33
34
35
36
37
38
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 33

def authenticate(options)
  requires :identity
  requires :secid
  params = {:id => identity, :secid => secid}.merge!(options)
  service.authenticate(params).body
end

#closeObject



40
41
42
43
44
45
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 40

def close
  requires :identity
  requires :secid
  res = service.close_ticket(:id => identity, :secid => secid).body
  res["closed"].to_i == 1 ? true : false
end

#reopenObject



47
48
49
50
51
52
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 47

def reopen
  requires :identity
  requires :secid
  res = service.reopen_ticket(:id => identity, :secid => secid).body
  res["reopened"].to_i == 1 ? true : false
end

#reply(options) ⇒ Object



54
55
56
57
58
59
60
# File 'lib/fog/support/storm_on_demand/models/ticket.rb', line 54

def reply(options)
  requires :identity
  requires :secid
  res = service.reply_ticket({:id => identity,
                              :secid => secid}.merge!(options)).body
  res["reply"].to_i == 1 ? true : false
end