Class: TransferZero::RecipientState

Inherits:
Object
  • Object
show all
Defined in:
lib/transferzero-sdk/models/recipient_state.rb

Constant Summary collapse

INITIAL =
"initial".freeze
PENDING =
"pending".freeze
SUCCESS =
"success".freeze
ERROR =
"error".freeze
REFUNDED =
"refunded".freeze
MANUAL =
"manual".freeze
STUCK =
"stuck".freeze
OVERPAID =
"overpaid".freeze
CANCELED =
"canceled".freeze
EXCEPTION =
"exception".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class 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
# File 'lib/transferzero-sdk/models/recipient_state.rb', line 31

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



38
39
40
41
42
# File 'lib/transferzero-sdk/models/recipient_state.rb', line 38

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