Class: Io::Flow::V0::Models::RefundStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RefundStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of RefundStatus for this value, creating a new instance for an unknown value.
-
.canceled ⇒ Object
The refund was canceled.
-
.failed ⇒ Object
The refund failed to process.
-
.from_string(value) ⇒ Object
Returns the instance of RefundStatus for this value, or nil if not found.
-
.pending ⇒ Object
The refund has been initiated and requires time to complete.
-
.succeeded ⇒ Object
The refund has been processed successfully.
Instance Method Summary collapse
-
#initialize(value) ⇒ RefundStatus
constructor
A new instance of RefundStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ RefundStatus
15522 15523 15524 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15522 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15520 15521 15522 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15520 def value @value end |
Class Method Details
.ALL ⇒ Object
15542 15543 15544 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15542 def RefundStatus.ALL @@all ||= [RefundStatus.pending, RefundStatus.succeeded, RefundStatus.failed, RefundStatus.canceled] end |
.apply(value) ⇒ Object
Returns the instance of RefundStatus for this value, creating a new instance for an unknown value
15527 15528 15529 15530 15531 15532 15533 15534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15527 def RefundStatus.apply(value) if value.instance_of?(RefundStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || RefundStatus.new(value)) end end |
.canceled ⇒ Object
The refund was canceled.
15562 15563 15564 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15562 def RefundStatus.canceled @@_canceled ||= RefundStatus.new('canceled') end |
.failed ⇒ Object
The refund failed to process.
15557 15558 15559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15557 def RefundStatus.failed @@_failed ||= RefundStatus.new('failed') end |
.from_string(value) ⇒ Object
Returns the instance of RefundStatus for this value, or nil if not found
15537 15538 15539 15540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15537 def RefundStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) RefundStatus.ALL.find { |v| v.value == value } end |
.pending ⇒ Object
The refund has been initiated and requires time to complete.
15547 15548 15549 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15547 def RefundStatus.pending @@_pending ||= RefundStatus.new('pending') end |
.succeeded ⇒ Object
The refund has been processed successfully.
15552 15553 15554 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15552 def RefundStatus.succeeded @@_succeeded ||= RefundStatus.new('succeeded') end |
Instance Method Details
#to_hash ⇒ Object
15566 15567 15568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15566 def to_hash value end |