Class: ZendeskAPI::Macro
- Includes:
- Actions
- Defined in:
- lib/zendesk_api/resources.rb
Instance Method Summary collapse
- #add_action(field, value) ⇒ Object included from Actions
-
#apply(ticket = nil) ⇒ Object
Returns the update to a ticket that happens when a macro will be applied.
-
#apply!(ticket = nil) ⇒ Object
Returns the update to a ticket that happens when a macro will be applied.
-
#execution ⇒ ZendeskAPI::RuleExecution
The associated object.
-
#execution=(value) ⇒ ZendeskAPI::RuleExecution
The associated object.
Constructor Details
This class inherits a constructor from ZendeskAPI::Data
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data
Instance Method Details
#add_action(field, value) ⇒ Object Originally defined in module Actions
#apply(ticket = nil) ⇒ Object
Returns the update to a ticket that happens when a macro will be applied.
629 630 631 632 633 |
# File 'lib/zendesk_api/resources.rb', line 629 def apply(ticket = nil) apply!(ticket) rescue Faraday::Error::ClientError SilentMash.new end |
#apply!(ticket = nil) ⇒ Object
Returns the update to a ticket that happens when a macro will be applied.
616 617 618 619 620 621 622 623 624 625 |
# File 'lib/zendesk_api/resources.rb', line 616 def apply!(ticket = nil) path = "#{self.path}/apply" if ticket path = "#{ticket.path}/#{path}" end response = @client.connection.get(path) SilentMash.new(response.body.fetch("result", {})) end |
#execution ⇒ ZendeskAPI::RuleExecution
Returns The associated object
611 |
# File 'lib/zendesk_api/resources.rb', line 611 has :execution, :class => RuleExecution |
#execution=(value) ⇒ ZendeskAPI::RuleExecution
Returns The associated object
611 |
# File 'lib/zendesk_api/resources.rb', line 611 has :execution, :class => RuleExecution |