Class: Seam::Clients::InstantKeys
- Inherits:
-
Object
- Object
- Seam::Clients::InstantKeys
- Defined in:
- lib/seam/routes/instant_keys.rb
Instance Method Summary collapse
-
#delete(instant_key_id:) ⇒ nil
Deletes a specified Instant Key.
-
#get(instant_key_id: nil, instant_key_url: nil) ⇒ Seam::Resources::InstantKey
Gets an instant key.
-
#initialize(client:, defaults:) ⇒ InstantKeys
constructor
A new instance of InstantKeys.
-
#list(user_identity_id: nil) ⇒ Seam::Resources::InstantKey
Returns a list of all instant keys.
Constructor Details
#initialize(client:, defaults:) ⇒ InstantKeys
Returns a new instance of InstantKeys.
6 7 8 9 |
# File 'lib/seam/routes/instant_keys.rb', line 6 def initialize(client:, defaults:) @client = client @defaults = defaults end |
Instance Method Details
#delete(instant_key_id:) ⇒ nil
Deletes a specified Instant Key.
14 15 16 17 18 |
# File 'lib/seam/routes/instant_keys.rb', line 14 def delete(instant_key_id:) @client.post("/instant_keys/delete", {instant_key_id: instant_key_id}.compact) nil end |
#get(instant_key_id: nil, instant_key_url: nil) ⇒ Seam::Resources::InstantKey
Gets an instant key.
24 25 26 27 28 |
# File 'lib/seam/routes/instant_keys.rb', line 24 def get(instant_key_id: nil, instant_key_url: nil) res = @client.post("/instant_keys/get", {instant_key_id: instant_key_id, instant_key_url: instant_key_url}.compact) Seam::Resources::InstantKey.load_from_response(res.body["instant_key"]) end |
#list(user_identity_id: nil) ⇒ Seam::Resources::InstantKey
Returns a list of all instant keys.
33 34 35 36 37 |
# File 'lib/seam/routes/instant_keys.rb', line 33 def list(user_identity_id: nil) res = @client.post("/instant_keys/list", {user_identity_id: user_identity_id}.compact) Seam::Resources::InstantKey.load_from_response(res.body["instant_keys"]) end |