Class: SolidusAfterpay::UpdateOrderAddressesService
- Inherits:
-
BaseService
- Object
- BaseService
- SolidusAfterpay::UpdateOrderAddressesService
- Defined in:
- app/services/solidus_afterpay/update_order_addresses_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(order:, address_params:) ⇒ UpdateOrderAddressesService
constructor
A new instance of UpdateOrderAddressesService.
Methods inherited from BaseService
Constructor Details
#initialize(order:, address_params:) ⇒ UpdateOrderAddressesService
Returns a new instance of UpdateOrderAddressesService.
5 6 7 8 9 10 |
# File 'app/services/solidus_afterpay/update_order_addresses_service.rb', line 5 def initialize(order:, address_params:) @order = order @address_params = address_params super() end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/services/solidus_afterpay/update_order_addresses_service.rb', line 12 def call order.state = 'address' order.email = SolidusAfterpay.configuration.dummy_email if order.email.blank? order.ship_address_attributes = address_object order.bill_address_attributes = address_object order.save end |