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.



2099
2100
2101
2102
2103
# File 'lib/basecamp/generated/types.rb', line 2099

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.



2092
2093
2094
# File 'lib/basecamp/generated/types.rb', line 2092

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



2092
2093
2094
# File 'lib/basecamp/generated/types.rb', line 2092

def id
  @id
end

#titleObject

Returns the value of attribute title.



2092
2093
2094
# File 'lib/basecamp/generated/types.rb', line 2092

def title
  @title
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2095
2096
2097
# File 'lib/basecamp/generated/types.rb', line 2095

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

Instance Method Details

#to_hObject



2105
2106
2107
2108
2109
2110
2111
# File 'lib/basecamp/generated/types.rb', line 2105

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

#to_json(*args) ⇒ Object



2113
2114
2115
# File 'lib/basecamp/generated/types.rb', line 2113

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