Class: Gusto::CompanyAccessTokenAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto.rb

Overview

Authentication configuration for company access token

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, access_token:, client_id:, client_secret:, redirect_uri:, refresh_token:) ⇒ CompanyAccessTokenAuth

Returns a new instance of CompanyAccessTokenAuth.

Parameters:

  • type (Symbol)

    The type of authentication, should be :company_access_token

  • access_token (String)

    The access token for company access token authentication

  • client_id (String)

    The client ID for company access token authentication

  • client_secret (String)

    The client secret for company access token authentication

  • redirect_uri (String)

    The redirect URI for company access token authentication

  • refresh_token (String)

    The refresh token for company access token authentication



45
46
47
48
49
50
51
52
# File 'lib/fern_gusto.rb', line 45

def initialize(type:, access_token:, client_id:, client_secret:, redirect_uri:, refresh_token:)
  @type = type
  @access_token = access_token
  @client_id = client_id
  @client_secret = client_secret
  @redirect_uri = redirect_uri
  @refresh_token = refresh_token
end

Instance Attribute Details

#access_tokenString

Returns The access token for company access token authentication.

Returns:

  • (String)

    The access token for company access token authentication



29
30
31
# File 'lib/fern_gusto.rb', line 29

def access_token
  @access_token
end

#client_idString

Returns The client ID for company access token authentication.

Returns:

  • (String)

    The client ID for company access token authentication



31
32
33
# File 'lib/fern_gusto.rb', line 31

def client_id
  @client_id
end

#client_secretString

Returns The client secret for company access token authentication.

Returns:

  • (String)

    The client secret for company access token authentication



33
34
35
# File 'lib/fern_gusto.rb', line 33

def client_secret
  @client_secret
end

#redirect_uriString

Returns The redirect URI for company access token authentication.

Returns:

  • (String)

    The redirect URI for company access token authentication



35
36
37
# File 'lib/fern_gusto.rb', line 35

def redirect_uri
  @redirect_uri
end

#refresh_tokenString

Returns The refresh token for company access token authentication.

Returns:

  • (String)

    The refresh token for company access token authentication



37
38
39
# File 'lib/fern_gusto.rb', line 37

def refresh_token
  @refresh_token
end

#typeSymbol

Returns The type of authentication, always :company_access_token.

Returns:

  • (Symbol)

    The type of authentication, always :company_access_token



27
28
29
# File 'lib/fern_gusto.rb', line 27

def type
  @type
end