Class: PAYJPv2::PaymentDisputeReason

Inherits:
Object
  • Object
show all
Defined in:
lib/payjpv2/models/payment_dispute_reason.rb

Constant Summary collapse

RESEARCHING =
"researching".freeze
RESEARCHING_FRAUDULENT =
"researching_fraudulent".freeze
WARNED_FRAUDULENT =
"warned_fraudulent".freeze
CONFIRMED_FRAUDULENT =
"confirmed_fraudulent".freeze
UNRECOGNIZED =
"unrecognized".freeze
FRAUDULENT =
"fraudulent".freeze
PRODUCT_NOT_RECEIVED =
"product_not_received".freeze
ONLINE_FRAUDULENT =
"online_fraudulent".freeze
INCORRECT_ACCOUNT_DETAILS =
"incorrect_account_details".freeze
RECEIVING_CHARGEBACK =
"receiving_chargeback".freeze
DUPLICATE =
"duplicate".freeze
NOT_AUTHORIZED =
"not_authorized".freeze
SUBSCRIPTION_CANCELED =
"subscription_canceled".freeze
CHECK_RETURNED =
"check_returned".freeze
OTHER =
"other".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



34
35
36
# File 'lib/payjpv2/models/payment_dispute_reason.rb', line 34

def self.all_vars
  @all_vars ||= [RESEARCHING, RESEARCHING_FRAUDULENT, WARNED_FRAUDULENT, CONFIRMED_FRAUDULENT, UNRECOGNIZED, FRAUDULENT, PRODUCT_NOT_RECEIVED, ONLINE_FRAUDULENT, INCORRECT_ACCOUNT_DETAILS, RECEIVING_CHARGEBACK, DUPLICATE, NOT_AUTHORIZED, SUBSCRIPTION_CANCELED, CHECK_RETURNED, OTHER].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



41
42
43
# File 'lib/payjpv2/models/payment_dispute_reason.rb', line 41

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



48
49
50
51
# File 'lib/payjpv2/models/payment_dispute_reason.rb', line 48

def build_from_hash(value)
  return value if PaymentDisputeReason.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #PaymentDisputeReason"
end