Sha256: 36dc80e0d6fb3ffc3534a952fb0bda88846e0ef2f8513240a88c3b7d27fe804c

Contents?: true

Size: 448 Bytes

Versions: 14

Compression:

Stored size: 448 Bytes

Contents

class Zendesk2::Client::GetOrganizationByExternalId < Zendesk2::Client::Request
  request_method :get
  request_params { |r| { "external_id" => r.external_id } }
  request_path   { |_| "/organizations/search.json" }

  def external_id
    params.fetch("external_id")
  end

  def mock
    results = self.data[:organizations].select { |k,v| v["external_id"].to_s == external_id.to_s }.values

    mock_response("organizations" => results)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
zendesk2-1.5.16 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.15 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.14 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.13 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.12 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.11 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.10 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.9 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.8 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.7 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.6 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.5 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.4 lib/zendesk2/client/requests/get_organization_by_external_id.rb
zendesk2-1.5.3 lib/zendesk2/client/requests/get_organization_by_external_id.rb