Sha256: af976c2e1c36417ee1245120c0441d2951789c8e029b41f1c299064b6ce3e4cf
Contents?: true
Size: 588 Bytes
Versions: 6
Compression:
Stored size: 588 Bytes
Contents
# frozen_string_literal: true class Zendesk2::GetHelpCenterSectionsArticles include Zendesk2::Request request_path do |r| locale = r.params['locale'] if locale "/help_center/#{locale}/sections/#{r.section_id}/articles.json" else "/help_center/sections/#{r.section_id}/articles.json" end end page_params! def section_id Integer(params.fetch('section_id')) end def mock find!(:help_center_sections, section_id) mock_response('articles' => data[:help_center_articles].values.select { |s| s['section_id'] == section_id }) end end
Version data entries
6 entries across 6 versions & 1 rubygems