Sha256: 7dfdfb89ffb1ec0db940c1fbf997a06e000566849f2eca70320fd50e5af7de33

Contents?: true

Size: 526 Bytes

Versions: 12

Compression:

Stored size: 526 Bytes

Contents

module Spree
  module Account
    module Addresses
      class Update
        prepend Spree::ServiceModule::Base
        include Spree::Account::Addresses::Helper

        attr_accessor :country

        def call(address:, address_params:)
          address_params[:country_id] ||= address.country_id
          fill_country_and_state_ids(address_params)

          if address.update(address_params)
            success(address)
          else
            failure(address)
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spree_core-4.2.7 app/services/spree/account/addresses/update.rb
spree_core-4.2.6 app/services/spree/account/addresses/update.rb
spree_core-4.2.5 app/services/spree/account/addresses/update.rb
spree_core-4.2.4 app/services/spree/account/addresses/update.rb
spree_core-4.2.3.1 app/services/spree/account/addresses/update.rb
spree_core-4.2.3 app/services/spree/account/addresses/update.rb
spree_core-4.2.2 app/services/spree/account/addresses/update.rb
spree_core-4.2.1 app/services/spree/account/addresses/update.rb
spree_core-4.2.0 app/services/spree/account/addresses/update.rb
spree_core-4.2.0.rc5 app/services/spree/account/addresses/update.rb
spree_core-4.2.0.rc4 app/services/spree/account/addresses/update.rb
spree_core-4.2.0.rc3 app/services/spree/account/addresses/update.rb