Class: KayakoClient::TicketNote
- Includes:
- TicketAPI
- Defined in:
- lib/kayako_client/ticket_note.rb
Constant Summary collapse
- NOTE_TYPES =
[ :ticket, :user, :userorganization, :timetrack ].freeze
- COLOR_YELLOW =
1- COLOR_PURPLE =
2- COLOR_BLUE =
3- COLOR_GREEN =
4- COLOR_RED =
5
Constants included from Object
Object::COMMON_OPTIONS, Object::OPTIONS, Object::PROPERTY_TYPES
Instance Method Summary collapse
- #created_by_user? ⇒ Boolean (also: #has_user?)
- #has_creator_staff? ⇒ Boolean
- #has_for_staff? ⇒ Boolean
- #has_user_organization? ⇒ Boolean
- #has_worker_staff? ⇒ Boolean
-
#is_ticket_note? ⇒ Boolean
NOTE: :all returns only notes of :ticket type.
- #is_time_track_note? ⇒ Boolean
- #is_user_note? ⇒ Boolean
- #is_user_organization_note? ⇒ Boolean
Methods included from TicketAPI
Methods inherited from Base
configure, #inherited_options, inherited_options, #initialize
Methods included from XML
included, #xml_backend, #xml_backend=
Methods included from HTTP
#client, #delete_request, #http_backend, #http_backend=, included, #post_request, #proxy, #proxy=, #put_request
Methods included from Authentication
Methods included from Object
#[], #[]=, #changed?, #errors, #has_errors?, #id, included, #loaded!, #new?, #properties, #to_i
Methods included from Logger
Methods included from API
#api_key, #api_key=, #api_url, #api_url=, #delete, included, #post, #put, #secret_key, #secret_key=
Constructor Details
This class inherits a constructor from KayakoClient::Base
Instance Method Details
#created_by_user? ⇒ Boolean Also known as: has_user?
92 93 94 |
# File 'lib/kayako_client/ticket_note.rb', line 92 def created_by_user? !user_id.nil? && user_id > 0 end |
#has_creator_staff? ⇒ Boolean
84 85 86 |
# File 'lib/kayako_client/ticket_note.rb', line 84 def has_creator_staff? !creator_staff_id.nil? && creator_staff_id > 0 end |
#has_for_staff? ⇒ Boolean
88 89 90 |
# File 'lib/kayako_client/ticket_note.rb', line 88 def has_for_staff? !for_staff_id.nil? && for_staff_id > 0 end |
#has_user_organization? ⇒ Boolean
98 99 100 |
# File 'lib/kayako_client/ticket_note.rb', line 98 def has_user_organization? !user_organization_id.nil? && user_organization_id > 0 end |
#has_worker_staff? ⇒ Boolean
102 103 104 |
# File 'lib/kayako_client/ticket_note.rb', line 102 def has_worker_staff? !worker_staff_id.nil? && worker_staff_id > 0 end |
#is_ticket_note? ⇒ Boolean
NOTE: :all returns only notes of :ticket type
68 69 70 |
# File 'lib/kayako_client/ticket_note.rb', line 68 def is_ticket_note? !type.nil? && type == :ticket end |
#is_time_track_note? ⇒ Boolean
80 81 82 |
# File 'lib/kayako_client/ticket_note.rb', line 80 def is_time_track_note? !type.nil? && type == :timetrack end |
#is_user_note? ⇒ Boolean
72 73 74 |
# File 'lib/kayako_client/ticket_note.rb', line 72 def is_user_note? !type.nil? && type == :user end |
#is_user_organization_note? ⇒ Boolean
76 77 78 |
# File 'lib/kayako_client/ticket_note.rb', line 76 def is_user_organization_note? !type.nil? && type == :userorganization end |