Class: Basecamp::Types::Chatbot

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

Overview

Chatbot

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Chatbot

Returns a new instance of Chatbot.



762
763
764
765
766
767
768
769
770
771
# File 'lib/basecamp/generated/types.rb', line 762

def initialize(data = {})
  @created_at = parse_datetime(data["created_at"])
  @id = parse_integer(data["id"])
  @service_name = data["service_name"]
  @updated_at = parse_datetime(data["updated_at"])
  @app_url = data["app_url"]
  @command_url = data["command_url"]
  @lines_url = data["lines_url"]
  @url = data["url"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def app_url
  @app_url
end

#command_urlObject

Returns the value of attribute command_url.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def command_url
  @command_url
end

#created_atObject

Returns the value of attribute created_at.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def id
  @id
end

#lines_urlObject

Returns the value of attribute lines_url.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def lines_url
  @lines_url
end

#service_nameObject

Returns the value of attribute service_name.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def service_name
  @service_name
end

#updated_atObject

Returns the value of attribute updated_at.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



755
756
757
# File 'lib/basecamp/generated/types.rb', line 755

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


758
759
760
# File 'lib/basecamp/generated/types.rb', line 758

def self.required_fields
  %i[created_at id service_name updated_at].freeze
end

Instance Method Details

#to_hObject



773
774
775
776
777
778
779
780
781
782
783
784
# File 'lib/basecamp/generated/types.rb', line 773

def to_h
  {
    "created_at" => @created_at,
    "id" => @id,
    "service_name" => @service_name,
    "updated_at" => @updated_at,
    "app_url" => @app_url,
    "command_url" => @command_url,
    "lines_url" => @lines_url,
    "url" => @url,
  }.compact
end

#to_json(*args) ⇒ Object



786
787
788
# File 'lib/basecamp/generated/types.rb', line 786

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