Sha256: fc7cdad808057467c17d0f1662cc6336f9a7248091f5a6631a5bc0eff49239b0

Contents?: true

Size: 1.61 KB

Versions: 67

Compression:

Stored size: 1.61 KB

Contents

module ZuoraAPI
  module Exceptions
    class Error < StandardError; end
    class AuthorizationNotPerformed < Error; end

    class ZuoraAPISessionError < Error
      attr_reader :code, :response
      attr_writer :default_message

      def initialize(message = nil)
        @message = message
        @default_message = "Error with Zuora Session."
      end

      def to_s
        @message || @default_message
      end
    end

    class ZuoraAPIError < Error
      attr_reader :code, :response
      attr_writer :default_message

      def initialize(message = nil,response=nil, code =nil)
        @code = code
        @message = message
        @response = response
        @default_message = "Error communicating with Zuora."
      end

      def to_s
        @message || @default_message
      end
    end

    class ZuoraAPIRequestLimit < Error
      attr_reader :code, :response
      attr_writer :default_message

      def initialize(message = nil,response=nil, code =nil)
        @code = code
        @message = message
        @response = response
        @default_message = "Your request limit has been exceeded for zuora."
      end

      def to_s
        @message || @default_message
      end
    end

    class ZuoraAPILockCompetition < Error
      attr_reader :code, :response
      attr_writer :default_message

      def initialize(message = nil,response=nil, code =nil)
        @code = code
        @message = message
        @response = response
        @default_message = "Operation failed due to lock competition. Please retry"
      end

      def to_s
        @message || @default_message
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
zuora_api-1.3.994 lib/zuora_api/exceptions.rb
zuora_api-1.3.993 lib/zuora_api/exceptions.rb
zuora_api-1.3.992 lib/zuora_api/exceptions.rb
zuora_api-1.3.991 lib/zuora_api/exceptions.rb
zuora_api-1.3.99 lib/zuora_api/exceptions.rb
zuora_api-1.3.98 lib/zuora_api/exceptions.rb
zuora_api-1.3.97 lib/zuora_api/exceptions.rb
zuora_api-1.3.96 lib/zuora_api/exceptions.rb
zuora_api-1.3.95 lib/zuora_api/exceptions.rb
zuora_api-1.3.94 lib/zuora_api/exceptions.rb
zuora_api-1.3.93 lib/zuora_api/exceptions.rb
zuora_api-1.3.92 lib/zuora_api/exceptions.rb
zuora_api-1.3.91 lib/zuora_api/exceptions.rb
zuora_api-1.3.90 lib/zuora_api/exceptions.rb
zuora_api-1.3.12 lib/zuora_api/exceptions.rb
zuora_api-1.3.11 lib/zuora_api/exceptions.rb
zuora_api-1.3.10 lib/zuora_api/exceptions.rb
zuora_api-1.3.9 lib/zuora_api/exceptions.rb
zuora_api-1.3.8 lib/zuora_api/exceptions.rb
zuora_api-1.3.7 lib/zuora_api/exceptions.rb