Class: Basecamp::Types::CampfireLineAttachment

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

CampfireLineAttachment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ CampfireLineAttachment

Returns a new instance of CampfireLineAttachment.



468
469
470
471
472
473
474
475
# File 'lib/basecamp/generated/types.rb', line 468

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_sizeObject

Returns the value of attribute byte_size.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def byte_size
  @byte_size
end

#content_typeObject

Returns the value of attribute content_type.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def content_type
  @content_type
end

#download_urlObject

Returns the value of attribute download_url.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def download_url
  @download_url
end

#filenameObject

Returns the value of attribute filename.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def filename
  @filename
end

#titleObject

Returns the value of attribute title.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def title
  @title
end

#urlObject

Returns the value of attribute url.



466
467
468
# File 'lib/basecamp/generated/types.rb', line 466

def url
  @url
end

Instance Method Details

#to_hObject



477
478
479
480
481
482
483
484
485
486
# File 'lib/basecamp/generated/types.rb', line 477

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



488
489
490
# File 'lib/basecamp/generated/types.rb', line 488

def to_json(*args)
  to_h.to_json(*args)
end