1use reqwest::Client;
2use serde_json::Value;
3use std::error::Error;
4
5#[derive(Clone)]
6pub struct MetrcClient {
7 client: Client,
8 base_url: String,
9 vendor_key: String,
10 user_key: String,
11}
12
13impl MetrcClient {
14 pub fn new(base_url: &str, vendor_key: &str, user_key: &str) -> Self {
15 MetrcClient {
16 client: Client::new(),
17 base_url: base_url.trim_end_matches('/').to_string(),
18 vendor_key: vendor_key.to_string(),
19 user_key: user_key.to_string(),
20 }
21 }
22
23 async fn send(&self, method: reqwest::Method, path: &str, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
24 let url = format!("{}{}", self.base_url, path);
25 let mut req = self.client.request(method, &url);
26 req = req.basic_auth(&self.vendor_key, Some(&self.user_key));
27
28 if let Some(b) = body {
29 req = req.json(b);
30 }
31
32 let resp = req.send().await?;
33 let status = resp.status();
34 if !status.is_success() {
35 return Err(format!("API Error: {}", status).into());
36 }
37 if status == reqwest::StatusCode::NO_CONTENT {
38 return Ok(None);
39 }
40 let json: Value = resp.json().await?;
41 Ok(Some(json))
42 }
43
44 pub async fn plants_create_additives_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
49 let mut path = format!("/plants/v1/additives");
50 let mut query_params = Vec::new();
51 if let Some(p) = license_number {
52 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
53 }
54 if !query_params.is_empty() {
55 path.push_str("?");
56 path.push_str(&query_params.join("&"));
57 }
58 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
59 }
60
61 pub async fn plants_create_additives_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
68 let mut path = format!("/plants/v2/additives");
69 let mut query_params = Vec::new();
70 if let Some(p) = license_number {
71 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
72 }
73 if !query_params.is_empty() {
74 path.push_str("?");
75 path.push_str(&query_params.join("&"));
76 }
77 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
78 }
79
80 pub async fn plants_create_additives_bylocation_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
86 let mut path = format!("/plants/v1/additives/bylocation");
87 let mut query_params = Vec::new();
88 if let Some(p) = license_number {
89 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
90 }
91 if !query_params.is_empty() {
92 path.push_str("?");
93 path.push_str(&query_params.join("&"));
94 }
95 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
96 }
97
98 pub async fn plants_create_additives_bylocation_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
106 let mut path = format!("/plants/v2/additives/bylocation");
107 let mut query_params = Vec::new();
108 if let Some(p) = license_number {
109 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
110 }
111 if !query_params.is_empty() {
112 path.push_str("?");
113 path.push_str(&query_params.join("&"));
114 }
115 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
116 }
117
118 pub async fn plants_create_additives_bylocation_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
125 let mut path = format!("/plants/v2/additives/bylocation/usingtemplate");
126 let mut query_params = Vec::new();
127 if let Some(p) = license_number {
128 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
129 }
130 if !query_params.is_empty() {
131 path.push_str("?");
132 path.push_str(&query_params.join("&"));
133 }
134 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
135 }
136
137 pub async fn plants_create_additives_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
144 let mut path = format!("/plants/v2/additives/usingtemplate");
145 let mut query_params = Vec::new();
146 if let Some(p) = license_number {
147 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
148 }
149 if !query_params.is_empty() {
150 path.push_str("?");
151 path.push_str(&query_params.join("&"));
152 }
153 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
154 }
155
156 pub async fn plants_create_changegrowthphases_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
162 let mut path = format!("/plants/v1/changegrowthphases");
163 let mut query_params = Vec::new();
164 if let Some(p) = license_number {
165 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
166 }
167 if !query_params.is_empty() {
168 path.push_str("?");
169 path.push_str(&query_params.join("&"));
170 }
171 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
172 }
173
174 pub async fn plants_create_harvestplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
182 let mut path = format!("/plants/v1/harvestplants");
183 let mut query_params = Vec::new();
184 if let Some(p) = license_number {
185 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
186 }
187 if !query_params.is_empty() {
188 path.push_str("?");
189 path.push_str(&query_params.join("&"));
190 }
191 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
192 }
193
194 pub async fn plants_create_manicure_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
202 let mut path = format!("/plants/v2/manicure");
203 let mut query_params = Vec::new();
204 if let Some(p) = license_number {
205 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
206 }
207 if !query_params.is_empty() {
208 path.push_str("?");
209 path.push_str(&query_params.join("&"));
210 }
211 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
212 }
213
214 pub async fn plants_create_manicureplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
220 let mut path = format!("/plants/v1/manicureplants");
221 let mut query_params = Vec::new();
222 if let Some(p) = license_number {
223 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
224 }
225 if !query_params.is_empty() {
226 path.push_str("?");
227 path.push_str(&query_params.join("&"));
228 }
229 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
230 }
231
232 pub async fn plants_create_moveplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
238 let mut path = format!("/plants/v1/moveplants");
239 let mut query_params = Vec::new();
240 if let Some(p) = license_number {
241 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
242 }
243 if !query_params.is_empty() {
244 path.push_str("?");
245 path.push_str(&query_params.join("&"));
246 }
247 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
248 }
249
250 pub async fn plants_create_plantbatch_package_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
260 let mut path = format!("/plants/v1/create/plantbatch/packages");
261 let mut query_params = Vec::new();
262 if let Some(p) = license_number {
263 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
264 }
265 if !query_params.is_empty() {
266 path.push_str("?");
267 path.push_str(&query_params.join("&"));
268 }
269 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
270 }
271
272 pub async fn plants_create_plantbatch_package_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
284 let mut path = format!("/plants/v2/plantbatch/packages");
285 let mut query_params = Vec::new();
286 if let Some(p) = license_number {
287 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
288 }
289 if !query_params.is_empty() {
290 path.push_str("?");
291 path.push_str(&query_params.join("&"));
292 }
293 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
294 }
295
296 pub async fn plants_create_plantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
304 let mut path = format!("/plants/v1/create/plantings");
305 let mut query_params = Vec::new();
306 if let Some(p) = license_number {
307 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
308 }
309 if !query_params.is_empty() {
310 path.push_str("?");
311 path.push_str(&query_params.join("&"));
312 }
313 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
314 }
315
316 pub async fn plants_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
326 let mut path = format!("/plants/v2/plantings");
327 let mut query_params = Vec::new();
328 if let Some(p) = license_number {
329 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
330 }
331 if !query_params.is_empty() {
332 path.push_str("?");
333 path.push_str(&query_params.join("&"));
334 }
335 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
336 }
337
338 pub async fn plants_create_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
343 let mut path = format!("/plants/v1/waste");
344 let mut query_params = Vec::new();
345 if let Some(p) = license_number {
346 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
347 }
348 if !query_params.is_empty() {
349 path.push_str("?");
350 path.push_str(&query_params.join("&"));
351 }
352 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
353 }
354
355 pub async fn plants_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
362 let mut path = format!("/plants/v2/waste");
363 let mut query_params = Vec::new();
364 if let Some(p) = license_number {
365 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
366 }
367 if !query_params.is_empty() {
368 path.push_str("?");
369 path.push_str(&query_params.join("&"));
370 }
371 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
372 }
373
374 pub async fn plants_delete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
380 let mut path = format!("/plants/v1");
381 let mut query_params = Vec::new();
382 if let Some(p) = license_number {
383 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
384 }
385 if !query_params.is_empty() {
386 path.push_str("?");
387 path.push_str(&query_params.join("&"));
388 }
389 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
390 }
391
392 pub async fn plants_delete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
400 let mut path = format!("/plants/v2");
401 let mut query_params = Vec::new();
402 if let Some(p) = license_number {
403 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
404 }
405 if !query_params.is_empty() {
406 path.push_str("?");
407 path.push_str(&query_params.join("&"));
408 }
409 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
410 }
411
412 pub async fn plants_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
417 let mut path = format!("/plants/v1/{}", urlencoding::encode(id).as_ref());
418 let mut query_params = Vec::new();
419 if let Some(p) = license_number {
420 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
421 }
422 if !query_params.is_empty() {
423 path.push_str("?");
424 path.push_str(&query_params.join("&"));
425 }
426 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
427 }
428
429 pub async fn plants_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
436 let mut path = format!("/plants/v2/{}", urlencoding::encode(id).as_ref());
437 let mut query_params = Vec::new();
438 if let Some(p) = license_number {
439 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
440 }
441 if !query_params.is_empty() {
442 path.push_str("?");
443 path.push_str(&query_params.join("&"));
444 }
445 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
446 }
447
448 pub async fn plants_get_additives_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
453 let mut path = format!("/plants/v1/additives");
454 let mut query_params = Vec::new();
455 if let Some(p) = last_modified_end {
456 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
457 }
458 if let Some(p) = last_modified_start {
459 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
460 }
461 if let Some(p) = license_number {
462 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
463 }
464 if !query_params.is_empty() {
465 path.push_str("?");
466 path.push_str(&query_params.join("&"));
467 }
468 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
469 }
470
471 pub async fn plants_get_additives_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
478 let mut path = format!("/plants/v2/additives");
479 let mut query_params = Vec::new();
480 if let Some(p) = last_modified_end {
481 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
482 }
483 if let Some(p) = last_modified_start {
484 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
485 }
486 if let Some(p) = license_number {
487 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
488 }
489 if let Some(p) = page_number {
490 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
491 }
492 if let Some(p) = page_size {
493 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
494 }
495 if !query_params.is_empty() {
496 path.push_str("?");
497 path.push_str(&query_params.join("&"));
498 }
499 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
500 }
501
502 pub async fn plants_get_additives_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
507 let mut path = format!("/plants/v1/additives/types");
508 let mut query_params = Vec::new();
509 if let Some(p) = no {
510 query_params.push(format!("No={}", urlencoding::encode(&p)));
511 }
512 if !query_params.is_empty() {
513 path.push_str("?");
514 path.push_str(&query_params.join("&"));
515 }
516 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
517 }
518
519 pub async fn plants_get_additives_types_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
526 let mut path = format!("/plants/v2/additives/types");
527 let mut query_params = Vec::new();
528 if let Some(p) = no {
529 query_params.push(format!("No={}", urlencoding::encode(&p)));
530 }
531 if !query_params.is_empty() {
532 path.push_str("?");
533 path.push_str(&query_params.join("&"));
534 }
535 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
536 }
537
538 pub async fn plants_get_by_label_v1(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
543 let mut path = format!("/plants/v1/{}", urlencoding::encode(label).as_ref());
544 let mut query_params = Vec::new();
545 if let Some(p) = license_number {
546 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
547 }
548 if !query_params.is_empty() {
549 path.push_str("?");
550 path.push_str(&query_params.join("&"));
551 }
552 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
553 }
554
555 pub async fn plants_get_by_label_v2(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
562 let mut path = format!("/plants/v2/{}", urlencoding::encode(label).as_ref());
563 let mut query_params = Vec::new();
564 if let Some(p) = license_number {
565 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
566 }
567 if !query_params.is_empty() {
568 path.push_str("?");
569 path.push_str(&query_params.join("&"));
570 }
571 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
572 }
573
574 pub async fn plants_get_flowering_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
579 let mut path = format!("/plants/v1/flowering");
580 let mut query_params = Vec::new();
581 if let Some(p) = last_modified_end {
582 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
583 }
584 if let Some(p) = last_modified_start {
585 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
586 }
587 if let Some(p) = license_number {
588 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
589 }
590 if !query_params.is_empty() {
591 path.push_str("?");
592 path.push_str(&query_params.join("&"));
593 }
594 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
595 }
596
597 pub async fn plants_get_flowering_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
604 let mut path = format!("/plants/v2/flowering");
605 let mut query_params = Vec::new();
606 if let Some(p) = last_modified_end {
607 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
608 }
609 if let Some(p) = last_modified_start {
610 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
611 }
612 if let Some(p) = license_number {
613 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
614 }
615 if let Some(p) = page_number {
616 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
617 }
618 if let Some(p) = page_size {
619 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
620 }
621 if !query_params.is_empty() {
622 path.push_str("?");
623 path.push_str(&query_params.join("&"));
624 }
625 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
626 }
627
628 pub async fn plants_get_growth_phases_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
633 let mut path = format!("/plants/v1/growthphases");
634 let mut query_params = Vec::new();
635 if let Some(p) = license_number {
636 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
637 }
638 if !query_params.is_empty() {
639 path.push_str("?");
640 path.push_str(&query_params.join("&"));
641 }
642 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
643 }
644
645 pub async fn plants_get_growth_phases_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
652 let mut path = format!("/plants/v2/growthphases");
653 let mut query_params = Vec::new();
654 if let Some(p) = license_number {
655 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
656 }
657 if !query_params.is_empty() {
658 path.push_str("?");
659 path.push_str(&query_params.join("&"));
660 }
661 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
662 }
663
664 pub async fn plants_get_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
669 let mut path = format!("/plants/v1/inactive");
670 let mut query_params = Vec::new();
671 if let Some(p) = last_modified_end {
672 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
673 }
674 if let Some(p) = last_modified_start {
675 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
676 }
677 if let Some(p) = license_number {
678 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
679 }
680 if !query_params.is_empty() {
681 path.push_str("?");
682 path.push_str(&query_params.join("&"));
683 }
684 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
685 }
686
687 pub async fn plants_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
694 let mut path = format!("/plants/v2/inactive");
695 let mut query_params = Vec::new();
696 if let Some(p) = last_modified_end {
697 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
698 }
699 if let Some(p) = last_modified_start {
700 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
701 }
702 if let Some(p) = license_number {
703 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
704 }
705 if let Some(p) = page_number {
706 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
707 }
708 if let Some(p) = page_size {
709 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
710 }
711 if !query_params.is_empty() {
712 path.push_str("?");
713 path.push_str(&query_params.join("&"));
714 }
715 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
716 }
717
718 pub async fn plants_get_mother_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
725 let mut path = format!("/plants/v2/mother");
726 let mut query_params = Vec::new();
727 if let Some(p) = last_modified_end {
728 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
729 }
730 if let Some(p) = last_modified_start {
731 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
732 }
733 if let Some(p) = license_number {
734 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
735 }
736 if let Some(p) = page_number {
737 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
738 }
739 if let Some(p) = page_size {
740 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
741 }
742 if !query_params.is_empty() {
743 path.push_str("?");
744 path.push_str(&query_params.join("&"));
745 }
746 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
747 }
748
749 pub async fn plants_get_mother_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
756 let mut path = format!("/plants/v2/mother/inactive");
757 let mut query_params = Vec::new();
758 if let Some(p) = last_modified_end {
759 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
760 }
761 if let Some(p) = last_modified_start {
762 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
763 }
764 if let Some(p) = license_number {
765 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
766 }
767 if let Some(p) = page_number {
768 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
769 }
770 if let Some(p) = page_size {
771 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
772 }
773 if !query_params.is_empty() {
774 path.push_str("?");
775 path.push_str(&query_params.join("&"));
776 }
777 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
778 }
779
780 pub async fn plants_get_mother_onhold_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
787 let mut path = format!("/plants/v2/mother/onhold");
788 let mut query_params = Vec::new();
789 if let Some(p) = last_modified_end {
790 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
791 }
792 if let Some(p) = last_modified_start {
793 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
794 }
795 if let Some(p) = license_number {
796 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
797 }
798 if let Some(p) = page_number {
799 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
800 }
801 if let Some(p) = page_size {
802 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
803 }
804 if !query_params.is_empty() {
805 path.push_str("?");
806 path.push_str(&query_params.join("&"));
807 }
808 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
809 }
810
811 pub async fn plants_get_onhold_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
816 let mut path = format!("/plants/v1/onhold");
817 let mut query_params = Vec::new();
818 if let Some(p) = last_modified_end {
819 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
820 }
821 if let Some(p) = last_modified_start {
822 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
823 }
824 if let Some(p) = license_number {
825 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
826 }
827 if !query_params.is_empty() {
828 path.push_str("?");
829 path.push_str(&query_params.join("&"));
830 }
831 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
832 }
833
834 pub async fn plants_get_onhold_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
841 let mut path = format!("/plants/v2/onhold");
842 let mut query_params = Vec::new();
843 if let Some(p) = last_modified_end {
844 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
845 }
846 if let Some(p) = last_modified_start {
847 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
848 }
849 if let Some(p) = license_number {
850 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
851 }
852 if let Some(p) = page_number {
853 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
854 }
855 if let Some(p) = page_size {
856 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
857 }
858 if !query_params.is_empty() {
859 path.push_str("?");
860 path.push_str(&query_params.join("&"));
861 }
862 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
863 }
864
865 pub async fn plants_get_vegetative_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
870 let mut path = format!("/plants/v1/vegetative");
871 let mut query_params = Vec::new();
872 if let Some(p) = last_modified_end {
873 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
874 }
875 if let Some(p) = last_modified_start {
876 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
877 }
878 if let Some(p) = license_number {
879 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
880 }
881 if !query_params.is_empty() {
882 path.push_str("?");
883 path.push_str(&query_params.join("&"));
884 }
885 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
886 }
887
888 pub async fn plants_get_vegetative_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
895 let mut path = format!("/plants/v2/vegetative");
896 let mut query_params = Vec::new();
897 if let Some(p) = last_modified_end {
898 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
899 }
900 if let Some(p) = last_modified_start {
901 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
902 }
903 if let Some(p) = license_number {
904 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
905 }
906 if let Some(p) = page_number {
907 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
908 }
909 if let Some(p) = page_size {
910 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
911 }
912 if !query_params.is_empty() {
913 path.push_str("?");
914 path.push_str(&query_params.join("&"));
915 }
916 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
917 }
918
919 pub async fn plants_get_waste_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
926 let mut path = format!("/plants/v2/waste");
927 let mut query_params = Vec::new();
928 if let Some(p) = license_number {
929 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
930 }
931 if let Some(p) = page_number {
932 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
933 }
934 if let Some(p) = page_size {
935 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
936 }
937 if !query_params.is_empty() {
938 path.push_str("?");
939 path.push_str(&query_params.join("&"));
940 }
941 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
942 }
943
944 pub async fn plants_get_waste_methods_all_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
949 let mut path = format!("/plants/v1/waste/methods/all");
950 let mut query_params = Vec::new();
951 if let Some(p) = no {
952 query_params.push(format!("No={}", urlencoding::encode(&p)));
953 }
954 if !query_params.is_empty() {
955 path.push_str("?");
956 path.push_str(&query_params.join("&"));
957 }
958 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
959 }
960
961 pub async fn plants_get_waste_methods_all_v2(&self, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
968 let mut path = format!("/plants/v2/waste/methods/all");
969 let mut query_params = Vec::new();
970 if let Some(p) = page_number {
971 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
972 }
973 if let Some(p) = page_size {
974 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
975 }
976 if !query_params.is_empty() {
977 path.push_str("?");
978 path.push_str(&query_params.join("&"));
979 }
980 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
981 }
982
983 pub async fn plants_get_waste_package_v2(&self, id: &str, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
990 let mut path = format!("/plants/v2/waste/{}/package", urlencoding::encode(id).as_ref());
991 let mut query_params = Vec::new();
992 if let Some(p) = license_number {
993 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
994 }
995 if let Some(p) = page_number {
996 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
997 }
998 if let Some(p) = page_size {
999 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1000 }
1001 if !query_params.is_empty() {
1002 path.push_str("?");
1003 path.push_str(&query_params.join("&"));
1004 }
1005 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1006 }
1007
1008 pub async fn plants_get_waste_plant_v2(&self, id: &str, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1015 let mut path = format!("/plants/v2/waste/{}/plant", urlencoding::encode(id).as_ref());
1016 let mut query_params = Vec::new();
1017 if let Some(p) = license_number {
1018 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1019 }
1020 if let Some(p) = page_number {
1021 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1022 }
1023 if let Some(p) = page_size {
1024 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1025 }
1026 if !query_params.is_empty() {
1027 path.push_str("?");
1028 path.push_str(&query_params.join("&"));
1029 }
1030 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1031 }
1032
1033 pub async fn plants_get_waste_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1038 let mut path = format!("/plants/v1/waste/reasons");
1039 let mut query_params = Vec::new();
1040 if let Some(p) = license_number {
1041 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1042 }
1043 if !query_params.is_empty() {
1044 path.push_str("?");
1045 path.push_str(&query_params.join("&"));
1046 }
1047 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1048 }
1049
1050 pub async fn plants_get_waste_reasons_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1057 let mut path = format!("/plants/v2/waste/reasons");
1058 let mut query_params = Vec::new();
1059 if let Some(p) = license_number {
1060 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1061 }
1062 if let Some(p) = page_number {
1063 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1064 }
1065 if let Some(p) = page_size {
1066 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1067 }
1068 if !query_params.is_empty() {
1069 path.push_str("?");
1070 path.push_str(&query_params.join("&"));
1071 }
1072 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1073 }
1074
1075 pub async fn plants_update_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1083 let mut path = format!("/plants/v2/adjust");
1084 let mut query_params = Vec::new();
1085 if let Some(p) = license_number {
1086 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1087 }
1088 if !query_params.is_empty() {
1089 path.push_str("?");
1090 path.push_str(&query_params.join("&"));
1091 }
1092 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1093 }
1094
1095 pub async fn plants_update_growthphase_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1103 let mut path = format!("/plants/v2/growthphase");
1104 let mut query_params = Vec::new();
1105 if let Some(p) = license_number {
1106 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1107 }
1108 if !query_params.is_empty() {
1109 path.push_str("?");
1110 path.push_str(&query_params.join("&"));
1111 }
1112 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1113 }
1114
1115 pub async fn plants_update_harvest_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1123 let mut path = format!("/plants/v2/harvest");
1124 let mut query_params = Vec::new();
1125 if let Some(p) = license_number {
1126 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1127 }
1128 if !query_params.is_empty() {
1129 path.push_str("?");
1130 path.push_str(&query_params.join("&"));
1131 }
1132 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1133 }
1134
1135 pub async fn plants_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1143 let mut path = format!("/plants/v2/location");
1144 let mut query_params = Vec::new();
1145 if let Some(p) = license_number {
1146 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1147 }
1148 if !query_params.is_empty() {
1149 path.push_str("?");
1150 path.push_str(&query_params.join("&"));
1151 }
1152 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1153 }
1154
1155 pub async fn plants_update_merge_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1163 let mut path = format!("/plants/v2/merge");
1164 let mut query_params = Vec::new();
1165 if let Some(p) = license_number {
1166 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1167 }
1168 if !query_params.is_empty() {
1169 path.push_str("?");
1170 path.push_str(&query_params.join("&"));
1171 }
1172 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1173 }
1174
1175 pub async fn plants_update_split_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1182 let mut path = format!("/plants/v2/split");
1183 let mut query_params = Vec::new();
1184 if let Some(p) = license_number {
1185 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1186 }
1187 if !query_params.is_empty() {
1188 path.push_str("?");
1189 path.push_str(&query_params.join("&"));
1190 }
1191 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1192 }
1193
1194 pub async fn plants_update_strain_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1202 let mut path = format!("/plants/v2/strain");
1203 let mut query_params = Vec::new();
1204 if let Some(p) = license_number {
1205 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1206 }
1207 if !query_params.is_empty() {
1208 path.push_str("?");
1209 path.push_str(&query_params.join("&"));
1210 }
1211 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1212 }
1213
1214 pub async fn plants_update_tag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1222 let mut path = format!("/plants/v2/tag");
1223 let mut query_params = Vec::new();
1224 if let Some(p) = license_number {
1225 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1226 }
1227 if !query_params.is_empty() {
1228 path.push_str("?");
1229 path.push_str(&query_params.join("&"));
1230 }
1231 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1232 }
1233
1234 pub async fn retail_id_create_associate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1244 let mut path = format!("/retailid/v2/associate");
1245 let mut query_params = Vec::new();
1246 if let Some(p) = license_number {
1247 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1248 }
1249 if !query_params.is_empty() {
1250 path.push_str("?");
1251 path.push_str(&query_params.join("&"));
1252 }
1253 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1254 }
1255
1256 pub async fn retail_id_create_generate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1266 let mut path = format!("/retailid/v2/generate");
1267 let mut query_params = Vec::new();
1268 if let Some(p) = license_number {
1269 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1270 }
1271 if !query_params.is_empty() {
1272 path.push_str("?");
1273 path.push_str(&query_params.join("&"));
1274 }
1275 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1276 }
1277
1278 pub async fn retail_id_create_merge_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1287 let mut path = format!("/retailid/v2/merge");
1288 let mut query_params = Vec::new();
1289 if let Some(p) = license_number {
1290 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1291 }
1292 if !query_params.is_empty() {
1293 path.push_str("?");
1294 path.push_str(&query_params.join("&"));
1295 }
1296 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1297 }
1298
1299 pub async fn retail_id_create_package_info_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1309 let mut path = format!("/retailid/v2/packages/info");
1310 let mut query_params = Vec::new();
1311 if let Some(p) = license_number {
1312 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1313 }
1314 if !query_params.is_empty() {
1315 path.push_str("?");
1316 path.push_str(&query_params.join("&"));
1317 }
1318 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1319 }
1320
1321 pub async fn retail_id_get_receive_by_label_v2(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1331 let mut path = format!("/retailid/v2/receive/{}", urlencoding::encode(label).as_ref());
1332 let mut query_params = Vec::new();
1333 if let Some(p) = license_number {
1334 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1335 }
1336 if !query_params.is_empty() {
1337 path.push_str("?");
1338 path.push_str(&query_params.join("&"));
1339 }
1340 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1341 }
1342
1343 pub async fn retail_id_get_receive_qr_by_short_code_v2(&self, short_code: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1353 let mut path = format!("/retailid/v2/receive/qr/{}", urlencoding::encode(short_code).as_ref());
1354 let mut query_params = Vec::new();
1355 if let Some(p) = license_number {
1356 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1357 }
1358 if !query_params.is_empty() {
1359 path.push_str("?");
1360 path.push_str(&query_params.join("&"));
1361 }
1362 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1363 }
1364
1365 pub async fn sandbox_create_integrator_setup_v2(&self, user_key: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1372 let mut path = format!("/sandbox/v2/integrator/setup");
1373 let mut query_params = Vec::new();
1374 if let Some(p) = user_key {
1375 query_params.push(format!("userKey={}", urlencoding::encode(&p)));
1376 }
1377 if !query_params.is_empty() {
1378 path.push_str("?");
1379 path.push_str(&query_params.join("&"));
1380 }
1381 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1382 }
1383
1384 pub async fn sublocations_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1391 let mut path = format!("/sublocations/v2");
1392 let mut query_params = Vec::new();
1393 if let Some(p) = license_number {
1394 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1395 }
1396 if !query_params.is_empty() {
1397 path.push_str("?");
1398 path.push_str(&query_params.join("&"));
1399 }
1400 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1401 }
1402
1403 pub async fn sublocations_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1410 let mut path = format!("/sublocations/v2/{}", urlencoding::encode(id).as_ref());
1411 let mut query_params = Vec::new();
1412 if let Some(p) = license_number {
1413 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1414 }
1415 if !query_params.is_empty() {
1416 path.push_str("?");
1417 path.push_str(&query_params.join("&"));
1418 }
1419 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1420 }
1421
1422 pub async fn sublocations_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1429 let mut path = format!("/sublocations/v2/{}", urlencoding::encode(id).as_ref());
1430 let mut query_params = Vec::new();
1431 if let Some(p) = license_number {
1432 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1433 }
1434 if !query_params.is_empty() {
1435 path.push_str("?");
1436 path.push_str(&query_params.join("&"));
1437 }
1438 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1439 }
1440
1441 pub async fn sublocations_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1448 let mut path = format!("/sublocations/v2/active");
1449 let mut query_params = Vec::new();
1450 if let Some(p) = last_modified_end {
1451 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1452 }
1453 if let Some(p) = last_modified_start {
1454 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1455 }
1456 if let Some(p) = license_number {
1457 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1458 }
1459 if let Some(p) = page_number {
1460 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1461 }
1462 if let Some(p) = page_size {
1463 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1464 }
1465 if !query_params.is_empty() {
1466 path.push_str("?");
1467 path.push_str(&query_params.join("&"));
1468 }
1469 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1470 }
1471
1472 pub async fn sublocations_get_inactive_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1479 let mut path = format!("/sublocations/v2/inactive");
1480 let mut query_params = Vec::new();
1481 if let Some(p) = license_number {
1482 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1483 }
1484 if let Some(p) = page_number {
1485 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1486 }
1487 if let Some(p) = page_size {
1488 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1489 }
1490 if !query_params.is_empty() {
1491 path.push_str("?");
1492 path.push_str(&query_params.join("&"));
1493 }
1494 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1495 }
1496
1497 pub async fn sublocations_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1504 let mut path = format!("/sublocations/v2");
1505 let mut query_params = Vec::new();
1506 if let Some(p) = license_number {
1507 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1508 }
1509 if !query_params.is_empty() {
1510 path.push_str("?");
1511 path.push_str(&query_params.join("&"));
1512 }
1513 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1514 }
1515
1516 pub async fn facilities_get_all_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1523 let mut path = format!("/facilities/v1");
1524 let mut query_params = Vec::new();
1525 if let Some(p) = no {
1526 query_params.push(format!("No={}", urlencoding::encode(&p)));
1527 }
1528 if !query_params.is_empty() {
1529 path.push_str("?");
1530 path.push_str(&query_params.join("&"));
1531 }
1532 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1533 }
1534
1535 pub async fn facilities_get_all_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1542 let mut path = format!("/facilities/v2");
1543 let mut query_params = Vec::new();
1544 if let Some(p) = no {
1545 query_params.push(format!("No={}", urlencoding::encode(&p)));
1546 }
1547 if !query_params.is_empty() {
1548 path.push_str("?");
1549 path.push_str(&query_params.join("&"));
1550 }
1551 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1552 }
1553
1554 pub async fn harvests_create_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1560 let mut path = format!("/harvests/v1/finish");
1561 let mut query_params = Vec::new();
1562 if let Some(p) = license_number {
1563 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1564 }
1565 if !query_params.is_empty() {
1566 path.push_str("?");
1567 path.push_str(&query_params.join("&"));
1568 }
1569 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1570 }
1571
1572 pub async fn harvests_create_package_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1580 let mut path = format!("/harvests/v1/create/packages");
1581 let mut query_params = Vec::new();
1582 if let Some(p) = license_number {
1583 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1584 }
1585 if !query_params.is_empty() {
1586 path.push_str("?");
1587 path.push_str(&query_params.join("&"));
1588 }
1589 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1590 }
1591
1592 pub async fn harvests_create_package_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1602 let mut path = format!("/harvests/v2/packages");
1603 let mut query_params = Vec::new();
1604 if let Some(p) = license_number {
1605 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1606 }
1607 if !query_params.is_empty() {
1608 path.push_str("?");
1609 path.push_str(&query_params.join("&"));
1610 }
1611 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1612 }
1613
1614 pub async fn harvests_create_package_testing_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1622 let mut path = format!("/harvests/v1/create/packages/testing");
1623 let mut query_params = Vec::new();
1624 if let Some(p) = license_number {
1625 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1626 }
1627 if !query_params.is_empty() {
1628 path.push_str("?");
1629 path.push_str(&query_params.join("&"));
1630 }
1631 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1632 }
1633
1634 pub async fn harvests_create_package_testing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1644 let mut path = format!("/harvests/v2/packages/testing");
1645 let mut query_params = Vec::new();
1646 if let Some(p) = license_number {
1647 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1648 }
1649 if !query_params.is_empty() {
1650 path.push_str("?");
1651 path.push_str(&query_params.join("&"));
1652 }
1653 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1654 }
1655
1656 pub async fn harvests_create_remove_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1662 let mut path = format!("/harvests/v1/removewaste");
1663 let mut query_params = Vec::new();
1664 if let Some(p) = license_number {
1665 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1666 }
1667 if !query_params.is_empty() {
1668 path.push_str("?");
1669 path.push_str(&query_params.join("&"));
1670 }
1671 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1672 }
1673
1674 pub async fn harvests_create_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1680 let mut path = format!("/harvests/v1/unfinish");
1681 let mut query_params = Vec::new();
1682 if let Some(p) = license_number {
1683 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1684 }
1685 if !query_params.is_empty() {
1686 path.push_str("?");
1687 path.push_str(&query_params.join("&"));
1688 }
1689 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1690 }
1691
1692 pub async fn harvests_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1700 let mut path = format!("/harvests/v2/waste");
1701 let mut query_params = Vec::new();
1702 if let Some(p) = license_number {
1703 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1704 }
1705 if !query_params.is_empty() {
1706 path.push_str("?");
1707 path.push_str(&query_params.join("&"));
1708 }
1709 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1710 }
1711
1712 pub async fn harvests_delete_waste_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1720 let mut path = format!("/harvests/v2/waste/{}", urlencoding::encode(id).as_ref());
1721 let mut query_params = Vec::new();
1722 if let Some(p) = license_number {
1723 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1724 }
1725 if !query_params.is_empty() {
1726 path.push_str("?");
1727 path.push_str(&query_params.join("&"));
1728 }
1729 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1730 }
1731
1732 pub async fn harvests_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1737 let mut path = format!("/harvests/v1/{}", urlencoding::encode(id).as_ref());
1738 let mut query_params = Vec::new();
1739 if let Some(p) = license_number {
1740 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1741 }
1742 if !query_params.is_empty() {
1743 path.push_str("?");
1744 path.push_str(&query_params.join("&"));
1745 }
1746 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1747 }
1748
1749 pub async fn harvests_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1756 let mut path = format!("/harvests/v2/{}", urlencoding::encode(id).as_ref());
1757 let mut query_params = Vec::new();
1758 if let Some(p) = license_number {
1759 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1760 }
1761 if !query_params.is_empty() {
1762 path.push_str("?");
1763 path.push_str(&query_params.join("&"));
1764 }
1765 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1766 }
1767
1768 pub async fn harvests_get_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1773 let mut path = format!("/harvests/v1/active");
1774 let mut query_params = Vec::new();
1775 if let Some(p) = last_modified_end {
1776 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1777 }
1778 if let Some(p) = last_modified_start {
1779 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1780 }
1781 if let Some(p) = license_number {
1782 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1783 }
1784 if !query_params.is_empty() {
1785 path.push_str("?");
1786 path.push_str(&query_params.join("&"));
1787 }
1788 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1789 }
1790
1791 pub async fn harvests_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1798 let mut path = format!("/harvests/v2/active");
1799 let mut query_params = Vec::new();
1800 if let Some(p) = last_modified_end {
1801 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1802 }
1803 if let Some(p) = last_modified_start {
1804 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1805 }
1806 if let Some(p) = license_number {
1807 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1808 }
1809 if let Some(p) = page_number {
1810 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1811 }
1812 if let Some(p) = page_size {
1813 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1814 }
1815 if !query_params.is_empty() {
1816 path.push_str("?");
1817 path.push_str(&query_params.join("&"));
1818 }
1819 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1820 }
1821
1822 pub async fn harvests_get_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1827 let mut path = format!("/harvests/v1/inactive");
1828 let mut query_params = Vec::new();
1829 if let Some(p) = last_modified_end {
1830 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1831 }
1832 if let Some(p) = last_modified_start {
1833 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1834 }
1835 if let Some(p) = license_number {
1836 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1837 }
1838 if !query_params.is_empty() {
1839 path.push_str("?");
1840 path.push_str(&query_params.join("&"));
1841 }
1842 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1843 }
1844
1845 pub async fn harvests_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1852 let mut path = format!("/harvests/v2/inactive");
1853 let mut query_params = Vec::new();
1854 if let Some(p) = last_modified_end {
1855 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1856 }
1857 if let Some(p) = last_modified_start {
1858 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1859 }
1860 if let Some(p) = license_number {
1861 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1862 }
1863 if let Some(p) = page_number {
1864 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1865 }
1866 if let Some(p) = page_size {
1867 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1868 }
1869 if !query_params.is_empty() {
1870 path.push_str("?");
1871 path.push_str(&query_params.join("&"));
1872 }
1873 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1874 }
1875
1876 pub async fn harvests_get_onhold_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1881 let mut path = format!("/harvests/v1/onhold");
1882 let mut query_params = Vec::new();
1883 if let Some(p) = last_modified_end {
1884 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1885 }
1886 if let Some(p) = last_modified_start {
1887 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1888 }
1889 if let Some(p) = license_number {
1890 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1891 }
1892 if !query_params.is_empty() {
1893 path.push_str("?");
1894 path.push_str(&query_params.join("&"));
1895 }
1896 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1897 }
1898
1899 pub async fn harvests_get_onhold_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1906 let mut path = format!("/harvests/v2/onhold");
1907 let mut query_params = Vec::new();
1908 if let Some(p) = last_modified_end {
1909 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1910 }
1911 if let Some(p) = last_modified_start {
1912 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1913 }
1914 if let Some(p) = license_number {
1915 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1916 }
1917 if let Some(p) = page_number {
1918 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1919 }
1920 if let Some(p) = page_size {
1921 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1922 }
1923 if !query_params.is_empty() {
1924 path.push_str("?");
1925 path.push_str(&query_params.join("&"));
1926 }
1927 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1928 }
1929
1930 pub async fn harvests_get_waste_v2(&self, harvest_id: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1937 let mut path = format!("/harvests/v2/waste");
1938 let mut query_params = Vec::new();
1939 if let Some(p) = harvest_id {
1940 query_params.push(format!("harvestId={}", urlencoding::encode(&p)));
1941 }
1942 if let Some(p) = license_number {
1943 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1944 }
1945 if let Some(p) = page_number {
1946 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1947 }
1948 if let Some(p) = page_size {
1949 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1950 }
1951 if !query_params.is_empty() {
1952 path.push_str("?");
1953 path.push_str(&query_params.join("&"));
1954 }
1955 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1956 }
1957
1958 pub async fn harvests_get_waste_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1963 let mut path = format!("/harvests/v1/waste/types");
1964 let mut query_params = Vec::new();
1965 if let Some(p) = no {
1966 query_params.push(format!("No={}", urlencoding::encode(&p)));
1967 }
1968 if !query_params.is_empty() {
1969 path.push_str("?");
1970 path.push_str(&query_params.join("&"));
1971 }
1972 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1973 }
1974
1975 pub async fn harvests_get_waste_types_v2(&self, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1982 let mut path = format!("/harvests/v2/waste/types");
1983 let mut query_params = Vec::new();
1984 if let Some(p) = page_number {
1985 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1986 }
1987 if let Some(p) = page_size {
1988 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1989 }
1990 if !query_params.is_empty() {
1991 path.push_str("?");
1992 path.push_str(&query_params.join("&"));
1993 }
1994 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1995 }
1996
1997 pub async fn harvests_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2005 let mut path = format!("/harvests/v2/finish");
2006 let mut query_params = Vec::new();
2007 if let Some(p) = license_number {
2008 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2009 }
2010 if !query_params.is_empty() {
2011 path.push_str("?");
2012 path.push_str(&query_params.join("&"));
2013 }
2014 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2015 }
2016
2017 pub async fn harvests_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2025 let mut path = format!("/harvests/v2/location");
2026 let mut query_params = Vec::new();
2027 if let Some(p) = license_number {
2028 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2029 }
2030 if !query_params.is_empty() {
2031 path.push_str("?");
2032 path.push_str(&query_params.join("&"));
2033 }
2034 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2035 }
2036
2037 pub async fn harvests_update_move_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2043 let mut path = format!("/harvests/v1/move");
2044 let mut query_params = Vec::new();
2045 if let Some(p) = license_number {
2046 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2047 }
2048 if !query_params.is_empty() {
2049 path.push_str("?");
2050 path.push_str(&query_params.join("&"));
2051 }
2052 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2053 }
2054
2055 pub async fn harvests_update_rename_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2061 let mut path = format!("/harvests/v1/rename");
2062 let mut query_params = Vec::new();
2063 if let Some(p) = license_number {
2064 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2065 }
2066 if !query_params.is_empty() {
2067 path.push_str("?");
2068 path.push_str(&query_params.join("&"));
2069 }
2070 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2071 }
2072
2073 pub async fn harvests_update_rename_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2081 let mut path = format!("/harvests/v2/rename");
2082 let mut query_params = Vec::new();
2083 if let Some(p) = license_number {
2084 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2085 }
2086 if !query_params.is_empty() {
2087 path.push_str("?");
2088 path.push_str(&query_params.join("&"));
2089 }
2090 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2091 }
2092
2093 pub async fn harvests_update_restore_harvested_plants_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2101 let mut path = format!("/harvests/v2/restore/harvestedplants");
2102 let mut query_params = Vec::new();
2103 if let Some(p) = license_number {
2104 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2105 }
2106 if !query_params.is_empty() {
2107 path.push_str("?");
2108 path.push_str(&query_params.join("&"));
2109 }
2110 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2111 }
2112
2113 pub async fn harvests_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2121 let mut path = format!("/harvests/v2/unfinish");
2122 let mut query_params = Vec::new();
2123 if let Some(p) = license_number {
2124 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2125 }
2126 if !query_params.is_empty() {
2127 path.push_str("?");
2128 path.push_str(&query_params.join("&"));
2129 }
2130 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2131 }
2132
2133 pub async fn plant_batches_create_additives_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2138 let mut path = format!("/plantbatches/v1/additives");
2139 let mut query_params = Vec::new();
2140 if let Some(p) = license_number {
2141 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2142 }
2143 if !query_params.is_empty() {
2144 path.push_str("?");
2145 path.push_str(&query_params.join("&"));
2146 }
2147 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2148 }
2149
2150 pub async fn plant_batches_create_additives_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2157 let mut path = format!("/plantbatches/v2/additives");
2158 let mut query_params = Vec::new();
2159 if let Some(p) = license_number {
2160 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2161 }
2162 if !query_params.is_empty() {
2163 path.push_str("?");
2164 path.push_str(&query_params.join("&"));
2165 }
2166 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2167 }
2168
2169 pub async fn plant_batches_create_additives_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2176 let mut path = format!("/plantbatches/v2/additives/usingtemplate");
2177 let mut query_params = Vec::new();
2178 if let Some(p) = license_number {
2179 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2180 }
2181 if !query_params.is_empty() {
2182 path.push_str("?");
2183 path.push_str(&query_params.join("&"));
2184 }
2185 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2186 }
2187
2188 pub async fn plant_batches_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2194 let mut path = format!("/plantbatches/v1/adjust");
2195 let mut query_params = Vec::new();
2196 if let Some(p) = license_number {
2197 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2198 }
2199 if !query_params.is_empty() {
2200 path.push_str("?");
2201 path.push_str(&query_params.join("&"));
2202 }
2203 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2204 }
2205
2206 pub async fn plant_batches_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2214 let mut path = format!("/plantbatches/v2/adjust");
2215 let mut query_params = Vec::new();
2216 if let Some(p) = license_number {
2217 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2218 }
2219 if !query_params.is_empty() {
2220 path.push_str("?");
2221 path.push_str(&query_params.join("&"));
2222 }
2223 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2224 }
2225
2226 pub async fn plant_batches_create_changegrowthphase_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2234 let mut path = format!("/plantbatches/v1/changegrowthphase");
2235 let mut query_params = Vec::new();
2236 if let Some(p) = license_number {
2237 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2238 }
2239 if !query_params.is_empty() {
2240 path.push_str("?");
2241 path.push_str(&query_params.join("&"));
2242 }
2243 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2244 }
2245
2246 pub async fn plant_batches_create_growthphase_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2256 let mut path = format!("/plantbatches/v2/growthphase");
2257 let mut query_params = Vec::new();
2258 if let Some(p) = license_number {
2259 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2260 }
2261 if !query_params.is_empty() {
2262 path.push_str("?");
2263 path.push_str(&query_params.join("&"));
2264 }
2265 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2266 }
2267
2268 pub async fn plant_batches_create_package_v2(&self, is_from_mother_plant: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2278 let mut path = format!("/plantbatches/v2/packages");
2279 let mut query_params = Vec::new();
2280 if let Some(p) = is_from_mother_plant {
2281 query_params.push(format!("isFromMotherPlant={}", urlencoding::encode(&p)));
2282 }
2283 if let Some(p) = license_number {
2284 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2285 }
2286 if !query_params.is_empty() {
2287 path.push_str("?");
2288 path.push_str(&query_params.join("&"));
2289 }
2290 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2291 }
2292
2293 pub async fn plant_batches_create_package_frommotherplant_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2301 let mut path = format!("/plantbatches/v1/create/packages/frommotherplant");
2302 let mut query_params = Vec::new();
2303 if let Some(p) = license_number {
2304 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2305 }
2306 if !query_params.is_empty() {
2307 path.push_str("?");
2308 path.push_str(&query_params.join("&"));
2309 }
2310 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2311 }
2312
2313 pub async fn plant_batches_create_package_frommotherplant_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2323 let mut path = format!("/plantbatches/v2/packages/frommotherplant");
2324 let mut query_params = Vec::new();
2325 if let Some(p) = license_number {
2326 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2327 }
2328 if !query_params.is_empty() {
2329 path.push_str("?");
2330 path.push_str(&query_params.join("&"));
2331 }
2332 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2333 }
2334
2335 pub async fn plant_batches_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2343 let mut path = format!("/plantbatches/v2/plantings");
2344 let mut query_params = Vec::new();
2345 if let Some(p) = license_number {
2346 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2347 }
2348 if !query_params.is_empty() {
2349 path.push_str("?");
2350 path.push_str(&query_params.join("&"));
2351 }
2352 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2353 }
2354
2355 pub async fn plant_batches_create_split_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2361 let mut path = format!("/plantbatches/v1/split");
2362 let mut query_params = Vec::new();
2363 if let Some(p) = license_number {
2364 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2365 }
2366 if !query_params.is_empty() {
2367 path.push_str("?");
2368 path.push_str(&query_params.join("&"));
2369 }
2370 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2371 }
2372
2373 pub async fn plant_batches_create_split_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2381 let mut path = format!("/plantbatches/v2/split");
2382 let mut query_params = Vec::new();
2383 if let Some(p) = license_number {
2384 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2385 }
2386 if !query_params.is_empty() {
2387 path.push_str("?");
2388 path.push_str(&query_params.join("&"));
2389 }
2390 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2391 }
2392
2393 pub async fn plant_batches_create_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2398 let mut path = format!("/plantbatches/v1/waste");
2399 let mut query_params = Vec::new();
2400 if let Some(p) = license_number {
2401 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2402 }
2403 if !query_params.is_empty() {
2404 path.push_str("?");
2405 path.push_str(&query_params.join("&"));
2406 }
2407 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2408 }
2409
2410 pub async fn plant_batches_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2417 let mut path = format!("/plantbatches/v2/waste");
2418 let mut query_params = Vec::new();
2419 if let Some(p) = license_number {
2420 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2421 }
2422 if !query_params.is_empty() {
2423 path.push_str("?");
2424 path.push_str(&query_params.join("&"));
2425 }
2426 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2427 }
2428
2429 pub async fn plant_batches_createpackages_v1(&self, is_from_mother_plant: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2437 let mut path = format!("/plantbatches/v1/createpackages");
2438 let mut query_params = Vec::new();
2439 if let Some(p) = is_from_mother_plant {
2440 query_params.push(format!("isFromMotherPlant={}", urlencoding::encode(&p)));
2441 }
2442 if let Some(p) = license_number {
2443 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2444 }
2445 if !query_params.is_empty() {
2446 path.push_str("?");
2447 path.push_str(&query_params.join("&"));
2448 }
2449 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2450 }
2451
2452 pub async fn plant_batches_createplantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2458 let mut path = format!("/plantbatches/v1/createplantings");
2459 let mut query_params = Vec::new();
2460 if let Some(p) = license_number {
2461 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2462 }
2463 if !query_params.is_empty() {
2464 path.push_str("?");
2465 path.push_str(&query_params.join("&"));
2466 }
2467 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2468 }
2469
2470 pub async fn plant_batches_delete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2476 let mut path = format!("/plantbatches/v1");
2477 let mut query_params = Vec::new();
2478 if let Some(p) = license_number {
2479 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2480 }
2481 if !query_params.is_empty() {
2482 path.push_str("?");
2483 path.push_str(&query_params.join("&"));
2484 }
2485 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2486 }
2487
2488 pub async fn plant_batches_delete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2496 let mut path = format!("/plantbatches/v2");
2497 let mut query_params = Vec::new();
2498 if let Some(p) = license_number {
2499 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2500 }
2501 if !query_params.is_empty() {
2502 path.push_str("?");
2503 path.push_str(&query_params.join("&"));
2504 }
2505 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2506 }
2507
2508 pub async fn plant_batches_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2513 let mut path = format!("/plantbatches/v1/{}", urlencoding::encode(id).as_ref());
2514 let mut query_params = Vec::new();
2515 if let Some(p) = license_number {
2516 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2517 }
2518 if !query_params.is_empty() {
2519 path.push_str("?");
2520 path.push_str(&query_params.join("&"));
2521 }
2522 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2523 }
2524
2525 pub async fn plant_batches_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2532 let mut path = format!("/plantbatches/v2/{}", urlencoding::encode(id).as_ref());
2533 let mut query_params = Vec::new();
2534 if let Some(p) = license_number {
2535 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2536 }
2537 if !query_params.is_empty() {
2538 path.push_str("?");
2539 path.push_str(&query_params.join("&"));
2540 }
2541 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2542 }
2543
2544 pub async fn plant_batches_get_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2549 let mut path = format!("/plantbatches/v1/active");
2550 let mut query_params = Vec::new();
2551 if let Some(p) = last_modified_end {
2552 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2553 }
2554 if let Some(p) = last_modified_start {
2555 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2556 }
2557 if let Some(p) = license_number {
2558 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2559 }
2560 if !query_params.is_empty() {
2561 path.push_str("?");
2562 path.push_str(&query_params.join("&"));
2563 }
2564 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2565 }
2566
2567 pub async fn plant_batches_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2574 let mut path = format!("/plantbatches/v2/active");
2575 let mut query_params = Vec::new();
2576 if let Some(p) = last_modified_end {
2577 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2578 }
2579 if let Some(p) = last_modified_start {
2580 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2581 }
2582 if let Some(p) = license_number {
2583 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2584 }
2585 if let Some(p) = page_number {
2586 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2587 }
2588 if let Some(p) = page_size {
2589 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2590 }
2591 if !query_params.is_empty() {
2592 path.push_str("?");
2593 path.push_str(&query_params.join("&"));
2594 }
2595 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2596 }
2597
2598 pub async fn plant_batches_get_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2603 let mut path = format!("/plantbatches/v1/inactive");
2604 let mut query_params = Vec::new();
2605 if let Some(p) = last_modified_end {
2606 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2607 }
2608 if let Some(p) = last_modified_start {
2609 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2610 }
2611 if let Some(p) = license_number {
2612 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2613 }
2614 if !query_params.is_empty() {
2615 path.push_str("?");
2616 path.push_str(&query_params.join("&"));
2617 }
2618 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2619 }
2620
2621 pub async fn plant_batches_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2628 let mut path = format!("/plantbatches/v2/inactive");
2629 let mut query_params = Vec::new();
2630 if let Some(p) = last_modified_end {
2631 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2632 }
2633 if let Some(p) = last_modified_start {
2634 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2635 }
2636 if let Some(p) = license_number {
2637 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2638 }
2639 if let Some(p) = page_number {
2640 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2641 }
2642 if let Some(p) = page_size {
2643 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2644 }
2645 if !query_params.is_empty() {
2646 path.push_str("?");
2647 path.push_str(&query_params.join("&"));
2648 }
2649 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2650 }
2651
2652 pub async fn plant_batches_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2657 let mut path = format!("/plantbatches/v1/types");
2658 let mut query_params = Vec::new();
2659 if let Some(p) = no {
2660 query_params.push(format!("No={}", urlencoding::encode(&p)));
2661 }
2662 if !query_params.is_empty() {
2663 path.push_str("?");
2664 path.push_str(&query_params.join("&"));
2665 }
2666 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2667 }
2668
2669 pub async fn plant_batches_get_types_v2(&self, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2676 let mut path = format!("/plantbatches/v2/types");
2677 let mut query_params = Vec::new();
2678 if let Some(p) = page_number {
2679 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2680 }
2681 if let Some(p) = page_size {
2682 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2683 }
2684 if !query_params.is_empty() {
2685 path.push_str("?");
2686 path.push_str(&query_params.join("&"));
2687 }
2688 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2689 }
2690
2691 pub async fn plant_batches_get_waste_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2698 let mut path = format!("/plantbatches/v2/waste");
2699 let mut query_params = Vec::new();
2700 if let Some(p) = license_number {
2701 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2702 }
2703 if let Some(p) = page_number {
2704 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2705 }
2706 if let Some(p) = page_size {
2707 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2708 }
2709 if !query_params.is_empty() {
2710 path.push_str("?");
2711 path.push_str(&query_params.join("&"));
2712 }
2713 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2714 }
2715
2716 pub async fn plant_batches_get_waste_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2721 let mut path = format!("/plantbatches/v1/waste/reasons");
2722 let mut query_params = Vec::new();
2723 if let Some(p) = license_number {
2724 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2725 }
2726 if !query_params.is_empty() {
2727 path.push_str("?");
2728 path.push_str(&query_params.join("&"));
2729 }
2730 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2731 }
2732
2733 pub async fn plant_batches_get_waste_reasons_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2740 let mut path = format!("/plantbatches/v2/waste/reasons");
2741 let mut query_params = Vec::new();
2742 if let Some(p) = license_number {
2743 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2744 }
2745 if !query_params.is_empty() {
2746 path.push_str("?");
2747 path.push_str(&query_params.join("&"));
2748 }
2749 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2750 }
2751
2752 pub async fn plant_batches_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2760 let mut path = format!("/plantbatches/v2/location");
2761 let mut query_params = Vec::new();
2762 if let Some(p) = license_number {
2763 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2764 }
2765 if !query_params.is_empty() {
2766 path.push_str("?");
2767 path.push_str(&query_params.join("&"));
2768 }
2769 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2770 }
2771
2772 pub async fn plant_batches_update_moveplantbatches_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2777 let mut path = format!("/plantbatches/v1/moveplantbatches");
2778 let mut query_params = Vec::new();
2779 if let Some(p) = license_number {
2780 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2781 }
2782 if !query_params.is_empty() {
2783 path.push_str("?");
2784 path.push_str(&query_params.join("&"));
2785 }
2786 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2787 }
2788
2789 pub async fn plant_batches_update_name_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2797 let mut path = format!("/plantbatches/v2/name");
2798 let mut query_params = Vec::new();
2799 if let Some(p) = license_number {
2800 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2801 }
2802 if !query_params.is_empty() {
2803 path.push_str("?");
2804 path.push_str(&query_params.join("&"));
2805 }
2806 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2807 }
2808
2809 pub async fn plant_batches_update_strain_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2817 let mut path = format!("/plantbatches/v2/strain");
2818 let mut query_params = Vec::new();
2819 if let Some(p) = license_number {
2820 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2821 }
2822 if !query_params.is_empty() {
2823 path.push_str("?");
2824 path.push_str(&query_params.join("&"));
2825 }
2826 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2827 }
2828
2829 pub async fn plant_batches_update_tag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2837 let mut path = format!("/plantbatches/v2/tag");
2838 let mut query_params = Vec::new();
2839 if let Some(p) = license_number {
2840 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2841 }
2842 if !query_params.is_empty() {
2843 path.push_str("?");
2844 path.push_str(&query_params.join("&"));
2845 }
2846 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2847 }
2848
2849 pub async fn tags_get_package_available_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2856 let mut path = format!("/tags/v2/package/available");
2857 let mut query_params = Vec::new();
2858 if let Some(p) = license_number {
2859 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2860 }
2861 if !query_params.is_empty() {
2862 path.push_str("?");
2863 path.push_str(&query_params.join("&"));
2864 }
2865 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2866 }
2867
2868 pub async fn tags_get_plant_available_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2875 let mut path = format!("/tags/v2/plant/available");
2876 let mut query_params = Vec::new();
2877 if let Some(p) = license_number {
2878 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2879 }
2880 if !query_params.is_empty() {
2881 path.push_str("?");
2882 path.push_str(&query_params.join("&"));
2883 }
2884 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2885 }
2886
2887 pub async fn tags_get_staged_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2895 let mut path = format!("/tags/v2/staged");
2896 let mut query_params = Vec::new();
2897 if let Some(p) = license_number {
2898 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2899 }
2900 if !query_params.is_empty() {
2901 path.push_str("?");
2902 path.push_str(&query_params.join("&"));
2903 }
2904 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2905 }
2906
2907 pub async fn transfers_create_external_incoming_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2912 let mut path = format!("/transfers/v1/external/incoming");
2913 let mut query_params = Vec::new();
2914 if let Some(p) = license_number {
2915 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2916 }
2917 if !query_params.is_empty() {
2918 path.push_str("?");
2919 path.push_str(&query_params.join("&"));
2920 }
2921 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2922 }
2923
2924 pub async fn transfers_create_external_incoming_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2931 let mut path = format!("/transfers/v2/external/incoming");
2932 let mut query_params = Vec::new();
2933 if let Some(p) = license_number {
2934 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2935 }
2936 if !query_params.is_empty() {
2937 path.push_str("?");
2938 path.push_str(&query_params.join("&"));
2939 }
2940 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2941 }
2942
2943 pub async fn transfers_create_templates_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2948 let mut path = format!("/transfers/v1/templates");
2949 let mut query_params = Vec::new();
2950 if let Some(p) = license_number {
2951 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2952 }
2953 if !query_params.is_empty() {
2954 path.push_str("?");
2955 path.push_str(&query_params.join("&"));
2956 }
2957 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2958 }
2959
2960 pub async fn transfers_create_templates_outgoing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2967 let mut path = format!("/transfers/v2/templates/outgoing");
2968 let mut query_params = Vec::new();
2969 if let Some(p) = license_number {
2970 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2971 }
2972 if !query_params.is_empty() {
2973 path.push_str("?");
2974 path.push_str(&query_params.join("&"));
2975 }
2976 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2977 }
2978
2979 pub async fn transfers_delete_external_incoming_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2984 let mut path = format!("/transfers/v1/external/incoming/{}", urlencoding::encode(id).as_ref());
2985 let mut query_params = Vec::new();
2986 if let Some(p) = license_number {
2987 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2988 }
2989 if !query_params.is_empty() {
2990 path.push_str("?");
2991 path.push_str(&query_params.join("&"));
2992 }
2993 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2994 }
2995
2996 pub async fn transfers_delete_external_incoming_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3003 let mut path = format!("/transfers/v2/external/incoming/{}", urlencoding::encode(id).as_ref());
3004 let mut query_params = Vec::new();
3005 if let Some(p) = license_number {
3006 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3007 }
3008 if !query_params.is_empty() {
3009 path.push_str("?");
3010 path.push_str(&query_params.join("&"));
3011 }
3012 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3013 }
3014
3015 pub async fn transfers_delete_templates_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3020 let mut path = format!("/transfers/v1/templates/{}", urlencoding::encode(id).as_ref());
3021 let mut query_params = Vec::new();
3022 if let Some(p) = license_number {
3023 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3024 }
3025 if !query_params.is_empty() {
3026 path.push_str("?");
3027 path.push_str(&query_params.join("&"));
3028 }
3029 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3030 }
3031
3032 pub async fn transfers_delete_templates_outgoing_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3039 let mut path = format!("/transfers/v2/templates/outgoing/{}", urlencoding::encode(id).as_ref());
3040 let mut query_params = Vec::new();
3041 if let Some(p) = license_number {
3042 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3043 }
3044 if !query_params.is_empty() {
3045 path.push_str("?");
3046 path.push_str(&query_params.join("&"));
3047 }
3048 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3049 }
3050
3051 pub async fn transfers_get_deliveries_packages_states_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3056 let mut path = format!("/transfers/v1/deliveries/packages/states");
3057 let mut query_params = Vec::new();
3058 if let Some(p) = no {
3059 query_params.push(format!("No={}", urlencoding::encode(&p)));
3060 }
3061 if !query_params.is_empty() {
3062 path.push_str("?");
3063 path.push_str(&query_params.join("&"));
3064 }
3065 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3066 }
3067
3068 pub async fn transfers_get_deliveries_packages_states_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3075 let mut path = format!("/transfers/v2/deliveries/packages/states");
3076 let mut query_params = Vec::new();
3077 if let Some(p) = no {
3078 query_params.push(format!("No={}", urlencoding::encode(&p)));
3079 }
3080 if !query_params.is_empty() {
3081 path.push_str("?");
3082 path.push_str(&query_params.join("&"));
3083 }
3084 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3085 }
3086
3087 pub async fn transfers_get_delivery_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3094 let mut path = format!("/transfers/v1/{}/deliveries", urlencoding::encode(id).as_ref());
3095 let mut query_params = Vec::new();
3096 if let Some(p) = no {
3097 query_params.push(format!("No={}", urlencoding::encode(&p)));
3098 }
3099 if !query_params.is_empty() {
3100 path.push_str("?");
3101 path.push_str(&query_params.join("&"));
3102 }
3103 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3104 }
3105
3106 pub async fn transfers_get_delivery_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3114 let mut path = format!("/transfers/v2/{}/deliveries", urlencoding::encode(id).as_ref());
3115 let mut query_params = Vec::new();
3116 if let Some(p) = page_number {
3117 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3118 }
3119 if let Some(p) = page_size {
3120 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3121 }
3122 if !query_params.is_empty() {
3123 path.push_str("?");
3124 path.push_str(&query_params.join("&"));
3125 }
3126 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3127 }
3128
3129 pub async fn transfers_get_delivery_package_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3136 let mut path = format!("/transfers/v1/deliveries/{}/packages", urlencoding::encode(id).as_ref());
3137 let mut query_params = Vec::new();
3138 if let Some(p) = no {
3139 query_params.push(format!("No={}", urlencoding::encode(&p)));
3140 }
3141 if !query_params.is_empty() {
3142 path.push_str("?");
3143 path.push_str(&query_params.join("&"));
3144 }
3145 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3146 }
3147
3148 pub async fn transfers_get_delivery_package_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3156 let mut path = format!("/transfers/v2/deliveries/{}/packages", urlencoding::encode(id).as_ref());
3157 let mut query_params = Vec::new();
3158 if let Some(p) = page_number {
3159 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3160 }
3161 if let Some(p) = page_size {
3162 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3163 }
3164 if !query_params.is_empty() {
3165 path.push_str("?");
3166 path.push_str(&query_params.join("&"));
3167 }
3168 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3169 }
3170
3171 pub async fn transfers_get_delivery_package_requiredlabtestbatches_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3178 let mut path = format!("/transfers/v1/deliveries/package/{}/requiredlabtestbatches", urlencoding::encode(id).as_ref());
3179 let mut query_params = Vec::new();
3180 if let Some(p) = no {
3181 query_params.push(format!("No={}", urlencoding::encode(&p)));
3182 }
3183 if !query_params.is_empty() {
3184 path.push_str("?");
3185 path.push_str(&query_params.join("&"));
3186 }
3187 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3188 }
3189
3190 pub async fn transfers_get_delivery_package_requiredlabtestbatches_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3198 let mut path = format!("/transfers/v2/deliveries/package/{}/requiredlabtestbatches", urlencoding::encode(id).as_ref());
3199 let mut query_params = Vec::new();
3200 if let Some(p) = page_number {
3201 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3202 }
3203 if let Some(p) = page_size {
3204 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3205 }
3206 if !query_params.is_empty() {
3207 path.push_str("?");
3208 path.push_str(&query_params.join("&"));
3209 }
3210 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3211 }
3212
3213 pub async fn transfers_get_delivery_package_wholesale_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3220 let mut path = format!("/transfers/v1/deliveries/{}/packages/wholesale", urlencoding::encode(id).as_ref());
3221 let mut query_params = Vec::new();
3222 if let Some(p) = no {
3223 query_params.push(format!("No={}", urlencoding::encode(&p)));
3224 }
3225 if !query_params.is_empty() {
3226 path.push_str("?");
3227 path.push_str(&query_params.join("&"));
3228 }
3229 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3230 }
3231
3232 pub async fn transfers_get_delivery_package_wholesale_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3240 let mut path = format!("/transfers/v2/deliveries/{}/packages/wholesale", urlencoding::encode(id).as_ref());
3241 let mut query_params = Vec::new();
3242 if let Some(p) = page_number {
3243 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3244 }
3245 if let Some(p) = page_size {
3246 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3247 }
3248 if !query_params.is_empty() {
3249 path.push_str("?");
3250 path.push_str(&query_params.join("&"));
3251 }
3252 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3253 }
3254
3255 pub async fn transfers_get_delivery_transporters_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3262 let mut path = format!("/transfers/v1/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
3263 let mut query_params = Vec::new();
3264 if let Some(p) = no {
3265 query_params.push(format!("No={}", urlencoding::encode(&p)));
3266 }
3267 if !query_params.is_empty() {
3268 path.push_str("?");
3269 path.push_str(&query_params.join("&"));
3270 }
3271 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3272 }
3273
3274 pub async fn transfers_get_delivery_transporters_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3282 let mut path = format!("/transfers/v2/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
3283 let mut query_params = Vec::new();
3284 if let Some(p) = page_number {
3285 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3286 }
3287 if let Some(p) = page_size {
3288 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3289 }
3290 if !query_params.is_empty() {
3291 path.push_str("?");
3292 path.push_str(&query_params.join("&"));
3293 }
3294 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3295 }
3296
3297 pub async fn transfers_get_delivery_transporters_details_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3304 let mut path = format!("/transfers/v1/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
3305 let mut query_params = Vec::new();
3306 if let Some(p) = no {
3307 query_params.push(format!("No={}", urlencoding::encode(&p)));
3308 }
3309 if !query_params.is_empty() {
3310 path.push_str("?");
3311 path.push_str(&query_params.join("&"));
3312 }
3313 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3314 }
3315
3316 pub async fn transfers_get_delivery_transporters_details_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3324 let mut path = format!("/transfers/v2/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
3325 let mut query_params = Vec::new();
3326 if let Some(p) = page_number {
3327 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3328 }
3329 if let Some(p) = page_size {
3330 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3331 }
3332 if !query_params.is_empty() {
3333 path.push_str("?");
3334 path.push_str(&query_params.join("&"));
3335 }
3336 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3337 }
3338
3339 pub async fn transfers_get_hub_v2(&self, estimated_arrival_end: Option<String>, estimated_arrival_start: Option<String>, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3347 let mut path = format!("/transfers/v2/hub");
3348 let mut query_params = Vec::new();
3349 if let Some(p) = estimated_arrival_end {
3350 query_params.push(format!("estimatedArrivalEnd={}", urlencoding::encode(&p)));
3351 }
3352 if let Some(p) = estimated_arrival_start {
3353 query_params.push(format!("estimatedArrivalStart={}", urlencoding::encode(&p)));
3354 }
3355 if let Some(p) = last_modified_end {
3356 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3357 }
3358 if let Some(p) = last_modified_start {
3359 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3360 }
3361 if let Some(p) = license_number {
3362 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3363 }
3364 if let Some(p) = page_number {
3365 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3366 }
3367 if let Some(p) = page_size {
3368 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3369 }
3370 if !query_params.is_empty() {
3371 path.push_str("?");
3372 path.push_str(&query_params.join("&"));
3373 }
3374 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3375 }
3376
3377 pub async fn transfers_get_incoming_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3382 let mut path = format!("/transfers/v1/incoming");
3383 let mut query_params = Vec::new();
3384 if let Some(p) = last_modified_end {
3385 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3386 }
3387 if let Some(p) = last_modified_start {
3388 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3389 }
3390 if let Some(p) = license_number {
3391 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3392 }
3393 if !query_params.is_empty() {
3394 path.push_str("?");
3395 path.push_str(&query_params.join("&"));
3396 }
3397 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3398 }
3399
3400 pub async fn transfers_get_incoming_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3408 let mut path = format!("/transfers/v2/incoming");
3409 let mut query_params = Vec::new();
3410 if let Some(p) = last_modified_end {
3411 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3412 }
3413 if let Some(p) = last_modified_start {
3414 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3415 }
3416 if let Some(p) = license_number {
3417 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3418 }
3419 if let Some(p) = page_number {
3420 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3421 }
3422 if let Some(p) = page_size {
3423 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3424 }
3425 if !query_params.is_empty() {
3426 path.push_str("?");
3427 path.push_str(&query_params.join("&"));
3428 }
3429 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3430 }
3431
3432 pub async fn transfers_get_outgoing_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3437 let mut path = format!("/transfers/v1/outgoing");
3438 let mut query_params = Vec::new();
3439 if let Some(p) = last_modified_end {
3440 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3441 }
3442 if let Some(p) = last_modified_start {
3443 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3444 }
3445 if let Some(p) = license_number {
3446 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3447 }
3448 if !query_params.is_empty() {
3449 path.push_str("?");
3450 path.push_str(&query_params.join("&"));
3451 }
3452 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3453 }
3454
3455 pub async fn transfers_get_outgoing_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3463 let mut path = format!("/transfers/v2/outgoing");
3464 let mut query_params = Vec::new();
3465 if let Some(p) = last_modified_end {
3466 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3467 }
3468 if let Some(p) = last_modified_start {
3469 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3470 }
3471 if let Some(p) = license_number {
3472 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3473 }
3474 if let Some(p) = page_number {
3475 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3476 }
3477 if let Some(p) = page_size {
3478 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3479 }
3480 if !query_params.is_empty() {
3481 path.push_str("?");
3482 path.push_str(&query_params.join("&"));
3483 }
3484 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3485 }
3486
3487 pub async fn transfers_get_rejected_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3492 let mut path = format!("/transfers/v1/rejected");
3493 let mut query_params = Vec::new();
3494 if let Some(p) = license_number {
3495 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3496 }
3497 if !query_params.is_empty() {
3498 path.push_str("?");
3499 path.push_str(&query_params.join("&"));
3500 }
3501 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3502 }
3503
3504 pub async fn transfers_get_rejected_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3512 let mut path = format!("/transfers/v2/rejected");
3513 let mut query_params = Vec::new();
3514 if let Some(p) = license_number {
3515 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3516 }
3517 if let Some(p) = page_number {
3518 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3519 }
3520 if let Some(p) = page_size {
3521 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3522 }
3523 if !query_params.is_empty() {
3524 path.push_str("?");
3525 path.push_str(&query_params.join("&"));
3526 }
3527 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3528 }
3529
3530 pub async fn transfers_get_templates_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3535 let mut path = format!("/transfers/v1/templates");
3536 let mut query_params = Vec::new();
3537 if let Some(p) = last_modified_end {
3538 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3539 }
3540 if let Some(p) = last_modified_start {
3541 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3542 }
3543 if let Some(p) = license_number {
3544 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3545 }
3546 if !query_params.is_empty() {
3547 path.push_str("?");
3548 path.push_str(&query_params.join("&"));
3549 }
3550 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3551 }
3552
3553 pub async fn transfers_get_templates_delivery_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3558 let mut path = format!("/transfers/v1/templates/{}/deliveries", urlencoding::encode(id).as_ref());
3559 let mut query_params = Vec::new();
3560 if let Some(p) = no {
3561 query_params.push(format!("No={}", urlencoding::encode(&p)));
3562 }
3563 if !query_params.is_empty() {
3564 path.push_str("?");
3565 path.push_str(&query_params.join("&"));
3566 }
3567 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3568 }
3569
3570 pub async fn transfers_get_templates_delivery_package_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3577 let mut path = format!("/transfers/v1/templates/deliveries/{}/packages", urlencoding::encode(id).as_ref());
3578 let mut query_params = Vec::new();
3579 if let Some(p) = no {
3580 query_params.push(format!("No={}", urlencoding::encode(&p)));
3581 }
3582 if !query_params.is_empty() {
3583 path.push_str("?");
3584 path.push_str(&query_params.join("&"));
3585 }
3586 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3587 }
3588
3589 pub async fn transfers_get_templates_delivery_transporters_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3596 let mut path = format!("/transfers/v1/templates/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
3597 let mut query_params = Vec::new();
3598 if let Some(p) = no {
3599 query_params.push(format!("No={}", urlencoding::encode(&p)));
3600 }
3601 if !query_params.is_empty() {
3602 path.push_str("?");
3603 path.push_str(&query_params.join("&"));
3604 }
3605 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3606 }
3607
3608 pub async fn transfers_get_templates_delivery_transporters_details_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3615 let mut path = format!("/transfers/v1/templates/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
3616 let mut query_params = Vec::new();
3617 if let Some(p) = no {
3618 query_params.push(format!("No={}", urlencoding::encode(&p)));
3619 }
3620 if !query_params.is_empty() {
3621 path.push_str("?");
3622 path.push_str(&query_params.join("&"));
3623 }
3624 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3625 }
3626
3627 pub async fn transfers_get_templates_outgoing_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3635 let mut path = format!("/transfers/v2/templates/outgoing");
3636 let mut query_params = Vec::new();
3637 if let Some(p) = last_modified_end {
3638 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3639 }
3640 if let Some(p) = last_modified_start {
3641 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3642 }
3643 if let Some(p) = license_number {
3644 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3645 }
3646 if let Some(p) = page_number {
3647 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3648 }
3649 if let Some(p) = page_size {
3650 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3651 }
3652 if !query_params.is_empty() {
3653 path.push_str("?");
3654 path.push_str(&query_params.join("&"));
3655 }
3656 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3657 }
3658
3659 pub async fn transfers_get_templates_outgoing_delivery_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3667 let mut path = format!("/transfers/v2/templates/outgoing/{}/deliveries", urlencoding::encode(id).as_ref());
3668 let mut query_params = Vec::new();
3669 if let Some(p) = page_number {
3670 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3671 }
3672 if let Some(p) = page_size {
3673 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3674 }
3675 if !query_params.is_empty() {
3676 path.push_str("?");
3677 path.push_str(&query_params.join("&"));
3678 }
3679 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3680 }
3681
3682 pub async fn transfers_get_templates_outgoing_delivery_package_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3690 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/packages", urlencoding::encode(id).as_ref());
3691 let mut query_params = Vec::new();
3692 if let Some(p) = page_number {
3693 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3694 }
3695 if let Some(p) = page_size {
3696 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3697 }
3698 if !query_params.is_empty() {
3699 path.push_str("?");
3700 path.push_str(&query_params.join("&"));
3701 }
3702 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3703 }
3704
3705 pub async fn transfers_get_templates_outgoing_delivery_transporters_v2(&self, id: &str, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3713 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
3714 let mut query_params = Vec::new();
3715 if let Some(p) = page_number {
3716 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3717 }
3718 if let Some(p) = page_size {
3719 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3720 }
3721 if !query_params.is_empty() {
3722 path.push_str("?");
3723 path.push_str(&query_params.join("&"));
3724 }
3725 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3726 }
3727
3728 pub async fn transfers_get_templates_outgoing_delivery_transporters_details_v2(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3736 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
3737 let mut query_params = Vec::new();
3738 if let Some(p) = no {
3739 query_params.push(format!("No={}", urlencoding::encode(&p)));
3740 }
3741 if !query_params.is_empty() {
3742 path.push_str("?");
3743 path.push_str(&query_params.join("&"));
3744 }
3745 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3746 }
3747
3748 pub async fn transfers_get_types_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3753 let mut path = format!("/transfers/v1/types");
3754 let mut query_params = Vec::new();
3755 if let Some(p) = license_number {
3756 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3757 }
3758 if !query_params.is_empty() {
3759 path.push_str("?");
3760 path.push_str(&query_params.join("&"));
3761 }
3762 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3763 }
3764
3765 pub async fn transfers_get_types_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3772 let mut path = format!("/transfers/v2/types");
3773 let mut query_params = Vec::new();
3774 if let Some(p) = license_number {
3775 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3776 }
3777 if let Some(p) = page_number {
3778 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3779 }
3780 if let Some(p) = page_size {
3781 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3782 }
3783 if !query_params.is_empty() {
3784 path.push_str("?");
3785 path.push_str(&query_params.join("&"));
3786 }
3787 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3788 }
3789
3790 pub async fn transfers_update_external_incoming_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3795 let mut path = format!("/transfers/v1/external/incoming");
3796 let mut query_params = Vec::new();
3797 if let Some(p) = license_number {
3798 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3799 }
3800 if !query_params.is_empty() {
3801 path.push_str("?");
3802 path.push_str(&query_params.join("&"));
3803 }
3804 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3805 }
3806
3807 pub async fn transfers_update_external_incoming_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3814 let mut path = format!("/transfers/v2/external/incoming");
3815 let mut query_params = Vec::new();
3816 if let Some(p) = license_number {
3817 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3818 }
3819 if !query_params.is_empty() {
3820 path.push_str("?");
3821 path.push_str(&query_params.join("&"));
3822 }
3823 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3824 }
3825
3826 pub async fn transfers_update_templates_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3831 let mut path = format!("/transfers/v1/templates");
3832 let mut query_params = Vec::new();
3833 if let Some(p) = license_number {
3834 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3835 }
3836 if !query_params.is_empty() {
3837 path.push_str("?");
3838 path.push_str(&query_params.join("&"));
3839 }
3840 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3841 }
3842
3843 pub async fn transfers_update_templates_outgoing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3850 let mut path = format!("/transfers/v2/templates/outgoing");
3851 let mut query_params = Vec::new();
3852 if let Some(p) = license_number {
3853 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3854 }
3855 if !query_params.is_empty() {
3856 path.push_str("?");
3857 path.push_str(&query_params.join("&"));
3858 }
3859 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3860 }
3861
3862 pub async fn units_of_measure_get_active_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3867 let mut path = format!("/unitsofmeasure/v1/active");
3868 let mut query_params = Vec::new();
3869 if let Some(p) = no {
3870 query_params.push(format!("No={}", urlencoding::encode(&p)));
3871 }
3872 if !query_params.is_empty() {
3873 path.push_str("?");
3874 path.push_str(&query_params.join("&"));
3875 }
3876 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3877 }
3878
3879 pub async fn units_of_measure_get_active_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3886 let mut path = format!("/unitsofmeasure/v2/active");
3887 let mut query_params = Vec::new();
3888 if let Some(p) = no {
3889 query_params.push(format!("No={}", urlencoding::encode(&p)));
3890 }
3891 if !query_params.is_empty() {
3892 path.push_str("?");
3893 path.push_str(&query_params.join("&"));
3894 }
3895 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3896 }
3897
3898 pub async fn units_of_measure_get_inactive_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3905 let mut path = format!("/unitsofmeasure/v2/inactive");
3906 let mut query_params = Vec::new();
3907 if let Some(p) = no {
3908 query_params.push(format!("No={}", urlencoding::encode(&p)));
3909 }
3910 if !query_params.is_empty() {
3911 path.push_str("?");
3912 path.push_str(&query_params.join("&"));
3913 }
3914 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3915 }
3916
3917 pub async fn waste_methods_get_all_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3924 let mut path = format!("/wastemethods/v2");
3925 let mut query_params = Vec::new();
3926 if let Some(p) = no {
3927 query_params.push(format!("No={}", urlencoding::encode(&p)));
3928 }
3929 if !query_params.is_empty() {
3930 path.push_str("?");
3931 path.push_str(&query_params.join("&"));
3932 }
3933 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3934 }
3935
3936 pub async fn caregivers_status_get_by_caregiver_license_number_v1(&self, caregiver_license_number: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3943 let mut path = format!("/caregivers/v1/status/{}", urlencoding::encode(caregiver_license_number).as_ref());
3944 let mut query_params = Vec::new();
3945 if let Some(p) = license_number {
3946 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3947 }
3948 if !query_params.is_empty() {
3949 path.push_str("?");
3950 path.push_str(&query_params.join("&"));
3951 }
3952 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3953 }
3954
3955 pub async fn caregivers_status_get_by_caregiver_license_number_v2(&self, caregiver_license_number: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3962 let mut path = format!("/caregivers/v2/status/{}", urlencoding::encode(caregiver_license_number).as_ref());
3963 let mut query_params = Vec::new();
3964 if let Some(p) = license_number {
3965 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3966 }
3967 if !query_params.is_empty() {
3968 path.push_str("?");
3969 path.push_str(&query_params.join("&"));
3970 }
3971 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3972 }
3973
3974 pub async fn employees_get_all_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3979 let mut path = format!("/employees/v1");
3980 let mut query_params = Vec::new();
3981 if let Some(p) = license_number {
3982 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3983 }
3984 if !query_params.is_empty() {
3985 path.push_str("?");
3986 path.push_str(&query_params.join("&"));
3987 }
3988 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3989 }
3990
3991 pub async fn employees_get_all_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3999 let mut path = format!("/employees/v2");
4000 let mut query_params = Vec::new();
4001 if let Some(p) = license_number {
4002 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4003 }
4004 if let Some(p) = page_number {
4005 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4006 }
4007 if let Some(p) = page_size {
4008 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4009 }
4010 if !query_params.is_empty() {
4011 path.push_str("?");
4012 path.push_str(&query_params.join("&"));
4013 }
4014 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4015 }
4016
4017 pub async fn employees_get_permissions_v2(&self, employee_license_number: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4024 let mut path = format!("/employees/v2/permissions");
4025 let mut query_params = Vec::new();
4026 if let Some(p) = employee_license_number {
4027 query_params.push(format!("employeeLicenseNumber={}", urlencoding::encode(&p)));
4028 }
4029 if let Some(p) = license_number {
4030 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4031 }
4032 if !query_params.is_empty() {
4033 path.push_str("?");
4034 path.push_str(&query_params.join("&"));
4035 }
4036 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4037 }
4038
4039 pub async fn items_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4046 let mut path = format!("/items/v1/create");
4047 let mut query_params = Vec::new();
4048 if let Some(p) = license_number {
4049 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4050 }
4051 if !query_params.is_empty() {
4052 path.push_str("?");
4053 path.push_str(&query_params.join("&"));
4054 }
4055 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4056 }
4057
4058 pub async fn items_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4065 let mut path = format!("/items/v2");
4066 let mut query_params = Vec::new();
4067 if let Some(p) = license_number {
4068 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4069 }
4070 if !query_params.is_empty() {
4071 path.push_str("?");
4072 path.push_str(&query_params.join("&"));
4073 }
4074 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4075 }
4076
4077 pub async fn items_create_brand_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4084 let mut path = format!("/items/v2/brand");
4085 let mut query_params = Vec::new();
4086 if let Some(p) = license_number {
4087 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4088 }
4089 if !query_params.is_empty() {
4090 path.push_str("?");
4091 path.push_str(&query_params.join("&"));
4092 }
4093 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4094 }
4095
4096 pub async fn items_create_file_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4103 let mut path = format!("/items/v2/file");
4104 let mut query_params = Vec::new();
4105 if let Some(p) = license_number {
4106 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4107 }
4108 if !query_params.is_empty() {
4109 path.push_str("?");
4110 path.push_str(&query_params.join("&"));
4111 }
4112 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4113 }
4114
4115 pub async fn items_create_photo_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4122 let mut path = format!("/items/v1/photo");
4123 let mut query_params = Vec::new();
4124 if let Some(p) = license_number {
4125 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4126 }
4127 if !query_params.is_empty() {
4128 path.push_str("?");
4129 path.push_str(&query_params.join("&"));
4130 }
4131 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4132 }
4133
4134 pub async fn items_create_photo_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4141 let mut path = format!("/items/v2/photo");
4142 let mut query_params = Vec::new();
4143 if let Some(p) = license_number {
4144 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4145 }
4146 if !query_params.is_empty() {
4147 path.push_str("?");
4148 path.push_str(&query_params.join("&"));
4149 }
4150 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4151 }
4152
4153 pub async fn items_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4158 let mut path = format!("/items/v1/update");
4159 let mut query_params = Vec::new();
4160 if let Some(p) = license_number {
4161 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4162 }
4163 if !query_params.is_empty() {
4164 path.push_str("?");
4165 path.push_str(&query_params.join("&"));
4166 }
4167 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4168 }
4169
4170 pub async fn items_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4175 let mut path = format!("/items/v1/{}", urlencoding::encode(id).as_ref());
4176 let mut query_params = Vec::new();
4177 if let Some(p) = license_number {
4178 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4179 }
4180 if !query_params.is_empty() {
4181 path.push_str("?");
4182 path.push_str(&query_params.join("&"));
4183 }
4184 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4185 }
4186
4187 pub async fn items_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4194 let mut path = format!("/items/v2/{}", urlencoding::encode(id).as_ref());
4195 let mut query_params = Vec::new();
4196 if let Some(p) = license_number {
4197 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4198 }
4199 if !query_params.is_empty() {
4200 path.push_str("?");
4201 path.push_str(&query_params.join("&"));
4202 }
4203 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4204 }
4205
4206 pub async fn items_delete_brand_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4213 let mut path = format!("/items/v2/brand/{}", urlencoding::encode(id).as_ref());
4214 let mut query_params = Vec::new();
4215 if let Some(p) = license_number {
4216 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4217 }
4218 if !query_params.is_empty() {
4219 path.push_str("?");
4220 path.push_str(&query_params.join("&"));
4221 }
4222 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4223 }
4224
4225 pub async fn items_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4230 let mut path = format!("/items/v1/{}", urlencoding::encode(id).as_ref());
4231 let mut query_params = Vec::new();
4232 if let Some(p) = license_number {
4233 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4234 }
4235 if !query_params.is_empty() {
4236 path.push_str("?");
4237 path.push_str(&query_params.join("&"));
4238 }
4239 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4240 }
4241
4242 pub async fn items_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4249 let mut path = format!("/items/v2/{}", urlencoding::encode(id).as_ref());
4250 let mut query_params = Vec::new();
4251 if let Some(p) = license_number {
4252 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4253 }
4254 if !query_params.is_empty() {
4255 path.push_str("?");
4256 path.push_str(&query_params.join("&"));
4257 }
4258 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4259 }
4260
4261 pub async fn items_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4266 let mut path = format!("/items/v1/active");
4267 let mut query_params = Vec::new();
4268 if let Some(p) = license_number {
4269 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4270 }
4271 if !query_params.is_empty() {
4272 path.push_str("?");
4273 path.push_str(&query_params.join("&"));
4274 }
4275 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4276 }
4277
4278 pub async fn items_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4285 let mut path = format!("/items/v2/active");
4286 let mut query_params = Vec::new();
4287 if let Some(p) = last_modified_end {
4288 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4289 }
4290 if let Some(p) = last_modified_start {
4291 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4292 }
4293 if let Some(p) = license_number {
4294 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4295 }
4296 if let Some(p) = page_number {
4297 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4298 }
4299 if let Some(p) = page_size {
4300 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4301 }
4302 if !query_params.is_empty() {
4303 path.push_str("?");
4304 path.push_str(&query_params.join("&"));
4305 }
4306 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4307 }
4308
4309 pub async fn items_get_brands_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4314 let mut path = format!("/items/v1/brands");
4315 let mut query_params = Vec::new();
4316 if let Some(p) = license_number {
4317 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4318 }
4319 if !query_params.is_empty() {
4320 path.push_str("?");
4321 path.push_str(&query_params.join("&"));
4322 }
4323 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4324 }
4325
4326 pub async fn items_get_brands_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4333 let mut path = format!("/items/v2/brands");
4334 let mut query_params = Vec::new();
4335 if let Some(p) = license_number {
4336 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4337 }
4338 if let Some(p) = page_number {
4339 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4340 }
4341 if let Some(p) = page_size {
4342 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4343 }
4344 if !query_params.is_empty() {
4345 path.push_str("?");
4346 path.push_str(&query_params.join("&"));
4347 }
4348 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4349 }
4350
4351 pub async fn items_get_categories_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4356 let mut path = format!("/items/v1/categories");
4357 let mut query_params = Vec::new();
4358 if let Some(p) = license_number {
4359 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4360 }
4361 if !query_params.is_empty() {
4362 path.push_str("?");
4363 path.push_str(&query_params.join("&"));
4364 }
4365 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4366 }
4367
4368 pub async fn items_get_categories_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4375 let mut path = format!("/items/v2/categories");
4376 let mut query_params = Vec::new();
4377 if let Some(p) = license_number {
4378 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4379 }
4380 if let Some(p) = page_number {
4381 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4382 }
4383 if let Some(p) = page_size {
4384 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4385 }
4386 if !query_params.is_empty() {
4387 path.push_str("?");
4388 path.push_str(&query_params.join("&"));
4389 }
4390 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4391 }
4392
4393 pub async fn items_get_file_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4400 let mut path = format!("/items/v2/file/{}", urlencoding::encode(id).as_ref());
4401 let mut query_params = Vec::new();
4402 if let Some(p) = license_number {
4403 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4404 }
4405 if !query_params.is_empty() {
4406 path.push_str("?");
4407 path.push_str(&query_params.join("&"));
4408 }
4409 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4410 }
4411
4412 pub async fn items_get_inactive_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4417 let mut path = format!("/items/v1/inactive");
4418 let mut query_params = Vec::new();
4419 if let Some(p) = license_number {
4420 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4421 }
4422 if !query_params.is_empty() {
4423 path.push_str("?");
4424 path.push_str(&query_params.join("&"));
4425 }
4426 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4427 }
4428
4429 pub async fn items_get_inactive_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4436 let mut path = format!("/items/v2/inactive");
4437 let mut query_params = Vec::new();
4438 if let Some(p) = license_number {
4439 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4440 }
4441 if let Some(p) = page_number {
4442 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4443 }
4444 if let Some(p) = page_size {
4445 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4446 }
4447 if !query_params.is_empty() {
4448 path.push_str("?");
4449 path.push_str(&query_params.join("&"));
4450 }
4451 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4452 }
4453
4454 pub async fn items_get_photo_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4459 let mut path = format!("/items/v1/photo/{}", urlencoding::encode(id).as_ref());
4460 let mut query_params = Vec::new();
4461 if let Some(p) = license_number {
4462 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4463 }
4464 if !query_params.is_empty() {
4465 path.push_str("?");
4466 path.push_str(&query_params.join("&"));
4467 }
4468 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4469 }
4470
4471 pub async fn items_get_photo_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4478 let mut path = format!("/items/v2/photo/{}", urlencoding::encode(id).as_ref());
4479 let mut query_params = Vec::new();
4480 if let Some(p) = license_number {
4481 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4482 }
4483 if !query_params.is_empty() {
4484 path.push_str("?");
4485 path.push_str(&query_params.join("&"));
4486 }
4487 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4488 }
4489
4490 pub async fn items_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4497 let mut path = format!("/items/v2");
4498 let mut query_params = Vec::new();
4499 if let Some(p) = license_number {
4500 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4501 }
4502 if !query_params.is_empty() {
4503 path.push_str("?");
4504 path.push_str(&query_params.join("&"));
4505 }
4506 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4507 }
4508
4509 pub async fn items_update_brand_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4516 let mut path = format!("/items/v2/brand");
4517 let mut query_params = Vec::new();
4518 if let Some(p) = license_number {
4519 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4520 }
4521 if !query_params.is_empty() {
4522 path.push_str("?");
4523 path.push_str(&query_params.join("&"));
4524 }
4525 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4526 }
4527
4528 pub async fn locations_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4533 let mut path = format!("/locations/v1/create");
4534 let mut query_params = Vec::new();
4535 if let Some(p) = license_number {
4536 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4537 }
4538 if !query_params.is_empty() {
4539 path.push_str("?");
4540 path.push_str(&query_params.join("&"));
4541 }
4542 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4543 }
4544
4545 pub async fn locations_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4552 let mut path = format!("/locations/v2");
4553 let mut query_params = Vec::new();
4554 if let Some(p) = license_number {
4555 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4556 }
4557 if !query_params.is_empty() {
4558 path.push_str("?");
4559 path.push_str(&query_params.join("&"));
4560 }
4561 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4562 }
4563
4564 pub async fn locations_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4569 let mut path = format!("/locations/v1/update");
4570 let mut query_params = Vec::new();
4571 if let Some(p) = license_number {
4572 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4573 }
4574 if !query_params.is_empty() {
4575 path.push_str("?");
4576 path.push_str(&query_params.join("&"));
4577 }
4578 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4579 }
4580
4581 pub async fn locations_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4586 let mut path = format!("/locations/v1/{}", urlencoding::encode(id).as_ref());
4587 let mut query_params = Vec::new();
4588 if let Some(p) = license_number {
4589 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4590 }
4591 if !query_params.is_empty() {
4592 path.push_str("?");
4593 path.push_str(&query_params.join("&"));
4594 }
4595 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4596 }
4597
4598 pub async fn locations_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4605 let mut path = format!("/locations/v2/{}", urlencoding::encode(id).as_ref());
4606 let mut query_params = Vec::new();
4607 if let Some(p) = license_number {
4608 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4609 }
4610 if !query_params.is_empty() {
4611 path.push_str("?");
4612 path.push_str(&query_params.join("&"));
4613 }
4614 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4615 }
4616
4617 pub async fn locations_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4622 let mut path = format!("/locations/v1/{}", urlencoding::encode(id).as_ref());
4623 let mut query_params = Vec::new();
4624 if let Some(p) = license_number {
4625 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4626 }
4627 if !query_params.is_empty() {
4628 path.push_str("?");
4629 path.push_str(&query_params.join("&"));
4630 }
4631 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4632 }
4633
4634 pub async fn locations_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4641 let mut path = format!("/locations/v2/{}", urlencoding::encode(id).as_ref());
4642 let mut query_params = Vec::new();
4643 if let Some(p) = license_number {
4644 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4645 }
4646 if !query_params.is_empty() {
4647 path.push_str("?");
4648 path.push_str(&query_params.join("&"));
4649 }
4650 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4651 }
4652
4653 pub async fn locations_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4658 let mut path = format!("/locations/v1/active");
4659 let mut query_params = Vec::new();
4660 if let Some(p) = license_number {
4661 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4662 }
4663 if !query_params.is_empty() {
4664 path.push_str("?");
4665 path.push_str(&query_params.join("&"));
4666 }
4667 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4668 }
4669
4670 pub async fn locations_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4677 let mut path = format!("/locations/v2/active");
4678 let mut query_params = Vec::new();
4679 if let Some(p) = last_modified_end {
4680 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4681 }
4682 if let Some(p) = last_modified_start {
4683 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4684 }
4685 if let Some(p) = license_number {
4686 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4687 }
4688 if let Some(p) = page_number {
4689 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4690 }
4691 if let Some(p) = page_size {
4692 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4693 }
4694 if !query_params.is_empty() {
4695 path.push_str("?");
4696 path.push_str(&query_params.join("&"));
4697 }
4698 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4699 }
4700
4701 pub async fn locations_get_inactive_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4708 let mut path = format!("/locations/v2/inactive");
4709 let mut query_params = Vec::new();
4710 if let Some(p) = license_number {
4711 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4712 }
4713 if let Some(p) = page_number {
4714 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4715 }
4716 if let Some(p) = page_size {
4717 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4718 }
4719 if !query_params.is_empty() {
4720 path.push_str("?");
4721 path.push_str(&query_params.join("&"));
4722 }
4723 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4724 }
4725
4726 pub async fn locations_get_types_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4731 let mut path = format!("/locations/v1/types");
4732 let mut query_params = Vec::new();
4733 if let Some(p) = license_number {
4734 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4735 }
4736 if !query_params.is_empty() {
4737 path.push_str("?");
4738 path.push_str(&query_params.join("&"));
4739 }
4740 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4741 }
4742
4743 pub async fn locations_get_types_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4750 let mut path = format!("/locations/v2/types");
4751 let mut query_params = Vec::new();
4752 if let Some(p) = license_number {
4753 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4754 }
4755 if let Some(p) = page_number {
4756 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4757 }
4758 if let Some(p) = page_size {
4759 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4760 }
4761 if !query_params.is_empty() {
4762 path.push_str("?");
4763 path.push_str(&query_params.join("&"));
4764 }
4765 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4766 }
4767
4768 pub async fn locations_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4775 let mut path = format!("/locations/v2");
4776 let mut query_params = Vec::new();
4777 if let Some(p) = license_number {
4778 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4779 }
4780 if !query_params.is_empty() {
4781 path.push_str("?");
4782 path.push_str(&query_params.join("&"));
4783 }
4784 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4785 }
4786
4787 pub async fn packages_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4793 let mut path = format!("/packages/v1/create");
4794 let mut query_params = Vec::new();
4795 if let Some(p) = license_number {
4796 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4797 }
4798 if !query_params.is_empty() {
4799 path.push_str("?");
4800 path.push_str(&query_params.join("&"));
4801 }
4802 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4803 }
4804
4805 pub async fn packages_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4813 let mut path = format!("/packages/v2");
4814 let mut query_params = Vec::new();
4815 if let Some(p) = license_number {
4816 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4817 }
4818 if !query_params.is_empty() {
4819 path.push_str("?");
4820 path.push_str(&query_params.join("&"));
4821 }
4822 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4823 }
4824
4825 pub async fn packages_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4831 let mut path = format!("/packages/v1/adjust");
4832 let mut query_params = Vec::new();
4833 if let Some(p) = license_number {
4834 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4835 }
4836 if !query_params.is_empty() {
4837 path.push_str("?");
4838 path.push_str(&query_params.join("&"));
4839 }
4840 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4841 }
4842
4843 pub async fn packages_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4851 let mut path = format!("/packages/v2/adjust");
4852 let mut query_params = Vec::new();
4853 if let Some(p) = license_number {
4854 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4855 }
4856 if !query_params.is_empty() {
4857 path.push_str("?");
4858 path.push_str(&query_params.join("&"));
4859 }
4860 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4861 }
4862
4863 pub async fn packages_create_change_item_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4869 let mut path = format!("/packages/v1/change/item");
4870 let mut query_params = Vec::new();
4871 if let Some(p) = license_number {
4872 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4873 }
4874 if !query_params.is_empty() {
4875 path.push_str("?");
4876 path.push_str(&query_params.join("&"));
4877 }
4878 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4879 }
4880
4881 pub async fn packages_create_change_location_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4887 let mut path = format!("/packages/v1/change/locations");
4888 let mut query_params = Vec::new();
4889 if let Some(p) = license_number {
4890 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4891 }
4892 if !query_params.is_empty() {
4893 path.push_str("?");
4894 path.push_str(&query_params.join("&"));
4895 }
4896 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4897 }
4898
4899 pub async fn packages_create_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4905 let mut path = format!("/packages/v1/finish");
4906 let mut query_params = Vec::new();
4907 if let Some(p) = license_number {
4908 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4909 }
4910 if !query_params.is_empty() {
4911 path.push_str("?");
4912 path.push_str(&query_params.join("&"));
4913 }
4914 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4915 }
4916
4917 pub async fn packages_create_plantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4925 let mut path = format!("/packages/v1/create/plantings");
4926 let mut query_params = Vec::new();
4927 if let Some(p) = license_number {
4928 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4929 }
4930 if !query_params.is_empty() {
4931 path.push_str("?");
4932 path.push_str(&query_params.join("&"));
4933 }
4934 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4935 }
4936
4937 pub async fn packages_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4947 let mut path = format!("/packages/v2/plantings");
4948 let mut query_params = Vec::new();
4949 if let Some(p) = license_number {
4950 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4951 }
4952 if !query_params.is_empty() {
4953 path.push_str("?");
4954 path.push_str(&query_params.join("&"));
4955 }
4956 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4957 }
4958
4959 pub async fn packages_create_remediate_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4965 let mut path = format!("/packages/v1/remediate");
4966 let mut query_params = Vec::new();
4967 if let Some(p) = license_number {
4968 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4969 }
4970 if !query_params.is_empty() {
4971 path.push_str("?");
4972 path.push_str(&query_params.join("&"));
4973 }
4974 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4975 }
4976
4977 pub async fn packages_create_testing_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4983 let mut path = format!("/packages/v1/create/testing");
4984 let mut query_params = Vec::new();
4985 if let Some(p) = license_number {
4986 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4987 }
4988 if !query_params.is_empty() {
4989 path.push_str("?");
4990 path.push_str(&query_params.join("&"));
4991 }
4992 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4993 }
4994
4995 pub async fn packages_create_testing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5003 let mut path = format!("/packages/v2/testing");
5004 let mut query_params = Vec::new();
5005 if let Some(p) = license_number {
5006 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5007 }
5008 if !query_params.is_empty() {
5009 path.push_str("?");
5010 path.push_str(&query_params.join("&"));
5011 }
5012 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5013 }
5014
5015 pub async fn packages_create_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5021 let mut path = format!("/packages/v1/unfinish");
5022 let mut query_params = Vec::new();
5023 if let Some(p) = license_number {
5024 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5025 }
5026 if !query_params.is_empty() {
5027 path.push_str("?");
5028 path.push_str(&query_params.join("&"));
5029 }
5030 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5031 }
5032
5033 pub async fn packages_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5041 let mut path = format!("/packages/v2/{}", urlencoding::encode(id).as_ref());
5042 let mut query_params = Vec::new();
5043 if let Some(p) = license_number {
5044 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5045 }
5046 if !query_params.is_empty() {
5047 path.push_str("?");
5048 path.push_str(&query_params.join("&"));
5049 }
5050 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5051 }
5052
5053 pub async fn packages_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5058 let mut path = format!("/packages/v1/{}", urlencoding::encode(id).as_ref());
5059 let mut query_params = Vec::new();
5060 if let Some(p) = license_number {
5061 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5062 }
5063 if !query_params.is_empty() {
5064 path.push_str("?");
5065 path.push_str(&query_params.join("&"));
5066 }
5067 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5068 }
5069
5070 pub async fn packages_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5077 let mut path = format!("/packages/v2/{}", urlencoding::encode(id).as_ref());
5078 let mut query_params = Vec::new();
5079 if let Some(p) = license_number {
5080 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5081 }
5082 if !query_params.is_empty() {
5083 path.push_str("?");
5084 path.push_str(&query_params.join("&"));
5085 }
5086 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5087 }
5088
5089 pub async fn packages_get_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5094 let mut path = format!("/packages/v1/active");
5095 let mut query_params = Vec::new();
5096 if let Some(p) = last_modified_end {
5097 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5098 }
5099 if let Some(p) = last_modified_start {
5100 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5101 }
5102 if let Some(p) = license_number {
5103 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5104 }
5105 if !query_params.is_empty() {
5106 path.push_str("?");
5107 path.push_str(&query_params.join("&"));
5108 }
5109 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5110 }
5111
5112 pub async fn packages_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5119 let mut path = format!("/packages/v2/active");
5120 let mut query_params = Vec::new();
5121 if let Some(p) = last_modified_end {
5122 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5123 }
5124 if let Some(p) = last_modified_start {
5125 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5126 }
5127 if let Some(p) = license_number {
5128 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5129 }
5130 if let Some(p) = page_number {
5131 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5132 }
5133 if let Some(p) = page_size {
5134 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5135 }
5136 if !query_params.is_empty() {
5137 path.push_str("?");
5138 path.push_str(&query_params.join("&"));
5139 }
5140 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5141 }
5142
5143 pub async fn packages_get_adjust_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5148 let mut path = format!("/packages/v1/adjust/reasons");
5149 let mut query_params = Vec::new();
5150 if let Some(p) = license_number {
5151 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5152 }
5153 if !query_params.is_empty() {
5154 path.push_str("?");
5155 path.push_str(&query_params.join("&"));
5156 }
5157 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5158 }
5159
5160 pub async fn packages_get_adjust_reasons_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5167 let mut path = format!("/packages/v2/adjust/reasons");
5168 let mut query_params = Vec::new();
5169 if let Some(p) = license_number {
5170 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5171 }
5172 if let Some(p) = page_number {
5173 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5174 }
5175 if let Some(p) = page_size {
5176 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5177 }
5178 if !query_params.is_empty() {
5179 path.push_str("?");
5180 path.push_str(&query_params.join("&"));
5181 }
5182 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5183 }
5184
5185 pub async fn packages_get_by_label_v1(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5190 let mut path = format!("/packages/v1/{}", urlencoding::encode(label).as_ref());
5191 let mut query_params = Vec::new();
5192 if let Some(p) = license_number {
5193 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5194 }
5195 if !query_params.is_empty() {
5196 path.push_str("?");
5197 path.push_str(&query_params.join("&"));
5198 }
5199 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5200 }
5201
5202 pub async fn packages_get_by_label_v2(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5209 let mut path = format!("/packages/v2/{}", urlencoding::encode(label).as_ref());
5210 let mut query_params = Vec::new();
5211 if let Some(p) = license_number {
5212 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5213 }
5214 if !query_params.is_empty() {
5215 path.push_str("?");
5216 path.push_str(&query_params.join("&"));
5217 }
5218 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5219 }
5220
5221 pub async fn packages_get_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5226 let mut path = format!("/packages/v1/inactive");
5227 let mut query_params = Vec::new();
5228 if let Some(p) = last_modified_end {
5229 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5230 }
5231 if let Some(p) = last_modified_start {
5232 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5233 }
5234 if let Some(p) = license_number {
5235 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5236 }
5237 if !query_params.is_empty() {
5238 path.push_str("?");
5239 path.push_str(&query_params.join("&"));
5240 }
5241 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5242 }
5243
5244 pub async fn packages_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5251 let mut path = format!("/packages/v2/inactive");
5252 let mut query_params = Vec::new();
5253 if let Some(p) = last_modified_end {
5254 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5255 }
5256 if let Some(p) = last_modified_start {
5257 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5258 }
5259 if let Some(p) = license_number {
5260 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5261 }
5262 if let Some(p) = page_number {
5263 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5264 }
5265 if let Some(p) = page_size {
5266 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5267 }
5268 if !query_params.is_empty() {
5269 path.push_str("?");
5270 path.push_str(&query_params.join("&"));
5271 }
5272 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5273 }
5274
5275 pub async fn packages_get_intransit_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5282 let mut path = format!("/packages/v2/intransit");
5283 let mut query_params = Vec::new();
5284 if let Some(p) = last_modified_end {
5285 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5286 }
5287 if let Some(p) = last_modified_start {
5288 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5289 }
5290 if let Some(p) = license_number {
5291 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5292 }
5293 if let Some(p) = page_number {
5294 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5295 }
5296 if let Some(p) = page_size {
5297 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5298 }
5299 if !query_params.is_empty() {
5300 path.push_str("?");
5301 path.push_str(&query_params.join("&"));
5302 }
5303 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5304 }
5305
5306 pub async fn packages_get_labsamples_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5313 let mut path = format!("/packages/v2/labsamples");
5314 let mut query_params = Vec::new();
5315 if let Some(p) = last_modified_end {
5316 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5317 }
5318 if let Some(p) = last_modified_start {
5319 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5320 }
5321 if let Some(p) = license_number {
5322 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5323 }
5324 if let Some(p) = page_number {
5325 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5326 }
5327 if let Some(p) = page_size {
5328 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5329 }
5330 if !query_params.is_empty() {
5331 path.push_str("?");
5332 path.push_str(&query_params.join("&"));
5333 }
5334 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5335 }
5336
5337 pub async fn packages_get_onhold_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5342 let mut path = format!("/packages/v1/onhold");
5343 let mut query_params = Vec::new();
5344 if let Some(p) = last_modified_end {
5345 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5346 }
5347 if let Some(p) = last_modified_start {
5348 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5349 }
5350 if let Some(p) = license_number {
5351 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5352 }
5353 if !query_params.is_empty() {
5354 path.push_str("?");
5355 path.push_str(&query_params.join("&"));
5356 }
5357 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5358 }
5359
5360 pub async fn packages_get_onhold_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5367 let mut path = format!("/packages/v2/onhold");
5368 let mut query_params = Vec::new();
5369 if let Some(p) = last_modified_end {
5370 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5371 }
5372 if let Some(p) = last_modified_start {
5373 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5374 }
5375 if let Some(p) = license_number {
5376 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5377 }
5378 if let Some(p) = page_number {
5379 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5380 }
5381 if let Some(p) = page_size {
5382 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5383 }
5384 if !query_params.is_empty() {
5385 path.push_str("?");
5386 path.push_str(&query_params.join("&"));
5387 }
5388 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5389 }
5390
5391 pub async fn packages_get_source_harvest_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5398 let mut path = format!("/packages/v2/{}/source/harvests", urlencoding::encode(id).as_ref());
5399 let mut query_params = Vec::new();
5400 if let Some(p) = license_number {
5401 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5402 }
5403 if !query_params.is_empty() {
5404 path.push_str("?");
5405 path.push_str(&query_params.join("&"));
5406 }
5407 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5408 }
5409
5410 pub async fn packages_get_transferred_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5417 let mut path = format!("/packages/v2/transferred");
5418 let mut query_params = Vec::new();
5419 if let Some(p) = last_modified_end {
5420 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5421 }
5422 if let Some(p) = last_modified_start {
5423 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5424 }
5425 if let Some(p) = license_number {
5426 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5427 }
5428 if let Some(p) = page_number {
5429 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5430 }
5431 if let Some(p) = page_size {
5432 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5433 }
5434 if !query_params.is_empty() {
5435 path.push_str("?");
5436 path.push_str(&query_params.join("&"));
5437 }
5438 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5439 }
5440
5441 pub async fn packages_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5446 let mut path = format!("/packages/v1/types");
5447 let mut query_params = Vec::new();
5448 if let Some(p) = no {
5449 query_params.push(format!("No={}", urlencoding::encode(&p)));
5450 }
5451 if !query_params.is_empty() {
5452 path.push_str("?");
5453 path.push_str(&query_params.join("&"));
5454 }
5455 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5456 }
5457
5458 pub async fn packages_get_types_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5465 let mut path = format!("/packages/v2/types");
5466 let mut query_params = Vec::new();
5467 if let Some(p) = no {
5468 query_params.push(format!("No={}", urlencoding::encode(&p)));
5469 }
5470 if !query_params.is_empty() {
5471 path.push_str("?");
5472 path.push_str(&query_params.join("&"));
5473 }
5474 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5475 }
5476
5477 pub async fn packages_update_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5485 let mut path = format!("/packages/v2/adjust");
5486 let mut query_params = Vec::new();
5487 if let Some(p) = license_number {
5488 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5489 }
5490 if !query_params.is_empty() {
5491 path.push_str("?");
5492 path.push_str(&query_params.join("&"));
5493 }
5494 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5495 }
5496
5497 pub async fn packages_update_change_note_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5504 let mut path = format!("/packages/v1/change/note");
5505 let mut query_params = Vec::new();
5506 if let Some(p) = license_number {
5507 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5508 }
5509 if !query_params.is_empty() {
5510 path.push_str("?");
5511 path.push_str(&query_params.join("&"));
5512 }
5513 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5514 }
5515
5516 pub async fn packages_update_decontaminate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5524 let mut path = format!("/packages/v2/decontaminate");
5525 let mut query_params = Vec::new();
5526 if let Some(p) = license_number {
5527 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5528 }
5529 if !query_params.is_empty() {
5530 path.push_str("?");
5531 path.push_str(&query_params.join("&"));
5532 }
5533 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5534 }
5535
5536 pub async fn packages_update_donation_flag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5544 let mut path = format!("/packages/v2/donation/flag");
5545 let mut query_params = Vec::new();
5546 if let Some(p) = license_number {
5547 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5548 }
5549 if !query_params.is_empty() {
5550 path.push_str("?");
5551 path.push_str(&query_params.join("&"));
5552 }
5553 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5554 }
5555
5556 pub async fn packages_update_donation_unflag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5564 let mut path = format!("/packages/v2/donation/unflag");
5565 let mut query_params = Vec::new();
5566 if let Some(p) = license_number {
5567 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5568 }
5569 if !query_params.is_empty() {
5570 path.push_str("?");
5571 path.push_str(&query_params.join("&"));
5572 }
5573 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5574 }
5575
5576 pub async fn packages_update_externalid_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5585 let mut path = format!("/packages/v2/externalid");
5586 let mut query_params = Vec::new();
5587 if let Some(p) = license_number {
5588 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5589 }
5590 if !query_params.is_empty() {
5591 path.push_str("?");
5592 path.push_str(&query_params.join("&"));
5593 }
5594 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5595 }
5596
5597 pub async fn packages_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5605 let mut path = format!("/packages/v2/finish");
5606 let mut query_params = Vec::new();
5607 if let Some(p) = license_number {
5608 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5609 }
5610 if !query_params.is_empty() {
5611 path.push_str("?");
5612 path.push_str(&query_params.join("&"));
5613 }
5614 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5615 }
5616
5617 pub async fn packages_update_item_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5625 let mut path = format!("/packages/v2/item");
5626 let mut query_params = Vec::new();
5627 if let Some(p) = license_number {
5628 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5629 }
5630 if !query_params.is_empty() {
5631 path.push_str("?");
5632 path.push_str(&query_params.join("&"));
5633 }
5634 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5635 }
5636
5637 pub async fn packages_update_lab_test_required_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5645 let mut path = format!("/packages/v2/labtests/required");
5646 let mut query_params = Vec::new();
5647 if let Some(p) = license_number {
5648 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5649 }
5650 if !query_params.is_empty() {
5651 path.push_str("?");
5652 path.push_str(&query_params.join("&"));
5653 }
5654 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5655 }
5656
5657 pub async fn packages_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5665 let mut path = format!("/packages/v2/location");
5666 let mut query_params = Vec::new();
5667 if let Some(p) = license_number {
5668 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5669 }
5670 if !query_params.is_empty() {
5671 path.push_str("?");
5672 path.push_str(&query_params.join("&"));
5673 }
5674 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5675 }
5676
5677 pub async fn packages_update_note_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5686 let mut path = format!("/packages/v2/note");
5687 let mut query_params = Vec::new();
5688 if let Some(p) = license_number {
5689 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5690 }
5691 if !query_params.is_empty() {
5692 path.push_str("?");
5693 path.push_str(&query_params.join("&"));
5694 }
5695 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5696 }
5697
5698 pub async fn packages_update_remediate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5706 let mut path = format!("/packages/v2/remediate");
5707 let mut query_params = Vec::new();
5708 if let Some(p) = license_number {
5709 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5710 }
5711 if !query_params.is_empty() {
5712 path.push_str("?");
5713 path.push_str(&query_params.join("&"));
5714 }
5715 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5716 }
5717
5718 pub async fn packages_update_tradesample_flag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5726 let mut path = format!("/packages/v2/tradesample/flag");
5727 let mut query_params = Vec::new();
5728 if let Some(p) = license_number {
5729 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5730 }
5731 if !query_params.is_empty() {
5732 path.push_str("?");
5733 path.push_str(&query_params.join("&"));
5734 }
5735 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5736 }
5737
5738 pub async fn packages_update_tradesample_unflag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5746 let mut path = format!("/packages/v2/tradesample/unflag");
5747 let mut query_params = Vec::new();
5748 if let Some(p) = license_number {
5749 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5750 }
5751 if !query_params.is_empty() {
5752 path.push_str("?");
5753 path.push_str(&query_params.join("&"));
5754 }
5755 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5756 }
5757
5758 pub async fn packages_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5766 let mut path = format!("/packages/v2/unfinish");
5767 let mut query_params = Vec::new();
5768 if let Some(p) = license_number {
5769 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5770 }
5771 if !query_params.is_empty() {
5772 path.push_str("?");
5773 path.push_str(&query_params.join("&"));
5774 }
5775 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5776 }
5777
5778 pub async fn packages_update_usebydate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5786 let mut path = format!("/packages/v2/usebydate");
5787 let mut query_params = Vec::new();
5788 if let Some(p) = license_number {
5789 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5790 }
5791 if !query_params.is_empty() {
5792 path.push_str("?");
5793 path.push_str(&query_params.join("&"));
5794 }
5795 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5796 }
5797
5798 pub async fn patient_check_ins_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5803 let mut path = format!("/patient-checkins/v1");
5804 let mut query_params = Vec::new();
5805 if let Some(p) = license_number {
5806 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5807 }
5808 if !query_params.is_empty() {
5809 path.push_str("?");
5810 path.push_str(&query_params.join("&"));
5811 }
5812 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5813 }
5814
5815 pub async fn patient_check_ins_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5822 let mut path = format!("/patient-checkins/v2");
5823 let mut query_params = Vec::new();
5824 if let Some(p) = license_number {
5825 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5826 }
5827 if !query_params.is_empty() {
5828 path.push_str("?");
5829 path.push_str(&query_params.join("&"));
5830 }
5831 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5832 }
5833
5834 pub async fn patient_check_ins_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5839 let mut path = format!("/patient-checkins/v1/{}", urlencoding::encode(id).as_ref());
5840 let mut query_params = Vec::new();
5841 if let Some(p) = license_number {
5842 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5843 }
5844 if !query_params.is_empty() {
5845 path.push_str("?");
5846 path.push_str(&query_params.join("&"));
5847 }
5848 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5849 }
5850
5851 pub async fn patient_check_ins_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5858 let mut path = format!("/patient-checkins/v2/{}", urlencoding::encode(id).as_ref());
5859 let mut query_params = Vec::new();
5860 if let Some(p) = license_number {
5861 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5862 }
5863 if !query_params.is_empty() {
5864 path.push_str("?");
5865 path.push_str(&query_params.join("&"));
5866 }
5867 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5868 }
5869
5870 pub async fn patient_check_ins_get_all_v1(&self, checkin_date_end: Option<String>, checkin_date_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5875 let mut path = format!("/patient-checkins/v1");
5876 let mut query_params = Vec::new();
5877 if let Some(p) = checkin_date_end {
5878 query_params.push(format!("checkinDateEnd={}", urlencoding::encode(&p)));
5879 }
5880 if let Some(p) = checkin_date_start {
5881 query_params.push(format!("checkinDateStart={}", urlencoding::encode(&p)));
5882 }
5883 if let Some(p) = license_number {
5884 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5885 }
5886 if !query_params.is_empty() {
5887 path.push_str("?");
5888 path.push_str(&query_params.join("&"));
5889 }
5890 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5891 }
5892
5893 pub async fn patient_check_ins_get_all_v2(&self, checkin_date_end: Option<String>, checkin_date_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5900 let mut path = format!("/patient-checkins/v2");
5901 let mut query_params = Vec::new();
5902 if let Some(p) = checkin_date_end {
5903 query_params.push(format!("checkinDateEnd={}", urlencoding::encode(&p)));
5904 }
5905 if let Some(p) = checkin_date_start {
5906 query_params.push(format!("checkinDateStart={}", urlencoding::encode(&p)));
5907 }
5908 if let Some(p) = license_number {
5909 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5910 }
5911 if !query_params.is_empty() {
5912 path.push_str("?");
5913 path.push_str(&query_params.join("&"));
5914 }
5915 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5916 }
5917
5918 pub async fn patient_check_ins_get_locations_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5923 let mut path = format!("/patient-checkins/v1/locations");
5924 let mut query_params = Vec::new();
5925 if let Some(p) = no {
5926 query_params.push(format!("No={}", urlencoding::encode(&p)));
5927 }
5928 if !query_params.is_empty() {
5929 path.push_str("?");
5930 path.push_str(&query_params.join("&"));
5931 }
5932 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5933 }
5934
5935 pub async fn patient_check_ins_get_locations_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5942 let mut path = format!("/patient-checkins/v2/locations");
5943 let mut query_params = Vec::new();
5944 if let Some(p) = no {
5945 query_params.push(format!("No={}", urlencoding::encode(&p)));
5946 }
5947 if !query_params.is_empty() {
5948 path.push_str("?");
5949 path.push_str(&query_params.join("&"));
5950 }
5951 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5952 }
5953
5954 pub async fn patient_check_ins_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5959 let mut path = format!("/patient-checkins/v1");
5960 let mut query_params = Vec::new();
5961 if let Some(p) = license_number {
5962 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5963 }
5964 if !query_params.is_empty() {
5965 path.push_str("?");
5966 path.push_str(&query_params.join("&"));
5967 }
5968 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5969 }
5970
5971 pub async fn patient_check_ins_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5978 let mut path = format!("/patient-checkins/v2");
5979 let mut query_params = Vec::new();
5980 if let Some(p) = license_number {
5981 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5982 }
5983 if !query_params.is_empty() {
5984 path.push_str("?");
5985 path.push_str(&query_params.join("&"));
5986 }
5987 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5988 }
5989
5990 pub async fn patients_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5997 let mut path = format!("/patients/v2");
5998 let mut query_params = Vec::new();
5999 if let Some(p) = license_number {
6000 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6001 }
6002 if !query_params.is_empty() {
6003 path.push_str("?");
6004 path.push_str(&query_params.join("&"));
6005 }
6006 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6007 }
6008
6009 pub async fn patients_create_add_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6014 let mut path = format!("/patients/v1/add");
6015 let mut query_params = Vec::new();
6016 if let Some(p) = license_number {
6017 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6018 }
6019 if !query_params.is_empty() {
6020 path.push_str("?");
6021 path.push_str(&query_params.join("&"));
6022 }
6023 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6024 }
6025
6026 pub async fn patients_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6031 let mut path = format!("/patients/v1/update");
6032 let mut query_params = Vec::new();
6033 if let Some(p) = license_number {
6034 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6035 }
6036 if !query_params.is_empty() {
6037 path.push_str("?");
6038 path.push_str(&query_params.join("&"));
6039 }
6040 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6041 }
6042
6043 pub async fn patients_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6048 let mut path = format!("/patients/v1/{}", urlencoding::encode(id).as_ref());
6049 let mut query_params = Vec::new();
6050 if let Some(p) = license_number {
6051 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6052 }
6053 if !query_params.is_empty() {
6054 path.push_str("?");
6055 path.push_str(&query_params.join("&"));
6056 }
6057 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6058 }
6059
6060 pub async fn patients_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6067 let mut path = format!("/patients/v2/{}", urlencoding::encode(id).as_ref());
6068 let mut query_params = Vec::new();
6069 if let Some(p) = license_number {
6070 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6071 }
6072 if !query_params.is_empty() {
6073 path.push_str("?");
6074 path.push_str(&query_params.join("&"));
6075 }
6076 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6077 }
6078
6079 pub async fn patients_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6084 let mut path = format!("/patients/v1/{}", urlencoding::encode(id).as_ref());
6085 let mut query_params = Vec::new();
6086 if let Some(p) = license_number {
6087 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6088 }
6089 if !query_params.is_empty() {
6090 path.push_str("?");
6091 path.push_str(&query_params.join("&"));
6092 }
6093 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6094 }
6095
6096 pub async fn patients_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6103 let mut path = format!("/patients/v2/{}", urlencoding::encode(id).as_ref());
6104 let mut query_params = Vec::new();
6105 if let Some(p) = license_number {
6106 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6107 }
6108 if !query_params.is_empty() {
6109 path.push_str("?");
6110 path.push_str(&query_params.join("&"));
6111 }
6112 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6113 }
6114
6115 pub async fn patients_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6120 let mut path = format!("/patients/v1/active");
6121 let mut query_params = Vec::new();
6122 if let Some(p) = license_number {
6123 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6124 }
6125 if !query_params.is_empty() {
6126 path.push_str("?");
6127 path.push_str(&query_params.join("&"));
6128 }
6129 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6130 }
6131
6132 pub async fn patients_get_active_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6139 let mut path = format!("/patients/v2/active");
6140 let mut query_params = Vec::new();
6141 if let Some(p) = license_number {
6142 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6143 }
6144 if let Some(p) = page_number {
6145 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6146 }
6147 if let Some(p) = page_size {
6148 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6149 }
6150 if !query_params.is_empty() {
6151 path.push_str("?");
6152 path.push_str(&query_params.join("&"));
6153 }
6154 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6155 }
6156
6157 pub async fn patients_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6164 let mut path = format!("/patients/v2");
6165 let mut query_params = Vec::new();
6166 if let Some(p) = license_number {
6167 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6168 }
6169 if !query_params.is_empty() {
6170 path.push_str("?");
6171 path.push_str(&query_params.join("&"));
6172 }
6173 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6174 }
6175
6176 pub async fn patients_status_get_statuses_by_patient_license_number_v1(&self, patient_license_number: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6183 let mut path = format!("/patients/v1/statuses/{}", urlencoding::encode(patient_license_number).as_ref());
6184 let mut query_params = Vec::new();
6185 if let Some(p) = license_number {
6186 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6187 }
6188 if !query_params.is_empty() {
6189 path.push_str("?");
6190 path.push_str(&query_params.join("&"));
6191 }
6192 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6193 }
6194
6195 pub async fn patients_status_get_statuses_by_patient_license_number_v2(&self, patient_license_number: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6202 let mut path = format!("/patients/v2/statuses/{}", urlencoding::encode(patient_license_number).as_ref());
6203 let mut query_params = Vec::new();
6204 if let Some(p) = license_number {
6205 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6206 }
6207 if !query_params.is_empty() {
6208 path.push_str("?");
6209 path.push_str(&query_params.join("&"));
6210 }
6211 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6212 }
6213
6214 pub async fn additives_templates_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6221 let mut path = format!("/additivestemplates/v2");
6222 let mut query_params = Vec::new();
6223 if let Some(p) = license_number {
6224 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6225 }
6226 if !query_params.is_empty() {
6227 path.push_str("?");
6228 path.push_str(&query_params.join("&"));
6229 }
6230 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6231 }
6232
6233 pub async fn additives_templates_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6240 let mut path = format!("/additivestemplates/v2/{}", urlencoding::encode(id).as_ref());
6241 let mut query_params = Vec::new();
6242 if let Some(p) = license_number {
6243 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6244 }
6245 if !query_params.is_empty() {
6246 path.push_str("?");
6247 path.push_str(&query_params.join("&"));
6248 }
6249 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6250 }
6251
6252 pub async fn additives_templates_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6259 let mut path = format!("/additivestemplates/v2/active");
6260 let mut query_params = Vec::new();
6261 if let Some(p) = last_modified_end {
6262 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6263 }
6264 if let Some(p) = last_modified_start {
6265 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6266 }
6267 if let Some(p) = license_number {
6268 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6269 }
6270 if let Some(p) = page_number {
6271 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6272 }
6273 if let Some(p) = page_size {
6274 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6275 }
6276 if !query_params.is_empty() {
6277 path.push_str("?");
6278 path.push_str(&query_params.join("&"));
6279 }
6280 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6281 }
6282
6283 pub async fn additives_templates_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6290 let mut path = format!("/additivestemplates/v2/inactive");
6291 let mut query_params = Vec::new();
6292 if let Some(p) = last_modified_end {
6293 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6294 }
6295 if let Some(p) = last_modified_start {
6296 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6297 }
6298 if let Some(p) = license_number {
6299 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6300 }
6301 if let Some(p) = page_number {
6302 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6303 }
6304 if let Some(p) = page_size {
6305 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6306 }
6307 if !query_params.is_empty() {
6308 path.push_str("?");
6309 path.push_str(&query_params.join("&"));
6310 }
6311 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6312 }
6313
6314 pub async fn additives_templates_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6321 let mut path = format!("/additivestemplates/v2");
6322 let mut query_params = Vec::new();
6323 if let Some(p) = license_number {
6324 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6325 }
6326 if !query_params.is_empty() {
6327 path.push_str("?");
6328 path.push_str(&query_params.join("&"));
6329 }
6330 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6331 }
6332
6333 pub async fn lab_tests_create_record_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6339 let mut path = format!("/labtests/v1/record");
6340 let mut query_params = Vec::new();
6341 if let Some(p) = license_number {
6342 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6343 }
6344 if !query_params.is_empty() {
6345 path.push_str("?");
6346 path.push_str(&query_params.join("&"));
6347 }
6348 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6349 }
6350
6351 pub async fn lab_tests_create_record_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6359 let mut path = format!("/labtests/v2/record");
6360 let mut query_params = Vec::new();
6361 if let Some(p) = license_number {
6362 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6363 }
6364 if !query_params.is_empty() {
6365 path.push_str("?");
6366 path.push_str(&query_params.join("&"));
6367 }
6368 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6369 }
6370
6371 pub async fn lab_tests_get_batches_v2(&self, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6378 let mut path = format!("/labtests/v2/batches");
6379 let mut query_params = Vec::new();
6380 if let Some(p) = page_number {
6381 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6382 }
6383 if let Some(p) = page_size {
6384 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6385 }
6386 if !query_params.is_empty() {
6387 path.push_str("?");
6388 path.push_str(&query_params.join("&"));
6389 }
6390 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6391 }
6392
6393 pub async fn lab_tests_get_labtestdocument_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6399 let mut path = format!("/labtests/v1/labtestdocument/{}", urlencoding::encode(id).as_ref());
6400 let mut query_params = Vec::new();
6401 if let Some(p) = license_number {
6402 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6403 }
6404 if !query_params.is_empty() {
6405 path.push_str("?");
6406 path.push_str(&query_params.join("&"));
6407 }
6408 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6409 }
6410
6411 pub async fn lab_tests_get_labtestdocument_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6419 let mut path = format!("/labtests/v2/labtestdocument/{}", urlencoding::encode(id).as_ref());
6420 let mut query_params = Vec::new();
6421 if let Some(p) = license_number {
6422 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6423 }
6424 if !query_params.is_empty() {
6425 path.push_str("?");
6426 path.push_str(&query_params.join("&"));
6427 }
6428 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6429 }
6430
6431 pub async fn lab_tests_get_results_v1(&self, license_number: Option<String>, package_id: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6436 let mut path = format!("/labtests/v1/results");
6437 let mut query_params = Vec::new();
6438 if let Some(p) = license_number {
6439 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6440 }
6441 if let Some(p) = package_id {
6442 query_params.push(format!("packageId={}", urlencoding::encode(&p)));
6443 }
6444 if !query_params.is_empty() {
6445 path.push_str("?");
6446 path.push_str(&query_params.join("&"));
6447 }
6448 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6449 }
6450
6451 pub async fn lab_tests_get_results_v2(&self, license_number: Option<String>, package_id: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6459 let mut path = format!("/labtests/v2/results");
6460 let mut query_params = Vec::new();
6461 if let Some(p) = license_number {
6462 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6463 }
6464 if let Some(p) = package_id {
6465 query_params.push(format!("packageId={}", urlencoding::encode(&p)));
6466 }
6467 if let Some(p) = page_number {
6468 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6469 }
6470 if let Some(p) = page_size {
6471 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6472 }
6473 if !query_params.is_empty() {
6474 path.push_str("?");
6475 path.push_str(&query_params.join("&"));
6476 }
6477 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6478 }
6479
6480 pub async fn lab_tests_get_states_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6485 let mut path = format!("/labtests/v1/states");
6486 let mut query_params = Vec::new();
6487 if let Some(p) = no {
6488 query_params.push(format!("No={}", urlencoding::encode(&p)));
6489 }
6490 if !query_params.is_empty() {
6491 path.push_str("?");
6492 path.push_str(&query_params.join("&"));
6493 }
6494 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6495 }
6496
6497 pub async fn lab_tests_get_states_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6504 let mut path = format!("/labtests/v2/states");
6505 let mut query_params = Vec::new();
6506 if let Some(p) = no {
6507 query_params.push(format!("No={}", urlencoding::encode(&p)));
6508 }
6509 if !query_params.is_empty() {
6510 path.push_str("?");
6511 path.push_str(&query_params.join("&"));
6512 }
6513 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6514 }
6515
6516 pub async fn lab_tests_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6521 let mut path = format!("/labtests/v1/types");
6522 let mut query_params = Vec::new();
6523 if let Some(p) = no {
6524 query_params.push(format!("No={}", urlencoding::encode(&p)));
6525 }
6526 if !query_params.is_empty() {
6527 path.push_str("?");
6528 path.push_str(&query_params.join("&"));
6529 }
6530 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6531 }
6532
6533 pub async fn lab_tests_get_types_v2(&self, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6540 let mut path = format!("/labtests/v2/types");
6541 let mut query_params = Vec::new();
6542 if let Some(p) = page_number {
6543 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6544 }
6545 if let Some(p) = page_size {
6546 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6547 }
6548 if !query_params.is_empty() {
6549 path.push_str("?");
6550 path.push_str(&query_params.join("&"));
6551 }
6552 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6553 }
6554
6555 pub async fn lab_tests_update_labtestdocument_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6561 let mut path = format!("/labtests/v1/labtestdocument");
6562 let mut query_params = Vec::new();
6563 if let Some(p) = license_number {
6564 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6565 }
6566 if !query_params.is_empty() {
6567 path.push_str("?");
6568 path.push_str(&query_params.join("&"));
6569 }
6570 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6571 }
6572
6573 pub async fn lab_tests_update_labtestdocument_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6581 let mut path = format!("/labtests/v2/labtestdocument");
6582 let mut query_params = Vec::new();
6583 if let Some(p) = license_number {
6584 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6585 }
6586 if !query_params.is_empty() {
6587 path.push_str("?");
6588 path.push_str(&query_params.join("&"));
6589 }
6590 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6591 }
6592
6593 pub async fn lab_tests_update_result_release_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6599 let mut path = format!("/labtests/v1/results/release");
6600 let mut query_params = Vec::new();
6601 if let Some(p) = license_number {
6602 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6603 }
6604 if !query_params.is_empty() {
6605 path.push_str("?");
6606 path.push_str(&query_params.join("&"));
6607 }
6608 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6609 }
6610
6611 pub async fn lab_tests_update_result_release_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6619 let mut path = format!("/labtests/v2/results/release");
6620 let mut query_params = Vec::new();
6621 if let Some(p) = license_number {
6622 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6623 }
6624 if !query_params.is_empty() {
6625 path.push_str("?");
6626 path.push_str(&query_params.join("&"));
6627 }
6628 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6629 }
6630
6631 pub async fn processing_jobs_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6636 let mut path = format!("/processing/v1/adjust");
6637 let mut query_params = Vec::new();
6638 if let Some(p) = license_number {
6639 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6640 }
6641 if !query_params.is_empty() {
6642 path.push_str("?");
6643 path.push_str(&query_params.join("&"));
6644 }
6645 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6646 }
6647
6648 pub async fn processing_jobs_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6655 let mut path = format!("/processing/v2/adjust");
6656 let mut query_params = Vec::new();
6657 if let Some(p) = license_number {
6658 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6659 }
6660 if !query_params.is_empty() {
6661 path.push_str("?");
6662 path.push_str(&query_params.join("&"));
6663 }
6664 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6665 }
6666
6667 pub async fn processing_jobs_create_jobtypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6672 let mut path = format!("/processing/v1/jobtypes");
6673 let mut query_params = Vec::new();
6674 if let Some(p) = license_number {
6675 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6676 }
6677 if !query_params.is_empty() {
6678 path.push_str("?");
6679 path.push_str(&query_params.join("&"));
6680 }
6681 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6682 }
6683
6684 pub async fn processing_jobs_create_jobtypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6691 let mut path = format!("/processing/v2/jobtypes");
6692 let mut query_params = Vec::new();
6693 if let Some(p) = license_number {
6694 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6695 }
6696 if !query_params.is_empty() {
6697 path.push_str("?");
6698 path.push_str(&query_params.join("&"));
6699 }
6700 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6701 }
6702
6703 pub async fn processing_jobs_create_start_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6708 let mut path = format!("/processing/v1/start");
6709 let mut query_params = Vec::new();
6710 if let Some(p) = license_number {
6711 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6712 }
6713 if !query_params.is_empty() {
6714 path.push_str("?");
6715 path.push_str(&query_params.join("&"));
6716 }
6717 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6718 }
6719
6720 pub async fn processing_jobs_create_start_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6727 let mut path = format!("/processing/v2/start");
6728 let mut query_params = Vec::new();
6729 if let Some(p) = license_number {
6730 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6731 }
6732 if !query_params.is_empty() {
6733 path.push_str("?");
6734 path.push_str(&query_params.join("&"));
6735 }
6736 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6737 }
6738
6739 pub async fn processing_jobs_createpackages_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6744 let mut path = format!("/processing/v1/createpackages");
6745 let mut query_params = Vec::new();
6746 if let Some(p) = license_number {
6747 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6748 }
6749 if !query_params.is_empty() {
6750 path.push_str("?");
6751 path.push_str(&query_params.join("&"));
6752 }
6753 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6754 }
6755
6756 pub async fn processing_jobs_createpackages_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6763 let mut path = format!("/processing/v2/createpackages");
6764 let mut query_params = Vec::new();
6765 if let Some(p) = license_number {
6766 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6767 }
6768 if !query_params.is_empty() {
6769 path.push_str("?");
6770 path.push_str(&query_params.join("&"));
6771 }
6772 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6773 }
6774
6775 pub async fn processing_jobs_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6780 let mut path = format!("/processing/v1/{}", urlencoding::encode(id).as_ref());
6781 let mut query_params = Vec::new();
6782 if let Some(p) = license_number {
6783 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6784 }
6785 if !query_params.is_empty() {
6786 path.push_str("?");
6787 path.push_str(&query_params.join("&"));
6788 }
6789 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6790 }
6791
6792 pub async fn processing_jobs_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6799 let mut path = format!("/processing/v2/{}", urlencoding::encode(id).as_ref());
6800 let mut query_params = Vec::new();
6801 if let Some(p) = license_number {
6802 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6803 }
6804 if !query_params.is_empty() {
6805 path.push_str("?");
6806 path.push_str(&query_params.join("&"));
6807 }
6808 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6809 }
6810
6811 pub async fn processing_jobs_delete_jobtypes_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6816 let mut path = format!("/processing/v1/jobtypes/{}", urlencoding::encode(id).as_ref());
6817 let mut query_params = Vec::new();
6818 if let Some(p) = license_number {
6819 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6820 }
6821 if !query_params.is_empty() {
6822 path.push_str("?");
6823 path.push_str(&query_params.join("&"));
6824 }
6825 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6826 }
6827
6828 pub async fn processing_jobs_delete_jobtypes_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6835 let mut path = format!("/processing/v2/jobtypes/{}", urlencoding::encode(id).as_ref());
6836 let mut query_params = Vec::new();
6837 if let Some(p) = license_number {
6838 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6839 }
6840 if !query_params.is_empty() {
6841 path.push_str("?");
6842 path.push_str(&query_params.join("&"));
6843 }
6844 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6845 }
6846
6847 pub async fn processing_jobs_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6852 let mut path = format!("/processing/v1/{}", urlencoding::encode(id).as_ref());
6853 let mut query_params = Vec::new();
6854 if let Some(p) = license_number {
6855 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6856 }
6857 if !query_params.is_empty() {
6858 path.push_str("?");
6859 path.push_str(&query_params.join("&"));
6860 }
6861 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6862 }
6863
6864 pub async fn processing_jobs_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6871 let mut path = format!("/processing/v2/{}", urlencoding::encode(id).as_ref());
6872 let mut query_params = Vec::new();
6873 if let Some(p) = license_number {
6874 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6875 }
6876 if !query_params.is_empty() {
6877 path.push_str("?");
6878 path.push_str(&query_params.join("&"));
6879 }
6880 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6881 }
6882
6883 pub async fn processing_jobs_get_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6888 let mut path = format!("/processing/v1/active");
6889 let mut query_params = Vec::new();
6890 if let Some(p) = last_modified_end {
6891 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6892 }
6893 if let Some(p) = last_modified_start {
6894 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6895 }
6896 if let Some(p) = license_number {
6897 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6898 }
6899 if !query_params.is_empty() {
6900 path.push_str("?");
6901 path.push_str(&query_params.join("&"));
6902 }
6903 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6904 }
6905
6906 pub async fn processing_jobs_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6913 let mut path = format!("/processing/v2/active");
6914 let mut query_params = Vec::new();
6915 if let Some(p) = last_modified_end {
6916 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6917 }
6918 if let Some(p) = last_modified_start {
6919 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6920 }
6921 if let Some(p) = license_number {
6922 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6923 }
6924 if let Some(p) = page_number {
6925 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6926 }
6927 if let Some(p) = page_size {
6928 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6929 }
6930 if !query_params.is_empty() {
6931 path.push_str("?");
6932 path.push_str(&query_params.join("&"));
6933 }
6934 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6935 }
6936
6937 pub async fn processing_jobs_get_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6942 let mut path = format!("/processing/v1/inactive");
6943 let mut query_params = Vec::new();
6944 if let Some(p) = last_modified_end {
6945 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6946 }
6947 if let Some(p) = last_modified_start {
6948 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6949 }
6950 if let Some(p) = license_number {
6951 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6952 }
6953 if !query_params.is_empty() {
6954 path.push_str("?");
6955 path.push_str(&query_params.join("&"));
6956 }
6957 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6958 }
6959
6960 pub async fn processing_jobs_get_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6967 let mut path = format!("/processing/v2/inactive");
6968 let mut query_params = Vec::new();
6969 if let Some(p) = last_modified_end {
6970 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6971 }
6972 if let Some(p) = last_modified_start {
6973 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6974 }
6975 if let Some(p) = license_number {
6976 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6977 }
6978 if let Some(p) = page_number {
6979 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6980 }
6981 if let Some(p) = page_size {
6982 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6983 }
6984 if !query_params.is_empty() {
6985 path.push_str("?");
6986 path.push_str(&query_params.join("&"));
6987 }
6988 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6989 }
6990
6991 pub async fn processing_jobs_get_jobtypes_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6996 let mut path = format!("/processing/v1/jobtypes/active");
6997 let mut query_params = Vec::new();
6998 if let Some(p) = last_modified_end {
6999 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7000 }
7001 if let Some(p) = last_modified_start {
7002 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7003 }
7004 if let Some(p) = license_number {
7005 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7006 }
7007 if !query_params.is_empty() {
7008 path.push_str("?");
7009 path.push_str(&query_params.join("&"));
7010 }
7011 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7012 }
7013
7014 pub async fn processing_jobs_get_jobtypes_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7021 let mut path = format!("/processing/v2/jobtypes/active");
7022 let mut query_params = Vec::new();
7023 if let Some(p) = last_modified_end {
7024 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7025 }
7026 if let Some(p) = last_modified_start {
7027 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7028 }
7029 if let Some(p) = license_number {
7030 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7031 }
7032 if let Some(p) = page_number {
7033 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7034 }
7035 if let Some(p) = page_size {
7036 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7037 }
7038 if !query_params.is_empty() {
7039 path.push_str("?");
7040 path.push_str(&query_params.join("&"));
7041 }
7042 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7043 }
7044
7045 pub async fn processing_jobs_get_jobtypes_attributes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7050 let mut path = format!("/processing/v1/jobtypes/attributes");
7051 let mut query_params = Vec::new();
7052 if let Some(p) = license_number {
7053 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7054 }
7055 if !query_params.is_empty() {
7056 path.push_str("?");
7057 path.push_str(&query_params.join("&"));
7058 }
7059 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7060 }
7061
7062 pub async fn processing_jobs_get_jobtypes_attributes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7069 let mut path = format!("/processing/v2/jobtypes/attributes");
7070 let mut query_params = Vec::new();
7071 if let Some(p) = license_number {
7072 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7073 }
7074 if !query_params.is_empty() {
7075 path.push_str("?");
7076 path.push_str(&query_params.join("&"));
7077 }
7078 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7079 }
7080
7081 pub async fn processing_jobs_get_jobtypes_categories_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7086 let mut path = format!("/processing/v1/jobtypes/categories");
7087 let mut query_params = Vec::new();
7088 if let Some(p) = license_number {
7089 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7090 }
7091 if !query_params.is_empty() {
7092 path.push_str("?");
7093 path.push_str(&query_params.join("&"));
7094 }
7095 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7096 }
7097
7098 pub async fn processing_jobs_get_jobtypes_categories_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7105 let mut path = format!("/processing/v2/jobtypes/categories");
7106 let mut query_params = Vec::new();
7107 if let Some(p) = license_number {
7108 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7109 }
7110 if !query_params.is_empty() {
7111 path.push_str("?");
7112 path.push_str(&query_params.join("&"));
7113 }
7114 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7115 }
7116
7117 pub async fn processing_jobs_get_jobtypes_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7122 let mut path = format!("/processing/v1/jobtypes/inactive");
7123 let mut query_params = Vec::new();
7124 if let Some(p) = last_modified_end {
7125 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7126 }
7127 if let Some(p) = last_modified_start {
7128 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7129 }
7130 if let Some(p) = license_number {
7131 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7132 }
7133 if !query_params.is_empty() {
7134 path.push_str("?");
7135 path.push_str(&query_params.join("&"));
7136 }
7137 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7138 }
7139
7140 pub async fn processing_jobs_get_jobtypes_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7147 let mut path = format!("/processing/v2/jobtypes/inactive");
7148 let mut query_params = Vec::new();
7149 if let Some(p) = last_modified_end {
7150 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7151 }
7152 if let Some(p) = last_modified_start {
7153 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7154 }
7155 if let Some(p) = license_number {
7156 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7157 }
7158 if let Some(p) = page_number {
7159 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7160 }
7161 if let Some(p) = page_size {
7162 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7163 }
7164 if !query_params.is_empty() {
7165 path.push_str("?");
7166 path.push_str(&query_params.join("&"));
7167 }
7168 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7169 }
7170
7171 pub async fn processing_jobs_update_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7176 let mut path = format!("/processing/v1/finish");
7177 let mut query_params = Vec::new();
7178 if let Some(p) = license_number {
7179 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7180 }
7181 if !query_params.is_empty() {
7182 path.push_str("?");
7183 path.push_str(&query_params.join("&"));
7184 }
7185 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7186 }
7187
7188 pub async fn processing_jobs_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7195 let mut path = format!("/processing/v2/finish");
7196 let mut query_params = Vec::new();
7197 if let Some(p) = license_number {
7198 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7199 }
7200 if !query_params.is_empty() {
7201 path.push_str("?");
7202 path.push_str(&query_params.join("&"));
7203 }
7204 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7205 }
7206
7207 pub async fn processing_jobs_update_jobtypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7212 let mut path = format!("/processing/v1/jobtypes");
7213 let mut query_params = Vec::new();
7214 if let Some(p) = license_number {
7215 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7216 }
7217 if !query_params.is_empty() {
7218 path.push_str("?");
7219 path.push_str(&query_params.join("&"));
7220 }
7221 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7222 }
7223
7224 pub async fn processing_jobs_update_jobtypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7231 let mut path = format!("/processing/v2/jobtypes");
7232 let mut query_params = Vec::new();
7233 if let Some(p) = license_number {
7234 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7235 }
7236 if !query_params.is_empty() {
7237 path.push_str("?");
7238 path.push_str(&query_params.join("&"));
7239 }
7240 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7241 }
7242
7243 pub async fn processing_jobs_update_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7248 let mut path = format!("/processing/v1/unfinish");
7249 let mut query_params = Vec::new();
7250 if let Some(p) = license_number {
7251 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7252 }
7253 if !query_params.is_empty() {
7254 path.push_str("?");
7255 path.push_str(&query_params.join("&"));
7256 }
7257 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7258 }
7259
7260 pub async fn processing_jobs_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7267 let mut path = format!("/processing/v2/unfinish");
7268 let mut query_params = Vec::new();
7269 if let Some(p) = license_number {
7270 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7271 }
7272 if !query_params.is_empty() {
7273 path.push_str("?");
7274 path.push_str(&query_params.join("&"));
7275 }
7276 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7277 }
7278
7279 pub async fn sales_create_delivery_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7286 let mut path = format!("/sales/v1/deliveries");
7287 let mut query_params = Vec::new();
7288 if let Some(p) = license_number {
7289 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7290 }
7291 if !query_params.is_empty() {
7292 path.push_str("?");
7293 path.push_str(&query_params.join("&"));
7294 }
7295 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7296 }
7297
7298 pub async fn sales_create_delivery_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7309 let mut path = format!("/sales/v2/deliveries");
7310 let mut query_params = Vec::new();
7311 if let Some(p) = license_number {
7312 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7313 }
7314 if !query_params.is_empty() {
7315 path.push_str("?");
7316 path.push_str(&query_params.join("&"));
7317 }
7318 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7319 }
7320
7321 pub async fn sales_create_delivery_retailer_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7328 let mut path = format!("/sales/v1/deliveries/retailer");
7329 let mut query_params = Vec::new();
7330 if let Some(p) = license_number {
7331 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7332 }
7333 if !query_params.is_empty() {
7334 path.push_str("?");
7335 path.push_str(&query_params.join("&"));
7336 }
7337 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7338 }
7339
7340 pub async fn sales_create_delivery_retailer_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7353 let mut path = format!("/sales/v2/deliveries/retailer");
7354 let mut query_params = Vec::new();
7355 if let Some(p) = license_number {
7356 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7357 }
7358 if !query_params.is_empty() {
7359 path.push_str("?");
7360 path.push_str(&query_params.join("&"));
7361 }
7362 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7363 }
7364
7365 pub async fn sales_create_delivery_retailer_depart_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7370 let mut path = format!("/sales/v1/deliveries/retailer/depart");
7371 let mut query_params = Vec::new();
7372 if let Some(p) = license_number {
7373 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7374 }
7375 if !query_params.is_empty() {
7376 path.push_str("?");
7377 path.push_str(&query_params.join("&"));
7378 }
7379 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7380 }
7381
7382 pub async fn sales_create_delivery_retailer_depart_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7393 let mut path = format!("/sales/v2/deliveries/retailer/depart");
7394 let mut query_params = Vec::new();
7395 if let Some(p) = license_number {
7396 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7397 }
7398 if !query_params.is_empty() {
7399 path.push_str("?");
7400 path.push_str(&query_params.join("&"));
7401 }
7402 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7403 }
7404
7405 pub async fn sales_create_delivery_retailer_end_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7412 let mut path = format!("/sales/v1/deliveries/retailer/end");
7413 let mut query_params = Vec::new();
7414 if let Some(p) = license_number {
7415 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7416 }
7417 if !query_params.is_empty() {
7418 path.push_str("?");
7419 path.push_str(&query_params.join("&"));
7420 }
7421 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7422 }
7423
7424 pub async fn sales_create_delivery_retailer_end_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7435 let mut path = format!("/sales/v2/deliveries/retailer/end");
7436 let mut query_params = Vec::new();
7437 if let Some(p) = license_number {
7438 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7439 }
7440 if !query_params.is_empty() {
7441 path.push_str("?");
7442 path.push_str(&query_params.join("&"));
7443 }
7444 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7445 }
7446
7447 pub async fn sales_create_delivery_retailer_restock_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7454 let mut path = format!("/sales/v1/deliveries/retailer/restock");
7455 let mut query_params = Vec::new();
7456 if let Some(p) = license_number {
7457 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7458 }
7459 if !query_params.is_empty() {
7460 path.push_str("?");
7461 path.push_str(&query_params.join("&"));
7462 }
7463 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7464 }
7465
7466 pub async fn sales_create_delivery_retailer_restock_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7477 let mut path = format!("/sales/v2/deliveries/retailer/restock");
7478 let mut query_params = Vec::new();
7479 if let Some(p) = license_number {
7480 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7481 }
7482 if !query_params.is_empty() {
7483 path.push_str("?");
7484 path.push_str(&query_params.join("&"));
7485 }
7486 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7487 }
7488
7489 pub async fn sales_create_delivery_retailer_sale_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7496 let mut path = format!("/sales/v1/deliveries/retailer/sale");
7497 let mut query_params = Vec::new();
7498 if let Some(p) = license_number {
7499 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7500 }
7501 if !query_params.is_empty() {
7502 path.push_str("?");
7503 path.push_str(&query_params.join("&"));
7504 }
7505 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7506 }
7507
7508 pub async fn sales_create_delivery_retailer_sale_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7520 let mut path = format!("/sales/v2/deliveries/retailer/sale");
7521 let mut query_params = Vec::new();
7522 if let Some(p) = license_number {
7523 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7524 }
7525 if !query_params.is_empty() {
7526 path.push_str("?");
7527 path.push_str(&query_params.join("&"));
7528 }
7529 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7530 }
7531
7532 pub async fn sales_create_receipt_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7539 let mut path = format!("/sales/v1/receipts");
7540 let mut query_params = Vec::new();
7541 if let Some(p) = license_number {
7542 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7543 }
7544 if !query_params.is_empty() {
7545 path.push_str("?");
7546 path.push_str(&query_params.join("&"));
7547 }
7548 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7549 }
7550
7551 pub async fn sales_create_receipt_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7563 let mut path = format!("/sales/v2/receipts");
7564 let mut query_params = Vec::new();
7565 if let Some(p) = license_number {
7566 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7567 }
7568 if !query_params.is_empty() {
7569 path.push_str("?");
7570 path.push_str(&query_params.join("&"));
7571 }
7572 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7573 }
7574
7575 pub async fn sales_create_transaction_by_date_v1(&self, date: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7580 let mut path = format!("/sales/v1/transactions/{}", urlencoding::encode(date).as_ref());
7581 let mut query_params = Vec::new();
7582 if let Some(p) = license_number {
7583 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7584 }
7585 if !query_params.is_empty() {
7586 path.push_str("?");
7587 path.push_str(&query_params.join("&"));
7588 }
7589 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7590 }
7591
7592 pub async fn sales_delete_delivery_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7597 let mut path = format!("/sales/v1/deliveries/{}", urlencoding::encode(id).as_ref());
7598 let mut query_params = Vec::new();
7599 if let Some(p) = license_number {
7600 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7601 }
7602 if !query_params.is_empty() {
7603 path.push_str("?");
7604 path.push_str(&query_params.join("&"));
7605 }
7606 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7607 }
7608
7609 pub async fn sales_delete_delivery_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7616 let mut path = format!("/sales/v2/deliveries/{}", urlencoding::encode(id).as_ref());
7617 let mut query_params = Vec::new();
7618 if let Some(p) = license_number {
7619 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7620 }
7621 if !query_params.is_empty() {
7622 path.push_str("?");
7623 path.push_str(&query_params.join("&"));
7624 }
7625 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7626 }
7627
7628 pub async fn sales_delete_delivery_retailer_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7633 let mut path = format!("/sales/v1/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
7634 let mut query_params = Vec::new();
7635 if let Some(p) = license_number {
7636 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7637 }
7638 if !query_params.is_empty() {
7639 path.push_str("?");
7640 path.push_str(&query_params.join("&"));
7641 }
7642 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7643 }
7644
7645 pub async fn sales_delete_delivery_retailer_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7656 let mut path = format!("/sales/v2/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
7657 let mut query_params = Vec::new();
7658 if let Some(p) = license_number {
7659 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7660 }
7661 if !query_params.is_empty() {
7662 path.push_str("?");
7663 path.push_str(&query_params.join("&"));
7664 }
7665 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7666 }
7667
7668 pub async fn sales_delete_receipt_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7673 let mut path = format!("/sales/v1/receipts/{}", urlencoding::encode(id).as_ref());
7674 let mut query_params = Vec::new();
7675 if let Some(p) = license_number {
7676 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7677 }
7678 if !query_params.is_empty() {
7679 path.push_str("?");
7680 path.push_str(&query_params.join("&"));
7681 }
7682 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7683 }
7684
7685 pub async fn sales_delete_receipt_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7692 let mut path = format!("/sales/v2/receipts/{}", urlencoding::encode(id).as_ref());
7693 let mut query_params = Vec::new();
7694 if let Some(p) = license_number {
7695 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7696 }
7697 if !query_params.is_empty() {
7698 path.push_str("?");
7699 path.push_str(&query_params.join("&"));
7700 }
7701 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7702 }
7703
7704 pub async fn sales_get_counties_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7709 let mut path = format!("/sales/v1/counties");
7710 let mut query_params = Vec::new();
7711 if let Some(p) = no {
7712 query_params.push(format!("No={}", urlencoding::encode(&p)));
7713 }
7714 if !query_params.is_empty() {
7715 path.push_str("?");
7716 path.push_str(&query_params.join("&"));
7717 }
7718 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7719 }
7720
7721 pub async fn sales_get_counties_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7728 let mut path = format!("/sales/v2/counties");
7729 let mut query_params = Vec::new();
7730 if let Some(p) = no {
7731 query_params.push(format!("No={}", urlencoding::encode(&p)));
7732 }
7733 if !query_params.is_empty() {
7734 path.push_str("?");
7735 path.push_str(&query_params.join("&"));
7736 }
7737 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7738 }
7739
7740 pub async fn sales_get_customertypes_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7745 let mut path = format!("/sales/v1/customertypes");
7746 let mut query_params = Vec::new();
7747 if let Some(p) = no {
7748 query_params.push(format!("No={}", urlencoding::encode(&p)));
7749 }
7750 if !query_params.is_empty() {
7751 path.push_str("?");
7752 path.push_str(&query_params.join("&"));
7753 }
7754 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7755 }
7756
7757 pub async fn sales_get_customertypes_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7764 let mut path = format!("/sales/v2/customertypes");
7765 let mut query_params = Vec::new();
7766 if let Some(p) = no {
7767 query_params.push(format!("No={}", urlencoding::encode(&p)));
7768 }
7769 if !query_params.is_empty() {
7770 path.push_str("?");
7771 path.push_str(&query_params.join("&"));
7772 }
7773 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7774 }
7775
7776 pub async fn sales_get_deliveries_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7781 let mut path = format!("/sales/v1/deliveries/active");
7782 let mut query_params = Vec::new();
7783 if let Some(p) = last_modified_end {
7784 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7785 }
7786 if let Some(p) = last_modified_start {
7787 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7788 }
7789 if let Some(p) = license_number {
7790 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7791 }
7792 if let Some(p) = sales_date_end {
7793 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
7794 }
7795 if let Some(p) = sales_date_start {
7796 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
7797 }
7798 if !query_params.is_empty() {
7799 path.push_str("?");
7800 path.push_str(&query_params.join("&"));
7801 }
7802 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7803 }
7804
7805 pub async fn sales_get_deliveries_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7813 let mut path = format!("/sales/v2/deliveries/active");
7814 let mut query_params = Vec::new();
7815 if let Some(p) = last_modified_end {
7816 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7817 }
7818 if let Some(p) = last_modified_start {
7819 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7820 }
7821 if let Some(p) = license_number {
7822 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7823 }
7824 if let Some(p) = page_number {
7825 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7826 }
7827 if let Some(p) = page_size {
7828 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7829 }
7830 if let Some(p) = sales_date_end {
7831 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
7832 }
7833 if let Some(p) = sales_date_start {
7834 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
7835 }
7836 if !query_params.is_empty() {
7837 path.push_str("?");
7838 path.push_str(&query_params.join("&"));
7839 }
7840 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7841 }
7842
7843 pub async fn sales_get_deliveries_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7848 let mut path = format!("/sales/v1/deliveries/inactive");
7849 let mut query_params = Vec::new();
7850 if let Some(p) = last_modified_end {
7851 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7852 }
7853 if let Some(p) = last_modified_start {
7854 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7855 }
7856 if let Some(p) = license_number {
7857 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7858 }
7859 if let Some(p) = sales_date_end {
7860 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
7861 }
7862 if let Some(p) = sales_date_start {
7863 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
7864 }
7865 if !query_params.is_empty() {
7866 path.push_str("?");
7867 path.push_str(&query_params.join("&"));
7868 }
7869 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7870 }
7871
7872 pub async fn sales_get_deliveries_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7880 let mut path = format!("/sales/v2/deliveries/inactive");
7881 let mut query_params = Vec::new();
7882 if let Some(p) = last_modified_end {
7883 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7884 }
7885 if let Some(p) = last_modified_start {
7886 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7887 }
7888 if let Some(p) = license_number {
7889 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7890 }
7891 if let Some(p) = page_number {
7892 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7893 }
7894 if let Some(p) = page_size {
7895 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7896 }
7897 if let Some(p) = sales_date_end {
7898 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
7899 }
7900 if let Some(p) = sales_date_start {
7901 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
7902 }
7903 if !query_params.is_empty() {
7904 path.push_str("?");
7905 path.push_str(&query_params.join("&"));
7906 }
7907 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7908 }
7909
7910 pub async fn sales_get_deliveries_retailer_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7915 let mut path = format!("/sales/v1/deliveries/retailer/active");
7916 let mut query_params = Vec::new();
7917 if let Some(p) = last_modified_end {
7918 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7919 }
7920 if let Some(p) = last_modified_start {
7921 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7922 }
7923 if let Some(p) = license_number {
7924 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7925 }
7926 if !query_params.is_empty() {
7927 path.push_str("?");
7928 path.push_str(&query_params.join("&"));
7929 }
7930 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7931 }
7932
7933 pub async fn sales_get_deliveries_retailer_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7941 let mut path = format!("/sales/v2/deliveries/retailer/active");
7942 let mut query_params = Vec::new();
7943 if let Some(p) = last_modified_end {
7944 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7945 }
7946 if let Some(p) = last_modified_start {
7947 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7948 }
7949 if let Some(p) = license_number {
7950 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7951 }
7952 if let Some(p) = page_number {
7953 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7954 }
7955 if let Some(p) = page_size {
7956 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7957 }
7958 if !query_params.is_empty() {
7959 path.push_str("?");
7960 path.push_str(&query_params.join("&"));
7961 }
7962 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7963 }
7964
7965 pub async fn sales_get_deliveries_retailer_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7970 let mut path = format!("/sales/v1/deliveries/retailer/inactive");
7971 let mut query_params = Vec::new();
7972 if let Some(p) = last_modified_end {
7973 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7974 }
7975 if let Some(p) = last_modified_start {
7976 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7977 }
7978 if let Some(p) = license_number {
7979 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7980 }
7981 if !query_params.is_empty() {
7982 path.push_str("?");
7983 path.push_str(&query_params.join("&"));
7984 }
7985 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7986 }
7987
7988 pub async fn sales_get_deliveries_retailer_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7996 let mut path = format!("/sales/v2/deliveries/retailer/inactive");
7997 let mut query_params = Vec::new();
7998 if let Some(p) = last_modified_end {
7999 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8000 }
8001 if let Some(p) = last_modified_start {
8002 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8003 }
8004 if let Some(p) = license_number {
8005 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8006 }
8007 if let Some(p) = page_number {
8008 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8009 }
8010 if let Some(p) = page_size {
8011 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8012 }
8013 if !query_params.is_empty() {
8014 path.push_str("?");
8015 path.push_str(&query_params.join("&"));
8016 }
8017 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8018 }
8019
8020 pub async fn sales_get_deliveries_returnreasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8025 let mut path = format!("/sales/v1/deliveries/returnreasons");
8026 let mut query_params = Vec::new();
8027 if let Some(p) = license_number {
8028 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8029 }
8030 if !query_params.is_empty() {
8031 path.push_str("?");
8032 path.push_str(&query_params.join("&"));
8033 }
8034 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8035 }
8036
8037 pub async fn sales_get_deliveries_returnreasons_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8044 let mut path = format!("/sales/v2/deliveries/returnreasons");
8045 let mut query_params = Vec::new();
8046 if let Some(p) = license_number {
8047 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8048 }
8049 if let Some(p) = page_number {
8050 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8051 }
8052 if let Some(p) = page_size {
8053 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8054 }
8055 if !query_params.is_empty() {
8056 path.push_str("?");
8057 path.push_str(&query_params.join("&"));
8058 }
8059 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8060 }
8061
8062 pub async fn sales_get_delivery_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8067 let mut path = format!("/sales/v1/deliveries/{}", urlencoding::encode(id).as_ref());
8068 let mut query_params = Vec::new();
8069 if let Some(p) = license_number {
8070 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8071 }
8072 if !query_params.is_empty() {
8073 path.push_str("?");
8074 path.push_str(&query_params.join("&"));
8075 }
8076 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8077 }
8078
8079 pub async fn sales_get_delivery_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8087 let mut path = format!("/sales/v2/deliveries/{}", urlencoding::encode(id).as_ref());
8088 let mut query_params = Vec::new();
8089 if let Some(p) = license_number {
8090 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8091 }
8092 if !query_params.is_empty() {
8093 path.push_str("?");
8094 path.push_str(&query_params.join("&"));
8095 }
8096 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8097 }
8098
8099 pub async fn sales_get_delivery_retailer_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8104 let mut path = format!("/sales/v1/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
8105 let mut query_params = Vec::new();
8106 if let Some(p) = license_number {
8107 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8108 }
8109 if !query_params.is_empty() {
8110 path.push_str("?");
8111 path.push_str(&query_params.join("&"));
8112 }
8113 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8114 }
8115
8116 pub async fn sales_get_delivery_retailer_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8124 let mut path = format!("/sales/v2/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
8125 let mut query_params = Vec::new();
8126 if let Some(p) = license_number {
8127 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8128 }
8129 if !query_params.is_empty() {
8130 path.push_str("?");
8131 path.push_str(&query_params.join("&"));
8132 }
8133 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8134 }
8135
8136 pub async fn sales_get_patient_registrations_locations_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8141 let mut path = format!("/sales/v1/patientregistration/locations");
8142 let mut query_params = Vec::new();
8143 if let Some(p) = no {
8144 query_params.push(format!("No={}", urlencoding::encode(&p)));
8145 }
8146 if !query_params.is_empty() {
8147 path.push_str("?");
8148 path.push_str(&query_params.join("&"));
8149 }
8150 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8151 }
8152
8153 pub async fn sales_get_patient_registrations_locations_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8160 let mut path = format!("/sales/v2/patientregistration/locations");
8161 let mut query_params = Vec::new();
8162 if let Some(p) = no {
8163 query_params.push(format!("No={}", urlencoding::encode(&p)));
8164 }
8165 if !query_params.is_empty() {
8166 path.push_str("?");
8167 path.push_str(&query_params.join("&"));
8168 }
8169 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8170 }
8171
8172 pub async fn sales_get_paymenttypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8177 let mut path = format!("/sales/v1/paymenttypes");
8178 let mut query_params = Vec::new();
8179 if let Some(p) = license_number {
8180 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8181 }
8182 if !query_params.is_empty() {
8183 path.push_str("?");
8184 path.push_str(&query_params.join("&"));
8185 }
8186 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8187 }
8188
8189 pub async fn sales_get_paymenttypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8197 let mut path = format!("/sales/v2/paymenttypes");
8198 let mut query_params = Vec::new();
8199 if let Some(p) = license_number {
8200 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8201 }
8202 if !query_params.is_empty() {
8203 path.push_str("?");
8204 path.push_str(&query_params.join("&"));
8205 }
8206 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8207 }
8208
8209 pub async fn sales_get_receipt_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8214 let mut path = format!("/sales/v1/receipts/{}", urlencoding::encode(id).as_ref());
8215 let mut query_params = Vec::new();
8216 if let Some(p) = license_number {
8217 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8218 }
8219 if !query_params.is_empty() {
8220 path.push_str("?");
8221 path.push_str(&query_params.join("&"));
8222 }
8223 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8224 }
8225
8226 pub async fn sales_get_receipt_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8234 let mut path = format!("/sales/v2/receipts/{}", urlencoding::encode(id).as_ref());
8235 let mut query_params = Vec::new();
8236 if let Some(p) = license_number {
8237 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8238 }
8239 if !query_params.is_empty() {
8240 path.push_str("?");
8241 path.push_str(&query_params.join("&"));
8242 }
8243 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8244 }
8245
8246 pub async fn sales_get_receipts_active_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8251 let mut path = format!("/sales/v1/receipts/active");
8252 let mut query_params = Vec::new();
8253 if let Some(p) = last_modified_end {
8254 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8255 }
8256 if let Some(p) = last_modified_start {
8257 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8258 }
8259 if let Some(p) = license_number {
8260 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8261 }
8262 if let Some(p) = sales_date_end {
8263 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
8264 }
8265 if let Some(p) = sales_date_start {
8266 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
8267 }
8268 if !query_params.is_empty() {
8269 path.push_str("?");
8270 path.push_str(&query_params.join("&"));
8271 }
8272 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8273 }
8274
8275 pub async fn sales_get_receipts_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8283 let mut path = format!("/sales/v2/receipts/active");
8284 let mut query_params = Vec::new();
8285 if let Some(p) = last_modified_end {
8286 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8287 }
8288 if let Some(p) = last_modified_start {
8289 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8290 }
8291 if let Some(p) = license_number {
8292 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8293 }
8294 if let Some(p) = page_number {
8295 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8296 }
8297 if let Some(p) = page_size {
8298 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8299 }
8300 if let Some(p) = sales_date_end {
8301 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
8302 }
8303 if let Some(p) = sales_date_start {
8304 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
8305 }
8306 if !query_params.is_empty() {
8307 path.push_str("?");
8308 path.push_str(&query_params.join("&"));
8309 }
8310 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8311 }
8312
8313 pub async fn sales_get_receipts_external_by_external_number_v2(&self, external_number: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8321 let mut path = format!("/sales/v2/receipts/external/{}", urlencoding::encode(external_number).as_ref());
8322 let mut query_params = Vec::new();
8323 if let Some(p) = license_number {
8324 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8325 }
8326 if !query_params.is_empty() {
8327 path.push_str("?");
8328 path.push_str(&query_params.join("&"));
8329 }
8330 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8331 }
8332
8333 pub async fn sales_get_receipts_inactive_v1(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8338 let mut path = format!("/sales/v1/receipts/inactive");
8339 let mut query_params = Vec::new();
8340 if let Some(p) = last_modified_end {
8341 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8342 }
8343 if let Some(p) = last_modified_start {
8344 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8345 }
8346 if let Some(p) = license_number {
8347 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8348 }
8349 if let Some(p) = sales_date_end {
8350 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
8351 }
8352 if let Some(p) = sales_date_start {
8353 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
8354 }
8355 if !query_params.is_empty() {
8356 path.push_str("?");
8357 path.push_str(&query_params.join("&"));
8358 }
8359 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8360 }
8361
8362 pub async fn sales_get_receipts_inactive_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, sales_date_end: Option<String>, sales_date_start: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8370 let mut path = format!("/sales/v2/receipts/inactive");
8371 let mut query_params = Vec::new();
8372 if let Some(p) = last_modified_end {
8373 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8374 }
8375 if let Some(p) = last_modified_start {
8376 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8377 }
8378 if let Some(p) = license_number {
8379 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8380 }
8381 if let Some(p) = page_number {
8382 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8383 }
8384 if let Some(p) = page_size {
8385 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8386 }
8387 if let Some(p) = sales_date_end {
8388 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
8389 }
8390 if let Some(p) = sales_date_start {
8391 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
8392 }
8393 if !query_params.is_empty() {
8394 path.push_str("?");
8395 path.push_str(&query_params.join("&"));
8396 }
8397 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8398 }
8399
8400 pub async fn sales_get_transactions_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8405 let mut path = format!("/sales/v1/transactions");
8406 let mut query_params = Vec::new();
8407 if let Some(p) = license_number {
8408 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8409 }
8410 if !query_params.is_empty() {
8411 path.push_str("?");
8412 path.push_str(&query_params.join("&"));
8413 }
8414 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8415 }
8416
8417 pub async fn sales_get_transactions_by_sales_date_start_and_sales_date_end_v1(&self, sales_date_start: &str, sales_date_end: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8422 let mut path = format!("/sales/v1/transactions/{}/{}", urlencoding::encode(sales_date_start).as_ref(), urlencoding::encode(sales_date_end).as_ref());
8423 let mut query_params = Vec::new();
8424 if let Some(p) = license_number {
8425 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8426 }
8427 if !query_params.is_empty() {
8428 path.push_str("?");
8429 path.push_str(&query_params.join("&"));
8430 }
8431 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8432 }
8433
8434 pub async fn sales_update_delivery_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8441 let mut path = format!("/sales/v1/deliveries");
8442 let mut query_params = Vec::new();
8443 if let Some(p) = license_number {
8444 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8445 }
8446 if !query_params.is_empty() {
8447 path.push_str("?");
8448 path.push_str(&query_params.join("&"));
8449 }
8450 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8451 }
8452
8453 pub async fn sales_update_delivery_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8460 let mut path = format!("/sales/v2/deliveries");
8461 let mut query_params = Vec::new();
8462 if let Some(p) = license_number {
8463 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8464 }
8465 if !query_params.is_empty() {
8466 path.push_str("?");
8467 path.push_str(&query_params.join("&"));
8468 }
8469 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8470 }
8471
8472 pub async fn sales_update_delivery_complete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8477 let mut path = format!("/sales/v1/deliveries/complete");
8478 let mut query_params = Vec::new();
8479 if let Some(p) = license_number {
8480 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8481 }
8482 if !query_params.is_empty() {
8483 path.push_str("?");
8484 path.push_str(&query_params.join("&"));
8485 }
8486 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8487 }
8488
8489 pub async fn sales_update_delivery_complete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8496 let mut path = format!("/sales/v2/deliveries/complete");
8497 let mut query_params = Vec::new();
8498 if let Some(p) = license_number {
8499 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8500 }
8501 if !query_params.is_empty() {
8502 path.push_str("?");
8503 path.push_str(&query_params.join("&"));
8504 }
8505 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8506 }
8507
8508 pub async fn sales_update_delivery_hub_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8515 let mut path = format!("/sales/v1/deliveries/hub");
8516 let mut query_params = Vec::new();
8517 if let Some(p) = license_number {
8518 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8519 }
8520 if !query_params.is_empty() {
8521 path.push_str("?");
8522 path.push_str(&query_params.join("&"));
8523 }
8524 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8525 }
8526
8527 pub async fn sales_update_delivery_hub_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8534 let mut path = format!("/sales/v2/deliveries/hub");
8535 let mut query_params = Vec::new();
8536 if let Some(p) = license_number {
8537 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8538 }
8539 if !query_params.is_empty() {
8540 path.push_str("?");
8541 path.push_str(&query_params.join("&"));
8542 }
8543 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8544 }
8545
8546 pub async fn sales_update_delivery_hub_accept_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8551 let mut path = format!("/sales/v1/deliveries/hub/accept");
8552 let mut query_params = Vec::new();
8553 if let Some(p) = license_number {
8554 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8555 }
8556 if !query_params.is_empty() {
8557 path.push_str("?");
8558 path.push_str(&query_params.join("&"));
8559 }
8560 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8561 }
8562
8563 pub async fn sales_update_delivery_hub_accept_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8570 let mut path = format!("/sales/v2/deliveries/hub/accept");
8571 let mut query_params = Vec::new();
8572 if let Some(p) = license_number {
8573 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8574 }
8575 if !query_params.is_empty() {
8576 path.push_str("?");
8577 path.push_str(&query_params.join("&"));
8578 }
8579 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8580 }
8581
8582 pub async fn sales_update_delivery_hub_depart_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8587 let mut path = format!("/sales/v1/deliveries/hub/depart");
8588 let mut query_params = Vec::new();
8589 if let Some(p) = license_number {
8590 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8591 }
8592 if !query_params.is_empty() {
8593 path.push_str("?");
8594 path.push_str(&query_params.join("&"));
8595 }
8596 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8597 }
8598
8599 pub async fn sales_update_delivery_hub_depart_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8606 let mut path = format!("/sales/v2/deliveries/hub/depart");
8607 let mut query_params = Vec::new();
8608 if let Some(p) = license_number {
8609 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8610 }
8611 if !query_params.is_empty() {
8612 path.push_str("?");
8613 path.push_str(&query_params.join("&"));
8614 }
8615 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8616 }
8617
8618 pub async fn sales_update_delivery_hub_verify_id_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8623 let mut path = format!("/sales/v1/deliveries/hub/verifyID");
8624 let mut query_params = Vec::new();
8625 if let Some(p) = license_number {
8626 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8627 }
8628 if !query_params.is_empty() {
8629 path.push_str("?");
8630 path.push_str(&query_params.join("&"));
8631 }
8632 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8633 }
8634
8635 pub async fn sales_update_delivery_hub_verify_id_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8642 let mut path = format!("/sales/v2/deliveries/hub/verifyID");
8643 let mut query_params = Vec::new();
8644 if let Some(p) = license_number {
8645 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8646 }
8647 if !query_params.is_empty() {
8648 path.push_str("?");
8649 path.push_str(&query_params.join("&"));
8650 }
8651 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8652 }
8653
8654 pub async fn sales_update_delivery_retailer_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8661 let mut path = format!("/sales/v1/deliveries/retailer");
8662 let mut query_params = Vec::new();
8663 if let Some(p) = license_number {
8664 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8665 }
8666 if !query_params.is_empty() {
8667 path.push_str("?");
8668 path.push_str(&query_params.join("&"));
8669 }
8670 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8671 }
8672
8673 pub async fn sales_update_delivery_retailer_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8686 let mut path = format!("/sales/v2/deliveries/retailer");
8687 let mut query_params = Vec::new();
8688 if let Some(p) = license_number {
8689 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8690 }
8691 if !query_params.is_empty() {
8692 path.push_str("?");
8693 path.push_str(&query_params.join("&"));
8694 }
8695 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8696 }
8697
8698 pub async fn sales_update_receipt_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8705 let mut path = format!("/sales/v1/receipts");
8706 let mut query_params = Vec::new();
8707 if let Some(p) = license_number {
8708 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8709 }
8710 if !query_params.is_empty() {
8711 path.push_str("?");
8712 path.push_str(&query_params.join("&"));
8713 }
8714 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8715 }
8716
8717 pub async fn sales_update_receipt_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8724 let mut path = format!("/sales/v2/receipts");
8725 let mut query_params = Vec::new();
8726 if let Some(p) = license_number {
8727 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8728 }
8729 if !query_params.is_empty() {
8730 path.push_str("?");
8731 path.push_str(&query_params.join("&"));
8732 }
8733 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8734 }
8735
8736 pub async fn sales_update_receipt_finalize_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8743 let mut path = format!("/sales/v2/receipts/finalize");
8744 let mut query_params = Vec::new();
8745 if let Some(p) = license_number {
8746 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8747 }
8748 if !query_params.is_empty() {
8749 path.push_str("?");
8750 path.push_str(&query_params.join("&"));
8751 }
8752 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8753 }
8754
8755 pub async fn sales_update_receipt_unfinalize_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8762 let mut path = format!("/sales/v2/receipts/unfinalize");
8763 let mut query_params = Vec::new();
8764 if let Some(p) = license_number {
8765 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8766 }
8767 if !query_params.is_empty() {
8768 path.push_str("?");
8769 path.push_str(&query_params.join("&"));
8770 }
8771 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8772 }
8773
8774 pub async fn sales_update_transaction_by_date_v1(&self, date: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8779 let mut path = format!("/sales/v1/transactions/{}", urlencoding::encode(date).as_ref());
8780 let mut query_params = Vec::new();
8781 if let Some(p) = license_number {
8782 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8783 }
8784 if !query_params.is_empty() {
8785 path.push_str("?");
8786 path.push_str(&query_params.join("&"));
8787 }
8788 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8789 }
8790
8791 pub async fn strains_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8796 let mut path = format!("/strains/v1/create");
8797 let mut query_params = Vec::new();
8798 if let Some(p) = license_number {
8799 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8800 }
8801 if !query_params.is_empty() {
8802 path.push_str("?");
8803 path.push_str(&query_params.join("&"));
8804 }
8805 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8806 }
8807
8808 pub async fn strains_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8815 let mut path = format!("/strains/v2");
8816 let mut query_params = Vec::new();
8817 if let Some(p) = license_number {
8818 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8819 }
8820 if !query_params.is_empty() {
8821 path.push_str("?");
8822 path.push_str(&query_params.join("&"));
8823 }
8824 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8825 }
8826
8827 pub async fn strains_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8832 let mut path = format!("/strains/v1/update");
8833 let mut query_params = Vec::new();
8834 if let Some(p) = license_number {
8835 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8836 }
8837 if !query_params.is_empty() {
8838 path.push_str("?");
8839 path.push_str(&query_params.join("&"));
8840 }
8841 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8842 }
8843
8844 pub async fn strains_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8849 let mut path = format!("/strains/v1/{}", urlencoding::encode(id).as_ref());
8850 let mut query_params = Vec::new();
8851 if let Some(p) = license_number {
8852 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8853 }
8854 if !query_params.is_empty() {
8855 path.push_str("?");
8856 path.push_str(&query_params.join("&"));
8857 }
8858 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8859 }
8860
8861 pub async fn strains_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8868 let mut path = format!("/strains/v2/{}", urlencoding::encode(id).as_ref());
8869 let mut query_params = Vec::new();
8870 if let Some(p) = license_number {
8871 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8872 }
8873 if !query_params.is_empty() {
8874 path.push_str("?");
8875 path.push_str(&query_params.join("&"));
8876 }
8877 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8878 }
8879
8880 pub async fn strains_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8885 let mut path = format!("/strains/v1/{}", urlencoding::encode(id).as_ref());
8886 let mut query_params = Vec::new();
8887 if let Some(p) = license_number {
8888 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8889 }
8890 if !query_params.is_empty() {
8891 path.push_str("?");
8892 path.push_str(&query_params.join("&"));
8893 }
8894 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8895 }
8896
8897 pub async fn strains_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8904 let mut path = format!("/strains/v2/{}", urlencoding::encode(id).as_ref());
8905 let mut query_params = Vec::new();
8906 if let Some(p) = license_number {
8907 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8908 }
8909 if !query_params.is_empty() {
8910 path.push_str("?");
8911 path.push_str(&query_params.join("&"));
8912 }
8913 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8914 }
8915
8916 pub async fn strains_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8921 let mut path = format!("/strains/v1/active");
8922 let mut query_params = Vec::new();
8923 if let Some(p) = license_number {
8924 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8925 }
8926 if !query_params.is_empty() {
8927 path.push_str("?");
8928 path.push_str(&query_params.join("&"));
8929 }
8930 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8931 }
8932
8933 pub async fn strains_get_active_v2(&self, last_modified_end: Option<String>, last_modified_start: Option<String>, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8940 let mut path = format!("/strains/v2/active");
8941 let mut query_params = Vec::new();
8942 if let Some(p) = last_modified_end {
8943 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8944 }
8945 if let Some(p) = last_modified_start {
8946 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8947 }
8948 if let Some(p) = license_number {
8949 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8950 }
8951 if let Some(p) = page_number {
8952 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8953 }
8954 if let Some(p) = page_size {
8955 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8956 }
8957 if !query_params.is_empty() {
8958 path.push_str("?");
8959 path.push_str(&query_params.join("&"));
8960 }
8961 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8962 }
8963
8964 pub async fn strains_get_inactive_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8971 let mut path = format!("/strains/v2/inactive");
8972 let mut query_params = Vec::new();
8973 if let Some(p) = license_number {
8974 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8975 }
8976 if let Some(p) = page_number {
8977 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8978 }
8979 if let Some(p) = page_size {
8980 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8981 }
8982 if !query_params.is_empty() {
8983 path.push_str("?");
8984 path.push_str(&query_params.join("&"));
8985 }
8986 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8987 }
8988
8989 pub async fn strains_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8996 let mut path = format!("/strains/v2");
8997 let mut query_params = Vec::new();
8998 if let Some(p) = license_number {
8999 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9000 }
9001 if !query_params.is_empty() {
9002 path.push_str("?");
9003 path.push_str(&query_params.join("&"));
9004 }
9005 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9006 }
9007
9008 pub async fn transporters_create_driver_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9015 let mut path = format!("/transporters/v2/drivers");
9016 let mut query_params = Vec::new();
9017 if let Some(p) = license_number {
9018 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9019 }
9020 if !query_params.is_empty() {
9021 path.push_str("?");
9022 path.push_str(&query_params.join("&"));
9023 }
9024 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9025 }
9026
9027 pub async fn transporters_create_vehicle_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9034 let mut path = format!("/transporters/v2/vehicles");
9035 let mut query_params = Vec::new();
9036 if let Some(p) = license_number {
9037 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9038 }
9039 if !query_params.is_empty() {
9040 path.push_str("?");
9041 path.push_str(&query_params.join("&"));
9042 }
9043 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9044 }
9045
9046 pub async fn transporters_delete_driver_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9053 let mut path = format!("/transporters/v2/drivers/{}", urlencoding::encode(id).as_ref());
9054 let mut query_params = Vec::new();
9055 if let Some(p) = license_number {
9056 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9057 }
9058 if !query_params.is_empty() {
9059 path.push_str("?");
9060 path.push_str(&query_params.join("&"));
9061 }
9062 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9063 }
9064
9065 pub async fn transporters_delete_vehicle_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9072 let mut path = format!("/transporters/v2/vehicles/{}", urlencoding::encode(id).as_ref());
9073 let mut query_params = Vec::new();
9074 if let Some(p) = license_number {
9075 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9076 }
9077 if !query_params.is_empty() {
9078 path.push_str("?");
9079 path.push_str(&query_params.join("&"));
9080 }
9081 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9082 }
9083
9084 pub async fn transporters_get_driver_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9091 let mut path = format!("/transporters/v2/drivers/{}", urlencoding::encode(id).as_ref());
9092 let mut query_params = Vec::new();
9093 if let Some(p) = license_number {
9094 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9095 }
9096 if !query_params.is_empty() {
9097 path.push_str("?");
9098 path.push_str(&query_params.join("&"));
9099 }
9100 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9101 }
9102
9103 pub async fn transporters_get_drivers_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9110 let mut path = format!("/transporters/v2/drivers");
9111 let mut query_params = Vec::new();
9112 if let Some(p) = license_number {
9113 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9114 }
9115 if let Some(p) = page_number {
9116 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
9117 }
9118 if let Some(p) = page_size {
9119 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
9120 }
9121 if !query_params.is_empty() {
9122 path.push_str("?");
9123 path.push_str(&query_params.join("&"));
9124 }
9125 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9126 }
9127
9128 pub async fn transporters_get_vehicle_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9135 let mut path = format!("/transporters/v2/vehicles/{}", urlencoding::encode(id).as_ref());
9136 let mut query_params = Vec::new();
9137 if let Some(p) = license_number {
9138 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9139 }
9140 if !query_params.is_empty() {
9141 path.push_str("?");
9142 path.push_str(&query_params.join("&"));
9143 }
9144 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9145 }
9146
9147 pub async fn transporters_get_vehicles_v2(&self, license_number: Option<String>, page_number: Option<String>, page_size: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9154 let mut path = format!("/transporters/v2/vehicles");
9155 let mut query_params = Vec::new();
9156 if let Some(p) = license_number {
9157 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9158 }
9159 if let Some(p) = page_number {
9160 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
9161 }
9162 if let Some(p) = page_size {
9163 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
9164 }
9165 if !query_params.is_empty() {
9166 path.push_str("?");
9167 path.push_str(&query_params.join("&"));
9168 }
9169 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9170 }
9171
9172 pub async fn transporters_update_driver_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9179 let mut path = format!("/transporters/v2/drivers");
9180 let mut query_params = Vec::new();
9181 if let Some(p) = license_number {
9182 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9183 }
9184 if !query_params.is_empty() {
9185 path.push_str("?");
9186 path.push_str(&query_params.join("&"));
9187 }
9188 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9189 }
9190
9191 pub async fn transporters_update_vehicle_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9198 let mut path = format!("/transporters/v2/vehicles");
9199 let mut query_params = Vec::new();
9200 if let Some(p) = license_number {
9201 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9202 }
9203 if !query_params.is_empty() {
9204 path.push_str("?");
9205 path.push_str(&query_params.join("&"));
9206 }
9207 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9208 }
9209
9210}