Sha256: c10c45b05e294d755d61df8eace42c95f6003e395caf4b4d829054d0322a7b0a

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 KB

Contents

=begin
#DocuSign Click API

#DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.

OpenAPI spec version: v1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git

=end

module DocuSign_Click
  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

7 entries across 5 versions & 1 rubygems

Version Path
docusign_click-1.4.0 lib/docusign_click/api_error.rb
docusign_click-1.3.0 lib/docusign_click/api_error.rb
docusign_click-1.2.2 lib/docusign_click/api_error.rb
docusign_click-1.2.2 lib/docusign_click/client/api_error.rb
docusign_click-1.1.0 lib/docusign_click/client/api_error.rb
docusign_click-1.1.0 lib/docusign_click/api_error.rb
docusign_click-1.1.0.rc1 lib/docusign_click/client/api_error.rb