Class: Basecamp::Types::HillChartDot

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

Overview

HillChartDot

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ HillChartDot

Returns a new instance of HillChartDot.



1872
1873
1874
1875
1876
1877
1878
1879
# File 'lib/basecamp/generated/types.rb', line 1872

def initialize(data = {})
  @color = data["color"]
  @id = parse_integer(data["id"])
  @label = data["label"]
  @position = parse_integer(data["position"])
  @app_url = data["app_url"]
  @url = data["url"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def app_url
  @app_url
end

#colorObject

Returns the value of attribute color.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def color
  @color
end

#idObject

Returns the value of attribute id.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def id
  @id
end

#labelObject

Returns the value of attribute label.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def label
  @label
end

#positionObject

Returns the value of attribute position.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def position
  @position
end

#urlObject

Returns the value of attribute url.



1865
1866
1867
# File 'lib/basecamp/generated/types.rb', line 1865

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


1868
1869
1870
# File 'lib/basecamp/generated/types.rb', line 1868

def self.required_fields
  %i[color id label position].freeze
end

Instance Method Details

#to_hObject



1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
# File 'lib/basecamp/generated/types.rb', line 1881

def to_h
  {
    "color" => @color,
    "id" => @id,
    "label" => @label,
    "position" => @position,
    "app_url" => @app_url,
    "url" => @url,
  }.compact
end

#to_json(*args) ⇒ Object



1892
1893
1894
# File 'lib/basecamp/generated/types.rb', line 1892

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