class Io::Flow::V0::Models::CaptureDeclineCode
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17549 def CaptureDeclineCode.ALL @@all ||= [CaptureDeclineCode.expired, CaptureDeclineCode.insufficient_funds, CaptureDeclineCode.unknown] end
apply(value)
click to toggle source
Returns the instance of CaptureDeclineCode
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 17534 def CaptureDeclineCode.apply(value) if value.instance_of?(CaptureDeclineCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CaptureDeclineCode.new(value)) end end
expired()
click to toggle source
Payment
authorization has expired
# File lib/flow_commerce/flow_api_v0_client.rb, line 17554 def CaptureDeclineCode.expired @@_expired ||= CaptureDeclineCode.new('expired') end
from_string(value)
click to toggle source
Returns the instance of CaptureDeclineCode
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 17544 def CaptureDeclineCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CaptureDeclineCode.ALL.find { |v| v.value == value } end
insufficient_funds()
click to toggle source
The amount to capture exceeded the amount authorized and not yet captured
# File lib/flow_commerce/flow_api_v0_client.rb, line 17559 def CaptureDeclineCode.insufficient_funds @@_insufficient_funds ||= CaptureDeclineCode.new('insufficient_funds') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17529 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
unknown()
click to toggle source
Failed due to another reason (details not known)
# File lib/flow_commerce/flow_api_v0_client.rb, line 17564 def CaptureDeclineCode.unknown @@_unknown ||= CaptureDeclineCode.new('unknown') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17568 def to_hash value end