Class: FinchAPI::Resources::Connect::Sessions
- Inherits:
-
Object
- Object
- FinchAPI::Resources::Connect::Sessions
- Defined in:
- lib/finch-api/resources/connect/sessions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Sessions
constructor
A new instance of Sessions.
-
#new(params) ⇒ FinchAPI::Models::Connect::SessionNewResponse
Create a new connect session for an employer.
-
#reauthenticate(params) ⇒ FinchAPI::Models::Connect::SessionReauthenticateResponse
Create a new Connect session for reauthenticating an existing connection.
Constructor Details
#initialize(client:) ⇒ Sessions
Returns a new instance of Sessions.
72 73 74 |
# File 'lib/finch-api/resources/connect/sessions.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#new(params) ⇒ FinchAPI::Models::Connect::SessionNewResponse
Create a new connect session for an employer
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/finch-api/resources/connect/sessions.rb', line 33 def new(params) parsed, = FinchAPI::Models::Connect::SessionNewParams.dump_request(params) @client.request( method: :post, path: "connect/sessions", body: parsed, model: FinchAPI::Models::Connect::SessionNewResponse, options: ) end |
#reauthenticate(params) ⇒ FinchAPI::Models::Connect::SessionReauthenticateResponse
Create a new Connect session for reauthenticating an existing connection
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/finch-api/resources/connect/sessions.rb', line 60 def reauthenticate(params) parsed, = FinchAPI::Models::Connect::SessionReauthenticateParams.dump_request(params) @client.request( method: :post, path: "connect/sessions/reauthenticate", body: parsed, model: FinchAPI::Models::Connect::SessionReauthenticateResponse, options: ) end |