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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crate::FluentRequest;
use serde::{Serialize, Deserialize};
use httpclient::InMemoryResponseExt;
/**You should use this struct via [`PlaidClient::credit_report_audit_copy_remove`].
On request success, this will return a [`CreditAuditCopyTokenRemoveResponse`].*/
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreditReportAuditCopyRemoveRequest {
pub audit_copy_token: String,
}
impl FluentRequest<'_, CreditReportAuditCopyRemoveRequest> {}
impl<'a> ::std::future::IntoFuture
for FluentRequest<'a, CreditReportAuditCopyRemoveRequest> {
type Output = httpclient::InMemoryResult<
crate::model::CreditAuditCopyTokenRemoveResponse,
>;
type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(async move {
let url = "/credit/audit_copy_token/remove";
let mut r = self.client.client.post(url);
r = r
.json(
serde_json::json!(
{ "audit_copy_token" : self.params.audit_copy_token }
),
);
r = self.client.authenticate(r);
let res = r.await?;
res.json().map_err(Into::into)
})
}
}
impl crate::PlaidClient {
/**Remove an Audit Copy token
The `/credit/audit_copy_token/remove` endpoint allows you to remove an Audit Copy. Removing an Audit Copy invalidates the `audit_copy_token` associated with it, meaning both you and any third parties holding the token will no longer be able to use it to access Report data. Items associated with the Report data and other Audit Copies of it are not affected and will remain accessible after removing the given Audit Copy.
See endpoint docs at <https://plaid.com/docs/api/products/income/#creditaudit_copy_tokenremove>.*/
pub fn credit_report_audit_copy_remove(
&self,
audit_copy_token: &str,
) -> FluentRequest<'_, CreditReportAuditCopyRemoveRequest> {
FluentRequest {
client: self,
params: CreditReportAuditCopyRemoveRequest {
audit_copy_token: audit_copy_token.to_owned(),
},
}
}
}