Class: Stall::ShippingNotificationService
- Inherits:
-
BaseService
- Object
- BaseService
- Stall::ShippingNotificationService
- Defined in:
- app/services/stall/shipping_notification_service.rb
Instance Attribute Summary collapse
-
#cart ⇒ Object
readonly
Returns the value of attribute cart.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(cart, params = {}) ⇒ ShippingNotificationService
constructor
A new instance of ShippingNotificationService.
Constructor Details
#initialize(cart, params = {}) ⇒ ShippingNotificationService
Returns a new instance of ShippingNotificationService.
5 6 7 8 |
# File 'app/services/stall/shipping_notification_service.rb', line 5 def initialize(cart, params = {}) @cart = cart @params = params end |
Instance Attribute Details
#cart ⇒ Object (readonly)
Returns the value of attribute cart.
3 4 5 |
# File 'app/services/stall/shipping_notification_service.rb', line 3 def cart @cart end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'app/services/stall/shipping_notification_service.rb', line 3 def params @params end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/stall/shipping_notification_service.rb', line 10 def call if shipment.update(shipment_params) update_shipment send_customer_email true else false end end |