Class: Basecamp::Types::MyAssignmentBucket

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

Overview

MyAssignmentBucket

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ MyAssignmentBucket

Returns a new instance of MyAssignmentBucket.



2234
2235
2236
2237
2238
# File 'lib/basecamp/generated/types.rb', line 2234

def initialize(data = {})
  @id = parse_integer(data["id"])
  @app_url = data["app_url"]
  @name = data["name"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



2227
2228
2229
# File 'lib/basecamp/generated/types.rb', line 2227

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



2227
2228
2229
# File 'lib/basecamp/generated/types.rb', line 2227

def id
  @id
end

#nameObject

Returns the value of attribute name.



2227
2228
2229
# File 'lib/basecamp/generated/types.rb', line 2227

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2230
2231
2232
# File 'lib/basecamp/generated/types.rb', line 2230

def self.required_fields
  %i[id].freeze
end

Instance Method Details

#to_hObject



2240
2241
2242
2243
2244
2245
2246
# File 'lib/basecamp/generated/types.rb', line 2240

def to_h
  {
    "id" => @id,
    "app_url" => @app_url,
    "name" => @name,
  }.compact
end

#to_json(*args) ⇒ Object



2248
2249
2250
# File 'lib/basecamp/generated/types.rb', line 2248

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