Class: Basecamp::Types::DoorService

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

Overview

DoorService

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ DoorService

Returns a new instance of DoorService.



1453
1454
1455
1456
1457
1458
1459
# File 'lib/basecamp/generated/types.rb', line 1453

def initialize(data = {})
  @code = data["code"]
  @example_url = data["example_url"]
  @name = data["name"]
  @supporting_text = data["supporting_text"]
  @valid_patterns = data["valid_patterns"]
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



1451
1452
1453
# File 'lib/basecamp/generated/types.rb', line 1451

def code
  @code
end

#example_urlObject

Returns the value of attribute example_url.



1451
1452
1453
# File 'lib/basecamp/generated/types.rb', line 1451

def example_url
  @example_url
end

#nameObject

Returns the value of attribute name.



1451
1452
1453
# File 'lib/basecamp/generated/types.rb', line 1451

def name
  @name
end

#supporting_textObject

Returns the value of attribute supporting_text.



1451
1452
1453
# File 'lib/basecamp/generated/types.rb', line 1451

def supporting_text
  @supporting_text
end

#valid_patternsObject

Returns the value of attribute valid_patterns.



1451
1452
1453
# File 'lib/basecamp/generated/types.rb', line 1451

def valid_patterns
  @valid_patterns
end

Instance Method Details

#to_hObject



1461
1462
1463
1464
1465
1466
1467
1468
1469
# File 'lib/basecamp/generated/types.rb', line 1461

def to_h
  {
    "code" => @code,
    "example_url" => @example_url,
    "name" => @name,
    "supporting_text" => @supporting_text,
    "valid_patterns" => @valid_patterns,
  }.compact
end

#to_json(*args) ⇒ Object



1471
1472
1473
# File 'lib/basecamp/generated/types.rb', line 1471

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