Class: Io::Flow::V0::Models::PaymentFailureCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentFailureCode
- 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
-
.action_cancelled ⇒ Object
The previous action was cancelled by the customer.
-
.action_expired ⇒ Object
The previous action was not completed and expired.
-
.action_failed ⇒ Object
The previous action could not be completed due to a failure returned by the payment processor.
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of PaymentFailureCode for this value, creating a new instance for an unknown value.
-
.authorization_declined ⇒ Object
The previous authorization was declined by the payment provider.
-
.error ⇒ Object
An unexpected error occurred during the payment process.
-
.fraudulent ⇒ Object
The payment could not be completed because it appeared to be fraudulent.
-
.from_string(value) ⇒ Object
Returns the instance of PaymentFailureCode for this value, or nil if not found.
-
.not_supported ⇒ Object
The payment request cannot be processed using this payment method due to an unsupported combination of currency, country, amount, or merchant of record.
Instance Method Summary collapse
-
#initialize(value) ⇒ PaymentFailureCode
constructor
A new instance of PaymentFailureCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PaymentFailureCode
Returns a new instance of PaymentFailureCode.
21352 21353 21354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21352 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21350 21351 21352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21350 def value @value end |
Class Method Details
.action_cancelled ⇒ Object
The previous action was cancelled by the customer.
21382 21383 21384 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21382 def PaymentFailureCode.action_cancelled @@_action_cancelled ||= PaymentFailureCode.new('action_cancelled') end |
.action_expired ⇒ Object
The previous action was not completed and expired.
21377 21378 21379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21377 def PaymentFailureCode.action_expired @@_action_expired ||= PaymentFailureCode.new('action_expired') end |
.action_failed ⇒ Object
The previous action could not be completed due to a failure returned by the payment processor.
21388 21389 21390 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21388 def PaymentFailureCode.action_failed @@_action_failed ||= PaymentFailureCode.new('action_failed') end |
.ALL ⇒ Object
21372 21373 21374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21372 def PaymentFailureCode.ALL @@all ||= [PaymentFailureCode.action_expired, PaymentFailureCode.action_cancelled, PaymentFailureCode.action_failed, PaymentFailureCode., PaymentFailureCode.not_supported, PaymentFailureCode.fraudulent, PaymentFailureCode.error] end |
.apply(value) ⇒ Object
Returns the instance of PaymentFailureCode for this value, creating a new instance for an unknown value
21357 21358 21359 21360 21361 21362 21363 21364 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21357 def PaymentFailureCode.apply(value) if value.instance_of?(PaymentFailureCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PaymentFailureCode.new(value)) end end |
.authorization_declined ⇒ Object
The previous authorization was declined by the payment provider. The consumer should contact their payment provider.
21394 21395 21396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21394 def PaymentFailureCode. @@_authorization_declined ||= PaymentFailureCode.new('authorization_declined') end |
.error ⇒ Object
An unexpected error occurred during the payment process.
21410 21411 21412 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21410 def PaymentFailureCode.error @@_error ||= PaymentFailureCode.new('error') end |
.fraudulent ⇒ Object
The payment could not be completed because it appeared to be fraudulent.
21405 21406 21407 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21405 def PaymentFailureCode.fraudulent @@_fraudulent ||= PaymentFailureCode.new('fraudulent') end |
.from_string(value) ⇒ Object
Returns the instance of PaymentFailureCode for this value, or nil if not found
21367 21368 21369 21370 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21367 def PaymentFailureCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentFailureCode.ALL.find { |v| v.value == value } end |
.not_supported ⇒ Object
The payment request cannot be processed using this payment method due to an unsupported combination of currency, country, amount, or merchant of record.
21400 21401 21402 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21400 def PaymentFailureCode.not_supported @@_not_supported ||= PaymentFailureCode.new('not_supported') end |
Instance Method Details
#to_hash ⇒ Object
21414 21415 21416 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21414 def to_hash value end |