pub struct UpdateCapability { /* private fields */ }
Expand description
Updates an existing Account Capability.
Request or remove a capability by updating its requested
parameter.
Implementations§
Source§impl UpdateCapability
impl UpdateCapability
Sourcepub fn new(account: impl Into<AccountId>, capability: impl Into<String>) -> Self
pub fn new(account: impl Into<AccountId>, capability: impl Into<String>) -> Self
Construct a new UpdateCapability
.
Sourcepub fn expand(self, expand: impl Into<Vec<String>>) -> Self
pub fn expand(self, expand: impl Into<Vec<String>>) -> Self
Specifies which fields in the response should be expanded.
Sourcepub fn requested(self, requested: impl Into<bool>) -> Self
pub fn requested(self, requested: impl Into<bool>) -> Self
To request a new capability for an account, pass true.
There can be a delay before the requested capability becomes active.
If the capability has any activation requirements, the response includes them in the requirements
arrays.
If a capability isn’t permanent, you can remove it from the account by passing false. Some capabilities are permanent after they’ve been requested. Attempting to remove a permanent capability returns an error.
Source§impl UpdateCapability
impl UpdateCapability
Sourcepub async fn send<C: StripeClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub async fn send<C: StripeClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: StripeBlockingClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub fn send_blocking<C: StripeBlockingClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for UpdateCapability
impl Clone for UpdateCapability
Source§fn clone(&self) -> UpdateCapability
fn clone(&self) -> UpdateCapability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more