Class: FlowChat::Config::WhatsappConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_chat/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWhatsappConfig

Returns a new instance of WhatsappConfig.



68
69
70
71
72
# File 'lib/flow_chat/config.rb', line 68

def initialize
  @message_handling_mode = :inline
  @background_job_class = "WhatsappMessageJob"
  @api_base_url = "https://graph.facebook.com/v22.0"
end

Instance Attribute Details

#api_base_urlObject (readonly)

Returns the value of attribute api_base_url.



66
67
68
# File 'lib/flow_chat/config.rb', line 66

def api_base_url
  @api_base_url
end

#background_job_classObject

Returns the value of attribute background_job_class.



65
66
67
# File 'lib/flow_chat/config.rb', line 65

def background_job_class
  @background_job_class
end

#message_handling_modeObject

Returns the value of attribute message_handling_mode.



66
67
68
# File 'lib/flow_chat/config.rb', line 66

def message_handling_mode
  @message_handling_mode
end

Instance Method Details

#background_mode?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/flow_chat/config.rb', line 88

def background_mode?
  @message_handling_mode == :background
end

#inline_mode?Boolean

Helper methods for mode checking

Returns:

  • (Boolean)


84
85
86
# File 'lib/flow_chat/config.rb', line 84

def inline_mode?
  @message_handling_mode == :inline
end

#simulator_mode?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/flow_chat/config.rb', line 92

def simulator_mode?
  @message_handling_mode == :simulator
end