Sha256: 02692302f05b0ac0b3d65459f0377b609e40b321dee3e556b8196739b877523d
Contents?: true
Size: 1.15 KB
Versions: 7
Compression:
Stored size: 1.15 KB
Contents
# frozen_string_literal: true module Script module Commands class Disable < ShopifyCli::Command options do |parser, flags| parser.on('--api_key=APIKEY') { |t| flags[:api_key] = t } parser.on('--shop_domain=MYSHOPIFYDOMAIN') { |t| flags[:shop_domain] = t } end def call(args, _name) form = Forms::Enable.ask(@ctx, args, options.flags) return @ctx.puts(self.class.help) unless form project = ScriptProject.current Layers::Application::DisableScript.call( ctx: @ctx, api_key: form.api_key, shop_domain: form.shop_domain, extension_point_type: project.extension_point_type ) @ctx.puts(@ctx.message('script.disable.script_disabled')) rescue StandardError => e UI::ErrorHandler.pretty_print_and_raise(e, failed_op: @ctx.message('script.disable.error.operation_failed')) end def self.help ShopifyCli::Context.message('script.disable.help', ShopifyCli::TOOL_NAME) end def self.extended_help ShopifyCli::Context.message('script.disable.extended_help', ShopifyCli::TOOL_NAME) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems