class StytchB2B::Client
def api_host(env, project_id)
def api_host(env, project_id) case env when :live 'https://api.stytch.com' when :test 'https://test.stytch.com' when %r{\Ahttps?://} # If this is a string that looks like a URL, assume it's an internal development URL. env else if project_id.start_with? 'project-live-' 'https://api.stytch.com' else 'https://test.stytch.com' end end end