Sha256: 2d931c2b220b2344f1530997ab61fab6d208b96a08e0f49ae3a7c410ffac9d62

Contents?: true

Size: 409 Bytes

Versions: 14

Compression:

Stored size: 409 Bytes

Contents

module Spree
  module Account
    module Addresses
      class Create < ::Spree::Account::Addresses::Base
        def call(user:, address_params:)
          fill_country_and_state_ids(address_params)

          address = user.addresses.new(address_params)
          if address.save
            success(address)
          else
            failure(address)
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
spree_core-4.0.9 app/services/spree/account/addresses/create.rb
spree_core-4.1.15 app/services/spree/account/addresses/create.rb
spree_core-4.1.14 app/services/spree/account/addresses/create.rb
spree_core-4.0.8 app/services/spree/account/addresses/create.rb
spree_core-4.1.13.1 app/services/spree/account/addresses/create.rb
spree_core-4.0.7.1 app/services/spree/account/addresses/create.rb
spree_core-4.0.7 app/services/spree/account/addresses/create.rb
spree_core-4.1.13 app/services/spree/account/addresses/create.rb
spree_core-4.0.6 app/services/spree/account/addresses/create.rb
spree_core-4.2.0.rc2 app/services/spree/account/addresses/create.rb
spree_core-4.1.12 app/services/spree/account/addresses/create.rb
spree_core-4.2.0.rc1 app/services/spree/account/addresses/create.rb
spree_core-4.1.11 app/services/spree/account/addresses/create.rb
spree_core-4.1.10 app/services/spree/account/addresses/create.rb