Sha256: 2cb13bc6a3c268dfdaab8faf608882714eba3813ac3ae6c58c03a688a682042f

Contents?: true

Size: 450 Bytes

Versions: 13

Compression:

Stored size: 450 Bytes

Contents

class Zendesk2::Client::GetOrganizationMemberships < Zendesk2::Client::Request
  request_method :get
  request_path { |r| "/organizations/#{r.organization_id}/organization_memberships.json" }

  page_params!

  def organization_id
    params.fetch("membership").fetch("organization_id").to_i
  end

  def mock
    page(self.data[:memberships].values.select { |m| m["organization_id"] == organization_id }, root: "organization_memberships")
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
zendesk2-1.7.5 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.7.4 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.7.2 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.7.1 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.7.0 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.6.1 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.17 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.16 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.15 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.14 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.13 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.12 lib/zendesk2/client/requests/get_organization_memberships.rb
zendesk2-1.5.11 lib/zendesk2/client/requests/get_organization_memberships.rb