Class: MoneyKit::PublicLinkError

Inherits:
Object
  • Object
show all
Defined in:
lib/moneykit/models/public_link_error.rb

Constant Summary collapse

SYSTEM_ERROR =
"system_error".freeze
PROVIDER_ERROR =
"provider_error".freeze
INSTITUTION_ERROR =
"institution_error".freeze
USER_ERROR =
"user_error".freeze
AUTH_EXPIRED =
"auth_expired".freeze
INCOMPLETE =
"incomplete".freeze
NO_ACCOUNTS =
"no_accounts".freeze
USER_SETUP_REQUIRED =
"user_setup_required".freeze
INVALID_CREDENTIALS =
"invalid_credentials".freeze
USER_OAUTH_DENIED =
"user_oauth_denied".freeze
USER_INPUT_INCORRECT =
"user_input_incorrect".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



30
31
32
# File 'lib/moneykit/models/public_link_error.rb', line 30

def self.all_vars
  @all_vars ||= [SYSTEM_ERROR, PROVIDER_ERROR, INSTITUTION_ERROR, USER_ERROR, AUTH_EXPIRED, INCOMPLETE, NO_ACCOUNTS, USER_SETUP_REQUIRED, INVALID_CREDENTIALS, USER_OAUTH_DENIED, USER_INPUT_INCORRECT].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



37
38
39
# File 'lib/moneykit/models/public_link_error.rb', line 37

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



44
45
46
47
# File 'lib/moneykit/models/public_link_error.rb', line 44

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