Class: Basecamp::Types::TodoParent

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

Overview

TodoParent

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ TodoParent

Returns a new instance of TodoParent.



3644
3645
3646
3647
3648
3649
3650
# File 'lib/basecamp/generated/types.rb', line 3644

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

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



3637
3638
3639
# File 'lib/basecamp/generated/types.rb', line 3637

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



3637
3638
3639
# File 'lib/basecamp/generated/types.rb', line 3637

def id
  @id
end

#titleObject

Returns the value of attribute title.



3637
3638
3639
# File 'lib/basecamp/generated/types.rb', line 3637

def title
  @title
end

#typeObject

Returns the value of attribute type.



3637
3638
3639
# File 'lib/basecamp/generated/types.rb', line 3637

def type
  @type
end

#urlObject

Returns the value of attribute url.



3637
3638
3639
# File 'lib/basecamp/generated/types.rb', line 3637

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


3640
3641
3642
# File 'lib/basecamp/generated/types.rb', line 3640

def self.required_fields
  %i[app_url id title type url].freeze
end

Instance Method Details

#to_hObject



3652
3653
3654
3655
3656
3657
3658
3659
3660
# File 'lib/basecamp/generated/types.rb', line 3652

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

#to_json(*args) ⇒ Object



3662
3663
3664
# File 'lib/basecamp/generated/types.rb', line 3662

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