Class: Fog::Support::StormOnDemand::Ticket
- Inherits:
-
Model
- Object
- Model
- Fog::Support::StormOnDemand::Ticket
show all
- Defined in:
- lib/fog/storm_on_demand/models/support/ticket.rb
Instance Attribute Summary
Attributes inherited from Model
#collection, #service
Instance Method Summary
collapse
Methods inherited from Model
#inspect, #reload, #symbolize_keys, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#connection, #connection=, #prepare_service_value
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
#initialize(attributes = {}) ⇒ Ticket
Returns a new instance of Ticket.
22
23
24
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 22
def initialize(attributes={})
super
end
|
Instance Method Details
#add_feedback(options) ⇒ Object
26
27
28
29
30
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 26
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
32
33
34
35
36
37
38
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 32
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
40
41
42
43
44
45
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 40
def authenticate(options)
requires :identity
requires :secid
params = {:id => identity, :secid => secid}.merge!(options)
service.authenticate(params).body
end
|
#close ⇒ Object
47
48
49
50
51
52
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 47
def close
requires :identity
requires :secid
res = service.close_ticket(:id => identity, :secid => secid).body
res['closed'].to_i == 1 ? true : false
end
|
#reopen ⇒ Object
54
55
56
57
58
59
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 54
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
61
62
63
64
65
66
67
|
# File 'lib/fog/storm_on_demand/models/support/ticket.rb', line 61
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
|