Class: Order::AuthorizationSplitter::Result
- Inherits:
-
Data
- Object
- Data
- Order::AuthorizationSplitter::Result
- Defined in:
- app/services/order/authorization_splitter.rb
Overview
Outcome of a split attempt.
:split - payment was allocated and the child is now fully funded
:noop - nothing to do (no deliveries, or the parent has no auth to split)
:failed - a payment path ran but the child is still underfunded
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(status: :noop) ⇒ Result
constructor
A new instance of Result.
- #noop? ⇒ Boolean
- #split? ⇒ Boolean
Constructor Details
#initialize(status: :noop) ⇒ Result
Returns a new instance of Result.
32 |
# File 'app/services/order/authorization_splitter.rb', line 32 def initialize(status: :noop) = super |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status
27 28 29 |
# File 'app/services/order/authorization_splitter.rb', line 27 def status @status end |
Class Method Details
.failed ⇒ Object
30 |
# File 'app/services/order/authorization_splitter.rb', line 30 def self.failed = new(status: :failed) |
.noop ⇒ Object
29 |
# File 'app/services/order/authorization_splitter.rb', line 29 def self.noop = new(status: :noop) |
.split ⇒ Object
28 |
# File 'app/services/order/authorization_splitter.rb', line 28 def self.split = new(status: :split) |
Instance Method Details
#failed? ⇒ Boolean
36 |
# File 'app/services/order/authorization_splitter.rb', line 36 def failed? = status == :failed |
#noop? ⇒ Boolean
35 |
# File 'app/services/order/authorization_splitter.rb', line 35 def noop? = status == :noop |
#split? ⇒ Boolean
34 |
# File 'app/services/order/authorization_splitter.rb', line 34 def split? = status == :split |