Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
zoho_api / lib / zoho_api / http_utils / response.rb
Size: Mime:
# frozen_string_literal: true

module ZohoApi
  class HttpUtils
    # Module for ZohoApi responses
    module Response
      def self.create(response_hash)
        data = begin
                 response_hash.data.dup
               rescue StandardError
                 response_hash
               end
        data.extend(self)
        if data.respond_to?(:error)
          raise ZohoApi::AuthorizationError, data.error
        end

        data
      end
    end
  end
end