Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Sep 20, 2024
1 parent b226381 commit b49264a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions rippling/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9930,7 +9930,8 @@ pub struct WorkerLocation {
#[serde(rename = "type")]
pub type_: WorkerLocationType,
#[doc = "The work location, if the worker isn't remote."]
pub work_location_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub work_location_id: Option<String>,
}

impl std::fmt::Display for WorkerLocation {
Expand All @@ -9949,7 +9950,11 @@ impl tabled::Tabled for WorkerLocation {
fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
vec![
format!("{:?}", self.type_).into(),
self.work_location_id.clone().into(),
if let Some(work_location_id) = &self.work_location_id {
format!("{:?}", work_location_id).into()
} else {
String::new().into()
},
]
}

Expand Down
3 changes: 2 additions & 1 deletion specs/rippling-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3601,6 +3601,7 @@ components:
work_location_id:
type: string
description: Work Location Id
nullable: true
work_location:
type: object
description: 'Work location for the job
Expand Down Expand Up @@ -5286,11 +5287,11 @@ components:
work_location_id:
type: string
description: The work location, if the worker isn't remote.
nullable: true
description: ''
x-rippling-expandable-fields: []
required:
- type
- work_location_id
parameters:
get_id:
name: id
Expand Down

0 comments on commit b49264a

Please sign in to comment.