pub struct UpdateWebhookBuilder {
pub config: UpdateWebhookConfig,
/* private fields */
}Fields§
§config: UpdateWebhookConfigImplementations§
Source§impl UpdateWebhookBuilder
impl UpdateWebhookBuilder
pub fn new(handle: Arc<Handle>, webhook_id: String) -> Self
pub fn webhook_id(self, webhook_id: String) -> Self
Sourcepub fn description(self, description: String) -> Self
pub fn description(self, description: String) -> Self
Examples found in repository?
examples/update_webhook.rs (line 19)
5async fn main() {
6 let bearer_token = env::var("DODO_PAYMENTS_BEARER_TOKEN")
7 .expect("DODO_PAYMENTS_BEARER_TOKEN must be set in env variables");
8 let webhook_id = env::var("DODO_PAYMENTS_WEBHOOK_ID")
9 .expect("DODO_PAYMENTS_WEBHOOK_ID must be set in env variables");
10
11 let client = DodoPayments::new(
12 DodoPaymentsConfigBuilder::new()
13 .bearer_token(&bearer_token)
14 .environment("test_mode"),
15 );
16
17 let response = client
18 .update_webhook(webhook_id)
19 .description("Updated webhook description".to_string())
20 .disabled(false)
21 .send()
22 .await;
23
24 println!("Response: {:#?}", response);
25}Sourcepub fn disabled(self, disabled: bool) -> Self
pub fn disabled(self, disabled: bool) -> Self
Examples found in repository?
examples/update_webhook.rs (line 20)
5async fn main() {
6 let bearer_token = env::var("DODO_PAYMENTS_BEARER_TOKEN")
7 .expect("DODO_PAYMENTS_BEARER_TOKEN must be set in env variables");
8 let webhook_id = env::var("DODO_PAYMENTS_WEBHOOK_ID")
9 .expect("DODO_PAYMENTS_WEBHOOK_ID must be set in env variables");
10
11 let client = DodoPayments::new(
12 DodoPaymentsConfigBuilder::new()
13 .bearer_token(&bearer_token)
14 .environment("test_mode"),
15 );
16
17 let response = client
18 .update_webhook(webhook_id)
19 .description("Updated webhook description".to_string())
20 .disabled(false)
21 .send()
22 .await;
23
24 println!("Response: {:#?}", response);
25}pub fn filter_types(self, filter_types: Vec<EventType>) -> Self
pub fn metadata(self, metadata: HashMap<String, String>) -> Self
pub fn rate_limit(self, rate_limit: i32) -> Self
pub fn url(self, url: String) -> Self
Sourcepub async fn send(self) -> Result<UpdateWebhookResponse, Error>
pub async fn send(self) -> Result<UpdateWebhookResponse, Error>
Examples found in repository?
examples/update_webhook.rs (line 21)
5async fn main() {
6 let bearer_token = env::var("DODO_PAYMENTS_BEARER_TOKEN")
7 .expect("DODO_PAYMENTS_BEARER_TOKEN must be set in env variables");
8 let webhook_id = env::var("DODO_PAYMENTS_WEBHOOK_ID")
9 .expect("DODO_PAYMENTS_WEBHOOK_ID must be set in env variables");
10
11 let client = DodoPayments::new(
12 DodoPaymentsConfigBuilder::new()
13 .bearer_token(&bearer_token)
14 .environment("test_mode"),
15 );
16
17 let response = client
18 .update_webhook(webhook_id)
19 .description("Updated webhook description".to_string())
20 .disabled(false)
21 .send()
22 .await;
23
24 println!("Response: {:#?}", response);
25}Auto Trait Implementations§
impl Freeze for UpdateWebhookBuilder
impl RefUnwindSafe for UpdateWebhookBuilder
impl Send for UpdateWebhookBuilder
impl Sync for UpdateWebhookBuilder
impl Unpin for UpdateWebhookBuilder
impl UnsafeUnpin for UpdateWebhookBuilder
impl UnwindSafe for UpdateWebhookBuilder
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more