use std::sync::Arc;
use crate::client::HttpCore;
use crate::error::Result;
use crate::types::*;
#[derive(Debug, Clone)]
pub struct FirstTouchSubscriptions {
pub(crate) core: Arc<HttpCore>,
}
impl FirstTouchSubscriptions {
pub async fn list(&self) -> Result<FirstTouchSubscriptionListResponse> {
self.core.get("/kol/first-touches/subscriptions", &()).await
}
pub async fn create(
&self,
params: &FirstTouchSubscriptionCreateParams,
) -> Result<FirstTouchSubscriptionCreateResponse> {
self.core
.post_json("/kol/first-touches/subscriptions", params)
.await
}
pub async fn get(&self, id: &str) -> Result<FirstTouchSubscriptionGetResponse> {
self.core
.get(&format!("/kol/first-touches/subscriptions/{}", id), &())
.await
}
pub async fn update(
&self,
id: &str,
params: &FirstTouchSubscriptionUpdateParams,
) -> Result<FirstTouchSubscriptionUpdateResponse> {
self.core
.patch_json(&format!("/kol/first-touches/subscriptions/{}", id), params)
.await
}
pub async fn delete(&self, id: &str) -> Result<FirstTouchSubscriptionDeleteResponse> {
self.core
.delete(&format!("/kol/first-touches/subscriptions/{}", id))
.await
}
}