plaid/request/
watchlist_screening_entity_get.rs1use crate::FluentRequest;
2use serde::{Serialize, Deserialize};
3use httpclient::InMemoryResponseExt;
4#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct WatchlistScreeningEntityGetRequest {
9 pub entity_watchlist_screening_id: String,
10}
11impl FluentRequest<'_, WatchlistScreeningEntityGetRequest> {}
12impl<'a> ::std::future::IntoFuture
13for FluentRequest<'a, WatchlistScreeningEntityGetRequest> {
14 type Output = httpclient::InMemoryResult<
15 crate::model::WatchlistScreeningEntityGetResponse,
16 >;
17 type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
18 fn into_future(self) -> Self::IntoFuture {
19 Box::pin(async move {
20 let url = "/watchlist_screening/entity/get";
21 let mut r = self.client.client.post(url);
22 r = r
23 .json(
24 serde_json::json!(
25 { "entity_watchlist_screening_id" : self.params
26 .entity_watchlist_screening_id }
27 ),
28 );
29 r = self.client.authenticate(r);
30 let res = r.await?;
31 res.json().map_err(Into::into)
32 })
33 }
34}
35impl crate::PlaidClient {
36 pub fn watchlist_screening_entity_get(
42 &self,
43 entity_watchlist_screening_id: &str,
44 ) -> FluentRequest<'_, WatchlistScreeningEntityGetRequest> {
45 FluentRequest {
46 client: self,
47 params: WatchlistScreeningEntityGetRequest {
48 entity_watchlist_screening_id: entity_watchlist_screening_id.to_owned(),
49 },
50 }
51 }
52}