use dodo_payments::{DodoPayments, client::DodoPaymentsConfigBuilder};
use std::env;
#[tokio::main]
async fn main() {
let bearer_token = env::var("DODO_PAYMENTS_BEARER_TOKEN")
.expect("DODO_PAYMENTS_BEARER_TOKEN must be set in env variables");
let webhook_id = env::var("DODO_PAYMENTS_WEBHOOK_ID")
.expect("DODO_PAYMENTS_WEBHOOK_ID must be set in env variables");
let client = DodoPayments::new(
DodoPaymentsConfigBuilder::new()
.bearer_token(&bearer_token)
.environment("test_mode"),
);
let response = client
.update_webhook(webhook_id)
.description("Updated webhook description".to_string())
.disabled(false)
.send()
.await;
println!("Response: {:#?}", response);
}