Class: SolidusAfterpay::UpdateOrderAttributesService
- Inherits:
-
BaseService
- Object
- BaseService
- SolidusAfterpay::UpdateOrderAttributesService
- Defined in:
- app/services/solidus_afterpay/update_order_attributes_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(order:, afterpay_order_token:, payment_method:, request_env:) ⇒ UpdateOrderAttributesService
constructor
A new instance of UpdateOrderAttributesService.
Methods inherited from BaseService
Constructor Details
#initialize(order:, afterpay_order_token:, payment_method:, request_env:) ⇒ UpdateOrderAttributesService
Returns a new instance of UpdateOrderAttributesService.
5 6 7 8 9 10 11 12 |
# File 'app/services/solidus_afterpay/update_order_attributes_service.rb', line 5 def initialize(order:, afterpay_order_token:, payment_method:, request_env:) @order = order @afterpay_order_token = afterpay_order_token @payment_method = payment_method @request_env = request_env super() end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 |
# File 'app/services/solidus_afterpay/update_order_attributes_service.rb', line 14 def call return false if afterpay_order.nil? ::Spree::OrderUpdateAttributes.new(order, update_params, request_env: request_env).apply end |