Sha256: 32145b72dc72ff2e6163e52194d799b5b3b151eb7d51e07cb38116a80545e74b

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

# #MoneyKit API
#
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#
# The version of the OpenAPI document: 0.1.0
#
# Generated by: https://openapi-generator.tech
# OpenAPI Generator version: 6.5.0
#

require 'date'
require 'time'

module MoneyKit
  class LinkError
    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
    PAYMENT_ERROR = 'payment_error'.freeze

    def self.all_vars
      @all_vars ||= [SYSTEM_ERROR, PROVIDER_ERROR, INSTITUTION_ERROR, USER_ERROR, AUTH_EXPIRED, INCOMPLETE,
                     PAYMENT_ERROR].freeze
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def self.build_from_hash(value)
      new.build_from_hash(value)
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def build_from_hash(value)
      return value if LinkError.all_vars.include?(value)

      raise "Invalid ENUM value #{value} for class #LinkError"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moneykit-0.0.5 lib/moneykit/models/link_error.rb
moneykit-0.0.3 lib/moneykit/models/link_error.rb