Class: MagicLinksClient
- Inherits:
-
Object
- Object
- MagicLinksClient
- Defined in:
- lib/lockstep_sdk/clients/magic_links_client.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ MagicLinksClient
constructor
Initialize the MagicLinksClient class with an API client instance.
-
#query_magic_links(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Magic Links for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_magic_link(id:, include_param:) ⇒ Object
Retrieves the Magic Link specified by this unique identifier, optionally including nested data sets.
-
#revoke_magic_link(id:) ⇒ Object
Revokes the magic link with the specified id so it cannot be used to call the API.
Constructor Details
#initialize(connection) ⇒ MagicLinksClient
Initialize the MagicLinksClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/magic_links_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#query_magic_links(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Magic Links for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
57 58 59 60 61 |
# File 'lib/lockstep_sdk/clients/magic_links_client.rb', line 57 def query_magic_links(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/useraccounts/magic-links/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_magic_link(id:, include_param:) ⇒ Object
Retrieves the Magic Link specified by this unique identifier, optionally including nested data sets.
32 33 34 35 36 |
# File 'lib/lockstep_sdk/clients/magic_links_client.rb', line 32 def retrieve_magic_link(id:, include_param:) path = "/api/v1/useraccounts/magic-links/#{id}" params = {:include => include_param} @connection.request(:get, path, nil, params) end |
#revoke_magic_link(id:) ⇒ Object
Revokes the magic link with the specified id so it cannot be used to call the API.
Revocation will be received by all servers within five minutes of revocation. API calls made using this magic link after the revocation will fail. A revoked magic link cannot be un-revoked.
44 45 46 47 |
# File 'lib/lockstep_sdk/clients/magic_links_client.rb', line 44 def revoke_magic_link(id:) path = "/api/v1/useraccounts/magic-links/#{id}" @connection.request(:delete, path, nil, nil) end |