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
52
use anyhow::Result;
use crate::Client;
pub struct CustomFields {
client: Client,
}
impl CustomFields {
#[doc(hidden)]
pub fn new(client: Client) -> Self {
CustomFields { client }
}
pub async fn get_employee_custom_fields(
&self,
employee_id: &str,
) -> Result<crate::types::GetEmployeeCustomFieldsResponse> {
let url = format!(
"/v1/employees/{}/custom_fields",
crate::progenitor_support::encode_path(&employee_id.to_string()),
);
self.client.get(&url, None).await
}
pub async fn get_company_custom_fields(
&self,
company_id: &str,
) -> Result<crate::types::GetCompanyCustomFieldsResponse> {
let url = format!(
"/v1/companies/{}/custom_fields",
crate::progenitor_support::encode_path(&company_id.to_string()),
);
self.client.get(&url, None).await
}
}