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.



816
817
818
819
820
821
822
823
824
825
# File 'lib/basecamp/generated/types.rb', line 816

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.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def app_url
  @app_url
end

#command_urlObject

Returns the value of attribute command_url.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def command_url
  @command_url
end

#created_atObject

Returns the value of attribute created_at.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def id
  @id
end

#lines_urlObject

Returns the value of attribute lines_url.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def lines_url
  @lines_url
end

#service_nameObject

Returns the value of attribute service_name.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def service_name
  @service_name
end

#updated_atObject

Returns the value of attribute updated_at.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



809
810
811
# File 'lib/basecamp/generated/types.rb', line 809

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


812
813
814
# File 'lib/basecamp/generated/types.rb', line 812

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

Instance Method Details

#to_hObject



827
828
829
830
831
832
833
834
835
836
837
838
# File 'lib/basecamp/generated/types.rb', line 827

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



840
841
842
# File 'lib/basecamp/generated/types.rb', line 840

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