Class: ShopifyApp::AccessScopes::UserStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_shopify_app/access_scopes/user_strategy.rb

Defined Under Namespace

Classes: InvalidInput

Class Method Summary collapse

Class Method Details

.update_access_scopes?(user_id: nil, shopify_user_id: nil) ⇒ Boolean

Returns:

  • (Boolean)

Raises:



9
10
11
12
13
# File 'lib/ruby_shopify_app/access_scopes/user_strategy.rb', line 9

def update_access_scopes?(user_id: nil, shopify_user_id: nil)
  return update_access_scopes_for_user_id?(user_id) if user_id
  return update_access_scopes_for_shopify_user_id?(shopify_user_id) if shopify_user_id
  raise(InvalidInput, '#update_access_scopes? requires user_id or shopify_user_id parameter inputs')
end