Class: Basecamp::Types::MyAssignment

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

Overview

MyAssignment

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ MyAssignment

Returns a new instance of MyAssignment.



1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
# File 'lib/basecamp/generated/types.rb', line 1990

def initialize(data = {})
  @id = parse_integer(data["id"])
  @app_url = data["app_url"]
  @assignees = parse_array(data["assignees"], "MyAssignmentAssignee")
  @bucket = parse_type(data["bucket"], "MyAssignmentBucket")
  @children = parse_array(data["children"], "MyAssignment")
  @comments_count = parse_integer(data["comments_count"])
  @completed = parse_boolean(data["completed"])
  @content = data["content"]
  @due_on = data["due_on"]
  @has_description = parse_boolean(data["has_description"])
  @parent = parse_type(data["parent"], "MyAssignmentParent")
  @priority_recording_id = parse_integer(data["priority_recording_id"])
  @starts_on = data["starts_on"]
  @type = data["type"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def app_url
  @app_url
end

#assigneesObject

Returns the value of attribute assignees.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def assignees
  @assignees
end

#bucketObject

Returns the value of attribute bucket.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def bucket
  @bucket
end

#childrenObject

Returns the value of attribute children.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def children
  @children
end

#comments_countObject

Returns the value of attribute comments_count.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def comments_count
  @comments_count
end

#completedObject

Returns the value of attribute completed.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def completed
  @completed
end

#contentObject

Returns the value of attribute content.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def content
  @content
end

#due_onObject

Returns the value of attribute due_on.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def due_on
  @due_on
end

#has_descriptionObject

Returns the value of attribute has_description.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def has_description
  @has_description
end

#idObject

Returns the value of attribute id.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def id
  @id
end

#parentObject

Returns the value of attribute parent.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def parent
  @parent
end

#priority_recording_idObject

Returns the value of attribute priority_recording_id.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def priority_recording_id
  @priority_recording_id
end

#starts_onObject

Returns the value of attribute starts_on.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def starts_on
  @starts_on
end

#typeObject

Returns the value of attribute type.



1983
1984
1985
# File 'lib/basecamp/generated/types.rb', line 1983

def type
  @type
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


1986
1987
1988
# File 'lib/basecamp/generated/types.rb', line 1986

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

Instance Method Details

#to_hObject



2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
# File 'lib/basecamp/generated/types.rb', line 2007

def to_h
  {
    "id" => @id,
    "app_url" => @app_url,
    "assignees" => @assignees,
    "bucket" => @bucket,
    "children" => @children,
    "comments_count" => @comments_count,
    "completed" => @completed,
    "content" => @content,
    "due_on" => @due_on,
    "has_description" => @has_description,
    "parent" => @parent,
    "priority_recording_id" => @priority_recording_id,
    "starts_on" => @starts_on,
    "type" => @type,
  }.compact
end

#to_json(*args) ⇒ Object



2026
2027
2028
# File 'lib/basecamp/generated/types.rb', line 2026

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