Sha256: d1f853624678a91506fd0ab0cc1ddaf0ed8ab131bd0a94944240deb87a0214ce

Contents?: true

Size: 648 Bytes

Versions: 57

Compression:

Stored size: 648 Bytes

Contents

require "shopify_cli"

module ShopifyCLI
  module Commands
    class Populate
      class Customer < ShopifyCLI::AdminAPI::PopulateResourceCommand
        @input_type = :CustomerInput

        def defaults
          first_name, last_name = ShopifyCLI::Helpers::Haikunator.name
          {
            firstName: first_name,
            lastName: last_name,
          }
        end

        def message(data)
          ret = data["customerCreate"]["customer"]
          id = ShopifyCLI::API.gid_to_id(ret["id"])
          @ctx.message("core.populate.customer.added", ret["displayName"], @shop, admin_url, id)
        end
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
shopify-cli-2.19.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.18.1 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.18.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.17.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.16.1 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.16.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.6 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.5 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.4 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.3 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.2 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.1 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.15.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.14.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.13.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.12.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.11.2 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.11.1 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.11.0 lib/shopify_cli/commands/populate/customer.rb
shopify-cli-2.10.2 lib/shopify_cli/commands/populate/customer.rb