pub struct RolesClient<'a> { /* private fields */ }Expand description
Client for the Roles API endpoints.
Implementations§
Source§impl<'a> RolesClient<'a>
impl<'a> RolesClient<'a>
Sourcepub async fn list(
&self,
merchant_code: impl Into<String>,
) -> SdkResult<ListResponse, ListErrorBody>
pub async fn list( &self, merchant_code: impl Into<String>, ) -> SdkResult<ListResponse, ListErrorBody>
List roles
List merchant’s custom roles.
Sourcepub async fn create(
&self,
merchant_code: impl Into<String>,
body: CreateBody,
) -> SdkResult<Role, CreateErrorBody>
pub async fn create( &self, merchant_code: impl Into<String>, body: CreateBody, ) -> SdkResult<Role, CreateErrorBody>
Create a role
Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.
Sourcepub async fn delete(
&self,
merchant_code: impl Into<String>,
role_id: impl Into<String>,
) -> SdkResult<(), DeleteErrorBody>
pub async fn delete( &self, merchant_code: impl Into<String>, role_id: impl Into<String>, ) -> SdkResult<(), DeleteErrorBody>
Delete a role
Delete a custom role.
Sourcepub async fn get(
&self,
merchant_code: impl Into<String>,
role_id: impl Into<String>,
) -> SdkResult<Role, GetErrorBody>
pub async fn get( &self, merchant_code: impl Into<String>, role_id: impl Into<String>, ) -> SdkResult<Role, GetErrorBody>
Retrieve a role
Retrieve a custom role by ID.
Sourcepub async fn update(
&self,
merchant_code: impl Into<String>,
role_id: impl Into<String>,
body: UpdateBody,
) -> SdkResult<Role, UpdateErrorBody>
pub async fn update( &self, merchant_code: impl Into<String>, role_id: impl Into<String>, body: UpdateBody, ) -> SdkResult<Role, UpdateErrorBody>
Update a role
Update a custom role.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RolesClient<'a>
impl<'a> !RefUnwindSafe for RolesClient<'a>
impl<'a> Send for RolesClient<'a>
impl<'a> Sync for RolesClient<'a>
impl<'a> Unpin for RolesClient<'a>
impl<'a> UnsafeUnpin for RolesClient<'a>
impl<'a> !UnwindSafe for RolesClient<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more