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.
-
#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.
-
#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.
3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 |
# File 'lib/basecamp/generated/types.rb', line 3271 def initialize(data = {}) @app_url = data["app_url"] @id = parse_integer(data["id"]) @title = data["title"] @type = data["type"] @url = data["url"] @bookmark_url = data["bookmark_url"] @bucket = parse_type(data["bucket"], "RecordingBucket") @content = data["content"] @content_attachments = parse_array(data["content_attachments"], "RichTextAttachment") @created_at = parse_datetime(data["created_at"]) @creator = parse_type(data["creator"], "Person") @description = data["description"] @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment") @inherits_status = parse_boolean(data["inherits_status"]) @parent = parse_type(data["parent"], "RecordingParent") @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.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def bookmark_url @bookmark_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def bucket @bucket end |
#content ⇒ Object
Returns the value of attribute content.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def content @content end |
#content_attachments ⇒ Object
Returns the value of attribute content_attachments.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def @content_attachments end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def creator @creator end |
#description ⇒ Object
Returns the value of attribute description.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def description @description end |
#description_attachments ⇒ Object
Returns the value of attribute description_attachments.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def @description_attachments end |
#id ⇒ Object
Returns the value of attribute id.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def inherits_status @inherits_status end |
#parent ⇒ Object
Returns the value of attribute parent.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def parent @parent end |
#status ⇒ Object
Returns the value of attribute status.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def status @status end |
#subject ⇒ Object
Returns the value of attribute subject.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def subject @subject end |
#title ⇒ Object
Returns the value of attribute title.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def url @url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3264 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3267 3268 3269 |
# File 'lib/basecamp/generated/types.rb', line 3267 def self.required_fields %i[app_url id title type url].freeze end |
Instance Method Details
#to_h ⇒ Object
3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 |
# File 'lib/basecamp/generated/types.rb', line 3293 def to_h { "app_url" => @app_url, "id" => @id, "title" => @title, "type" => @type, "url" => @url, "bookmark_url" => @bookmark_url, "bucket" => @bucket, "content" => @content, "content_attachments" => @content_attachments, "created_at" => @created_at, "creator" => @creator, "description" => @description, "description_attachments" => @description_attachments, "inherits_status" => @inherits_status, "parent" => @parent, "status" => @status, "subject" => @subject, "updated_at" => @updated_at, "visible_to_clients" => @visible_to_clients, }.compact end |
#to_json(*args) ⇒ Object
3317 3318 3319 |
# File 'lib/basecamp/generated/types.rb', line 3317 def to_json(*args) to_h.to_json(*args) end |