Class: BabySMS::Adapters::BandwidthAdapter::WebHook
- Defined in:
- lib/babysms/adapters/bandwidth_adapter.rb
Instance Attribute Summary
Attributes inherited from WebHook
Instance Method Summary collapse
Methods inherited from WebHook
#end_point, #initialize, #mount_point
Constructor Details
This class inherits a constructor from BabySMS::WebHook
Instance Method Details
#process(app:, report:) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/babysms/adapters/bandwidth_adapter.rb', line 29 def process(app:, report:) validate!(app.request) = BabySMS::Message.new(from: app.params['from'], to: app.params['to'], contents: app.params['text'], uuid: app.params['id']) report.() [200, { 'Content-Type' => 'text/plain' }, 'ok'] end |