Sha256: 413a912b2677df72cb023898cd4c052f3f55fec9b2f5256ebe4d4472cd5e8d1e

Contents?: true

Size: 524 Bytes

Versions: 38

Compression:

Stored size: 524 Bytes

Contents

module EffectiveOrders
  class AppCheckoutService
    def self.call(order:)
      new(order).tap(&:call)
    end

    attr_reader :order

    def initialize(order)
      @order = order
    end

    def call
      raise NotImplementedError, "overwrite the `call` instance method in #{self.class}"
    end

    def success?
      raise NotImplementedError, "overwrite the `success?` instance method in #{self.class}"
    end

    # A Hash or easily serializable object like a String
    def payment_details
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
effective_orders-2.1.16 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.15 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.14 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.13 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.12 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.10 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.9 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.8 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.7 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.6 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.5 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.4 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.3 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.2 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.1 lib/effective_orders/app_checkout_service.rb
effective_orders-2.1.0 lib/effective_orders/app_checkout_service.rb
effective_orders-2.0.1 lib/effective_orders/app_checkout_service.rb
effective_orders-2.0.0 lib/effective_orders/app_checkout_service.rb