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

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Ticket

Returns a new instance of Ticket.



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

def initialize(attributes={})
  super
end

Instance Method Details

#add_feedback(options) ⇒ Object



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

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



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

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



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

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

#closeObject



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

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

#reopenObject



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

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



60
61
62
63
64
65
66
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 60

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