1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use serde_json::json;
use crate::model::*;
use crate::PlaidClient;
#[derive(Clone)]
pub struct LinkDeliveryGetRequest<'a> {
pub(crate) http_client: &'a PlaidClient,
pub link_delivery_session_id: String,
}
impl<'a> LinkDeliveryGetRequest<'a> {
pub async fn send(self) -> ::httpclient::InMemoryResult<LinkDeliveryGetResponse> {
let mut r = self.http_client.client.post("/link_delivery/get");
r = r
.json(json!({ "link_delivery_session_id" : self.link_delivery_session_id }));
r = self.http_client.authenticate(r);
let res = r.send_awaiting_body().await?;
res.json()
}
}
impl<'a> ::std::future::IntoFuture for LinkDeliveryGetRequest<'a> {
type Output = httpclient::InMemoryResult<LinkDeliveryGetResponse>;
type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.send())
}
}