Class: Extension::Tasks::FetchSpecifications

Inherits:
Object
  • Object
show all
Includes:
ShopifyCLI::MethodObject
Defined in:
lib/project_types/extension/tasks/fetch_specifications.rb

Instance Method Summary collapse

Methods included from ShopifyCLI::MethodObject

included, #to_proc

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/project_types/extension/tasks/fetch_specifications.rb', line 9

def call
  response = ShopifyCLI::PartnersAPI
    .query(context, "fetch_specifications", api_key: api_key)
    .dig("data", "extensionSpecifications")
  context.abort(context.message("tasks.errors.parse_error")) if response.nil?

  response.reject do |line|
    ::Extension::Features::Runtimes::CheckoutUiExtension::IDENTIFIERS.include?(line["identifier"].upcase)
  end
end