class StytchB2B::Organizations::Members::OAuthProviders

def github(

The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is list of +GithubProviderInfo+ (+object+).
A list of tokens the member is registered with.
registrations::
The type of this field is +String+.
Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
provider_type::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +Boolean+.
Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future.
include_refresh_token::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
member_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

tokens after very long periods of inactivity.
issued access token from the identity provider. GitHub does not issue refresh tokens, but will invalidate access
Retrieve the saved GitHub access token for a Member. After a successful OAuth login, Stytch will save the
def github(
  organization_id:,
  member_id:,
  include_refresh_token: nil
)
  headers = {}
  query_params = {
    include_refresh_token: include_refresh_token
  }
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/github", query_params)
  get_request(request, headers)
end

def google(

The type of this field is nilable +String+.
The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API.
refresh_token::
The type of this field is nilable +Integer+.
The number of seconds until the access token expires.
access_token_expires_in::
The type of this field is nilable +String+.
The `access_token` that you may use to access the User's data in the provider's API.
access_token::
The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is list of +String+.
The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes.
scopes::
The type of this field is +String+.
The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth.
id_token::
The type of this field is +String+.
The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols.
provider_subject::
The type of this field is +String+.
Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
provider_type::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +Boolean+.
Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future.
include_refresh_token::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
member_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

[Start Google OAuth flow](https://stytch.com/docs/b2b/api/oauth-google-start) endpoint.
To force a refresh token to be issued, pass the `?provider_prompt=consent` query param into the
__Note:__ Google does not issue a refresh token on every login, and refresh tokens may expire if unused.

Google One Tap does not return access tokens. If the member has only authenticated through Google One Tap and not through a regular Google OAuth flow, this endpoint will not return any tokens.

access token automatically.
issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
Retrieve the saved Google access token and ID token for a member. After a successful OAuth login, Stytch will save the
def google(
  organization_id:,
  member_id:,
  include_refresh_token: nil
)
  headers = {}
  query_params = {
    include_refresh_token: include_refresh_token
  }
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/google", query_params)
  get_request(request, headers)
end

def hubspot(

The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is list of +HubspotProviderInfo+ (+object+).
A list of tokens the member is registered with.
registrations::
The type of this field is +String+.
Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
provider_type::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +Boolean+.
Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future.
include_refresh_token::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
member_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

access token automatically.
issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
Retrieve the saved Hubspot access token and ID token for a member. After a successful OAuth login, Stytch will save the
def hubspot(
  organization_id:,
  member_id:,
  include_refresh_token: nil
)
  headers = {}
  query_params = {
    include_refresh_token: include_refresh_token
  }
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/hubspot", query_params)
  get_request(request, headers)
end

def initialize(connection)

def initialize(connection)
  @connection = connection
end

def microsoft(

The type of this field is nilable +String+.
The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API.
refresh_token::
The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is list of +String+.
The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes.
scopes::
The type of this field is +String+.
The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth.
id_token::
The type of this field is +Integer+.
The number of seconds until the access token expires.
access_token_expires_in::
The type of this field is +String+.
The `access_token` that you may use to access the User's data in the provider's API.
access_token::
The type of this field is +String+.
The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols.
provider_subject::
The type of this field is +String+.
Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
provider_type::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +Boolean+.
Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future.
include_refresh_token::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
member_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

access token automatically.
issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
Retrieve the saved Microsoft access token and ID token for a member. After a successful OAuth login, Stytch will save the
def microsoft(
  organization_id:,
  member_id:,
  include_refresh_token: nil
)
  headers = {}
  query_params = {
    include_refresh_token: include_refresh_token
  }
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/microsoft", query_params)
  get_request(request, headers)
end

def slack(

The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is list of +SlackProviderInfo+ (+object+).
A list of tokens the member is registered with.
registrations::
The type of this field is +String+.
Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
provider_type::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is +String+.
Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
member_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

issued access token and ID token from the identity provider.
Retrieve the saved Slack access token and ID token for a member. After a successful OAuth login, Stytch will save the
def slack(
  organization_id:,
  member_id:
)
  headers = {}
  query_params = {}
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/slack", query_params)
  get_request(request, headers)
end