Sha256: b177285a773cc0d80cae5615bf290e8e64ecce918f460c24122ec5f09f885cdb
Contents?: true
Size: 429 Bytes
Versions: 8
Compression:
Stored size: 429 Bytes
Contents
class Zendesk2::Client::GetUserMemberships < Zendesk2::Client::Request request_method :get request_path { |r| "/users/#{r.user_id}/organization_memberships.json" } page_params! def user_id params.fetch("membership").fetch("user_id").to_i end def mock collection = self.data[:memberships].values.select { |m| m["user_id"] == user_id } resources(collection, root: "organization_memberships") end end
Version data entries
8 entries across 8 versions & 1 rubygems