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.
3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 |
# File 'lib/basecamp/generated/types.rb', line 3566 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.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def id @id end |
#preview_url ⇒ Object
Returns the value of attribute preview_url.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def preview_url @preview_url end |
#previewable ⇒ Object
Returns the value of attribute previewable.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def previewable @previewable end |
#sgid ⇒ Object
Returns the value of attribute sgid.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def sgid @sgid end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def thumbnail_url @thumbnail_url end |
#width ⇒ Object
Returns the value of attribute width.
3559 3560 3561 |
# File 'lib/basecamp/generated/types.rb', line 3559 def width @width end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3562 3563 3564 |
# File 'lib/basecamp/generated/types.rb', line 3562 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
3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 |
# File 'lib/basecamp/generated/types.rb', line 3580 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
3596 3597 3598 |
# File 'lib/basecamp/generated/types.rb', line 3596 def to_json(*args) to_h.to_json(*args) end |