Class: OrangeSmsApi::Client

Inherits:
Object
  • Object
show all
Includes:
HttpInterceptor
Defined in:
lib/orange_sms_api/client.rb

Instance Method Summary collapse

Methods included from HttpInterceptor

#access_token_validity?, #api_configured?, #get_token, #post

Instance Method Details

#send_sms(recipient_phone_number, body) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/orange_sms_api/client.rb', line 7

def send_sms(recipient_phone_number, body)
    message = {}
    message[:recipient_phone_number] = recipient_phone_number
    message[:body] = body

    puts "MESSAGE: #{message}"
    post(OrangeSmsApi.configuration.send_sms_endpoint, message)
    #get_token
       
end