class Io::Flow::V0::Models::PaymentStatus
Attributes
Public Class Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 24717 def PaymentStatus.ALL @@all ||= [PaymentStatus.requires_payment_method, PaymentStatus.requires_action, PaymentStatus.processing, PaymentStatus.cancelled, PaymentStatus.expired, PaymentStatus.authorized, PaymentStatus.reversed, PaymentStatus.captured, PaymentStatus.refunded, PaymentStatus.in_dispute, PaymentStatus.charged_back] end
Returns the instance of PaymentStatus
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 24702 def PaymentStatus.apply(value) if value.instance_of?(PaymentStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PaymentStatus.new(value)) end end
The payment request was cancelled before any transaction was authorized. The consumer will not be charged for any transactions that were in progress.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24748 def PaymentStatus.cancelled @@_cancelled ||= PaymentStatus.new('cancelled') end
The entire balance of the payment request has been captured. The funds have been withdrawn from the consumer and will be transferred to the merchant. With some payment methods, this occurs automatically after authorization without taking steps to capture. Any funds captured can be returned to the customer by refunding them. The consumer can issue a dispute for any captured funds.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24780 def PaymentStatus.captured @@_captured ||= PaymentStatus.new('captured') end
The payment provider has decided that the merchant breached terms of service will claim back all captured funds for the consumer.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24800 def PaymentStatus.charged_back @@_charged_back ||= PaymentStatus.new('charged_back') end
The payment request expired due to inactivity before any transaction was authorized.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24754 def PaymentStatus.expired @@_expired ||= PaymentStatus.new('expired') end
Returns the instance of PaymentStatus
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 24712 def PaymentStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentStatus.ALL.find { |v| v.value == value } end
The consumer has placed a dispute with their payment provider to reclaim any captured funds due to breach of service with the merchant. The status of the payment request will update to ‘charged_back` or `dispute_won` after the payment provider makes a decision.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24794 def PaymentStatus.in_dispute @@_in_dispute ||= PaymentStatus.new('in_dispute') end
# File lib/flow_commerce/flow_api_v0_client.rb, line 24697 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
The payment attempt is processing. Eventually it will update with the results of the transaction. Sometimes, this may take hours or days to finish processing - if that is the case, the consumer can have their order reserved provisionally until the payment is processed.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24742 def PaymentStatus.processing @@_processing ||= PaymentStatus.new('processing') end
The entire balance of the payment request has been refunded back to the consumer. No further actions can be taken with this payment request.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24786 def PaymentStatus.refunded @@_refunded ||= PaymentStatus.new('refunded') end
In order to process a payment for a given payment method, an action needs to be rendered on the consumer’s device so that they can interact with the payment provider or authenticate themselves. If the action is not completed, the action will expire and the payment request will change to ‘requires_payment_method`.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24734 def PaymentStatus.requires_action @@_requires_action ||= PaymentStatus.new('requires_action') end
The initial state of payment request if no ‘payment_method_data` is provided, if an authorization couldn’t be completed, or if the payment request details are changed beyond certain thesholds (e.g. currency changed). If a payment method is not added, this payment request will change to ‘expired`.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24725 def PaymentStatus.requires_payment_method @@_requires_payment_method ||= PaymentStatus.new('requires_payment_method') end
The entire balance of the payment request was reversed without being captured. The consumer has not had any funds withdrawn and any authorization hold has been removed.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24771 def PaymentStatus.reversed @@_reversed ||= PaymentStatus.new('reversed') end
Public Instance Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 24804 def to_hash value end