Class: Noticed::DeliveryMethods::Vonage
- Defined in:
- lib/noticed/delivery_methods/vonage.rb
Instance Attribute Summary
Attributes inherited from Base
#logger, #notification, #options, #params, #recipient, #record
Instance Method Summary collapse
Methods inherited from Base
#assign_args, inherited, options, #perform, validate!
Instance Method Details
#deliver ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/noticed/delivery_methods/vonage.rb', line 4 def deliver response = post("https://rest.nexmo.com/sms/json", json: format) status = response.parse.dig("messages", 0, "status") if ![:ignore_failure] && status != "0" raise ResponseUnsuccessful.new(response) end response end |