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.
3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 |
# File 'lib/basecamp/generated/types.rb', line 3035 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.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def id @id end |
#preview_url ⇒ Object
Returns the value of attribute preview_url.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def preview_url @preview_url end |
#previewable ⇒ Object
Returns the value of attribute previewable.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def previewable @previewable end |
#sgid ⇒ Object
Returns the value of attribute sgid.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def sgid @sgid end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def thumbnail_url @thumbnail_url end |
#width ⇒ Object
Returns the value of attribute width.
3028 3029 3030 |
# File 'lib/basecamp/generated/types.rb', line 3028 def width @width end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3031 3032 3033 |
# File 'lib/basecamp/generated/types.rb', line 3031 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
3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 |
# File 'lib/basecamp/generated/types.rb', line 3049 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
3065 3066 3067 |
# File 'lib/basecamp/generated/types.rb', line 3065 def to_json(*args) to_h.to_json(*args) end |