autogen_squareup/models/wage_setting.rs
1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// WageSetting : Represents information about the overtime exemption status, job assignments, and compensation for a [team member](entity:TeamMember).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WageSetting {
17 /// The ID of the team member associated with the wage setting.
18 #[serde(rename = "team_member_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19 pub team_member_id: Option<Option<String>>,
20 /// **Required** The ordered list of jobs that the team member is assigned to. The first job assignment is considered the team member's primary job.
21 #[serde(rename = "job_assignments", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub job_assignments: Option<Option<Vec<models::JobAssignment>>>,
23 /// Whether the team member is exempt from the overtime rules of the seller's country.
24 #[serde(rename = "is_overtime_exempt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25 pub is_overtime_exempt: Option<Option<bool>>,
26 /// **Read only** Used for resolving concurrency issues. The request fails if the version provided does not match the server version at the time of the request. If not provided, Square executes a blind write, potentially overwriting data from another write. For more information, see [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency).
27 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
28 pub version: Option<i32>,
29 /// The timestamp when the wage setting was created, in RFC 3339 format.
30 #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
31 pub created_at: Option<String>,
32 /// The timestamp when the wage setting was last updated, in RFC 3339 format.
33 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
34 pub updated_at: Option<String>,
35}
36
37impl WageSetting {
38 /// Represents information about the overtime exemption status, job assignments, and compensation for a [team member](entity:TeamMember).
39 pub fn new() -> WageSetting {
40 WageSetting {
41 team_member_id: None,
42 job_assignments: None,
43 is_overtime_exempt: None,
44 version: None,
45 created_at: None,
46 updated_at: None,
47 }
48 }
49}
50