Sha256: a31553f24c472ac7e365f4200bca92280d5ac2960e009140de2a11fd2e147816

Contents?: true

Size: 1.02 KB

Versions: 62

Compression:

Stored size: 1.02 KB

Contents

=begin
PureCloud Platform API

With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.

OpenAPI spec version: v2
Contact: DeveloperEvangelists@genesys.com
Generated by: https://github.com/swagger-api/swagger-codegen.git

License: ININ
http://www.inin.com

Terms of Service: https://developer.mypurecloud.com/tos

=end

module PureCloud
  class ApiError < StandardError
    attr_reader :code, :response_headers, :response_body

    # Usage examples:
    #   ApiError.new
    #   ApiError.new("message")
    #   ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
    #   ApiError.new(:code => 404, :message => "Not Found")
    def initialize(arg = nil)
      if arg.is_a? Hash
        arg.each do |k, v|
          if k.to_s == 'message'
            super v
          else
            instance_variable_set "@#{k}", v
          end
        end
      else
        super arg
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 2 rubygems

Version Path
purecloudplatformclientv2-52.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-51.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-50.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-49.0.1 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-49.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-48.2.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-48.1.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-48.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-47.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-46.1.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-46.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-45.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-44.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-43.1.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-43.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-42.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-41.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-40.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-39.1.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-39.0.0 lib/purecloudplatformclientv2/api_error.rb