Class: Basecamp::Types::CampfireLineAttachment
- Inherits:
-
Object
- Object
- Basecamp::Types::CampfireLineAttachment
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
CampfireLineAttachment
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.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ CampfireLineAttachment
constructor
A new instance of CampfireLineAttachment.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ CampfireLineAttachment
Returns a new instance of CampfireLineAttachment.
414 415 416 417 418 419 420 421 |
# File 'lib/basecamp/generated/types.rb', line 414 def initialize(data = {}) @byte_size = parse_integer(data["byte_size"]) @content_type = data["content_type"] @download_url = data["download_url"] @filename = data["filename"] @title = data["title"] @url = data["url"] end |
Instance Attribute Details
#byte_size ⇒ Object
Returns the value of attribute byte_size.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def byte_size @byte_size end |
#content_type ⇒ Object
Returns the value of attribute content_type.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def content_type @content_type end |
#download_url ⇒ Object
Returns the value of attribute download_url.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def download_url @download_url end |
#filename ⇒ Object
Returns the value of attribute filename.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def filename @filename end |
#title ⇒ Object
Returns the value of attribute title.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
412 413 414 |
# File 'lib/basecamp/generated/types.rb', line 412 def url @url end |
Instance Method Details
#to_h ⇒ Object
423 424 425 426 427 428 429 430 431 432 |
# File 'lib/basecamp/generated/types.rb', line 423 def to_h { "byte_size" => @byte_size, "content_type" => @content_type, "download_url" => @download_url, "filename" => @filename, "title" => @title, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
434 435 436 |
# File 'lib/basecamp/generated/types.rb', line 434 def to_json(*args) to_h.to_json(*args) end |