Class: EffectiveOrders::AppCheckoutService
- Inherits:
-
Object
- Object
- EffectiveOrders::AppCheckoutService
- Defined in:
- lib/effective_orders/app_checkout_service.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
readonly
Returns the value of attribute order.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(order) ⇒ AppCheckoutService
constructor
A new instance of AppCheckoutService.
-
#payment_details ⇒ Object
A Hash or easily serializable object like a String.
- #success? ⇒ Boolean
Constructor Details
#initialize(order) ⇒ AppCheckoutService
Returns a new instance of AppCheckoutService.
9 10 11 |
# File 'lib/effective_orders/app_checkout_service.rb', line 9 def initialize(order) @order = order end |
Instance Attribute Details
#order ⇒ Object (readonly)
Returns the value of attribute order.
7 8 9 |
# File 'lib/effective_orders/app_checkout_service.rb', line 7 def order @order end |
Class Method Details
.call(order:) ⇒ Object
3 4 5 |
# File 'lib/effective_orders/app_checkout_service.rb', line 3 def self.call(order:) new(order).tap(&:call) end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'lib/effective_orders/app_checkout_service.rb', line 13 def call raise NotImplementedError, "overwrite the `call` instance method in #{self.class}" end |
#payment_details ⇒ Object
A Hash or easily serializable object like a String
22 23 |
# File 'lib/effective_orders/app_checkout_service.rb', line 22 def payment_details end |
#success? ⇒ Boolean
17 18 19 |
# File 'lib/effective_orders/app_checkout_service.rb', line 17 def success? raise NotImplementedError, "overwrite the `success?` instance method in #{self.class}" end |