Class: Io::Flow::V0::Models::ReversalErrorCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ReversalErrorCode
- 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 ReversalErrorCode for this value, creating a new instance for an unknown value.
-
.authorization_captured ⇒ Object
It’s too late to reverse the authorization, because it has already been captured.
-
.authorization_declined ⇒ Object
The authorization has been declined.
-
.authorization_reversed ⇒ Object
The authorization has already been reversed.
-
.from_string(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, or nil if not found.
-
.unknown ⇒ Object
Unknown or other.
Instance Method Summary collapse
-
#initialize(value) ⇒ ReversalErrorCode
constructor
A new instance of ReversalErrorCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ReversalErrorCode
Returns a new instance of ReversalErrorCode.
10470 10471 10472 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10470 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10468 10469 10470 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10468 def value @value end |
Class Method Details
.ALL ⇒ Object
10490 10491 10492 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10490 def ReversalErrorCode.ALL @@all ||= [ReversalErrorCode., ReversalErrorCode., ReversalErrorCode., ReversalErrorCode.unknown] end |
.apply(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, creating a new instance for an unknown value
10475 10476 10477 10478 10479 10480 10481 10482 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10475 def ReversalErrorCode.apply(value) if value.instance_of?(ReversalErrorCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ReversalErrorCode.new(value)) end end |
.authorization_captured ⇒ Object
It’s too late to reverse the authorization, because it has already been captured. Create a refund instead.
10506 10507 10508 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10506 def ReversalErrorCode. ||= ReversalErrorCode.new('authorization_captured') end |
.authorization_declined ⇒ Object
The authorization has been declined.
10495 10496 10497 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10495 def ReversalErrorCode. ||= ReversalErrorCode.new('authorization_declined') end |
.authorization_reversed ⇒ Object
The authorization has already been reversed.
10500 10501 10502 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10500 def ReversalErrorCode. ||= ReversalErrorCode.new('authorization_reversed') end |
.from_string(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, or nil if not found
10485 10486 10487 10488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10485 def ReversalErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ReversalErrorCode.ALL.find { |v| v.value == value } end |
.unknown ⇒ Object
Unknown or other
10511 10512 10513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10511 def ReversalErrorCode.unknown @@_unknown ||= ReversalErrorCode.new('unknown') end |
Instance Method Details
#to_hash ⇒ Object
10515 10516 10517 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10515 def to_hash value end |