Sha256: 0fd41e357fdb76af2c4bbcc06326bc35144bfceea0ece51196cad09a1d7def45

Contents?: true

Size: 787 Bytes

Versions: 19

Compression:

Stored size: 787 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_user_identity(params={})
      id      = params["id"]
      user_id = params["user_id"]
      path    = "/users/#{user_id}/identities/#{id}.json"

      request(:path => path)
    end
  end # Real

  class Mock
    def get_user_identity(params={})
      id      = params["id"]
      user_id = params["user_id"]
      path    = "/users/#{user_id}/identities/#{id}.json"

      if body = self.data[:identities][id]
        response(
          :path => path,
          :body => {
            "identity" => body
          },
        )
      else 
        response(
          :path   => path,
          :status => 404,
          :body => {"error" => "RecordNotFound", "description" => "Not found"},
        )
      end
    end
  end # Mock
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
zendesk2-0.4.4 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.4.3 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.4.2 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.4.1 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.4.0 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.3.2 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.3.1 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.3.0 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.7 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.6 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.5 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.4 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.3 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.2 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.1 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.2.0 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.1.3 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.1.2 lib/zendesk2/client/requests/get_user_identity.rb
zendesk2-0.1.1 lib/zendesk2/client/requests/get_user_identity.rb