Skip to content

Commit

Permalink
fix gusto
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Aug 11, 2024
1 parent f45dae3 commit 624e09d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gusto/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2444,6 +2444,9 @@ pub struct Contractor {
#[doc = "The unique identifier of the contractor in Gusto."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<f64>,
#[doc = "A unique identifier of the employee in Gusto."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uuid: Option<String>,
#[doc = "The ID of the company the contractor is employed by."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub company_id: Option<f64>,
Expand Down Expand Up @@ -2506,14 +2509,19 @@ impl std::fmt::Display for Contractor {

#[cfg(feature = "tabled")]
impl tabled::Tabled for Contractor {
const LENGTH: usize = 14;
const LENGTH: usize = 15;
fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
vec![
if let Some(id) = &self.id {
format!("{:?}", id).into()
} else {
String::new().into()
},
if let Some(uuid) = &self.uuid {
format!("{:?}", uuid).into()
} else {
String::new().into()
},
if let Some(company_id) = &self.company_id {
format!("{:?}", company_id).into()
} else {
Expand Down Expand Up @@ -2581,6 +2589,7 @@ impl tabled::Tabled for Contractor {
fn headers() -> Vec<std::borrow::Cow<'static, str>> {
vec![
"id".into(),
"uuid".into(),
"company_id".into(),
"wage_type".into(),
"is_active".into(),
Expand Down
4 changes: 4 additions & 0 deletions specs/gusto.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,10 @@ components:
type: number
description: The unique identifier of the contractor in Gusto.
readOnly: true
uuid:
type: string
description: A unique identifier of the employee in Gusto.
readOnly: true
company_id:
type: number
description: The ID of the company the contractor is employed by.
Expand Down

0 comments on commit 624e09d

Please sign in to comment.