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.



1331
1332
1333
1334
1335
1336
1337
# File 'lib/basecamp/generated/types.rb', line 1331

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.



1329
1330
1331
# File 'lib/basecamp/generated/types.rb', line 1329

def code
  @code
end

#example_urlObject

Returns the value of attribute example_url.



1329
1330
1331
# File 'lib/basecamp/generated/types.rb', line 1329

def example_url
  @example_url
end

#nameObject

Returns the value of attribute name.



1329
1330
1331
# File 'lib/basecamp/generated/types.rb', line 1329

def name
  @name
end

#supporting_textObject

Returns the value of attribute supporting_text.



1329
1330
1331
# File 'lib/basecamp/generated/types.rb', line 1329

def supporting_text
  @supporting_text
end

#valid_patternsObject

Returns the value of attribute valid_patterns.



1329
1330
1331
# File 'lib/basecamp/generated/types.rb', line 1329

def valid_patterns
  @valid_patterns
end

Instance Method Details

#to_hObject



1339
1340
1341
1342
1343
1344
1345
1346
1347
# File 'lib/basecamp/generated/types.rb', line 1339

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



1349
1350
1351
# File 'lib/basecamp/generated/types.rb', line 1349

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