Class: Readiness::TicketProcessor::STAR
- Defined in:
- lib/support_readiness/ticket_processor/star.rb
Overview
Defines the class STAR within the module Zendesk.
Class Method Summary collapse
-
.process!(zendesk_client, ticket_id) ⇒ Object
Process a STAR request.
Methods inherited from Client
auth_error, bad_request_error, convert_actions, convert_conditions, convert_standard_names_to_ids, convert_ticket_form_agent_conditions, convert_ticket_form_brands, convert_ticket_form_end_user_conditions, convert_ticket_form_names_to_ids, convert_view_names_to_ids, convert_view_restrictions, covert_ticket_form_field_ids, create_package!, erb_renderer, handle_request_error, not_found_error, not_processible_error, put_into_archive, recursively_deflate_directory, timestamp_filename, to_clean_json, to_clean_json_with_key, to_hash, to_nearly_clean_json, to_nearly_clean_json_with_key, to_param_string, write_entries
Class Method Details
.process!(zendesk_client, ticket_id) ⇒ Object
Process a STAR request
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/support_readiness/ticket_processor/star.rb', line 18 def self.process!(zendesk_client, ticket_id) @zendesk_client = zendesk_client @ticket_id = ticket_id @ticket = Readiness::Zendesk::Tickets.find(@zendesk_client, @ticket_id) puts 'No ticket found, so no STAR actions to do' if @ticket.is_a? Hash exit 0 if @ticket.is_a? Hash new_ticket = Readiness::Zendesk::Tickets.new new_ticket.id = @ticket.id new_ticket. = @ticket. + ['star_submitted'] Readiness::Zendesk::Tickets.update!(zendesk_client, new_ticket) end |