Class: Basecamp::Types::SearchResultAttachment
- Inherits:
-
Object
- Object
- Basecamp::Types::SearchResultAttachment
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
SearchResultAttachment
Instance Attribute Summary collapse
-
#byte_size ⇒ Object
Returns the value of attribute byte_size.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#download_url ⇒ Object
Returns the value of attribute download_url.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#preview_url ⇒ Object
Returns the value of attribute preview_url.
-
#previewable ⇒ Object
Returns the value of attribute previewable.
-
#sgid ⇒ Object
Returns the value of attribute sgid.
-
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ SearchResultAttachment
constructor
A new instance of SearchResultAttachment.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ SearchResultAttachment
Returns a new instance of SearchResultAttachment.
4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 |
# File 'lib/basecamp/generated/types.rb', line 4154 def initialize(data = {}) @byte_size = parse_integer(data["byte_size"]) @content_type = data["content_type"] @download_url = data["download_url"] @filename = data["filename"] @height = parse_integer(data["height"]) @id = parse_integer(data["id"]) @preview_url = data["preview_url"] @previewable = parse_boolean(data["previewable"]) @sgid = data["sgid"] @thumbnail_url = data["thumbnail_url"] @title = data["title"] @url = data["url"] @width = parse_integer(data["width"]) end |
Instance Attribute Details
#byte_size ⇒ Object
Returns the value of attribute byte_size.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def id @id end |
#preview_url ⇒ Object
Returns the value of attribute preview_url.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def preview_url @preview_url end |
#previewable ⇒ Object
Returns the value of attribute previewable.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def previewable @previewable end |
#sgid ⇒ Object
Returns the value of attribute sgid.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def sgid @sgid end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def thumbnail_url @thumbnail_url end |
#title ⇒ Object
Returns the value of attribute title.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
4147 4148 4149 |
# File 'lib/basecamp/generated/types.rb', line 4147 def width @width end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4150 4151 4152 |
# File 'lib/basecamp/generated/types.rb', line 4150 def self.required_fields %i[byte_size content_type download_url filename].freeze end |
Instance Method Details
#to_h ⇒ Object
4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 |
# File 'lib/basecamp/generated/types.rb', line 4170 def to_h { "byte_size" => @byte_size, "content_type" => @content_type, "download_url" => @download_url, "filename" => @filename, "height" => @height, "id" => @id, "preview_url" => @preview_url, "previewable" => @previewable, "sgid" => @sgid, "thumbnail_url" => @thumbnail_url, "title" => @title, "url" => @url, "width" => @width, }.compact end |
#to_json(*args) ⇒ Object
4188 4189 4190 |
# File 'lib/basecamp/generated/types.rb', line 4188 def to_json(*args) to_h.to_json(*args) end |