stripe/model/
terminal_location.rs

1use serde::{Serialize, Deserialize};
2use super::Address;
3/**A Location represents a grouping of readers.
4
5Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)*/
6#[derive(Debug, Clone, Serialize, Deserialize, Default)]
7pub struct TerminalLocation {
8    ///
9    pub address: Address,
10    ///The ID of a configuration that will be used to customize all readers in this location.
11    #[serde(skip_serializing_if = "Option::is_none")]
12    pub configuration_overrides: Option<String>,
13    ///The display name of the location.
14    pub display_name: String,
15    ///Unique identifier for the object.
16    pub id: String,
17    ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
18    pub livemode: bool,
19    ///Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
20    pub metadata: serde_json::Value,
21    ///String representing the object's type. Objects of the same type share the same value.
22    pub object: String,
23}
24impl std::fmt::Display for TerminalLocation {
25    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
26        write!(f, "{}", serde_json::to_string(self).unwrap())
27    }
28}