Class: Script::Layers::Application::DisableScript

Inherits:
Object
  • Object
show all
Defined in:
lib/project_types/script/layers/application/disable_script.rb

Class Method Summary collapse

Class Method Details

.call(ctx:, api_key:, shop_domain:, extension_point_type:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/project_types/script/layers/application/disable_script.rb', line 7

def self.call(ctx:, api_key:, shop_domain:, extension_point_type:)
  UI::PrintingSpinner.spin(ctx, ctx.message('script.application.disabling')) do |p_ctx, spinner|
    script_service = Infrastructure::ScriptService.new(ctx: p_ctx)
    script_service.disable(
      api_key: api_key,
      shop_domain: shop_domain,
      extension_point_type: extension_point_type,
    )
    spinner.update_title(p_ctx.message('script.application.disabled'))
  end
end