Skip to main content

neptunium_http/endpoints/channel/
end_call_session.rs

1use bon::Builder;
2use neptunium_model::id::{Id, marker::ChannelMarker};
3use reqwest::Method;
4
5use crate::{endpoints::Endpoint, request::Request};
6
7/// Terminate an active voice call in a channel.
8#[derive(Builder, Copy, Clone, Debug)]
9pub struct EndCallSession {
10    pub channel_id: Id<ChannelMarker>,
11}
12
13impl Endpoint for EndCallSession {
14    type Response = ();
15
16    fn into_request(self) -> crate::request::Request {
17        Request::builder()
18            .method(Method::POST)
19            .path(format!("/channels/{}/call/end", self.channel_id))
20            .build()
21    }
22}