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
Returns a new instance of RefundStatus.
14377 14378 14379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14377 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14375 14376 14377 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14375 def value @value end |
Class Method Details
.ALL ⇒ Object
14397 14398 14399 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14397 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
14382 14383 14384 14385 14386 14387 14388 14389 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14382 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.
14417 14418 14419 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14417 def RefundStatus.canceled @@_canceled ||= RefundStatus.new('canceled') end |
.failed ⇒ Object
The refund failed to process.
14412 14413 14414 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14412 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
14392 14393 14394 14395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14392 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.
14402 14403 14404 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14402 def RefundStatus.pending @@_pending ||= RefundStatus.new('pending') end |
.succeeded ⇒ Object
The refund has been processed successfully.
14407 14408 14409 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14407 def RefundStatus.succeeded @@_succeeded ||= RefundStatus.new('succeeded') end |
Instance Method Details
#to_hash ⇒ Object
14421 14422 14423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14421 def to_hash value end |