(roles)
Retrieve all roles for the account
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.list_roles()
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
x_account_id |
Optional[str] |
➖ |
ID of the account. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListRolesResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Add a new role for the account
import moov
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.create_role(create_role={
"name": "Amanda Yang",
"subjects": [
"ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
],
"policies": [
{
"resource": moov.Resource.ROOT_BANK_ACCOUNTS,
"action": moov.Action.WRITE,
},
],
})
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
create_role |
models.CreateRole |
✔️ |
N/A |
x_account_id |
Optional[str] |
➖ |
ID of the account. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.CreateRoleResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Retrieve a specific Role under the account
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.get_role(role_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
role_id |
str |
✔️ |
ID of the role to update |
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. |
|
models.GetRoleResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Modify an existing Role for the account
import moov
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.update_role(role_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", update_role={
"name": "Amanda Yang",
"subjects": [
"ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
],
"policies": [
{
"resource": moov.Resource.ROOT_TRANSFERS,
"action": moov.Action.WRITE,
},
{
"resource": moov.Resource.ROOT_TOS,
"action": moov.Action.WRITE,
},
{
"resource": moov.Resource.ROOT_TOS,
"action": moov.Action.WRITE,
},
],
})
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
role_id |
str |
✔️ |
ID of the role to update |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
update_role |
models.UpdateRole |
✔️ |
N/A |
|
x_account_id |
Optional[str] |
➖ |
ID of the account. |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.UpdateRoleResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Disable a Role under the account
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.disable_role(role_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
role_id |
str |
✔️ |
ID of the role to update |
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. |
|
models.DisableRoleResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Retrieve all members connected to the account
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.roles.members_list()
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
x_account_id |
Optional[str] |
➖ |
ID of the account. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.MembersListResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |