Sha256: d6da8699af6400a1c1f30953d275b8804cf30561eb5bf7fa61eec1b3db900c50

Contents?: true

Size: 1.08 KB

Versions: 49

Compression:

Stored size: 1.08 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: UNLICENSED
https://help.mypurecloud.com/articles/terms-and-conditions/

Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/

=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

49 entries across 49 versions & 1 rubygems

Version Path
purecloudplatformclientv2-98.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-96.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-95.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-94.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-93.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-92.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-91.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-90.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-89.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-88.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-87.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-86.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-85.0.1 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-85.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-84.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-83.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-82.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-81.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-80.0.0 lib/purecloudplatformclientv2/api_error.rb
purecloudplatformclientv2-79.0.0 lib/purecloudplatformclientv2/api_error.rb