Class: Basecamp::Types::RichTextAttachment
- Inherits:
-
Object
- Object
- Basecamp::Types::RichTextAttachment
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
RichTextAttachment
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.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ RichTextAttachment
constructor
A new instance of RichTextAttachment.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ RichTextAttachment
Returns a new instance of RichTextAttachment.
3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 |
# File 'lib/basecamp/generated/types.rb', line 3254 def initialize(data = {}) @byte_size = parse_integer(data["byte_size"]) @content_type = data["content_type"] @download_url = data["download_url"] @filename = data["filename"] @id = parse_integer(data["id"]) @preview_url = data["preview_url"] @previewable = parse_boolean(data["previewable"]) @sgid = data["sgid"] @thumbnail_url = data["thumbnail_url"] @height = parse_integer(data["height"]) @width = parse_integer(data["width"]) end |
Instance Attribute Details
#byte_size ⇒ Object
Returns the value of attribute byte_size.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def id @id end |
#preview_url ⇒ Object
Returns the value of attribute preview_url.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def preview_url @preview_url end |
#previewable ⇒ Object
Returns the value of attribute previewable.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def previewable @previewable end |
#sgid ⇒ Object
Returns the value of attribute sgid.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def sgid @sgid end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def thumbnail_url @thumbnail_url end |
#width ⇒ Object
Returns the value of attribute width.
3247 3248 3249 |
# File 'lib/basecamp/generated/types.rb', line 3247 def width @width end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3250 3251 3252 |
# File 'lib/basecamp/generated/types.rb', line 3250 def self.required_fields %i[byte_size content_type download_url filename id preview_url previewable sgid thumbnail_url].freeze end |
Instance Method Details
#to_h ⇒ Object
3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 |
# File 'lib/basecamp/generated/types.rb', line 3268 def to_h { "byte_size" => @byte_size, "content_type" => @content_type, "download_url" => @download_url, "filename" => @filename, "id" => @id, "preview_url" => @preview_url, "previewable" => @previewable, "sgid" => @sgid, "thumbnail_url" => @thumbnail_url, "height" => @height, "width" => @width, }.compact end |
#to_json(*args) ⇒ Object
3284 3285 3286 |
# File 'lib/basecamp/generated/types.rb', line 3284 def to_json(*args) to_h.to_json(*args) end |