Class: PaperPlane::FlightRoutes::Sms
- Inherits:
-
Base
- Object
- Base
- PaperPlane::FlightRoutes::Sms
show all
- Defined in:
- lib/paper_plane/flight_routes/sms.rb
Instance Attribute Summary
Attributes inherited from Base
#flight_routes, #mid, #params
Instance Method Summary
collapse
Methods inherited from Base
#context, flight_routes, #fly, fly_action, #fly_now!, #flying_route?, inherited, #initialize, method_missing, register_flight_route, respond_to_missing?, skip, #skip, template_formats
Instance Method Details
#do_fly ⇒ Object
8
9
10
11
12
|
# File 'lib/paper_plane/flight_routes/sms.rb', line 8
def do_fly
return if intercept?
@_engine.create(message_payload)
end
|
#intercept? ⇒ Boolean
22
|
# File 'lib/paper_plane/flight_routes/sms.rb', line 22
def intercept?; end
|
#message_payload ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/paper_plane/flight_routes/sms.rb', line 14
def message_payload
{
from: ENV['TWILIO_NUMBER'],
to: recipient.full_mobile_number,
body: template
}
end
|