Class: Basecamp::Types::SearchResult
- Inherits:
-
Object
- Object
- Basecamp::Types::SearchResult
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
SearchResult
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
-
#bubble_up_url ⇒ Object
Returns the value of attribute bubble_up_url.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#content ⇒ Object
Returns the value of attribute content.
-
#content_attachments ⇒ Object
Returns the value of attribute content_attachments.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#description ⇒ Object
Returns the value of attribute description.
-
#description_attachments ⇒ Object
Returns the value of attribute description_attachments.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#plain_text_content ⇒ Object
Returns the value of attribute plain_text_content.
-
#plain_text_description ⇒ Object
Returns the value of attribute plain_text_description.
-
#status ⇒ Object
Returns the value of attribute status.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ SearchResult
constructor
A new instance of SearchResult.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ SearchResult
Returns a new instance of SearchResult.
3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 |
# File 'lib/basecamp/generated/types.rb', line 3802 def initialize(data = {}) @app_url = data["app_url"] @content = data["content"] @description = data["description"] @id = parse_integer(data["id"]) @title = data["title"] @type = data["type"] @url = data["url"] @bookmark_url = data["bookmark_url"] @bubble_up_url = data["bubble_up_url"] @bucket = parse_type(data["bucket"], "RecordingBucket") @content_attachments = parse_array(data["content_attachments"], "RichTextAttachment") @created_at = parse_datetime(data["created_at"]) @creator = parse_type(data["creator"], "Person") @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment") @inherits_status = parse_boolean(data["inherits_status"]) @parent = parse_type(data["parent"], "RecordingParent") @plain_text_content = data["plain_text_content"] @plain_text_description = data["plain_text_description"] @status = data["status"] @subject = data["subject"] @updated_at = parse_datetime(data["updated_at"]) @visible_to_clients = parse_boolean(data["visible_to_clients"]) end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def bookmark_url @bookmark_url end |
#bubble_up_url ⇒ Object
Returns the value of attribute bubble_up_url.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def bubble_up_url @bubble_up_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def bucket @bucket end |
#content ⇒ Object
Returns the value of attribute content.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def content @content end |
#content_attachments ⇒ Object
Returns the value of attribute content_attachments.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def @content_attachments end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def creator @creator end |
#description ⇒ Object
Returns the value of attribute description.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def description @description end |
#description_attachments ⇒ Object
Returns the value of attribute description_attachments.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def @description_attachments end |
#id ⇒ Object
Returns the value of attribute id.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def inherits_status @inherits_status end |
#parent ⇒ Object
Returns the value of attribute parent.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def parent @parent end |
#plain_text_content ⇒ Object
Returns the value of attribute plain_text_content.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def plain_text_content @plain_text_content end |
#plain_text_description ⇒ Object
Returns the value of attribute plain_text_description.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def plain_text_description @plain_text_description end |
#status ⇒ Object
Returns the value of attribute status.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def status @status end |
#subject ⇒ Object
Returns the value of attribute subject.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def subject @subject end |
#title ⇒ Object
Returns the value of attribute title.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def url @url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
3795 3796 3797 |
# File 'lib/basecamp/generated/types.rb', line 3795 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3798 3799 3800 |
# File 'lib/basecamp/generated/types.rb', line 3798 def self.required_fields %i[app_url content description id title type url].freeze end |
Instance Method Details
#to_h ⇒ Object
3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 |
# File 'lib/basecamp/generated/types.rb', line 3827 def to_h { "app_url" => @app_url, "content" => @content, "description" => @description, "id" => @id, "title" => @title, "type" => @type, "url" => @url, "bookmark_url" => @bookmark_url, "bubble_up_url" => @bubble_up_url, "bucket" => @bucket, "content_attachments" => @content_attachments, "created_at" => @created_at, "creator" => @creator, "description_attachments" => @description_attachments, "inherits_status" => @inherits_status, "parent" => @parent, "plain_text_content" => @plain_text_content, "plain_text_description" => @plain_text_description, "status" => @status, "subject" => @subject, "updated_at" => @updated_at, "visible_to_clients" => @visible_to_clients, }.reject { |k, v| v.nil? && !["content", "description"].include?(k) } end |
#to_json(*args) ⇒ Object
3854 3855 3856 |
# File 'lib/basecamp/generated/types.rb', line 3854 def to_json(*args) to_h.to_json(*args) end |