Class: Seam::Clients::AcsEntrances
- Inherits:
-
Object
- Object
- Seam::Clients::AcsEntrances
- Defined in:
- lib/seam/routes/clients/acs_entrances.rb
Instance Method Summary collapse
- #get(acs_entrance_id:) ⇒ Object
- #grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil) ⇒ Object
-
#initialize(client:, defaults:) ⇒ AcsEntrances
constructor
A new instance of AcsEntrances.
- #list(acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil) ⇒ Object
- #list_credentials_with_access(acs_entrance_id:, include_if: nil) ⇒ Object
- #unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil) ⇒ Object
Constructor Details
#initialize(client:, defaults:) ⇒ AcsEntrances
Returns a new instance of AcsEntrances.
8 9 10 11 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 8 def initialize(client:, defaults:) @client = client @defaults = defaults end |
Instance Method Details
#get(acs_entrance_id:) ⇒ Object
13 14 15 16 17 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 13 def get(acs_entrance_id:) res = @client.post("/acs/entrances/get", {acs_entrance_id: acs_entrance_id}.compact) Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrance"]) end |
#grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil) ⇒ Object
19 20 21 22 23 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 19 def grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil) @client.post("/acs/entrances/grant_access", {acs_entrance_id: acs_entrance_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact) nil end |
#list(acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil) ⇒ Object
25 26 27 28 29 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 25 def list(acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil) res = @client.post("/acs/entrances/list", {acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact) Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"]) end |
#list_credentials_with_access(acs_entrance_id:, include_if: nil) ⇒ Object
31 32 33 34 35 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 31 def list_credentials_with_access(acs_entrance_id:, include_if: nil) res = @client.post("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact) Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"]) end |
#unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/seam/routes/clients/acs_entrances.rb', line 37 def unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil) res = @client.post("/acs/entrances/unlock", {acs_credential_id: acs_credential_id, acs_entrance_id: acs_entrance_id}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end |