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.



5232
5233
5234
5235
5236
5237
5238
5239
# File 'lib/basecamp/generated/types.rb', line 5232

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.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def app_download_url
  @app_download_url
end

#byte_sizeObject

Returns the value of attribute byte_size.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def byte_size
  @byte_size
end

#content_typeObject

Returns the value of attribute content_type.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def content_type
  @content_type
end

#currentObject

Returns the value of attribute current.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def current
  @current
end

#download_urlObject

Returns the value of attribute download_url.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def download_url
  @download_url
end

#filenameObject

Returns the value of attribute filename.



5225
5226
5227
# File 'lib/basecamp/generated/types.rb', line 5225

def filename
  @filename
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


5228
5229
5230
# File 'lib/basecamp/generated/types.rb', line 5228

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

Instance Method Details

#to_hObject



5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
# File 'lib/basecamp/generated/types.rb', line 5241

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



5252
5253
5254
# File 'lib/basecamp/generated/types.rb', line 5252

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