Sha256: 003f4cd625eff59a65650f2abb5ab822609e42e2e622a1ff6e37fb51ec5c910e
Contents?: true
Size: 691 Bytes
Versions: 21
Compression:
Stored size: 691 Bytes
Contents
class Zendesk2::Client::UpdateUserIdentity < Zendesk2::Client::Request request_path { |r| "/users/#{r.user_id}/identities/#{r.user_identity_id}.json" } request_method :put request_body { |r| { "identity" => r.user_identity_params } } def self.accepted_attributes %w[verified] end def user_id params.fetch("user_identity").fetch("user_id") end def user_identity_id params.fetch("user_identity").fetch("id") end def user_identity_params Cistern::Hash.slice(params.fetch("user_identity"), *self.class.accepted_attributes) end def mock mock_response("identity" => self.find!(:identities, user_identity_id).merge!(user_identity_params)) end end
Version data entries
21 entries across 21 versions & 1 rubygems