Class: Zendesk2::Forum
- Inherits:
-
Object
- Object
- Zendesk2::Forum
- Extended by:
- Attributes
- Includes:
- Model
- Defined in:
- lib/zendesk2/forum.rb
Instance Attribute Summary
Attributes included from Model
Instance Method Summary collapse
-
#access ⇒ String
Who has access to this forum, valid values: “everybody”, “logged-in users” or “agents only”.
-
#category_id ⇒ Fixnum
Category this forum is in.
-
#created_at ⇒ Time
The time the forum was created.
-
#description ⇒ String
A description of the forum.
- #destroy! ⇒ Object
-
#forum_type ⇒ String
The type of the topics in this forum, valid values: “articles”, “ideas” or “questions”.
-
#id ⇒ Fixnum
Automatically assigned upon creation.
-
#locale_id ⇒ Fixnum
User locale id this forum is restricted to.
-
#locked ⇒ Boolean
Whether this forum is locked such that new entries and comments cannot be made.
-
#name ⇒ String
The name of the forum.
-
#organization_id ⇒ Fixnum
Organization this forum is restricted to.
-
#position ⇒ Fixnum
The position of this forum relative to other forums in the same category.
- #save! ⇒ Object
-
#tags ⇒ Array
Restrict access to end-users and organizations with all these tags.
-
#unanswered_topics ⇒ Fixnum
Contains the number of unanswered questions if this forum’s topics are questions.
-
#updated_at ⇒ Time
The time of the last update of the forum.
-
#url ⇒ String
The API url of this forum.
Methods included from Attributes
assoc_accessor, assoc_reader, assoc_writer
Methods included from Model
#destroy, #destroyed?, #missing_attributes, #save, #update!
Instance Method Details
#access ⇒ String
Returns Who has access to this forum, valid values: “everybody”, “logged-in users” or “agents only”.
31 |
# File 'lib/zendesk2/forum.rb', line 31 attribute :access, type: :string |
#category_id ⇒ Fixnum
Returns Category this forum is in.
17 |
# File 'lib/zendesk2/forum.rb', line 17 attribute :category_id, type: :integer |
#created_at ⇒ Time
Returns The time the forum was created.
35 |
# File 'lib/zendesk2/forum.rb', line 35 attribute :created_at, type: :time |
#description ⇒ String
Returns A description of the forum.
15 |
# File 'lib/zendesk2/forum.rb', line 15 attribute :description, type: :string |
#destroy! ⇒ Object
42 43 44 45 46 |
# File 'lib/zendesk2/forum.rb', line 42 def destroy! requires :identity cistern.destroy_forum('forum' => { 'id' => identity }) end |
#forum_type ⇒ String
Returns The type of the topics in this forum, valid values: “articles”, “ideas” or “questions”.
29 |
# File 'lib/zendesk2/forum.rb', line 29 attribute :forum_type, type: :string |
#id ⇒ Fixnum
Returns Automatically assigned upon creation.
8 |
# File 'lib/zendesk2/forum.rb', line 8 identity :id, type: :integer |
#locale_id ⇒ Fixnum
Returns User locale id this forum is restricted to.
21 |
# File 'lib/zendesk2/forum.rb', line 21 attribute :locale_id, type: :integer |
#locked ⇒ Boolean
Returns Whether this forum is locked such that new entries and comments cannot be made.
23 |
# File 'lib/zendesk2/forum.rb', line 23 attribute :locked, type: :boolean |
#name ⇒ String
Returns The name of the forum.
13 |
# File 'lib/zendesk2/forum.rb', line 13 attribute :name, type: :string |
#organization_id ⇒ Fixnum
Returns Organization this forum is restricted to.
19 |
# File 'lib/zendesk2/forum.rb', line 19 attribute :organization_id, type: :integer |
#position ⇒ Fixnum
Returns The position of this forum relative to other forums in the same category.
27 |
# File 'lib/zendesk2/forum.rb', line 27 attribute :position, type: :integer |
#save! ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/zendesk2/forum.rb', line 48 def save! response = if new_record? requires :name cistern.create_forum('forum' => attributes) else requires :identity cistern.update_forum('forum' => attributes) end merge_attributes(response.body['forum']) end |
#tags ⇒ Array
Returns Restrict access to end-users and organizations with all these tags.
33 |
# File 'lib/zendesk2/forum.rb', line 33 attribute :tags, type: :array |
#unanswered_topics ⇒ Fixnum
Returns Contains the number of unanswered questions if this forum’s topics are questions.
25 |
# File 'lib/zendesk2/forum.rb', line 25 attribute :unanswered_topics, type: :integer |
#updated_at ⇒ Time
Returns The time of the last update of the forum.
37 |
# File 'lib/zendesk2/forum.rb', line 37 attribute :updated_at, type: :time |
#url ⇒ String
Returns The API url of this forum.
11 |
# File 'lib/zendesk2/forum.rb', line 11 attribute :url, type: :string |