Class: Io::Flow::V0::Models::AuthorizationDeleteErrorCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AuthorizationDeleteErrorCode
- 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 AuthorizationDeleteErrorCode for this value, creating a new instance for an unknown value.
-
.captured ⇒ Object
Payment authorization has already been captured.
-
.expired ⇒ Object
Payment authorization has expired.
-
.from_string(value) ⇒ Object
Returns the instance of AuthorizationDeleteErrorCode for this value, or nil if not found.
-
.unknown ⇒ Object
Failed due to another reason (details not known).
Instance Method Summary collapse
-
#initialize(value) ⇒ AuthorizationDeleteErrorCode
constructor
A new instance of AuthorizationDeleteErrorCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ AuthorizationDeleteErrorCode
Returns a new instance of AuthorizationDeleteErrorCode.
7135 7136 7137 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7135 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7133 7134 7135 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7133 def value @value end |
Class Method Details
.ALL ⇒ Object
7155 7156 7157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7155 def AuthorizationDeleteErrorCode.ALL @@all ||= [AuthorizationDeleteErrorCode.expired, AuthorizationDeleteErrorCode.captured, AuthorizationDeleteErrorCode.unknown] end |
.apply(value) ⇒ Object
Returns the instance of AuthorizationDeleteErrorCode for this value, creating a new instance for an unknown value
7140 7141 7142 7143 7144 7145 7146 7147 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7140 def AuthorizationDeleteErrorCode.apply(value) if value.instance_of?(AuthorizationDeleteErrorCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || AuthorizationDeleteErrorCode.new(value)) end end |
.captured ⇒ Object
Payment authorization has already been captured. Please create a refund.
7165 7166 7167 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7165 def AuthorizationDeleteErrorCode.captured @@_captured ||= AuthorizationDeleteErrorCode.new('captured') end |
.expired ⇒ Object
Payment authorization has expired
7160 7161 7162 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7160 def AuthorizationDeleteErrorCode.expired @@_expired ||= AuthorizationDeleteErrorCode.new('expired') end |
.from_string(value) ⇒ Object
Returns the instance of AuthorizationDeleteErrorCode for this value, or nil if not found
7150 7151 7152 7153 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7150 def AuthorizationDeleteErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AuthorizationDeleteErrorCode.ALL.find { |v| v.value == value } end |
.unknown ⇒ Object
Failed due to another reason (details not known)
7170 7171 7172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7170 def AuthorizationDeleteErrorCode.unknown @@_unknown ||= AuthorizationDeleteErrorCode.new('unknown') end |
Instance Method Details
#to_hash ⇒ Object
7174 7175 7176 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7174 def to_hash value end |