wave_api/models/
business.rs1use chrono::{DateTime, Utc};
2use serde::Deserialize;
3
4use super::common::{Address, Currency};
5use crate::enums::OrganizationalType;
6
7#[derive(Debug, Clone, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct Business {
11 pub id: String,
12 pub name: String,
13 pub is_personal: bool,
14 pub organizational_type: Option<OrganizationalType>,
15 #[serde(rename = "type")]
16 pub business_type: Option<BusinessType>,
17 pub subtype: Option<BusinessSubtype>,
18 pub currency: Currency,
19 pub timezone: Option<String>,
20 pub address: Option<Address>,
21 pub phone: Option<String>,
22 pub fax: Option<String>,
23 pub mobile: Option<String>,
24 pub toll_free: Option<String>,
25 pub website: Option<String>,
26 pub is_archived: bool,
27 pub created_at: DateTime<Utc>,
28 pub modified_at: DateTime<Utc>,
29}
30
31#[derive(Debug, Clone, Deserialize)]
33#[serde(rename_all = "camelCase")]
34pub struct BusinessType {
35 pub name: String,
36 pub value: String,
37}
38
39#[derive(Debug, Clone, Deserialize)]
41#[serde(rename_all = "camelCase")]
42pub struct BusinessSubtype {
43 pub name: String,
44 pub value: String,
45}