Class: Spree::Addresses::Update
- Inherits:
-
Object
- Object
- Spree::Addresses::Update
- Includes:
- Helper, ServiceModule::Base
- Defined in:
- app/services/spree/addresses/update.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
Instance Method Summary collapse
Methods included from ServiceModule::Base
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
7 8 9 |
# File 'app/services/spree/addresses/update.rb', line 7 def country @country end |
Instance Method Details
#call(address:, address_params:, **opts) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/services/spree/addresses/update.rb', line 9 def call(address:, address_params:, **opts) ApplicationRecord.transaction do perform(address: address, address_params: address_params, **opts) end rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotDestroyed => e failure(e.record) end |