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
Indiciates 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.
10872 10873 10874 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10872 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10870 10871 10872 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10870 def value @value end |
Class Method Details
.ALL ⇒ Object
10892 10893 10894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10892 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.
10897 10898 10899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10897 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
10877 10878 10879 10880 10881 10882 10883 10884 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10877 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.
10902 10903 10904 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10902 def ReversalErrorCode. ||= ReversalErrorCode.new('authorization_declined') end |
.authorization_expired ⇒ Object
The authorization has expired and can no longer be reversed.
10907 10908 10909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10907 def ReversalErrorCode. ||= ReversalErrorCode.new('authorization_expired') end |
.from_string(value) ⇒ Object
Returns the instance of ReversalErrorCode for this value, or nil if not found
10887 10888 10889 10890 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10887 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
10922 10923 10924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10922 def ReversalErrorCode.invalid_amount @@_invalid_amount ||= ReversalErrorCode.new('invalid_amount') end |
.invalid_authorization ⇒ Object
The authorization was not found.
10912 10913 10914 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10912 def ReversalErrorCode. ||= ReversalErrorCode.new('invalid_authorization') end |
.invalid_currency ⇒ Object
Currency is either not known or invalid
10927 10928 10929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10927 def ReversalErrorCode.invalid_currency @@_invalid_currency ||= ReversalErrorCode.new('invalid_currency') end |
.invalid_key ⇒ Object
Invalid key
10917 10918 10919 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10917 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.
10933 10934 10935 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10933 def ReversalErrorCode.no_remaining_balance @@_no_remaining_balance ||= ReversalErrorCode.new('no_remaining_balance') end |
.partial_reversal_not_supported ⇒ Object
Indiciates a request for a partial reversal when the underlying processor does not support it
10939 10940 10941 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10939 def ReversalErrorCode.partial_reversal_not_supported @@_partial_reversal_not_supported ||= ReversalErrorCode.new('partial_reversal_not_supported') end |
.unknown ⇒ Object
Unknown or other
10944 10945 10946 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10944 def ReversalErrorCode.unknown @@_unknown ||= ReversalErrorCode.new('unknown') end |
Instance Method Details
#to_hash ⇒ Object
10948 10949 10950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10948 def to_hash value end |