Class: Basecamp::Types::MyAssignmentParent

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

Overview

MyAssignmentParent

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ MyAssignmentParent

Returns a new instance of MyAssignmentParent.



2296
2297
2298
2299
2300
# File 'lib/basecamp/generated/types.rb', line 2296

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

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



2289
2290
2291
# File 'lib/basecamp/generated/types.rb', line 2289

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



2289
2290
2291
# File 'lib/basecamp/generated/types.rb', line 2289

def id
  @id
end

#titleObject

Returns the value of attribute title.



2289
2290
2291
# File 'lib/basecamp/generated/types.rb', line 2289

def title
  @title
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2292
2293
2294
# File 'lib/basecamp/generated/types.rb', line 2292

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

Instance Method Details

#to_hObject



2302
2303
2304
2305
2306
2307
2308
# File 'lib/basecamp/generated/types.rb', line 2302

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

#to_json(*args) ⇒ Object



2310
2311
2312
# File 'lib/basecamp/generated/types.rb', line 2310

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