Sha256: 4818bab10db9c63076a0c9913d772c30c4d8994ba2018949abfbf39b6b3b2af3

Contents?: true

Size: 765 Bytes

Versions: 16

Compression:

Stored size: 765 Bytes

Contents

# frozen_string_literal: true

module Extension
  module Models
    module SpecificationHandlers
      class CheckoutUiExtension < Default
        PERMITTED_CONFIG_KEYS = [:extension_points, :metafields, :name]

        def config(context)
          {
            **Features::ArgoConfig.parse_yaml(context, PERMITTED_CONFIG_KEYS),
            **argo.config(context, include_renderer_version: false),
          }
        end

        def supplies_resource_url?
          true
        end

        def build_resource_url(context:, shop:)
          product = Tasks::GetProduct.call(context, shop)
          return unless product
          format("/cart/%<variant_id>d:%<quantity>d", variant_id: product.variant_id, quantity: 1)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shopify-cli-2.11.2 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.11.1 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.11.0 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.10.2 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.10.1 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.10.0 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.9.0 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.8.0 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.7.4 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.7.3 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.7.2 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.7.1 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.7.0 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.6.6 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.6.5 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb
shopify-cli-2.6.4 lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb