Class: Basecamp::Types::UploadVersionFile

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

Overview

UploadVersionFile

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ UploadVersionFile

Returns a new instance of UploadVersionFile.



5117
5118
5119
5120
5121
5122
5123
5124
# File 'lib/basecamp/generated/types.rb', line 5117

def initialize(data = {})
  @app_download_url = data["app_download_url"]
  @current = parse_boolean(data["current"])
  @download_url = data["download_url"]
  @filename = data["filename"]
  @byte_size = parse_integer(data["byte_size"])
  @content_type = data["content_type"]
end

Instance Attribute Details

#app_download_urlObject

Returns the value of attribute app_download_url.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def app_download_url
  @app_download_url
end

#byte_sizeObject

Returns the value of attribute byte_size.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def byte_size
  @byte_size
end

#content_typeObject

Returns the value of attribute content_type.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def content_type
  @content_type
end

#currentObject

Returns the value of attribute current.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def current
  @current
end

#download_urlObject

Returns the value of attribute download_url.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def download_url
  @download_url
end

#filenameObject

Returns the value of attribute filename.



5110
5111
5112
# File 'lib/basecamp/generated/types.rb', line 5110

def filename
  @filename
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


5113
5114
5115
# File 'lib/basecamp/generated/types.rb', line 5113

def self.required_fields
  %i[app_download_url current download_url filename].freeze
end

Instance Method Details

#to_hObject



5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
# File 'lib/basecamp/generated/types.rb', line 5126

def to_h
  {
    "app_download_url" => @app_download_url,
    "current" => @current,
    "download_url" => @download_url,
    "filename" => @filename,
    "byte_size" => @byte_size,
    "content_type" => @content_type,
  }.compact
end

#to_json(*args) ⇒ Object



5137
5138
5139
# File 'lib/basecamp/generated/types.rb', line 5137

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