Sha256: 21ef449b95203d99afe32c7c2d55a233dbedd5c91c04f5f555571c2057179200

Contents?: true

Size: 1.38 KB

Versions: 10

Compression:

Stored size: 1.38 KB

Contents

# bandwidth
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

module Bandwidth
  # PathClientException class.
  class PathClientException < APIException
    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :timestamp

    # TODO: Write general description for this method
    # @return [Integer]
    attr_accessor :status

    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :error

    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :message

    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :path

    # The constructor.
    # @param [String] The reason for raising an exception.
    # @param [HttpResponse] The HttpReponse of the API call.
    def initialize(reason, response)
      super(reason, response)
      hash = APIHelper.json_deserialize(@response.raw_body)
      unbox(hash)
    end

    # Populates this object by extracting properties from a hash.
    # @param [Hash] The deserialized response sent by the server in the
    # response body.
    def unbox(hash)
      @timestamp = hash['timestamp']
      @status = hash['status']
      @error = hash['error']
      @message = hash['message']
      @path = hash['path']
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bandwidth-sdk-2.2.2 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-2.2.1 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-2.2.0 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-2.1.1 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-2.1.0 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-2.0.0 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-1.0.2 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-1.0.1 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-1.0.0 lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
bandwidth-sdk-1.0.0.pre lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb