Class: Stytch::Client
- Inherits:
-
Object
- Object
- Stytch::Client
- Defined in:
- lib/stytch/client.rb
Constant Summary collapse
- ENVIRONMENTS =
%i[live test].freeze
Instance Attribute Summary collapse
-
#crypto_wallets ⇒ Object
readonly
Returns the value of attribute crypto_wallets.
-
#m2m ⇒ Object
readonly
Returns the value of attribute m2m.
-
#magic_links ⇒ Object
readonly
Returns the value of attribute magic_links.
-
#oauth ⇒ Object
readonly
Returns the value of attribute oauth.
-
#otps ⇒ Object
readonly
Returns the value of attribute otps.
-
#passwords ⇒ Object
readonly
Returns the value of attribute passwords.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#sessions ⇒ Object
readonly
Returns the value of attribute sessions.
-
#totps ⇒ Object
readonly
Returns the value of attribute totps.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
-
#webauthn ⇒ Object
readonly
Returns the value of attribute webauthn.
Instance Method Summary collapse
-
#initialize(project_id:, secret:, env: nil, &block) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(project_id:, secret:, env: nil, &block) ⇒ Client
Returns a new instance of Client.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/stytch/client.rb', line 21 def initialize(project_id:, secret:, env: nil, &block) @api_host = api_host(env, project_id) @project_id = project_id @secret = secret @is_b2b_client = false create_connection(&block) @crypto_wallets = Stytch::CryptoWallets.new(@connection) @m2m = Stytch::M2M.new(@connection, @project_id, @is_b2b_client) @magic_links = Stytch::MagicLinks.new(@connection) @oauth = Stytch::OAuth.new(@connection) @otps = Stytch::OTPs.new(@connection) @passwords = Stytch::Passwords.new(@connection) @project = Stytch::Project.new(@connection) @sessions = Stytch::Sessions.new(@connection, @project_id) @totps = Stytch::TOTPs.new(@connection) @users = Stytch::Users.new(@connection) @webauthn = Stytch::WebAuthn.new(@connection) end |
Instance Attribute Details
#crypto_wallets ⇒ Object (readonly)
Returns the value of attribute crypto_wallets.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def crypto_wallets @crypto_wallets end |
#m2m ⇒ Object (readonly)
Returns the value of attribute m2m.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def m2m @m2m end |
#magic_links ⇒ Object (readonly)
Returns the value of attribute magic_links.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def magic_links @magic_links end |
#oauth ⇒ Object (readonly)
Returns the value of attribute oauth.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def oauth @oauth end |
#otps ⇒ Object (readonly)
Returns the value of attribute otps.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def otps @otps end |
#passwords ⇒ Object (readonly)
Returns the value of attribute passwords.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def passwords @passwords end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def project @project end |
#sessions ⇒ Object (readonly)
Returns the value of attribute sessions.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def sessions @sessions end |
#totps ⇒ Object (readonly)
Returns the value of attribute totps.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def totps @totps end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def users @users end |
#webauthn ⇒ Object (readonly)
Returns the value of attribute webauthn.
19 20 21 |
# File 'lib/stytch/client.rb', line 19 def webauthn @webauthn end |