Sha256: a45e42d1c4d47f84e404751891878085af6063b135725479914e969a03779df7

Contents?: true

Size: 620 Bytes

Versions: 4

Compression:

Stored size: 620 Bytes

Contents

require 'freshdesk_api/resource'

module FreshdeskAPI
  class SolutionArticle < Resource
    # Need to specify the category_id and folder_id in url

    def api_url(options = {})
      "/solution/categories/%{category_id}/folders/%{folder_id}/articles" % attributes
    end

    def request_namespace
      'solution_article'
    end

    def response_namespace
      :article
    end

    class << self
      def api_url(options = {})
        "/solution/categories/%{category_id}/folders/%{folder_id}/articles" % options
      end

      def collection_namespace
        'folder/articles'
      end

    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
freshdesk_api-0.1.3 lib/freshdesk_api/resources/solution_article.rb
freshdesk_api-0.1.2 lib/freshdesk_api/resources/solution_article.rb
freshdesk_api-0.1.1 lib/freshdesk_api/resources/solution_article.rb
freshdesk_api-0.1.0 lib/freshdesk_api/resources/solution_article.rb