You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
321 B
16 lines
321 B
3 years ago
|
require "notifications/client"
|
||
|
|
||
|
class Sms
|
||
|
def self.notify_client
|
||
|
Notifications::Client.new(ENV["GOVUK_NOTIFY_API_KEY"])
|
||
|
end
|
||
|
|
||
|
def self.send(phone_number, template_id, args)
|
||
|
notify_client.send_sms(
|
||
|
phone_number: phone_number,
|
||
|
template_id: template_id,
|
||
|
personalisation: args,
|
||
|
)
|
||
|
end
|
||
|
end
|