Skip to content

Latest commit

 

History

History
171 lines (110 loc) · 8.62 KB

README.md

File metadata and controls

171 lines (110 loc) · 8.62 KB

Users

(users)

Overview

Users are lightweight objects that handle signing in to our app.moov.io

Available Operations

get_user

Returns the specific user if they have access

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.users.get_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ UserID of the user to load ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetUserResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

update_user

Updates the specific user with the new values

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.users.update_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ UserID of the user to update ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.UpdateUserResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

get_user_accounts

Returns the list of accounts a user has access to

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.users.get_user_accounts(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ UserID of the user to load ec7e1848-dc80-4ab0-8827-dd7fc0737b43
x_account_id Optional[str] ID of the account.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetUserAccountsResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

get_user_invites

Returns the pending invitiations sent to the user by user on other accounts

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.users.get_user_invites(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
user_id str ✔️ UserID of the user to load ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetUserInvitesResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*