Class: CourierRails::DeliveryMethod
- Inherits:
-
Object
- Object
- CourierRails::DeliveryMethod
- Defined in:
- lib/courier_rails/delivery_method.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#response ⇒ Object
Returns the value of attribute response.
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(options = {}) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(options = {}) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
8 9 10 |
# File 'lib/courier_rails/delivery_method.rb', line 8 def initialize( = {}) @settings = end |
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
6 7 8 |
# File 'lib/courier_rails/delivery_method.rb', line 6 def payload @payload end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/courier_rails/delivery_method.rb', line 6 def response @response end |
#settings ⇒ Object
Returns the value of attribute settings.
6 7 8 |
# File 'lib/courier_rails/delivery_method.rb', line 6 def settings @settings end |
Instance Method Details
#deliver!(mail) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/courier_rails/delivery_method.rb', line 12 def deliver!(mail) @payload = {} courier_data = find_courier_data_from mail prepare_event_from courier_data prepare_recipient_from mail, courier_data prepare_profile_from mail, courier_data prepare_data_from courier_data prepare_brand_from courier_data perfom_send_request end |