Sha256: 5caf1285626b579abc237ec3621b15e3a74f4fbefe5193924854777e87001a35

Contents?: true

Size: 1.13 KB

Versions: 6

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

module Yext
  module Api
    module KnowledgeApi
      module OptimizationTasks
        # :knowledge_api:
        #   :knowledge_manager:
        #     :optimization_task:
        #       - :action: :index
        #         :method: :get
        #         :endpoint: https://api.yext.com/v2/accounts/{accountId}/optimizationtasks
        #         :path_regex: v2/accounts/[^/]+?/optimizationtasks
        #         :default_version: 20161012
        #         :documentation: http://developer.yext.com/docs/api-reference/#operation/getOptimizationTasks
        #         :sandbox_only: false
        class OptimizationTask < Yext::Api::Utils::ApiBase
          uri default_uri.delete("_")

          include Yext::Api::Concerns::AccountChild

          scope :location, ->(location_id) { locations(location_id) }
          scope :locations, ->(*location_id_array) { where(locationIds: Array.wrap(location_id_array).join(",")) }

          scope :task, ->(task_id) { tasks(task_id) }
          scope :tasks, ->(*task_id_array) { where(taskIds: Array.wrap(task_id_array).join(",")) }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yext-api-0.1.11 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb
yext-api-0.1.10 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb
yext-api-0.1.9 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb
yext-api-0.1.8 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb
yext-api-0.1.7 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb
yext-api-0.1.5 lib/yext/api/knowledge_api/optimization_tasks/optimization_task.rb