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.



2349
2350
2351
2352
2353
2354
2355
2356
# File 'lib/basecamp/generated/types.rb', line 2349

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.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def app_url
  @app_url
end

#colorObject

Returns the value of attribute color.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def color
  @color
end

#idObject

Returns the value of attribute id.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def id
  @id
end

#labelObject

Returns the value of attribute label.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def label
  @label
end

#positionObject

Returns the value of attribute position.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def position
  @position
end

#urlObject

Returns the value of attribute url.



2342
2343
2344
# File 'lib/basecamp/generated/types.rb', line 2342

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2345
2346
2347
# File 'lib/basecamp/generated/types.rb', line 2345

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

Instance Method Details

#to_hObject



2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
# File 'lib/basecamp/generated/types.rb', line 2358

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

#to_json(*args) ⇒ Object



2369
2370
2371
# File 'lib/basecamp/generated/types.rb', line 2369

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