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.
3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 |
# File 'lib/basecamp/generated/types.rb', line 3795 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.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def id @id end |
#preview_url ⇒ Object
Returns the value of attribute preview_url.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def preview_url @preview_url end |
#previewable ⇒ Object
Returns the value of attribute previewable.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def previewable @previewable end |
#sgid ⇒ Object
Returns the value of attribute sgid.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def sgid @sgid end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def thumbnail_url @thumbnail_url end |
#width ⇒ Object
Returns the value of attribute width.
3788 3789 3790 |
# File 'lib/basecamp/generated/types.rb', line 3788 def width @width end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3791 3792 3793 |
# File 'lib/basecamp/generated/types.rb', line 3791 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
3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 |
# File 'lib/basecamp/generated/types.rb', line 3809 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
3825 3826 3827 |
# File 'lib/basecamp/generated/types.rb', line 3825 def to_json(*args) to_h.to_json(*args) end |