class Io::Flow::V0::Models::AuthorizationStatus
Attributes
Public Class Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 17120 def AuthorizationStatus.ALL @@all ||= [AuthorizationStatus.initiated, AuthorizationStatus.pending, AuthorizationStatus.expired, AuthorizationStatus.authorized, AuthorizationStatus.review, AuthorizationStatus.declined, AuthorizationStatus.reversed] end
Returns the instance of AuthorizationStatus
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 17105 def AuthorizationStatus.apply(value) if value.instance_of?(AuthorizationStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || AuthorizationStatus.new(value)) end end
The authorization has been declined by the issuing bank. See the authorization decline code for more details as to the reason for decline.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17169 def AuthorizationStatus.declined @@_declined ||= AuthorizationStatus.new('declined') end
The authorization has expired or was explicitly cancelled by the customer.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17149 def AuthorizationStatus.expired @@_expired ||= AuthorizationStatus.new('expired') end
Returns the instance of AuthorizationStatus
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 17115 def AuthorizationStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AuthorizationStatus.ALL.find { |v| v.value == value } end
When the customer has selected a type of payment method to attempt a transaction, e.g. by clicking a payment method button, an authorization is created in the ‘initiated` status. This will transition to another status once the user’s exact method of payment is determined (a specific card or bank account). Often, the checkout experience will need to take additional action to enable this transition, like redirecting to a payment provider’s page; consult ‘result_action` to understand what to do next.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17131 def AuthorizationStatus.initiated @@_initiated ||= AuthorizationStatus.new('initiated') end
# File lib/flow_commerce/flow_api_v0_client.rb, line 17100 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
After the customer has filled in their payment information, like their card or their bank account, the payment provider may need additional verification like cardholder authentication or may need more time to complete processing. The checkout experience may need to take additional actions expressed in ‘result_action` to complete the transaction. If no `result_action` is present, the authorization will update asynchronously based on payment processor notifications. In this case, the payment should be considered provisional; you can display a Thank You page to the customer, but the order should not be fulfilled until the authorization updates to a final status.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17144 def AuthorizationStatus.pending @@_pending ||= AuthorizationStatus.new('pending') end
The authorization has been fully reversed. You can fully reverse an authorization up until the moment you capture funds; once you have captured funds you must create refunds.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17176 def AuthorizationStatus.reversed @@_reversed ||= AuthorizationStatus.new('reversed') end
The authorization has been completed, but it needs to go through a fraud review process. You can show a Thank You page to the customer, but you should not fulfill the order until the status has updated to ‘authorized`.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17163 def AuthorizationStatus.review @@_review ||= AuthorizationStatus.new('review') end
Public Instance Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 17180 def to_hash value end