Class: ShopifyCli::Tasks::SelectOrgAndShop
- Inherits:
-
ShopifyCli::Task
- Object
- ShopifyCli::Task
- ShopifyCli::Tasks::SelectOrgAndShop
- Defined in:
- lib/shopify-cli/tasks/select_org_and_shop.rb
Instance Attribute Summary collapse
-
#ctx ⇒ Object
readonly
Returns the value of attribute ctx.
Instance Method Summary collapse
Methods inherited from ShopifyCli::Task
Instance Attribute Details
#ctx ⇒ Object (readonly)
Returns the value of attribute ctx.
6 7 8 |
# File 'lib/shopify-cli/tasks/select_org_and_shop.rb', line 6 def ctx @ctx end |
Instance Method Details
#call(ctx, organization_id: nil, shop_domain: nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/shopify-cli/tasks/select_org_and_shop.rb', line 8 def call(ctx, organization_id: nil, shop_domain: nil) @ctx = ctx return response(organization_id.to_i, shop_domain) unless organization_id.nil? || shop_domain.nil? org = get_organization(organization_id) shop_domain ||= get_shop_domain(org) response(org["id"].to_i, shop_domain) end |