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
-
.amount_exceeds_balance ⇒ Object
Amount specified exceeds the remaining authorization balance.
-
.apply(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, creating a new instance for an unknown value.
-
.authorization_declined ⇒ Object
The authorization was initially declined; there is nothing to reverse.
-
.authorization_expired ⇒ Object
The authorization has expired and can no longer be reversed.
-
.from_string(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, or nil if not found.
-
.invalid_amount ⇒ Object
Amount is not valid - usually because amount was <= 0.
-
.invalid_authorization ⇒ Object
The authorization was not found.
-
.invalid_currency ⇒ Object
Currency is either not known or invalid.
-
.invalid_key ⇒ Object
Invalid key.
-
.no_remaining_balance ⇒ Object
The authorization has already been fully captured and/or reversed - there are no additional funds to reverse.
-
.partial_reversal_not_supported ⇒ Object
Indicates a request for a partial reversal when the underlying processor does not support it.
-
.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.
19975 19976 19977 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19975 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19973 19974 19975 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19973 def value @value end |
Class Method Details
.ALL ⇒ Object
19995 19996 19997 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19995 def ReversalErrorCode.ALL @@all ||= [ReversalErrorCode.amount_exceeds_balance, ReversalErrorCode., ReversalErrorCode., ReversalErrorCode., ReversalErrorCode.invalid_key, ReversalErrorCode.invalid_amount, ReversalErrorCode.invalid_currency, ReversalErrorCode.no_remaining_balance, ReversalErrorCode.partial_reversal_not_supported, ReversalErrorCode.unknown] end |
.amount_exceeds_balance ⇒ Object
Amount specified exceeds the remaining authorization balance.
20000 20001 20002 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20000 def ReversalErrorCode.amount_exceeds_balance @@_amount_exceeds_balance ||= ReversalErrorCode.new('amount_exceeds_balance') end |
.apply(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, creating a new instance for an unknown value
19980 19981 19982 19983 19984 19985 19986 19987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19980 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_declined ⇒ Object
The authorization was initially declined; there is nothing to reverse.
20005 20006 20007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20005 def ReversalErrorCode. @@_authorization_declined ||= ReversalErrorCode.new('authorization_declined') end |
.authorization_expired ⇒ Object
The authorization has expired and can no longer be reversed.
20010 20011 20012 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20010 def ReversalErrorCode. @@_authorization_expired ||= ReversalErrorCode.new('authorization_expired') end |
.from_string(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, or nil if not found
19990 19991 19992 19993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19990 def ReversalErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ReversalErrorCode.ALL.find { |v| v.value == value } end |
.invalid_amount ⇒ Object
Amount is not valid - usually because amount was <= 0
20025 20026 20027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20025 def ReversalErrorCode.invalid_amount @@_invalid_amount ||= ReversalErrorCode.new('invalid_amount') end |
.invalid_authorization ⇒ Object
The authorization was not found.
20015 20016 20017 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20015 def ReversalErrorCode. @@_invalid_authorization ||= ReversalErrorCode.new('invalid_authorization') end |
.invalid_currency ⇒ Object
Currency is either not known or invalid
20030 20031 20032 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20030 def ReversalErrorCode.invalid_currency @@_invalid_currency ||= ReversalErrorCode.new('invalid_currency') end |
.invalid_key ⇒ Object
Invalid key
20020 20021 20022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20020 def ReversalErrorCode.invalid_key @@_invalid_key ||= ReversalErrorCode.new('invalid_key') end |
.no_remaining_balance ⇒ Object
The authorization has already been fully captured and/or reversed - there are no additional funds to reverse.
20036 20037 20038 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20036 def ReversalErrorCode.no_remaining_balance @@_no_remaining_balance ||= ReversalErrorCode.new('no_remaining_balance') end |
.partial_reversal_not_supported ⇒ Object
Indicates a request for a partial reversal when the underlying processor does not support it
20042 20043 20044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20042 def ReversalErrorCode.partial_reversal_not_supported @@_partial_reversal_not_supported ||= ReversalErrorCode.new('partial_reversal_not_supported') end |
.unknown ⇒ Object
Unknown or other
20047 20048 20049 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20047 def ReversalErrorCode.unknown @@_unknown ||= ReversalErrorCode.new('unknown') end |
Instance Method Details
#to_hash ⇒ Object
20051 20052 20053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20051 def to_hash value end |