Class: PostFinanceCheckout::RefundType

Inherits:
Object
  • Object
show all
Defined in:
lib/postfinancecheckout-ruby-sdk/models/refund_type.rb

Constant Summary collapse

MERCHANT_INITIATED_ONLINE =
'MERCHANT_INITIATED_ONLINE'.freeze
MERCHANT_INITIATED_OFFLINE =
'MERCHANT_INITIATED_OFFLINE'.freeze
CUSTOMER_INITIATED_AUTOMATIC =
'CUSTOMER_INITIATED_AUTOMATIC'.freeze
CUSTOMER_INITIATED_MANUAL =
'CUSTOMER_INITIATED_MANUAL'.freeze

Instance Method Summary collapse

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



31
32
33
34
35
# File 'lib/postfinancecheckout-ruby-sdk/models/refund_type.rb', line 31

def build_from_hash(value)
  constantValues = RefundType.constants.select { |c| RefundType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #RefundType" if constantValues.empty?
  value
end