Class: Shoutout::SMS

Inherits:
Object
  • Object
show all
Defined in:
lib/shoutout/sms.rb

Class Method Summary collapse

Class Method Details

.send(apikey, from, to, body) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/shoutout/sms.rb', line 3

def self.send(apikey,from,to,body)

    return RestClient.postJson(
        body:{
            'source' => from, 
            'transports':['sms'],
            'content' => {
            'sms'=>body
        }, 
        'destinations' => [to]},
        url:"https://api.getshoutout.com/coreservice/messages",
        apikey:apikey

    )


    
end