Sha256: f668bdb50c8a0d4324f3bbbd65e1d356a230dcf405d5d6de16a734eb1173b5e4

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module Atol
  class MissingConfigError < StandardError; end
  class AuthBadRequestError < StandardError; end
  class AuthUserOrPasswordError < StandardError; end
  class ConfigExpectedError < StandardError; end
  class UnknownOperationError < StandardError; end
  class BadJSONError < StandardError; end
  class IncomingOperationNotSupportError < StandardError; end
  class IncomingMissingTokenError < StandardError; end
  class IncomingExpiredTokenError < StandardError; end
  class IncomingExistExternalIdError < StandardError; end
  class GroupCodeToTokenError < StandardError; end
  class EmptyClientContactError < StandardError; end
  class EmptySellItemsError < StandardError; end
  class IncomingValidationError < StandardError; end
  class StateMissingUuidError < StandardError; end
  class StateNotFoundError < StandardError; end
  class ZeroItemQuantityError < StandardError; end

  ERRORS = Hash[
      0 =>  BadJSONError,
      10 => IncomingMissingTokenError,
      11 => IncomingExpiredTokenError,
      20 => GroupCodeToTokenError,
      30 => StateMissingUuidError,
      31 => IncomingOperationNotSupportError,
      32 => IncomingValidationError,
      33 => IncomingExistExternalIdError,
      34 => StateNotFoundError,
      -3804 => ZeroItemQuantityError
  ].freeze
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atol-0.7 lib/atol/errors.rb