Class: PostFinanceCheckout::TransactionState

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

Constant Summary collapse

CREATE =
'CREATE'.freeze
PENDING =
'PENDING'.freeze
CONFIRMED =
'CONFIRMED'.freeze
PROCESSING =
'PROCESSING'.freeze
FAILED =
'FAILED'.freeze
AUTHORIZED =
'AUTHORIZED'.freeze
VOIDED =
'VOIDED'.freeze
COMPLETED =
'COMPLETED'.freeze
FULFILL =
'FULFILL'.freeze
DECLINE =
'DECLINE'.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



37
38
39
40
41
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction_state.rb', line 37

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