Sha256: d5780ce37e3c3027f088fa52f87e018c7c332a5654c28e40bc6d866306cccc2b

Contents?: true

Size: 443 Bytes

Versions: 1

Compression:

Stored size: 443 Bytes

Contents

module Shopper
  module CheckoutPage
    class ProceedCheckout
      def self.call(order, params, step, &block)
        command = case step
                  when :address  then AddCheckoutAddresses
                  when :delivery then AddCheckoutDelivery
                  when :payment  then AddCheckoutPayment
                  end
        ActiveRecord::Base.transaction { command.call(order, params, &block) }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoppper-0.1.0 app/commands/shopper/checkout_page/proceed_checkout.rb