Class: Fog::Support::StormOnDemand::Ticket
- Inherits:
-
Model
- Object
- Model
- Fog::Support::StormOnDemand::Ticket
- Defined in:
- lib/fog/storm_on_demand/models/support/ticket.rb
Instance Method Summary collapse
- #add_feedback(options) ⇒ Object
- #add_transaction_feedback(options) ⇒ Object
- #authenticate(options) ⇒ Object
- #close ⇒ Object
-
#initialize(attributes = {}) ⇒ Ticket
constructor
A new instance of Ticket.
- #reopen ⇒ Object
- #reply(options) ⇒ Object
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() requires :identity res = service.add_feedback({:id => identity}.merge!()).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() requires :identity requires :secid params = {:ticket_id => identity, :secid => secid}.merge!() 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() requires :identity requires :secid params = {:id => identity, :secid => secid}.merge!() service.authenticate(params).body end |
#close ⇒ Object
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 |
#reopen ⇒ Object
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() requires :identity requires :secid res = service.reply_ticket({:id => identity, :secid => secid}.merge!()).body res['reply'].to_i == 1 ? true : false end |