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.99997 lib/zuora_api/exceptions.rb
zuora_api-1.3.99996 lib/zuora_api/exceptions.rb
zuora_api-1.3.99995 lib/zuora_api/exceptions.rb
zuora_api-1.3.99994 lib/zuora_api/exceptions.rb
zuora_api-1.3.99993 lib/zuora_api/exceptions.rb
zuora_api-1.3.99992 lib/zuora_api/exceptions.rb
zuora_api-1.3.99991 lib/zuora_api/exceptions.rb
zuora_api-1.3.9999 lib/zuora_api/exceptions.rb
zuora_api-1.3.9998 lib/zuora_api/exceptions.rb
zuora_api-1.3.9996 lib/zuora_api/exceptions.rb
zuora_api-1.3.9995 lib/zuora_api/exceptions.rb
zuora_api-1.3.9994 lib/zuora_api/exceptions.rb
zuora_api-1.3.9993 lib/zuora_api/exceptions.rb
zuora_api-1.3.9992 lib/zuora_api/exceptions.rb
zuora_api-1.3.9991 lib/zuora_api/exceptions.rb
zuora_api-1.3.999 lib/zuora_api/exceptions.rb
zuora_api-1.3.997 lib/zuora_api/exceptions.rb
zuora_api-1.3.996b lib/zuora_api/exceptions.rb
zuora_api-1.3.996 lib/zuora_api/exceptions.rb
zuora_api-1.3.995 lib/zuora_api/exceptions.rb