Class: Stall::CartPaymentValidationService
- Inherits:
-
BaseService
- Object
- BaseService
- Stall::CartPaymentValidationService
- Defined in:
- app/services/stall/cart_payment_validation_service.rb
Instance Attribute Summary collapse
-
#cart ⇒ Object
readonly
Returns the value of attribute cart.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(cart) ⇒ CartPaymentValidationService
constructor
A new instance of CartPaymentValidationService.
Constructor Details
#initialize(cart) ⇒ CartPaymentValidationService
Returns a new instance of CartPaymentValidationService.
5 6 7 |
# File 'app/services/stall/cart_payment_validation_service.rb', line 5 def initialize(cart) @cart = cart end |
Instance Attribute Details
#cart ⇒ Object (readonly)
Returns the value of attribute cart.
3 4 5 |
# File 'app/services/stall/cart_payment_validation_service.rb', line 3 def cart @cart end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/services/stall/cart_payment_validation_service.rb', line 9 def call cart.payment.pay! send_payment_notification_emails! create_credit_notes! # Always return true since errors should have raised if anything got # wrong. true end |