Sha256: 5d88500c7dc590231d3b2b912a641e71f5b3ec0b15ca8db7829988f9fa775dbb

Contents?: true

Size: 993 Bytes

Versions: 19

Compression:

Stored size: 993 Bytes

Contents

=begin
#Web API Swagger specification

#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT

=end

module AsposeCellsCloud
  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
        if arg.key?(:message) || arg.key?('message')
          super(arg[:message] || arg['message'])
        else
          super arg
        end

        arg.each do |k, v|
          instance_variable_set "@#{k}", v
        end
      else
        super arg
      end
    end
  end
end

Version data entries

19 entries across 13 versions & 1 rubygems

Version Path
aspose_cells_cloud-20.9 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.8 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.7 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.6 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.4 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.2 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.1 lib.1/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.1 lib.old/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-20.1 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.10 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.9 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.9 lib.1/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.9 lib.2/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.9 lib.3/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.9 lib.old/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.6 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.2.1 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-19.2 lib/aspose_cells_cloud/api_error.rb
aspose_cells_cloud-18.11.1 lib/aspose_cells_cloud/api_error.rb