Class: SyncteraRubySdk::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/synctera_ruby_sdk/models/status.rb

Constant Summary collapse

APPLICATION_SUBMITTED =
"APPLICATION_SUBMITTED".freeze
FAILED_KYC =
"FAILED_KYC".freeze
ACCOUNT_NOT_DESIRED =
"ACCOUNT_NOT_DESIRED".freeze
ACTIVE_OR_DISBURSED =
"ACTIVE_OR_DISBURSED".freeze
CLOSED =
"CLOSED".freeze
SUSPENDED =
"SUSPENDED".freeze
CHARGED_OFF =
"CHARGED_OFF".freeze
ACCOUNT_NEVER_ACTIVE =
"ACCOUNT_NEVER_ACTIVE".freeze
ACTIVATED_NOT_DISBURSED =
"ACTIVATED_NOT_DISBURSED".freeze
AWAITING_FIXING =
"AWAITING_FIXING".freeze
IN_CLOSING =
"IN_CLOSING".freeze
RESTRICTED =
"RESTRICTED".freeze
DELINQUENT =
"DELINQUENT".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



32
33
34
# File 'lib/synctera_ruby_sdk/models/status.rb', line 32

def self.all_vars
  @all_vars ||= [APPLICATION_SUBMITTED, FAILED_KYC, ACCOUNT_NOT_DESIRED, ACTIVE_OR_DISBURSED, CLOSED, SUSPENDED, CHARGED_OFF, ACCOUNT_NEVER_ACTIVE, ACTIVATED_NOT_DISBURSED, AWAITING_FIXING, IN_CLOSING, RESTRICTED, DELINQUENT].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



39
40
41
# File 'lib/synctera_ruby_sdk/models/status.rb', line 39

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



46
47
48
49
# File 'lib/synctera_ruby_sdk/models/status.rb', line 46

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