Sha256: 24b1537c6288af8e4bd8c79b3e4d152ff42638f6fe5f8873553980acd70b7fc1

Contents?: true

Size: 334 Bytes

Versions: 6

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true
class Zendesk2::GetUserField
  include Zendesk2::Request

  request_path { |r| "/user_fields/#{r.user_field_id}.json" }
  request_method :get

  def user_field_id
    params.fetch('user_field').fetch('id')
  end

  def mock
    mock_response('user_field' => find!(:user_fields, user_field_id))
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zendesk2-1.15.0 lib/zendesk2/get_user_field.rb
zendesk2-1.13.1 lib/zendesk2/get_user_field.rb
zendesk2-1.13.0 lib/zendesk2/get_user_field.rb
zendesk2-1.12.0 lib/zendesk2/get_user_field.rb
zendesk2-1.11.0 lib/zendesk2/get_user_field.rb
zendesk2-1.10.0 lib/zendesk2/get_user_field.rb