Class: Node::Commands::Populate::Customer
- Inherits:
-
ShopifyCli::AdminAPI::PopulateResourceCommand
- Object
- CLI::Kit::BaseCommand
- ShopifyCli::Command
- ShopifyCli::SubCommand
- ShopifyCli::AdminAPI::PopulateResourceCommand
- Node::Commands::Populate::Customer
- Defined in:
- lib/project_types/node/commands/populate/customer.rb
Constant Summary
Constants inherited from ShopifyCli::AdminAPI::PopulateResourceCommand
ShopifyCli::AdminAPI::PopulateResourceCommand::DEFAULT_COUNT
Instance Attribute Summary
Attributes inherited from ShopifyCli::AdminAPI::PopulateResourceCommand
Attributes inherited from ShopifyCli::Command
Instance Method Summary collapse
Methods inherited from ShopifyCli::AdminAPI::PopulateResourceCommand
#admin_url, #call, call, #completion_message, #display_parent_extended_help, #display_parent_help, help, #input_options, #populate, #price, #resource_options, #run_mutation, #schema
Methods inherited from ShopifyCli::SubCommand
Methods inherited from ShopifyCli::Command
call, call_help, #initialize, options, prerequisite_task, run_prerequisites, subcommand, subcommand_registry
Methods included from ShopifyCli::Feature::Set
Constructor Details
This class inherits a constructor from ShopifyCli::Command
Instance Method Details
#defaults ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/project_types/node/commands/populate/customer.rb', line 9 def defaults first_name, last_name = ShopifyCli::Helpers::Haikunator.name { firstName: first_name, lastName: last_name, } end |
#message(data) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/project_types/node/commands/populate/customer.rb', line 17 def (data) ret = data['customerCreate']['customer'] id = ShopifyCli::API.gid_to_id(ret['id']) @ctx.( 'node.populate.customer.added', ret['displayName'], ShopifyCli::Project.current.env.shop, admin_url, id ) end |