Class: PaypalServerSdk::CaptureIncompleteReason

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/capture_incomplete_reason.rb

Overview

The reason why the captured payment status is ‘PENDING` or `DENIED`.

Constant Summary collapse

CAPTURE_INCOMPLETE_REASON =
[
  # The payer initiated a dispute for this captured payment with PayPal.

  BUYER_COMPLAINT = 'BUYER_COMPLAINT'.freeze,

  # The captured funds were reversed in response to the payer disputing this

  # captured payment with the issuer of the financial instrument used to pay

  # for this captured payment.

  CHARGEBACK = 'CHARGEBACK'.freeze,

  # The payer paid by an eCheck that has not yet cleared.

  ECHECK = 'ECHECK'.freeze,

  # Visit your online account. In your **Account Overview**, accept and deny

  # this payment.

  INTERNATIONAL_WITHDRAWAL = 'INTERNATIONAL_WITHDRAWAL'.freeze,

  # No additional specific reason can be provided. For more information

  # about this captured payment, visit your account online or contact

  # PayPal.

  OTHER = 'OTHER'.freeze,

  # The captured payment is pending manual review.

  PENDING_REVIEW = 'PENDING_REVIEW'.freeze,

  # The payee has not yet set up appropriate receiving preferences for their

  # account. For more information about how to accept or deny this payment,

  # visit your account online. This reason is typically offered in scenarios

  # such as when the currency of the captured payment is different from the

  # primary holding currency of the payee.

  RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION = 'RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION'.freeze,

  # The captured funds were refunded.

  REFUNDED = 'REFUNDED'.freeze,

  # The payer must send the funds for this captured payment. This code

  # generally appears for manual EFTs.

  TRANSACTION_APPROVED_AWAITING_FUNDING = 'TRANSACTION_APPROVED_AWAITING_FUNDING'.freeze,

  # The payee does not have a PayPal account.

  UNILATERAL = 'UNILATERAL'.freeze,

  # The payee's PayPal account is not verified.

  VERIFICATION_REQUIRED = 'VERIFICATION_REQUIRED'.freeze,

  # Risk Filter set by the payee failed for the transaction.

  DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = BUYER_COMPLAINT) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/paypal_server_sdk/models/capture_incomplete_reason.rb', line 63

def self.from_value(value, default_value = BUYER_COMPLAINT)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'buyer_complaint' then BUYER_COMPLAINT
  when 'chargeback' then CHARGEBACK
  when 'echeck' then ECHECK
  when 'international_withdrawal' then INTERNATIONAL_WITHDRAWAL
  when 'other' then OTHER
  when 'pending_review' then PENDING_REVIEW
  when 'receiving_preference_mandates_manual_action' then RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION
  when 'refunded' then REFUNDED
  when 'transaction_approved_awaiting_funding' then TRANSACTION_APPROVED_AWAITING_FUNDING
  when 'unilateral' then UNILATERAL
  when 'verification_required' then VERIFICATION_REQUIRED
  when 'declined_by_risk_fraud_filters' then DECLINED_BY_RISK_FRAUD_FILTERS
  else
    default_value
  end
end

.validate(value) ⇒ Object



57
58
59
60
61
# File 'lib/paypal_server_sdk/models/capture_incomplete_reason.rb', line 57

def self.validate(value)
  return false if value.nil?

  true
end