1use serde::{Serialize, Deserialize};
2#[derive(Debug, Serialize, Deserialize)]
3pub struct BillableRates {
4 pub previous_page: Option<i64>,
5 pub total_entries: i64,
6 pub billable_rates: Vec<BillableRate>,
7 pub per_page: i64,
8 pub page: i64,
9 pub total_pages: i64,
10 pub next_page: Option<i64>,
11 pub links: PaginationLinks,
12}
13impl std::fmt::Display for BillableRates {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15 write!(f, "{}", serde_json::to_string(self).unwrap())
16 }
17}
18#[derive(Debug, Serialize, Deserialize, Default)]
19pub struct PaginationLinks {
20 pub last: String,
22 pub first: String,
24 pub previous: Option<String>,
26 pub next: Option<String>,
28}
29impl std::fmt::Display for PaginationLinks {
30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
31 write!(f, "{}", serde_json::to_string(self).unwrap())
32 }
33}
34#[derive(Debug, Serialize, Deserialize, Default)]
35pub struct User {
36 pub avatar_url: Option<String>,
38 pub access_roles: Option<Vec<String>>,
40 pub last_name: Option<String>,
42 pub timezone: Option<String>,
44 pub email: Option<String>,
46 pub cost_rate: Option<f64>,
48 pub id: Option<i64>,
50 pub created_at: Option<String>,
52 pub first_name: Option<String>,
54 pub updated_at: Option<String>,
56 pub weekly_capacity: Option<i64>,
58 pub roles: Option<Vec<String>>,
60 pub has_access_to_all_future_projects: Option<bool>,
62 pub telephone: Option<String>,
64 pub is_contractor: Option<bool>,
66 pub is_active: Option<bool>,
68 pub default_hourly_rate: Option<f64>,
70}
71impl std::fmt::Display for User {
72 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
73 write!(f, "{}", serde_json::to_string(self).unwrap())
74 }
75}
76#[derive(Debug, Serialize, Deserialize)]
77pub struct TaskAssignments {
78 pub page: i64,
79 pub total_entries: i64,
80 pub links: PaginationLinks,
81 pub per_page: i64,
82 pub total_pages: i64,
83 pub task_assignments: Vec<TaskAssignment>,
84 pub next_page: Option<i64>,
85 pub previous_page: Option<i64>,
86}
87impl std::fmt::Display for TaskAssignments {
88 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
89 write!(f, "{}", serde_json::to_string(self).unwrap())
90 }
91}
92#[derive(Debug, Serialize, Deserialize)]
93pub struct UninvoicedReportResults {
94 pub results: Vec<UninvoicedReportResult>,
95 pub next_page: Option<i64>,
96 pub links: PaginationLinks,
97 pub total_pages: i64,
98 pub previous_page: Option<i64>,
99 pub per_page: i64,
100 pub total_entries: i64,
101 pub page: i64,
102}
103impl std::fmt::Display for UninvoicedReportResults {
104 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
105 write!(f, "{}", serde_json::to_string(self).unwrap())
106 }
107}
108#[derive(Debug, Serialize, Deserialize, Default)]
109pub struct EstimateMessage {
110 pub sent_by_email: Option<String>,
112 pub updated_at: Option<String>,
114 pub recipients: Option<Vec<EstimateMessageRecipient>>,
116 pub event_type: Option<String>,
118 pub sent_from: Option<String>,
120 pub id: Option<i64>,
122 pub subject: Option<String>,
124 pub send_me_a_copy: Option<bool>,
126 pub sent_from_email: Option<String>,
128 pub sent_by: Option<String>,
130 pub body: Option<String>,
132 pub created_at: Option<String>,
134}
135impl std::fmt::Display for EstimateMessage {
136 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
137 write!(f, "{}", serde_json::to_string(self).unwrap())
138 }
139}
140#[derive(Debug, Serialize, Deserialize)]
141pub struct InvoiceLineItem {
142 pub project: Option<serde_json::Value>,
144 pub id: Option<i64>,
146 pub unit_price: Option<f64>,
148 pub taxed2: Option<bool>,
150 pub kind: Option<String>,
152 pub description: Option<String>,
154 pub amount: Option<f64>,
156 pub quantity: Option<f64>,
158 pub taxed: Option<bool>,
160}
161impl std::fmt::Display for InvoiceLineItem {
162 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
163 write!(f, "{}", serde_json::to_string(self).unwrap())
164 }
165}
166#[derive(Debug, Serialize, Deserialize, Default)]
167pub struct Client {
168 pub address: Option<String>,
170 pub created_at: Option<String>,
172 pub name: Option<String>,
174 pub statement_key: Option<String>,
176 pub updated_at: Option<String>,
178 pub is_active: Option<bool>,
180 pub currency: Option<String>,
182 pub id: Option<i64>,
184}
185impl std::fmt::Display for Client {
186 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
187 write!(f, "{}", serde_json::to_string(self).unwrap())
188 }
189}
190#[derive(Debug, Serialize, Deserialize, Default)]
191pub struct InvoiceMessageSubjectAndBody {
192 pub subject: String,
193 pub invoice_id: i64,
194 pub body: String,
195 pub reminder: bool,
196 pub thank_you: bool,
197}
198impl std::fmt::Display for InvoiceMessageSubjectAndBody {
199 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
200 write!(f, "{}", serde_json::to_string(self).unwrap())
201 }
202}
203#[derive(Debug, Serialize, Deserialize)]
204pub struct TaskAssignment {
205 pub task: Option<serde_json::Value>,
207 pub is_active: Option<bool>,
209 pub budget: Option<f64>,
211 pub billable: Option<bool>,
213 pub hourly_rate: Option<f64>,
215 pub updated_at: Option<String>,
217 pub id: Option<i64>,
219 pub project: Option<serde_json::Value>,
221 pub created_at: Option<String>,
223}
224impl std::fmt::Display for TaskAssignment {
225 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
226 write!(f, "{}", serde_json::to_string(self).unwrap())
227 }
228}
229#[derive(Debug, Serialize, Deserialize)]
230pub struct Tasks {
231 pub page: i64,
232 pub total_pages: i64,
233 pub previous_page: Option<i64>,
234 pub links: PaginationLinks,
235 pub next_page: Option<i64>,
236 pub per_page: i64,
237 pub total_entries: i64,
238 pub tasks: Vec<Task>,
239}
240impl std::fmt::Display for Tasks {
241 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
242 write!(f, "{}", serde_json::to_string(self).unwrap())
243 }
244}
245#[derive(Debug, Serialize, Deserialize)]
246pub struct Contacts {
247 pub page: i64,
248 pub next_page: Option<i64>,
249 pub links: PaginationLinks,
250 pub per_page: i64,
251 pub total_entries: i64,
252 pub previous_page: Option<i64>,
253 pub contacts: Vec<Contact>,
254 pub total_pages: i64,
255}
256impl std::fmt::Display for Contacts {
257 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
258 write!(f, "{}", serde_json::to_string(self).unwrap())
259 }
260}
261#[derive(Debug, Serialize, Deserialize, Default)]
262pub struct EstimateMessageRecipient {
263 pub email: Option<String>,
265 pub name: Option<String>,
267}
268impl std::fmt::Display for EstimateMessageRecipient {
269 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
270 write!(f, "{}", serde_json::to_string(self).unwrap())
271 }
272}
273#[derive(Debug, Serialize, Deserialize)]
274pub struct Clients {
275 pub previous_page: Option<i64>,
276 pub page: i64,
277 pub total_pages: i64,
278 pub links: PaginationLinks,
279 pub clients: Vec<Client>,
280 pub next_page: Option<i64>,
281 pub total_entries: i64,
282 pub per_page: i64,
283}
284impl std::fmt::Display for Clients {
285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
286 write!(f, "{}", serde_json::to_string(self).unwrap())
287 }
288}
289#[derive(Debug, Serialize, Deserialize)]
290pub struct EstimateItemCategories {
291 pub previous_page: Option<i64>,
292 pub total_entries: i64,
293 pub total_pages: i64,
294 pub next_page: Option<i64>,
295 pub links: PaginationLinks,
296 pub per_page: i64,
297 pub estimate_item_categories: Vec<EstimateItemCategory>,
298 pub page: i64,
299}
300impl std::fmt::Display for EstimateItemCategories {
301 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
302 write!(f, "{}", serde_json::to_string(self).unwrap())
303 }
304}
305#[derive(Debug, Serialize, Deserialize)]
306pub struct InvoicePayments {
307 pub links: PaginationLinks,
308 pub total_entries: i64,
309 pub per_page: i64,
310 pub previous_page: Option<i64>,
311 pub page: i64,
312 pub total_pages: i64,
313 pub invoice_payments: Vec<InvoicePayment>,
314 pub next_page: Option<i64>,
315}
316impl std::fmt::Display for InvoicePayments {
317 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
318 write!(f, "{}", serde_json::to_string(self).unwrap())
319 }
320}
321#[derive(Debug, Serialize, Deserialize)]
322pub struct Estimates {
323 pub total_pages: i64,
324 pub next_page: Option<i64>,
325 pub links: PaginationLinks,
326 pub estimates: Vec<Estimate>,
327 pub per_page: i64,
328 pub total_entries: i64,
329 pub page: i64,
330 pub previous_page: Option<i64>,
331}
332impl std::fmt::Display for Estimates {
333 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
334 write!(f, "{}", serde_json::to_string(self).unwrap())
335 }
336}
337#[derive(Debug, Serialize, Deserialize)]
338pub struct Expenses {
339 pub per_page: i64,
340 pub total_entries: i64,
341 pub previous_page: Option<i64>,
342 pub page: i64,
343 pub next_page: Option<i64>,
344 pub links: PaginationLinks,
345 pub total_pages: i64,
346 pub expenses: Vec<Expense>,
347}
348impl std::fmt::Display for Expenses {
349 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
350 write!(f, "{}", serde_json::to_string(self).unwrap())
351 }
352}
353#[derive(Debug, Serialize, Deserialize)]
354pub struct TimeEntries {
355 pub total_pages: i64,
356 pub total_entries: i64,
357 pub per_page: i64,
358 pub previous_page: Option<i64>,
359 pub time_entries: Vec<TimeEntry>,
360 pub next_page: Option<i64>,
361 pub page: i64,
362 pub links: PaginationLinks,
363}
364impl std::fmt::Display for TimeEntries {
365 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
366 write!(f, "{}", serde_json::to_string(self).unwrap())
367 }
368}
369#[derive(Debug, Serialize, Deserialize)]
370pub struct ExpenseReportsResults {
371 pub page: i64,
372 pub total_pages: i64,
373 pub previous_page: Option<i64>,
374 pub results: Vec<ExpenseReportsResult>,
375 pub links: PaginationLinks,
376 pub next_page: Option<i64>,
377 pub total_entries: i64,
378 pub per_page: i64,
379}
380impl std::fmt::Display for ExpenseReportsResults {
381 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
382 write!(f, "{}", serde_json::to_string(self).unwrap())
383 }
384}
385#[derive(Debug, Serialize, Deserialize)]
386pub struct UserAssignment {
387 pub created_at: Option<String>,
389 pub use_default_rates: Option<bool>,
391 pub updated_at: Option<String>,
393 pub id: Option<i64>,
395 pub user: Option<serde_json::Value>,
397 pub is_active: Option<bool>,
399 pub is_project_manager: Option<bool>,
401 pub project: Option<serde_json::Value>,
403 pub hourly_rate: Option<f64>,
405 pub budget: Option<f64>,
407}
408impl std::fmt::Display for UserAssignment {
409 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
410 write!(f, "{}", serde_json::to_string(self).unwrap())
411 }
412}
413#[derive(Debug, Serialize, Deserialize, Default)]
414pub struct BillableRate {
415 pub end_date: Option<String>,
417 pub updated_at: Option<String>,
419 pub created_at: Option<String>,
421 pub id: Option<i64>,
423 pub start_date: Option<String>,
425 pub amount: Option<f64>,
427}
428impl std::fmt::Display for BillableRate {
429 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
430 write!(f, "{}", serde_json::to_string(self).unwrap())
431 }
432}
433#[derive(Debug, Serialize, Deserialize)]
434pub struct Projects {
435 pub page: i64,
436 pub total_pages: i64,
437 pub next_page: Option<i64>,
438 pub projects: Vec<Project>,
439 pub per_page: i64,
440 pub total_entries: i64,
441 pub previous_page: Option<i64>,
442 pub links: PaginationLinks,
443}
444impl std::fmt::Display for Projects {
445 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
446 write!(f, "{}", serde_json::to_string(self).unwrap())
447 }
448}
449#[derive(Debug, Serialize, Deserialize)]
450pub struct Teammates {
451 pub per_page: i64,
452 pub page: i64,
453 pub teammates: Vec<Teammate>,
454 pub total_pages: i64,
455 pub links: PaginationLinks,
456 pub next_page: Option<i64>,
457 pub previous_page: Option<i64>,
458 pub total_entries: i64,
459}
460impl std::fmt::Display for Teammates {
461 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
462 write!(f, "{}", serde_json::to_string(self).unwrap())
463 }
464}
465#[derive(Debug, Serialize, Deserialize)]
466pub struct Roles {
467 pub roles: Vec<Role>,
468 pub previous_page: Option<i64>,
469 pub page: i64,
470 pub total_pages: i64,
471 pub total_entries: i64,
472 pub next_page: Option<i64>,
473 pub per_page: i64,
474 pub links: PaginationLinks,
475}
476impl std::fmt::Display for Roles {
477 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
478 write!(f, "{}", serde_json::to_string(self).unwrap())
479 }
480}
481#[derive(Debug, Serialize, Deserialize)]
482pub struct Companies {
483 pub per_page: i64,
484 pub total_pages: i64,
485 pub links: PaginationLinks,
486 pub next_page: Option<i64>,
487 pub page: i64,
488 pub companies: Vec<Company>,
489 pub total_entries: i64,
490 pub previous_page: Option<i64>,
491}
492impl std::fmt::Display for Companies {
493 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
494 write!(f, "{}", serde_json::to_string(self).unwrap())
495 }
496}
497#[derive(Debug, Serialize, Deserialize, Default)]
498pub struct Role {
499 pub name: Option<String>,
501 pub user_ids: Option<Vec<i64>>,
503 pub created_at: Option<String>,
505 pub updated_at: Option<String>,
507 pub id: Option<i64>,
509}
510impl std::fmt::Display for Role {
511 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
512 write!(f, "{}", serde_json::to_string(self).unwrap())
513 }
514}
515#[derive(Debug, Serialize, Deserialize)]
516pub struct InvoiceMessageRecipients {
517 pub total_pages: i64,
518 pub next_page: Option<i64>,
519 pub previous_page: Option<i64>,
520 pub page: i64,
521 pub invoice_message_recipients: Vec<InvoiceMessageRecipient>,
522 pub total_entries: i64,
523 pub links: PaginationLinks,
524 pub per_page: i64,
525}
526impl std::fmt::Display for InvoiceMessageRecipients {
527 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
528 write!(f, "{}", serde_json::to_string(self).unwrap())
529 }
530}
531#[derive(Debug, Serialize, Deserialize)]
532pub struct Invoices {
533 pub invoices: Vec<Invoice>,
534 pub total_entries: i64,
535 pub page: i64,
536 pub per_page: i64,
537 pub links: PaginationLinks,
538 pub next_page: Option<i64>,
539 pub previous_page: Option<i64>,
540 pub total_pages: i64,
541}
542impl std::fmt::Display for Invoices {
543 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
544 write!(f, "{}", serde_json::to_string(self).unwrap())
545 }
546}
547#[derive(Debug, Serialize, Deserialize, Default)]
548pub struct ExpenseCategory {
549 pub updated_at: Option<String>,
551 pub name: Option<String>,
553 pub unit_price: Option<f64>,
555 pub created_at: Option<String>,
557 pub id: Option<i64>,
559 pub unit_name: Option<String>,
561 pub is_active: Option<bool>,
563}
564impl std::fmt::Display for ExpenseCategory {
565 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
566 write!(f, "{}", serde_json::to_string(self).unwrap())
567 }
568}
569#[derive(Debug, Serialize, Deserialize, Default)]
570pub struct InvoiceMessageRecipient {
571 pub name: Option<String>,
573 pub email: Option<String>,
575}
576impl std::fmt::Display for InvoiceMessageRecipient {
577 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
578 write!(f, "{}", serde_json::to_string(self).unwrap())
579 }
580}
581#[derive(Debug, Serialize, Deserialize)]
582pub struct TimeReportsResults {
583 pub total_entries: i64,
584 pub page: i64,
585 pub next_page: Option<i64>,
586 pub per_page: i64,
587 pub links: PaginationLinks,
588 pub previous_page: Option<i64>,
589 pub results: Vec<TimeReportsResult>,
590 pub total_pages: i64,
591}
592impl std::fmt::Display for TimeReportsResults {
593 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
594 write!(f, "{}", serde_json::to_string(self).unwrap())
595 }
596}
597#[derive(Debug, Serialize, Deserialize, Default)]
598pub struct Company {
599 pub decimal_symbol: Option<String>,
601 pub base_uri: Option<String>,
603 pub plan_type: Option<String>,
605 pub expense_feature: Option<bool>,
607 pub is_active: Option<bool>,
609 pub time_format: Option<String>,
611 pub color_scheme: Option<String>,
613 pub weekly_capacity: Option<i64>,
615 pub name: Option<String>,
617 pub week_start_day: Option<String>,
619 pub thousands_separator: Option<String>,
621 pub invoice_feature: Option<bool>,
623 pub estimate_feature: Option<bool>,
625 pub clock: Option<String>,
627 pub wants_timestamp_timers: Option<bool>,
629 pub full_domain: Option<String>,
631 pub currency_code_display: Option<String>,
633 pub currency_symbol_display: Option<String>,
635 pub approval_feature: Option<bool>,
637 pub date_format: Option<String>,
639}
640impl std::fmt::Display for Company {
641 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
642 write!(f, "{}", serde_json::to_string(self).unwrap())
643 }
644}
645#[derive(Debug, Serialize, Deserialize)]
646pub struct Contact {
647 pub last_name: Option<String>,
649 pub title: Option<String>,
651 pub phone_office: Option<String>,
653 pub phone_mobile: Option<String>,
655 pub client: Option<serde_json::Value>,
657 pub updated_at: Option<String>,
659 pub first_name: Option<String>,
661 pub fax: Option<String>,
663 pub created_at: Option<String>,
665 pub email: Option<String>,
667 pub id: Option<i64>,
669}
670impl std::fmt::Display for Contact {
671 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
672 write!(f, "{}", serde_json::to_string(self).unwrap())
673 }
674}
675#[derive(Debug, Serialize, Deserialize, Default)]
676pub struct ProjectBudgetReportResult {
677 pub budget_spent: Option<f64>,
679 pub client_id: Option<i64>,
681 pub budget_by: Option<String>,
683 pub budget: Option<f64>,
685 pub project_name: Option<String>,
687 pub budget_is_monthly: Option<bool>,
689 pub budget_remaining: Option<f64>,
691 pub is_active: Option<bool>,
693 pub client_name: Option<String>,
695 pub project_id: Option<i64>,
697}
698impl std::fmt::Display for ProjectBudgetReportResult {
699 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
700 write!(f, "{}", serde_json::to_string(self).unwrap())
701 }
702}
703#[derive(Debug, Serialize, Deserialize)]
704pub struct EstimateMessages {
705 pub next_page: Option<i64>,
706 pub previous_page: Option<i64>,
707 pub page: i64,
708 pub per_page: i64,
709 pub links: PaginationLinks,
710 pub estimate_messages: Vec<EstimateMessage>,
711 pub total_entries: i64,
712 pub total_pages: i64,
713}
714impl std::fmt::Display for EstimateMessages {
715 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
716 write!(f, "{}", serde_json::to_string(self).unwrap())
717 }
718}
719#[derive(Debug, Serialize, Deserialize, Default)]
720pub struct Error {
721 pub message: Option<String>,
722 pub code: Option<i64>,
723}
724impl std::fmt::Display for Error {
725 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
726 write!(f, "{}", serde_json::to_string(self).unwrap())
727 }
728}
729#[derive(Debug, Serialize, Deserialize)]
730pub struct InvoiceMessages {
731 pub total_pages: i64,
732 pub per_page: i64,
733 pub page: i64,
734 pub links: PaginationLinks,
735 pub next_page: Option<i64>,
736 pub previous_page: Option<i64>,
737 pub invoice_messages: Vec<InvoiceMessage>,
738 pub total_entries: i64,
739}
740impl std::fmt::Display for InvoiceMessages {
741 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
742 write!(f, "{}", serde_json::to_string(self).unwrap())
743 }
744}
745#[derive(Debug, Serialize, Deserialize)]
746pub struct UserAssignments {
747 pub page: i64,
748 pub links: PaginationLinks,
749 pub per_page: i64,
750 pub total_entries: i64,
751 pub previous_page: Option<i64>,
752 pub next_page: Option<i64>,
753 pub user_assignments: Vec<UserAssignment>,
754 pub total_pages: i64,
755}
756impl std::fmt::Display for UserAssignments {
757 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
758 write!(f, "{}", serde_json::to_string(self).unwrap())
759 }
760}
761#[derive(Debug, Serialize, Deserialize, Default)]
762pub struct EstimateLineItem {
763 pub quantity: Option<f64>,
765 pub taxed2: Option<bool>,
767 pub id: Option<i64>,
769 pub unit_price: Option<f64>,
771 pub kind: Option<String>,
773 pub description: Option<String>,
775 pub amount: Option<f64>,
777 pub taxed: Option<bool>,
779}
780impl std::fmt::Display for EstimateLineItem {
781 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
782 write!(f, "{}", serde_json::to_string(self).unwrap())
783 }
784}
785#[derive(Debug, Serialize, Deserialize)]
786pub struct Teammate {
787 pub first_name: Option<String>,
789 pub id: Option<serde_json::Value>,
791 pub last_name: Option<String>,
793 pub email: Option<String>,
795}
796impl std::fmt::Display for Teammate {
797 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
798 write!(f, "{}", serde_json::to_string(self).unwrap())
799 }
800}
801#[derive(Debug, Serialize, Deserialize)]
802pub struct ProjectAssignment {
803 pub updated_at: Option<String>,
805 pub is_project_manager: Option<bool>,
807 pub use_default_rates: Option<bool>,
809 pub budget: Option<f64>,
811 pub created_at: Option<String>,
813 pub project: Option<serde_json::Value>,
815 pub client: Option<serde_json::Value>,
817 pub task_assignments: Option<Vec<TaskAssignment>>,
819 pub hourly_rate: Option<f64>,
821 pub id: Option<i64>,
823 pub is_active: Option<bool>,
825}
826impl std::fmt::Display for ProjectAssignment {
827 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
828 write!(f, "{}", serde_json::to_string(self).unwrap())
829 }
830}
831#[derive(Debug, Serialize, Deserialize, Default)]
832pub struct TeammatesPatchResponse {
833 pub teammates: Vec<Teammate>,
834}
835impl std::fmt::Display for TeammatesPatchResponse {
836 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
837 write!(f, "{}", serde_json::to_string(self).unwrap())
838 }
839}
840#[derive(Debug, Serialize, Deserialize, Default)]
841pub struct InvoiceItemCategory {
842 pub id: Option<i64>,
844 pub use_as_service: Option<bool>,
846 pub created_at: Option<String>,
848 pub name: Option<String>,
850 pub use_as_expense: Option<bool>,
852 pub updated_at: Option<String>,
854}
855impl std::fmt::Display for InvoiceItemCategory {
856 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
857 write!(f, "{}", serde_json::to_string(self).unwrap())
858 }
859}
860#[derive(Debug, Serialize, Deserialize)]
861pub struct Project {
862 pub budget_by: Option<String>,
864 pub is_billable: Option<bool>,
866 pub budget_is_monthly: Option<bool>,
868 pub starts_on: Option<String>,
870 pub created_at: Option<String>,
872 pub is_fixed_fee: Option<bool>,
874 pub notify_when_over_budget: Option<bool>,
876 pub bill_by: Option<String>,
878 pub over_budget_notification_percentage: Option<f64>,
880 pub fee: Option<f64>,
882 pub cost_budget_include_expenses: Option<bool>,
884 pub cost_budget: Option<f64>,
886 pub show_budget_to_all: Option<bool>,
888 pub notes: Option<String>,
890 pub is_active: Option<bool>,
892 pub client: Option<serde_json::Value>,
894 pub hourly_rate: Option<f64>,
896 pub budget: Option<f64>,
898 pub ends_on: Option<String>,
900 pub updated_at: Option<String>,
902 pub id: Option<i64>,
904 pub over_budget_notification_date: Option<String>,
906 pub name: Option<String>,
908 pub code: Option<String>,
910}
911impl std::fmt::Display for Project {
912 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
913 write!(f, "{}", serde_json::to_string(self).unwrap())
914 }
915}
916#[derive(Debug, Serialize, Deserialize)]
917pub struct EstimateMessageRecipients {
918 pub page: i64,
919 pub links: PaginationLinks,
920 pub estimate_message_recipients: Vec<EstimateMessageRecipient>,
921 pub total_pages: i64,
922 pub per_page: i64,
923 pub total_entries: i64,
924 pub previous_page: Option<i64>,
925 pub next_page: Option<i64>,
926}
927impl std::fmt::Display for EstimateMessageRecipients {
928 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
929 write!(f, "{}", serde_json::to_string(self).unwrap())
930 }
931}
932#[derive(Debug, Serialize, Deserialize)]
933pub struct InvoicePayment {
934 pub recorded_by_email: Option<String>,
936 pub payment_gateway: Option<serde_json::Value>,
938 pub paid_at: Option<String>,
940 pub created_at: Option<String>,
942 pub paid_date: Option<String>,
944 pub recorded_by: Option<String>,
946 pub updated_at: Option<String>,
948 pub id: Option<i64>,
950 pub notes: Option<String>,
952 pub amount: Option<f64>,
954 pub transaction_id: Option<String>,
956}
957impl std::fmt::Display for InvoicePayment {
958 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
959 write!(f, "{}", serde_json::to_string(self).unwrap())
960 }
961}
962#[derive(Debug, Serialize, Deserialize, Default)]
963pub struct InvoiceMessage {
964 pub thank_you: Option<bool>,
966 pub created_at: Option<String>,
968 pub sent_from_email: Option<String>,
970 pub id: Option<i64>,
972 pub send_me_a_copy: Option<bool>,
974 pub event_type: Option<String>,
976 pub include_link_to_client_invoice: Option<bool>,
978 pub sent_by_email: Option<String>,
980 pub sent_from: Option<String>,
982 pub recipients: Option<Vec<InvoiceMessageRecipient>>,
984 pub subject: Option<String>,
986 pub reminder: Option<bool>,
988 pub body: Option<String>,
990 pub attach_pdf: Option<bool>,
992 pub send_reminder_on: Option<String>,
994 pub sent_by: Option<String>,
996 pub updated_at: Option<String>,
998}
999impl std::fmt::Display for InvoiceMessage {
1000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1001 write!(f, "{}", serde_json::to_string(self).unwrap())
1002 }
1003}
1004#[derive(Debug, Serialize, Deserialize)]
1005pub struct TimeEntry {
1006 pub task: Option<serde_json::Value>,
1008 pub task_assignment: Option<TaskAssignment>,
1009 pub user_assignment: Option<UserAssignment>,
1010 pub notes: Option<String>,
1012 pub user: Option<serde_json::Value>,
1014 pub external_reference: Option<serde_json::Value>,
1016 pub hours: Option<f64>,
1018 pub client: Option<serde_json::Value>,
1020 pub billable_rate: Option<f64>,
1022 pub updated_at: Option<String>,
1024 pub budgeted: Option<bool>,
1026 pub locked_reason: Option<String>,
1028 pub created_at: Option<String>,
1030 pub id: Option<i64>,
1032 pub is_billed: Option<bool>,
1034 pub started_time: Option<String>,
1036 pub ended_time: Option<String>,
1038 pub billable: Option<bool>,
1040 pub hours_without_timer: Option<f64>,
1042 pub is_closed: Option<bool>,
1044 pub timer_started_at: Option<String>,
1046 pub is_running: Option<bool>,
1048 pub rounded_hours: Option<f64>,
1050 pub is_locked: Option<bool>,
1052 pub spent_date: Option<String>,
1054 pub invoice: Option<serde_json::Value>,
1056 pub cost_rate: Option<f64>,
1058 pub project: Option<serde_json::Value>,
1060}
1061impl std::fmt::Display for TimeEntry {
1062 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1063 write!(f, "{}", serde_json::to_string(self).unwrap())
1064 }
1065}
1066#[derive(Debug, Serialize, Deserialize, Default)]
1067pub struct CostRate {
1068 pub created_at: Option<String>,
1070 pub updated_at: Option<String>,
1072 pub start_date: Option<String>,
1074 pub id: Option<i64>,
1076 pub end_date: Option<String>,
1078 pub amount: Option<f64>,
1080}
1081impl std::fmt::Display for CostRate {
1082 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1083 write!(f, "{}", serde_json::to_string(self).unwrap())
1084 }
1085}
1086#[derive(Debug, Serialize, Deserialize)]
1087pub struct ExpenseCategories {
1088 pub page: i64,
1089 pub next_page: Option<i64>,
1090 pub total_entries: i64,
1091 pub total_pages: i64,
1092 pub per_page: i64,
1093 pub previous_page: Option<i64>,
1094 pub links: PaginationLinks,
1095 pub expense_categories: Vec<ExpenseCategory>,
1096}
1097impl std::fmt::Display for ExpenseCategories {
1098 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1099 write!(f, "{}", serde_json::to_string(self).unwrap())
1100 }
1101}
1102#[derive(Debug, Serialize, Deserialize)]
1103pub struct CostRates {
1104 pub per_page: i64,
1105 pub total_pages: i64,
1106 pub previous_page: Option<i64>,
1107 pub total_entries: i64,
1108 pub links: PaginationLinks,
1109 pub page: i64,
1110 pub next_page: Option<i64>,
1111 pub cost_rates: Vec<CostRate>,
1112}
1113impl std::fmt::Display for CostRates {
1114 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1115 write!(f, "{}", serde_json::to_string(self).unwrap())
1116 }
1117}
1118#[derive(Debug, Serialize, Deserialize)]
1119pub struct InvoiceItemCategories {
1120 pub total_entries: i64,
1121 pub previous_page: Option<i64>,
1122 pub per_page: i64,
1123 pub page: i64,
1124 pub invoice_item_categories: Vec<InvoiceItemCategory>,
1125 pub next_page: Option<i64>,
1126 pub links: PaginationLinks,
1127 pub total_pages: i64,
1128}
1129impl std::fmt::Display for InvoiceItemCategories {
1130 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1131 write!(f, "{}", serde_json::to_string(self).unwrap())
1132 }
1133}
1134#[derive(Debug, Serialize, Deserialize)]
1135pub struct Estimate {
1136 pub notes: Option<String>,
1138 pub number: Option<String>,
1140 pub client: Option<serde_json::Value>,
1142 pub currency: Option<String>,
1144 pub purchase_order: Option<String>,
1146 pub subject: Option<String>,
1148 pub state: Option<String>,
1150 pub sent_at: Option<String>,
1152 pub client_key: Option<String>,
1154 pub creator: Option<serde_json::Value>,
1156 pub tax2: Option<f64>,
1158 pub tax2_amount: Option<f64>,
1160 pub discount: Option<f64>,
1162 pub discount_amount: Option<f64>,
1164 pub accepted_at: Option<String>,
1166 pub updated_at: Option<String>,
1168 pub created_at: Option<String>,
1170 pub id: Option<i64>,
1172 pub tax_amount: Option<f64>,
1174 pub issue_date: Option<String>,
1176 pub declined_at: Option<String>,
1178 pub amount: Option<f64>,
1180 pub line_items: Option<Vec<EstimateLineItem>>,
1182 pub tax: Option<f64>,
1184}
1185impl std::fmt::Display for Estimate {
1186 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1187 write!(f, "{}", serde_json::to_string(self).unwrap())
1188 }
1189}
1190#[derive(Debug, Serialize, Deserialize)]
1191pub struct InvoiceLineItems {
1192 pub per_page: i64,
1193 pub total_entries: i64,
1194 pub links: PaginationLinks,
1195 pub invoice_line_items: Vec<InvoiceLineItem>,
1196 pub page: i64,
1197 pub total_pages: i64,
1198 pub next_page: Option<i64>,
1199 pub previous_page: Option<i64>,
1200}
1201impl std::fmt::Display for InvoiceLineItems {
1202 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1203 write!(f, "{}", serde_json::to_string(self).unwrap())
1204 }
1205}
1206#[derive(Debug, Serialize, Deserialize)]
1207pub struct EstimateLineItems {
1208 pub estimate_line_items: Vec<EstimateLineItem>,
1209 pub per_page: i64,
1210 pub next_page: Option<i64>,
1211 pub total_pages: i64,
1212 pub previous_page: Option<i64>,
1213 pub page: i64,
1214 pub total_entries: i64,
1215 pub links: PaginationLinks,
1216}
1217impl std::fmt::Display for EstimateLineItems {
1218 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1219 write!(f, "{}", serde_json::to_string(self).unwrap())
1220 }
1221}
1222#[derive(Debug, Serialize, Deserialize)]
1223pub struct ProjectBudgetReportResults {
1224 pub total_pages: i64,
1225 pub results: Vec<ProjectBudgetReportResult>,
1226 pub next_page: Option<i64>,
1227 pub per_page: i64,
1228 pub total_entries: i64,
1229 pub previous_page: Option<i64>,
1230 pub page: i64,
1231 pub links: PaginationLinks,
1232}
1233impl std::fmt::Display for ProjectBudgetReportResults {
1234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1235 write!(f, "{}", serde_json::to_string(self).unwrap())
1236 }
1237}
1238#[derive(Debug, Serialize, Deserialize, Default)]
1239pub struct EstimateItemCategory {
1240 pub id: Option<i64>,
1242 pub created_at: Option<String>,
1244 pub updated_at: Option<String>,
1246 pub name: Option<String>,
1248}
1249impl std::fmt::Display for EstimateItemCategory {
1250 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1251 write!(f, "{}", serde_json::to_string(self).unwrap())
1252 }
1253}
1254#[derive(Debug, Serialize, Deserialize, Default)]
1255pub struct Task {
1256 pub is_default: Option<bool>,
1258 pub billable_by_default: Option<bool>,
1260 pub default_hourly_rate: Option<f64>,
1262 pub is_active: Option<bool>,
1264 pub created_at: Option<String>,
1266 pub updated_at: Option<String>,
1268 pub name: Option<String>,
1270 pub id: Option<i64>,
1272}
1273impl std::fmt::Display for Task {
1274 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1275 write!(f, "{}", serde_json::to_string(self).unwrap())
1276 }
1277}
1278#[derive(Debug, Serialize, Deserialize, Default)]
1279pub struct ExpenseReportsResult {
1280 pub client_name: Option<String>,
1282 pub user_name: Option<String>,
1284 pub currency: Option<String>,
1286 pub billable_amount: Option<f64>,
1288 pub expense_category_id: Option<i64>,
1290 pub project_id: Option<i64>,
1292 pub is_contractor: Option<bool>,
1294 pub project_name: Option<String>,
1296 pub expense_category_name: Option<String>,
1298 pub user_id: Option<i64>,
1300 pub client_id: Option<i64>,
1302 pub total_amount: Option<f64>,
1304}
1305impl std::fmt::Display for ExpenseReportsResult {
1306 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1307 write!(f, "{}", serde_json::to_string(self).unwrap())
1308 }
1309}
1310#[derive(Debug, Serialize, Deserialize, Default)]
1311pub struct TimeReportsResult {
1312 pub client_id: Option<i64>,
1314 pub task_id: Option<i64>,
1316 pub user_id: Option<i64>,
1318 pub task_name: Option<String>,
1320 pub user_name: Option<String>,
1322 pub billable_hours: Option<f64>,
1324 pub billable_amount: Option<f64>,
1326 pub project_name: Option<String>,
1328 pub project_id: Option<i64>,
1330 pub client_name: Option<String>,
1332 pub is_contractor: Option<bool>,
1334 pub currency: Option<String>,
1336 pub total_hours: Option<f64>,
1338}
1339impl std::fmt::Display for TimeReportsResult {
1340 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1341 write!(f, "{}", serde_json::to_string(self).unwrap())
1342 }
1343}
1344#[derive(Debug, Serialize, Deserialize)]
1345pub struct ProjectAssignments {
1346 pub project_assignments: Vec<ProjectAssignment>,
1347 pub total_pages: i64,
1348 pub per_page: i64,
1349 pub page: i64,
1350 pub total_entries: i64,
1351 pub next_page: Option<i64>,
1352 pub links: PaginationLinks,
1353 pub previous_page: Option<i64>,
1354}
1355impl std::fmt::Display for ProjectAssignments {
1356 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1357 write!(f, "{}", serde_json::to_string(self).unwrap())
1358 }
1359}
1360#[derive(Debug, Serialize, Deserialize)]
1361pub struct Users {
1362 pub total_entries: i64,
1363 pub next_page: Option<i64>,
1364 pub links: PaginationLinks,
1365 pub per_page: i64,
1366 pub previous_page: Option<i64>,
1367 pub page: i64,
1368 pub total_pages: i64,
1369 pub users: Vec<User>,
1370}
1371impl std::fmt::Display for Users {
1372 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1373 write!(f, "{}", serde_json::to_string(self).unwrap())
1374 }
1375}
1376#[derive(Debug, Serialize, Deserialize)]
1377pub struct Invoice {
1378 pub number: Option<String>,
1380 pub issue_date: Option<String>,
1382 pub due_date: Option<String>,
1384 pub subject: Option<String>,
1386 pub closed_at: Option<String>,
1388 pub period_start: Option<String>,
1390 pub payment_term: Option<String>,
1392 pub paid_at: Option<String>,
1394 pub amount: Option<f64>,
1396 pub notes: Option<String>,
1398 pub tax2: Option<f64>,
1400 pub due_amount: Option<f64>,
1402 pub discount_amount: Option<f64>,
1404 pub currency: Option<String>,
1406 pub paid_date: Option<String>,
1408 pub client_key: Option<String>,
1410 pub recurring_invoice_id: Option<i64>,
1412 pub estimate: Option<serde_json::Value>,
1414 pub sent_at: Option<String>,
1416 pub discount: Option<f64>,
1418 pub period_end: Option<String>,
1420 pub tax: Option<f64>,
1422 pub client: Option<serde_json::Value>,
1424 pub purchase_order: Option<String>,
1426 pub line_items: Option<Vec<InvoiceLineItem>>,
1428 pub id: Option<i64>,
1430 pub state: Option<String>,
1432 pub creator: Option<serde_json::Value>,
1434 pub tax2_amount: Option<f64>,
1436 pub retainer: Option<serde_json::Value>,
1438 pub created_at: Option<String>,
1440 pub tax_amount: Option<f64>,
1442 pub updated_at: Option<String>,
1444}
1445impl std::fmt::Display for Invoice {
1446 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1447 write!(f, "{}", serde_json::to_string(self).unwrap())
1448 }
1449}
1450#[derive(Debug, Serialize, Deserialize)]
1451pub struct Expense {
1452 pub user_assignment: Option<UserAssignment>,
1453 pub units: Option<i64>,
1455 pub locked_reason: Option<String>,
1457 pub id: Option<i64>,
1459 pub receipt: Option<serde_json::Value>,
1461 pub created_at: Option<String>,
1463 pub billable: Option<bool>,
1465 pub is_closed: Option<bool>,
1467 pub expense_category: Option<serde_json::Value>,
1469 pub invoice: Option<serde_json::Value>,
1471 pub total_cost: Option<f64>,
1473 pub updated_at: Option<String>,
1475 pub user: Option<serde_json::Value>,
1477 pub spent_date: Option<String>,
1479 pub notes: Option<String>,
1481 pub project: Option<serde_json::Value>,
1483 pub is_locked: Option<bool>,
1485 pub client: Option<serde_json::Value>,
1487 pub is_billed: Option<bool>,
1489}
1490impl std::fmt::Display for Expense {
1491 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1492 write!(f, "{}", serde_json::to_string(self).unwrap())
1493 }
1494}
1495#[derive(Debug, Serialize, Deserialize, Default)]
1496pub struct UninvoicedReportResult {
1497 pub uninvoiced_expenses: Option<f64>,
1499 pub client_id: Option<i64>,
1501 pub client_name: Option<String>,
1503 pub project_name: Option<String>,
1505 pub total_hours: Option<f64>,
1507 pub currency: Option<String>,
1509 pub project_id: Option<i64>,
1511 pub uninvoiced_amount: Option<f64>,
1513 pub uninvoiced_hours: Option<f64>,
1515}
1516impl std::fmt::Display for UninvoicedReportResult {
1517 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1518 write!(f, "{}", serde_json::to_string(self).unwrap())
1519 }
1520}