class Io::Flow::V0::Models::PaymentFailureCode

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24246
def PaymentFailureCode.ALL
  @@all ||= [PaymentFailureCode.action_expired, PaymentFailureCode.action_cancelled, PaymentFailureCode.action_failed, PaymentFailureCode.authorization_declined, PaymentFailureCode.not_supported, PaymentFailureCode.fraudulent, PaymentFailureCode.error, PaymentFailureCode.payment_checks_declined]
end
action_cancelled() click to toggle source

The previous action was cancelled by the customer.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24256
def PaymentFailureCode.action_cancelled
  @@_action_cancelled ||= PaymentFailureCode.new('action_cancelled')
end
action_expired() click to toggle source

The previous action was not completed and expired.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24251
def PaymentFailureCode.action_expired
  @@_action_expired ||= PaymentFailureCode.new('action_expired')
end
action_failed() click to toggle source

The previous action could not be completed due to a failure returned by the payment processor.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24262
def PaymentFailureCode.action_failed
  @@_action_failed ||= PaymentFailureCode.new('action_failed')
end
apply(value) click to toggle source

Returns the instance of PaymentFailureCode for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 24231
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() click to toggle source

The previous authorization was declined by the payment provider. The consumer should contact their payment provider.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24268
def PaymentFailureCode.authorization_declined
  @@_authorization_declined ||= PaymentFailureCode.new('authorization_declined')
end
error() click to toggle source

An unexpected error occurred during the payment process.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24284
def PaymentFailureCode.error
  @@_error ||= PaymentFailureCode.new('error')
end
fraudulent() click to toggle source

The payment could not be completed because it appeared to be fraudulent.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24279
def PaymentFailureCode.fraudulent
  @@_fraudulent ||= PaymentFailureCode.new('fraudulent')
end
from_string(value) click to toggle source

Returns the instance of PaymentFailureCode for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 24241
def PaymentFailureCode.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PaymentFailureCode.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24226
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
not_supported() click to toggle source

The payment request cannot be processed using this payment method due to an unsupported combination of currency, country, amount, or merchant of record.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24274
def PaymentFailureCode.not_supported
  @@_not_supported ||= PaymentFailureCode.new('not_supported')
end
payment_checks_declined() click to toggle source

Payment checks declined.

# File lib/flow_commerce/flow_api_v0_client.rb, line 24289
def PaymentFailureCode.payment_checks_declined
  @@_payment_checks_declined ||= PaymentFailureCode.new('payment_checks_declined')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24293
def to_hash
  value
end