Class: FreshchatWhatsapp::Api
- Inherits:
-
Object
- Object
- FreshchatWhatsapp::Api
- Defined in:
- lib/freshchat_whatsapp/api.rb
Instance Method Summary collapse
- #check_message_status(request_id) ⇒ Object
-
#initialize(base_path = nil, token = nil) ⇒ Api
constructor
A new instance of Api.
- #send_hsm_message(from_number, to_number, namespace, template_name, language, params) ⇒ Object
Constructor Details
#initialize(base_path = nil, token = nil) ⇒ Api
Returns a new instance of Api.
8 9 10 11 12 |
# File 'lib/freshchat_whatsapp/api.rb', line 8 def initialize(base_path=nil,token=nil) fresh_chat_base_path = base_path || FreshchatWhatsapp.configuration.base_path @base_path = fresh_chat_base_path @token = token end |
Instance Method Details
#check_message_status(request_id) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/freshchat_whatsapp/api.rb', line 26 def (request_id) Actions::CheckMessageStatus.new( client, request_id ).call end |
#send_hsm_message(from_number, to_number, namespace, template_name, language, params) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/freshchat_whatsapp/api.rb', line 14 def (from_number, to_number, namespace, template_name, language, params) Actions::SendHsmMessage.new( client, from_number, to_number, namespace, template_name, language, params ).call end |