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 sales_create_delivery_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
51 let mut path = format!("/sales/v1/deliveries");
52 let mut query_params = Vec::new();
53 if let Some(p) = license_number {
54 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
55 }
56 if !query_params.is_empty() {
57 path.push_str("?");
58 path.push_str(&query_params.join("&"));
59 }
60 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
61 }
62
63 pub async fn sales_create_delivery_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
74 let mut path = format!("/sales/v2/deliveries");
75 let mut query_params = Vec::new();
76 if let Some(p) = license_number {
77 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
78 }
79 if !query_params.is_empty() {
80 path.push_str("?");
81 path.push_str(&query_params.join("&"));
82 }
83 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
84 }
85
86 pub async fn sales_create_delivery_retailer_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
93 let mut path = format!("/sales/v1/deliveries/retailer");
94 let mut query_params = Vec::new();
95 if let Some(p) = license_number {
96 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
97 }
98 if !query_params.is_empty() {
99 path.push_str("?");
100 path.push_str(&query_params.join("&"));
101 }
102 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
103 }
104
105 pub async fn sales_create_delivery_retailer_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
118 let mut path = format!("/sales/v2/deliveries/retailer");
119 let mut query_params = Vec::new();
120 if let Some(p) = license_number {
121 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
122 }
123 if !query_params.is_empty() {
124 path.push_str("?");
125 path.push_str(&query_params.join("&"));
126 }
127 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
128 }
129
130 pub async fn sales_create_delivery_retailer_depart_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
135 let mut path = format!("/sales/v1/deliveries/retailer/depart");
136 let mut query_params = Vec::new();
137 if let Some(p) = license_number {
138 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
139 }
140 if !query_params.is_empty() {
141 path.push_str("?");
142 path.push_str(&query_params.join("&"));
143 }
144 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
145 }
146
147 pub async fn sales_create_delivery_retailer_depart_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
158 let mut path = format!("/sales/v2/deliveries/retailer/depart");
159 let mut query_params = Vec::new();
160 if let Some(p) = license_number {
161 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
162 }
163 if !query_params.is_empty() {
164 path.push_str("?");
165 path.push_str(&query_params.join("&"));
166 }
167 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
168 }
169
170 pub async fn sales_create_delivery_retailer_end_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
177 let mut path = format!("/sales/v1/deliveries/retailer/end");
178 let mut query_params = Vec::new();
179 if let Some(p) = license_number {
180 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
181 }
182 if !query_params.is_empty() {
183 path.push_str("?");
184 path.push_str(&query_params.join("&"));
185 }
186 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
187 }
188
189 pub async fn sales_create_delivery_retailer_end_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
200 let mut path = format!("/sales/v2/deliveries/retailer/end");
201 let mut query_params = Vec::new();
202 if let Some(p) = license_number {
203 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
204 }
205 if !query_params.is_empty() {
206 path.push_str("?");
207 path.push_str(&query_params.join("&"));
208 }
209 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
210 }
211
212 pub async fn sales_create_delivery_retailer_restock_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
219 let mut path = format!("/sales/v1/deliveries/retailer/restock");
220 let mut query_params = Vec::new();
221 if let Some(p) = license_number {
222 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
223 }
224 if !query_params.is_empty() {
225 path.push_str("?");
226 path.push_str(&query_params.join("&"));
227 }
228 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
229 }
230
231 pub async fn sales_create_delivery_retailer_restock_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
242 let mut path = format!("/sales/v2/deliveries/retailer/restock");
243 let mut query_params = Vec::new();
244 if let Some(p) = license_number {
245 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
246 }
247 if !query_params.is_empty() {
248 path.push_str("?");
249 path.push_str(&query_params.join("&"));
250 }
251 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
252 }
253
254 pub async fn sales_create_delivery_retailer_sale_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
261 let mut path = format!("/sales/v1/deliveries/retailer/sale");
262 let mut query_params = Vec::new();
263 if let Some(p) = license_number {
264 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
265 }
266 if !query_params.is_empty() {
267 path.push_str("?");
268 path.push_str(&query_params.join("&"));
269 }
270 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
271 }
272
273 pub async fn sales_create_delivery_retailer_sale_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
285 let mut path = format!("/sales/v2/deliveries/retailer/sale");
286 let mut query_params = Vec::new();
287 if let Some(p) = license_number {
288 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
289 }
290 if !query_params.is_empty() {
291 path.push_str("?");
292 path.push_str(&query_params.join("&"));
293 }
294 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
295 }
296
297 pub async fn sales_create_receipt_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
304 let mut path = format!("/sales/v1/receipts");
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 sales_create_receipt_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
328 let mut path = format!("/sales/v2/receipts");
329 let mut query_params = Vec::new();
330 if let Some(p) = license_number {
331 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
332 }
333 if !query_params.is_empty() {
334 path.push_str("?");
335 path.push_str(&query_params.join("&"));
336 }
337 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
338 }
339
340 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>> {
345 let mut path = format!("/sales/v1/transactions/{}", urlencoding::encode(date).as_ref());
346 let mut query_params = Vec::new();
347 if let Some(p) = license_number {
348 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
349 }
350 if !query_params.is_empty() {
351 path.push_str("?");
352 path.push_str(&query_params.join("&"));
353 }
354 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
355 }
356
357 pub async fn sales_delete_delivery_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
362 let mut path = format!("/sales/v1/deliveries/{}", urlencoding::encode(id).as_ref());
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::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
372 }
373
374 pub async fn sales_delete_delivery_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
381 let mut path = format!("/sales/v2/deliveries/{}", urlencoding::encode(id).as_ref());
382 let mut query_params = Vec::new();
383 if let Some(p) = license_number {
384 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
385 }
386 if !query_params.is_empty() {
387 path.push_str("?");
388 path.push_str(&query_params.join("&"));
389 }
390 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
391 }
392
393 pub async fn sales_delete_delivery_retailer_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
398 let mut path = format!("/sales/v1/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
399 let mut query_params = Vec::new();
400 if let Some(p) = license_number {
401 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
402 }
403 if !query_params.is_empty() {
404 path.push_str("?");
405 path.push_str(&query_params.join("&"));
406 }
407 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
408 }
409
410 pub async fn sales_delete_delivery_retailer_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
421 let mut path = format!("/sales/v2/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
422 let mut query_params = Vec::new();
423 if let Some(p) = license_number {
424 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
425 }
426 if !query_params.is_empty() {
427 path.push_str("?");
428 path.push_str(&query_params.join("&"));
429 }
430 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
431 }
432
433 pub async fn sales_delete_receipt_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
438 let mut path = format!("/sales/v1/receipts/{}", urlencoding::encode(id).as_ref());
439 let mut query_params = Vec::new();
440 if let Some(p) = license_number {
441 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
442 }
443 if !query_params.is_empty() {
444 path.push_str("?");
445 path.push_str(&query_params.join("&"));
446 }
447 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
448 }
449
450 pub async fn sales_delete_receipt_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
457 let mut path = format!("/sales/v2/receipts/{}", urlencoding::encode(id).as_ref());
458 let mut query_params = Vec::new();
459 if let Some(p) = license_number {
460 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
461 }
462 if !query_params.is_empty() {
463 path.push_str("?");
464 path.push_str(&query_params.join("&"));
465 }
466 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
467 }
468
469 pub async fn sales_get_counties_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
474 let mut path = format!("/sales/v1/counties");
475 let mut query_params = Vec::new();
476 if let Some(p) = no {
477 query_params.push(format!("No={}", urlencoding::encode(&p)));
478 }
479 if !query_params.is_empty() {
480 path.push_str("?");
481 path.push_str(&query_params.join("&"));
482 }
483 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
484 }
485
486 pub async fn sales_get_counties_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
493 let mut path = format!("/sales/v2/counties");
494 let mut query_params = Vec::new();
495 if let Some(p) = no {
496 query_params.push(format!("No={}", urlencoding::encode(&p)));
497 }
498 if !query_params.is_empty() {
499 path.push_str("?");
500 path.push_str(&query_params.join("&"));
501 }
502 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
503 }
504
505 pub async fn sales_get_customertypes_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
510 let mut path = format!("/sales/v1/customertypes");
511 let mut query_params = Vec::new();
512 if let Some(p) = no {
513 query_params.push(format!("No={}", urlencoding::encode(&p)));
514 }
515 if !query_params.is_empty() {
516 path.push_str("?");
517 path.push_str(&query_params.join("&"));
518 }
519 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
520 }
521
522 pub async fn sales_get_customertypes_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
529 let mut path = format!("/sales/v2/customertypes");
530 let mut query_params = Vec::new();
531 if let Some(p) = no {
532 query_params.push(format!("No={}", urlencoding::encode(&p)));
533 }
534 if !query_params.is_empty() {
535 path.push_str("?");
536 path.push_str(&query_params.join("&"));
537 }
538 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
539 }
540
541 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>> {
546 let mut path = format!("/sales/v1/deliveries/active");
547 let mut query_params = Vec::new();
548 if let Some(p) = last_modified_end {
549 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
550 }
551 if let Some(p) = last_modified_start {
552 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
553 }
554 if let Some(p) = license_number {
555 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
556 }
557 if let Some(p) = sales_date_end {
558 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
559 }
560 if let Some(p) = sales_date_start {
561 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
562 }
563 if !query_params.is_empty() {
564 path.push_str("?");
565 path.push_str(&query_params.join("&"));
566 }
567 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
568 }
569
570 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>> {
578 let mut path = format!("/sales/v2/deliveries/active");
579 let mut query_params = Vec::new();
580 if let Some(p) = last_modified_end {
581 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
582 }
583 if let Some(p) = last_modified_start {
584 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
585 }
586 if let Some(p) = license_number {
587 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
588 }
589 if let Some(p) = page_number {
590 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
591 }
592 if let Some(p) = page_size {
593 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
594 }
595 if let Some(p) = sales_date_end {
596 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
597 }
598 if let Some(p) = sales_date_start {
599 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
600 }
601 if !query_params.is_empty() {
602 path.push_str("?");
603 path.push_str(&query_params.join("&"));
604 }
605 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
606 }
607
608 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>> {
613 let mut path = format!("/sales/v1/deliveries/inactive");
614 let mut query_params = Vec::new();
615 if let Some(p) = last_modified_end {
616 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
617 }
618 if let Some(p) = last_modified_start {
619 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
620 }
621 if let Some(p) = license_number {
622 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
623 }
624 if let Some(p) = sales_date_end {
625 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
626 }
627 if let Some(p) = sales_date_start {
628 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
629 }
630 if !query_params.is_empty() {
631 path.push_str("?");
632 path.push_str(&query_params.join("&"));
633 }
634 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
635 }
636
637 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>> {
645 let mut path = format!("/sales/v2/deliveries/inactive");
646 let mut query_params = Vec::new();
647 if let Some(p) = last_modified_end {
648 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
649 }
650 if let Some(p) = last_modified_start {
651 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
652 }
653 if let Some(p) = license_number {
654 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
655 }
656 if let Some(p) = page_number {
657 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
658 }
659 if let Some(p) = page_size {
660 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
661 }
662 if let Some(p) = sales_date_end {
663 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
664 }
665 if let Some(p) = sales_date_start {
666 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
667 }
668 if !query_params.is_empty() {
669 path.push_str("?");
670 path.push_str(&query_params.join("&"));
671 }
672 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
673 }
674
675 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>> {
680 let mut path = format!("/sales/v1/deliveries/retailer/active");
681 let mut query_params = Vec::new();
682 if let Some(p) = last_modified_end {
683 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
684 }
685 if let Some(p) = last_modified_start {
686 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
687 }
688 if let Some(p) = license_number {
689 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
690 }
691 if !query_params.is_empty() {
692 path.push_str("?");
693 path.push_str(&query_params.join("&"));
694 }
695 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
696 }
697
698 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>> {
706 let mut path = format!("/sales/v2/deliveries/retailer/active");
707 let mut query_params = Vec::new();
708 if let Some(p) = last_modified_end {
709 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
710 }
711 if let Some(p) = last_modified_start {
712 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
713 }
714 if let Some(p) = license_number {
715 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
716 }
717 if let Some(p) = page_number {
718 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
719 }
720 if let Some(p) = page_size {
721 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
722 }
723 if !query_params.is_empty() {
724 path.push_str("?");
725 path.push_str(&query_params.join("&"));
726 }
727 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
728 }
729
730 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>> {
735 let mut path = format!("/sales/v1/deliveries/retailer/inactive");
736 let mut query_params = Vec::new();
737 if let Some(p) = last_modified_end {
738 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
739 }
740 if let Some(p) = last_modified_start {
741 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
742 }
743 if let Some(p) = license_number {
744 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
745 }
746 if !query_params.is_empty() {
747 path.push_str("?");
748 path.push_str(&query_params.join("&"));
749 }
750 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
751 }
752
753 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>> {
761 let mut path = format!("/sales/v2/deliveries/retailer/inactive");
762 let mut query_params = Vec::new();
763 if let Some(p) = last_modified_end {
764 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
765 }
766 if let Some(p) = last_modified_start {
767 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
768 }
769 if let Some(p) = license_number {
770 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
771 }
772 if let Some(p) = page_number {
773 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
774 }
775 if let Some(p) = page_size {
776 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
777 }
778 if !query_params.is_empty() {
779 path.push_str("?");
780 path.push_str(&query_params.join("&"));
781 }
782 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
783 }
784
785 pub async fn sales_get_deliveries_returnreasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
790 let mut path = format!("/sales/v1/deliveries/returnreasons");
791 let mut query_params = Vec::new();
792 if let Some(p) = license_number {
793 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
794 }
795 if !query_params.is_empty() {
796 path.push_str("?");
797 path.push_str(&query_params.join("&"));
798 }
799 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
800 }
801
802 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>> {
809 let mut path = format!("/sales/v2/deliveries/returnreasons");
810 let mut query_params = Vec::new();
811 if let Some(p) = license_number {
812 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
813 }
814 if let Some(p) = page_number {
815 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
816 }
817 if let Some(p) = page_size {
818 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
819 }
820 if !query_params.is_empty() {
821 path.push_str("?");
822 path.push_str(&query_params.join("&"));
823 }
824 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
825 }
826
827 pub async fn sales_get_delivery_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
832 let mut path = format!("/sales/v1/deliveries/{}", urlencoding::encode(id).as_ref());
833 let mut query_params = Vec::new();
834 if let Some(p) = license_number {
835 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
836 }
837 if !query_params.is_empty() {
838 path.push_str("?");
839 path.push_str(&query_params.join("&"));
840 }
841 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
842 }
843
844 pub async fn sales_get_delivery_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
852 let mut path = format!("/sales/v2/deliveries/{}", urlencoding::encode(id).as_ref());
853 let mut query_params = Vec::new();
854 if let Some(p) = license_number {
855 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
856 }
857 if !query_params.is_empty() {
858 path.push_str("?");
859 path.push_str(&query_params.join("&"));
860 }
861 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
862 }
863
864 pub async fn sales_get_delivery_retailer_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
869 let mut path = format!("/sales/v1/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
870 let mut query_params = Vec::new();
871 if let Some(p) = license_number {
872 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
873 }
874 if !query_params.is_empty() {
875 path.push_str("?");
876 path.push_str(&query_params.join("&"));
877 }
878 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
879 }
880
881 pub async fn sales_get_delivery_retailer_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
889 let mut path = format!("/sales/v2/deliveries/retailer/{}", urlencoding::encode(id).as_ref());
890 let mut query_params = Vec::new();
891 if let Some(p) = license_number {
892 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
893 }
894 if !query_params.is_empty() {
895 path.push_str("?");
896 path.push_str(&query_params.join("&"));
897 }
898 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
899 }
900
901 pub async fn sales_get_patient_registrations_locations_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
906 let mut path = format!("/sales/v1/patientregistration/locations");
907 let mut query_params = Vec::new();
908 if let Some(p) = no {
909 query_params.push(format!("No={}", urlencoding::encode(&p)));
910 }
911 if !query_params.is_empty() {
912 path.push_str("?");
913 path.push_str(&query_params.join("&"));
914 }
915 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
916 }
917
918 pub async fn sales_get_patient_registrations_locations_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
925 let mut path = format!("/sales/v2/patientregistration/locations");
926 let mut query_params = Vec::new();
927 if let Some(p) = no {
928 query_params.push(format!("No={}", urlencoding::encode(&p)));
929 }
930 if !query_params.is_empty() {
931 path.push_str("?");
932 path.push_str(&query_params.join("&"));
933 }
934 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
935 }
936
937 pub async fn sales_get_paymenttypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
942 let mut path = format!("/sales/v1/paymenttypes");
943 let mut query_params = Vec::new();
944 if let Some(p) = license_number {
945 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
946 }
947 if !query_params.is_empty() {
948 path.push_str("?");
949 path.push_str(&query_params.join("&"));
950 }
951 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
952 }
953
954 pub async fn sales_get_paymenttypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
962 let mut path = format!("/sales/v2/paymenttypes");
963 let mut query_params = Vec::new();
964 if let Some(p) = license_number {
965 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
966 }
967 if !query_params.is_empty() {
968 path.push_str("?");
969 path.push_str(&query_params.join("&"));
970 }
971 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
972 }
973
974 pub async fn sales_get_receipt_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
979 let mut path = format!("/sales/v1/receipts/{}", urlencoding::encode(id).as_ref());
980 let mut query_params = Vec::new();
981 if let Some(p) = license_number {
982 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
983 }
984 if !query_params.is_empty() {
985 path.push_str("?");
986 path.push_str(&query_params.join("&"));
987 }
988 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
989 }
990
991 pub async fn sales_get_receipt_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
999 let mut path = format!("/sales/v2/receipts/{}", urlencoding::encode(id).as_ref());
1000 let mut query_params = Vec::new();
1001 if let Some(p) = license_number {
1002 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1003 }
1004 if !query_params.is_empty() {
1005 path.push_str("?");
1006 path.push_str(&query_params.join("&"));
1007 }
1008 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1009 }
1010
1011 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>> {
1016 let mut path = format!("/sales/v1/receipts/active");
1017 let mut query_params = Vec::new();
1018 if let Some(p) = last_modified_end {
1019 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1020 }
1021 if let Some(p) = last_modified_start {
1022 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1023 }
1024 if let Some(p) = license_number {
1025 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1026 }
1027 if let Some(p) = sales_date_end {
1028 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
1029 }
1030 if let Some(p) = sales_date_start {
1031 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
1032 }
1033 if !query_params.is_empty() {
1034 path.push_str("?");
1035 path.push_str(&query_params.join("&"));
1036 }
1037 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1038 }
1039
1040 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>> {
1048 let mut path = format!("/sales/v2/receipts/active");
1049 let mut query_params = Vec::new();
1050 if let Some(p) = last_modified_end {
1051 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1052 }
1053 if let Some(p) = last_modified_start {
1054 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1055 }
1056 if let Some(p) = license_number {
1057 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1058 }
1059 if let Some(p) = page_number {
1060 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1061 }
1062 if let Some(p) = page_size {
1063 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1064 }
1065 if let Some(p) = sales_date_end {
1066 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
1067 }
1068 if let Some(p) = sales_date_start {
1069 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
1070 }
1071 if !query_params.is_empty() {
1072 path.push_str("?");
1073 path.push_str(&query_params.join("&"));
1074 }
1075 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1076 }
1077
1078 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>> {
1086 let mut path = format!("/sales/v2/receipts/external/{}", urlencoding::encode(external_number).as_ref());
1087 let mut query_params = Vec::new();
1088 if let Some(p) = license_number {
1089 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1090 }
1091 if !query_params.is_empty() {
1092 path.push_str("?");
1093 path.push_str(&query_params.join("&"));
1094 }
1095 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1096 }
1097
1098 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>> {
1103 let mut path = format!("/sales/v1/receipts/inactive");
1104 let mut query_params = Vec::new();
1105 if let Some(p) = last_modified_end {
1106 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1107 }
1108 if let Some(p) = last_modified_start {
1109 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1110 }
1111 if let Some(p) = license_number {
1112 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1113 }
1114 if let Some(p) = sales_date_end {
1115 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
1116 }
1117 if let Some(p) = sales_date_start {
1118 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
1119 }
1120 if !query_params.is_empty() {
1121 path.push_str("?");
1122 path.push_str(&query_params.join("&"));
1123 }
1124 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1125 }
1126
1127 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>> {
1135 let mut path = format!("/sales/v2/receipts/inactive");
1136 let mut query_params = Vec::new();
1137 if let Some(p) = last_modified_end {
1138 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1139 }
1140 if let Some(p) = last_modified_start {
1141 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1142 }
1143 if let Some(p) = license_number {
1144 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1145 }
1146 if let Some(p) = page_number {
1147 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1148 }
1149 if let Some(p) = page_size {
1150 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1151 }
1152 if let Some(p) = sales_date_end {
1153 query_params.push(format!("salesDateEnd={}", urlencoding::encode(&p)));
1154 }
1155 if let Some(p) = sales_date_start {
1156 query_params.push(format!("salesDateStart={}", urlencoding::encode(&p)));
1157 }
1158 if !query_params.is_empty() {
1159 path.push_str("?");
1160 path.push_str(&query_params.join("&"));
1161 }
1162 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1163 }
1164
1165 pub async fn sales_get_transactions_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1170 let mut path = format!("/sales/v1/transactions");
1171 let mut query_params = Vec::new();
1172 if let Some(p) = license_number {
1173 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1174 }
1175 if !query_params.is_empty() {
1176 path.push_str("?");
1177 path.push_str(&query_params.join("&"));
1178 }
1179 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1180 }
1181
1182 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>> {
1187 let mut path = format!("/sales/v1/transactions/{}/{}", urlencoding::encode(sales_date_start).as_ref(), urlencoding::encode(sales_date_end).as_ref());
1188 let mut query_params = Vec::new();
1189 if let Some(p) = license_number {
1190 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1191 }
1192 if !query_params.is_empty() {
1193 path.push_str("?");
1194 path.push_str(&query_params.join("&"));
1195 }
1196 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1197 }
1198
1199 pub async fn sales_update_delivery_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1206 let mut path = format!("/sales/v1/deliveries");
1207 let mut query_params = Vec::new();
1208 if let Some(p) = license_number {
1209 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1210 }
1211 if !query_params.is_empty() {
1212 path.push_str("?");
1213 path.push_str(&query_params.join("&"));
1214 }
1215 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1216 }
1217
1218 pub async fn sales_update_delivery_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1225 let mut path = format!("/sales/v2/deliveries");
1226 let mut query_params = Vec::new();
1227 if let Some(p) = license_number {
1228 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1229 }
1230 if !query_params.is_empty() {
1231 path.push_str("?");
1232 path.push_str(&query_params.join("&"));
1233 }
1234 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1235 }
1236
1237 pub async fn sales_update_delivery_complete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1242 let mut path = format!("/sales/v1/deliveries/complete");
1243 let mut query_params = Vec::new();
1244 if let Some(p) = license_number {
1245 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1246 }
1247 if !query_params.is_empty() {
1248 path.push_str("?");
1249 path.push_str(&query_params.join("&"));
1250 }
1251 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1252 }
1253
1254 pub async fn sales_update_delivery_complete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1261 let mut path = format!("/sales/v2/deliveries/complete");
1262 let mut query_params = Vec::new();
1263 if let Some(p) = license_number {
1264 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1265 }
1266 if !query_params.is_empty() {
1267 path.push_str("?");
1268 path.push_str(&query_params.join("&"));
1269 }
1270 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1271 }
1272
1273 pub async fn sales_update_delivery_hub_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1280 let mut path = format!("/sales/v1/deliveries/hub");
1281 let mut query_params = Vec::new();
1282 if let Some(p) = license_number {
1283 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1284 }
1285 if !query_params.is_empty() {
1286 path.push_str("?");
1287 path.push_str(&query_params.join("&"));
1288 }
1289 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1290 }
1291
1292 pub async fn sales_update_delivery_hub_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1299 let mut path = format!("/sales/v2/deliveries/hub");
1300 let mut query_params = Vec::new();
1301 if let Some(p) = license_number {
1302 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1303 }
1304 if !query_params.is_empty() {
1305 path.push_str("?");
1306 path.push_str(&query_params.join("&"));
1307 }
1308 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1309 }
1310
1311 pub async fn sales_update_delivery_hub_accept_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1316 let mut path = format!("/sales/v1/deliveries/hub/accept");
1317 let mut query_params = Vec::new();
1318 if let Some(p) = license_number {
1319 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1320 }
1321 if !query_params.is_empty() {
1322 path.push_str("?");
1323 path.push_str(&query_params.join("&"));
1324 }
1325 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1326 }
1327
1328 pub async fn sales_update_delivery_hub_accept_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1335 let mut path = format!("/sales/v2/deliveries/hub/accept");
1336 let mut query_params = Vec::new();
1337 if let Some(p) = license_number {
1338 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1339 }
1340 if !query_params.is_empty() {
1341 path.push_str("?");
1342 path.push_str(&query_params.join("&"));
1343 }
1344 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1345 }
1346
1347 pub async fn sales_update_delivery_hub_depart_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1352 let mut path = format!("/sales/v1/deliveries/hub/depart");
1353 let mut query_params = Vec::new();
1354 if let Some(p) = license_number {
1355 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1356 }
1357 if !query_params.is_empty() {
1358 path.push_str("?");
1359 path.push_str(&query_params.join("&"));
1360 }
1361 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1362 }
1363
1364 pub async fn sales_update_delivery_hub_depart_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1371 let mut path = format!("/sales/v2/deliveries/hub/depart");
1372 let mut query_params = Vec::new();
1373 if let Some(p) = license_number {
1374 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1375 }
1376 if !query_params.is_empty() {
1377 path.push_str("?");
1378 path.push_str(&query_params.join("&"));
1379 }
1380 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1381 }
1382
1383 pub async fn sales_update_delivery_hub_verify_id_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1388 let mut path = format!("/sales/v1/deliveries/hub/verifyID");
1389 let mut query_params = Vec::new();
1390 if let Some(p) = license_number {
1391 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1392 }
1393 if !query_params.is_empty() {
1394 path.push_str("?");
1395 path.push_str(&query_params.join("&"));
1396 }
1397 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1398 }
1399
1400 pub async fn sales_update_delivery_hub_verify_id_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1407 let mut path = format!("/sales/v2/deliveries/hub/verifyID");
1408 let mut query_params = Vec::new();
1409 if let Some(p) = license_number {
1410 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1411 }
1412 if !query_params.is_empty() {
1413 path.push_str("?");
1414 path.push_str(&query_params.join("&"));
1415 }
1416 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1417 }
1418
1419 pub async fn sales_update_delivery_retailer_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1426 let mut path = format!("/sales/v1/deliveries/retailer");
1427 let mut query_params = Vec::new();
1428 if let Some(p) = license_number {
1429 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1430 }
1431 if !query_params.is_empty() {
1432 path.push_str("?");
1433 path.push_str(&query_params.join("&"));
1434 }
1435 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1436 }
1437
1438 pub async fn sales_update_delivery_retailer_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1451 let mut path = format!("/sales/v2/deliveries/retailer");
1452 let mut query_params = Vec::new();
1453 if let Some(p) = license_number {
1454 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1455 }
1456 if !query_params.is_empty() {
1457 path.push_str("?");
1458 path.push_str(&query_params.join("&"));
1459 }
1460 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1461 }
1462
1463 pub async fn sales_update_receipt_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1470 let mut path = format!("/sales/v1/receipts");
1471 let mut query_params = Vec::new();
1472 if let Some(p) = license_number {
1473 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1474 }
1475 if !query_params.is_empty() {
1476 path.push_str("?");
1477 path.push_str(&query_params.join("&"));
1478 }
1479 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1480 }
1481
1482 pub async fn sales_update_receipt_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1489 let mut path = format!("/sales/v2/receipts");
1490 let mut query_params = Vec::new();
1491 if let Some(p) = license_number {
1492 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1493 }
1494 if !query_params.is_empty() {
1495 path.push_str("?");
1496 path.push_str(&query_params.join("&"));
1497 }
1498 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1499 }
1500
1501 pub async fn sales_update_receipt_finalize_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1508 let mut path = format!("/sales/v2/receipts/finalize");
1509 let mut query_params = Vec::new();
1510 if let Some(p) = license_number {
1511 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1512 }
1513 if !query_params.is_empty() {
1514 path.push_str("?");
1515 path.push_str(&query_params.join("&"));
1516 }
1517 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1518 }
1519
1520 pub async fn sales_update_receipt_unfinalize_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1527 let mut path = format!("/sales/v2/receipts/unfinalize");
1528 let mut query_params = Vec::new();
1529 if let Some(p) = license_number {
1530 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1531 }
1532 if !query_params.is_empty() {
1533 path.push_str("?");
1534 path.push_str(&query_params.join("&"));
1535 }
1536 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1537 }
1538
1539 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>> {
1544 let mut path = format!("/sales/v1/transactions/{}", urlencoding::encode(date).as_ref());
1545 let mut query_params = Vec::new();
1546 if let Some(p) = license_number {
1547 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1548 }
1549 if !query_params.is_empty() {
1550 path.push_str("?");
1551 path.push_str(&query_params.join("&"));
1552 }
1553 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1554 }
1555
1556 pub async fn strains_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1561 let mut path = format!("/strains/v1/create");
1562 let mut query_params = Vec::new();
1563 if let Some(p) = license_number {
1564 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1565 }
1566 if !query_params.is_empty() {
1567 path.push_str("?");
1568 path.push_str(&query_params.join("&"));
1569 }
1570 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1571 }
1572
1573 pub async fn strains_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1580 let mut path = format!("/strains/v2");
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 strains_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1597 let mut path = format!("/strains/v1/update");
1598 let mut query_params = Vec::new();
1599 if let Some(p) = license_number {
1600 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1601 }
1602 if !query_params.is_empty() {
1603 path.push_str("?");
1604 path.push_str(&query_params.join("&"));
1605 }
1606 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1607 }
1608
1609 pub async fn strains_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1614 let mut path = format!("/strains/v1/{}", urlencoding::encode(id).as_ref());
1615 let mut query_params = Vec::new();
1616 if let Some(p) = license_number {
1617 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1618 }
1619 if !query_params.is_empty() {
1620 path.push_str("?");
1621 path.push_str(&query_params.join("&"));
1622 }
1623 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1624 }
1625
1626 pub async fn strains_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1633 let mut path = format!("/strains/v2/{}", urlencoding::encode(id).as_ref());
1634 let mut query_params = Vec::new();
1635 if let Some(p) = license_number {
1636 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1637 }
1638 if !query_params.is_empty() {
1639 path.push_str("?");
1640 path.push_str(&query_params.join("&"));
1641 }
1642 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1643 }
1644
1645 pub async fn strains_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1650 let mut path = format!("/strains/v1/{}", urlencoding::encode(id).as_ref());
1651 let mut query_params = Vec::new();
1652 if let Some(p) = license_number {
1653 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1654 }
1655 if !query_params.is_empty() {
1656 path.push_str("?");
1657 path.push_str(&query_params.join("&"));
1658 }
1659 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1660 }
1661
1662 pub async fn strains_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1669 let mut path = format!("/strains/v2/{}", urlencoding::encode(id).as_ref());
1670 let mut query_params = Vec::new();
1671 if let Some(p) = license_number {
1672 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1673 }
1674 if !query_params.is_empty() {
1675 path.push_str("?");
1676 path.push_str(&query_params.join("&"));
1677 }
1678 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1679 }
1680
1681 pub async fn strains_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1686 let mut path = format!("/strains/v1/active");
1687 let mut query_params = Vec::new();
1688 if let Some(p) = license_number {
1689 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1690 }
1691 if !query_params.is_empty() {
1692 path.push_str("?");
1693 path.push_str(&query_params.join("&"));
1694 }
1695 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1696 }
1697
1698 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>> {
1705 let mut path = format!("/strains/v2/active");
1706 let mut query_params = Vec::new();
1707 if let Some(p) = last_modified_end {
1708 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
1709 }
1710 if let Some(p) = last_modified_start {
1711 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
1712 }
1713 if let Some(p) = license_number {
1714 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1715 }
1716 if let Some(p) = page_number {
1717 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1718 }
1719 if let Some(p) = page_size {
1720 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1721 }
1722 if !query_params.is_empty() {
1723 path.push_str("?");
1724 path.push_str(&query_params.join("&"));
1725 }
1726 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1727 }
1728
1729 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>> {
1736 let mut path = format!("/strains/v2/inactive");
1737 let mut query_params = Vec::new();
1738 if let Some(p) = license_number {
1739 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1740 }
1741 if let Some(p) = page_number {
1742 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
1743 }
1744 if let Some(p) = page_size {
1745 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
1746 }
1747 if !query_params.is_empty() {
1748 path.push_str("?");
1749 path.push_str(&query_params.join("&"));
1750 }
1751 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1752 }
1753
1754 pub async fn strains_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1761 let mut path = format!("/strains/v2");
1762 let mut query_params = Vec::new();
1763 if let Some(p) = license_number {
1764 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1765 }
1766 if !query_params.is_empty() {
1767 path.push_str("?");
1768 path.push_str(&query_params.join("&"));
1769 }
1770 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1771 }
1772
1773 pub async fn tags_get_package_available_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1780 let mut path = format!("/tags/v2/package/available");
1781 let mut query_params = Vec::new();
1782 if let Some(p) = license_number {
1783 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1784 }
1785 if !query_params.is_empty() {
1786 path.push_str("?");
1787 path.push_str(&query_params.join("&"));
1788 }
1789 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1790 }
1791
1792 pub async fn tags_get_plant_available_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1799 let mut path = format!("/tags/v2/plant/available");
1800 let mut query_params = Vec::new();
1801 if let Some(p) = license_number {
1802 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1803 }
1804 if !query_params.is_empty() {
1805 path.push_str("?");
1806 path.push_str(&query_params.join("&"));
1807 }
1808 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1809 }
1810
1811 pub async fn tags_get_staged_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1819 let mut path = format!("/tags/v2/staged");
1820 let mut query_params = Vec::new();
1821 if let Some(p) = license_number {
1822 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1823 }
1824 if !query_params.is_empty() {
1825 path.push_str("?");
1826 path.push_str(&query_params.join("&"));
1827 }
1828 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1829 }
1830
1831 pub async fn transfers_create_external_incoming_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1836 let mut path = format!("/transfers/v1/external/incoming");
1837 let mut query_params = Vec::new();
1838 if let Some(p) = license_number {
1839 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1840 }
1841 if !query_params.is_empty() {
1842 path.push_str("?");
1843 path.push_str(&query_params.join("&"));
1844 }
1845 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1846 }
1847
1848 pub async fn transfers_create_external_incoming_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1855 let mut path = format!("/transfers/v2/external/incoming");
1856 let mut query_params = Vec::new();
1857 if let Some(p) = license_number {
1858 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1859 }
1860 if !query_params.is_empty() {
1861 path.push_str("?");
1862 path.push_str(&query_params.join("&"));
1863 }
1864 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1865 }
1866
1867 pub async fn transfers_create_templates_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1872 let mut path = format!("/transfers/v1/templates");
1873 let mut query_params = Vec::new();
1874 if let Some(p) = license_number {
1875 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1876 }
1877 if !query_params.is_empty() {
1878 path.push_str("?");
1879 path.push_str(&query_params.join("&"));
1880 }
1881 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1882 }
1883
1884 pub async fn transfers_create_templates_outgoing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1891 let mut path = format!("/transfers/v2/templates/outgoing");
1892 let mut query_params = Vec::new();
1893 if let Some(p) = license_number {
1894 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1895 }
1896 if !query_params.is_empty() {
1897 path.push_str("?");
1898 path.push_str(&query_params.join("&"));
1899 }
1900 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1901 }
1902
1903 pub async fn transfers_delete_external_incoming_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1908 let mut path = format!("/transfers/v1/external/incoming/{}", urlencoding::encode(id).as_ref());
1909 let mut query_params = Vec::new();
1910 if let Some(p) = license_number {
1911 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1912 }
1913 if !query_params.is_empty() {
1914 path.push_str("?");
1915 path.push_str(&query_params.join("&"));
1916 }
1917 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1918 }
1919
1920 pub async fn transfers_delete_external_incoming_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1927 let mut path = format!("/transfers/v2/external/incoming/{}", urlencoding::encode(id).as_ref());
1928 let mut query_params = Vec::new();
1929 if let Some(p) = license_number {
1930 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1931 }
1932 if !query_params.is_empty() {
1933 path.push_str("?");
1934 path.push_str(&query_params.join("&"));
1935 }
1936 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1937 }
1938
1939 pub async fn transfers_delete_templates_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1944 let mut path = format!("/transfers/v1/templates/{}", urlencoding::encode(id).as_ref());
1945 let mut query_params = Vec::new();
1946 if let Some(p) = license_number {
1947 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
1948 }
1949 if !query_params.is_empty() {
1950 path.push_str("?");
1951 path.push_str(&query_params.join("&"));
1952 }
1953 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1954 }
1955
1956 pub async fn transfers_delete_templates_outgoing_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1963 let mut path = format!("/transfers/v2/templates/outgoing/{}", urlencoding::encode(id).as_ref());
1964 let mut query_params = Vec::new();
1965 if let Some(p) = license_number {
1966 query_params.push(format!("licenseNumber={}", 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::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1973 }
1974
1975 pub async fn transfers_get_deliveries_packages_states_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1980 let mut path = format!("/transfers/v1/deliveries/packages/states");
1981 let mut query_params = Vec::new();
1982 if let Some(p) = no {
1983 query_params.push(format!("No={}", urlencoding::encode(&p)));
1984 }
1985 if !query_params.is_empty() {
1986 path.push_str("?");
1987 path.push_str(&query_params.join("&"));
1988 }
1989 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
1990 }
1991
1992 pub async fn transfers_get_deliveries_packages_states_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
1999 let mut path = format!("/transfers/v2/deliveries/packages/states");
2000 let mut query_params = Vec::new();
2001 if let Some(p) = no {
2002 query_params.push(format!("No={}", urlencoding::encode(&p)));
2003 }
2004 if !query_params.is_empty() {
2005 path.push_str("?");
2006 path.push_str(&query_params.join("&"));
2007 }
2008 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2009 }
2010
2011 pub async fn transfers_get_delivery_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2018 let mut path = format!("/transfers/v1/{}/deliveries", urlencoding::encode(id).as_ref());
2019 let mut query_params = Vec::new();
2020 if let Some(p) = no {
2021 query_params.push(format!("No={}", urlencoding::encode(&p)));
2022 }
2023 if !query_params.is_empty() {
2024 path.push_str("?");
2025 path.push_str(&query_params.join("&"));
2026 }
2027 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2028 }
2029
2030 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>> {
2038 let mut path = format!("/transfers/v2/{}/deliveries", urlencoding::encode(id).as_ref());
2039 let mut query_params = Vec::new();
2040 if let Some(p) = page_number {
2041 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2042 }
2043 if let Some(p) = page_size {
2044 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2045 }
2046 if !query_params.is_empty() {
2047 path.push_str("?");
2048 path.push_str(&query_params.join("&"));
2049 }
2050 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2051 }
2052
2053 pub async fn transfers_get_delivery_package_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2060 let mut path = format!("/transfers/v1/deliveries/{}/packages", urlencoding::encode(id).as_ref());
2061 let mut query_params = Vec::new();
2062 if let Some(p) = no {
2063 query_params.push(format!("No={}", urlencoding::encode(&p)));
2064 }
2065 if !query_params.is_empty() {
2066 path.push_str("?");
2067 path.push_str(&query_params.join("&"));
2068 }
2069 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2070 }
2071
2072 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>> {
2080 let mut path = format!("/transfers/v2/deliveries/{}/packages", urlencoding::encode(id).as_ref());
2081 let mut query_params = Vec::new();
2082 if let Some(p) = page_number {
2083 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2084 }
2085 if let Some(p) = page_size {
2086 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2087 }
2088 if !query_params.is_empty() {
2089 path.push_str("?");
2090 path.push_str(&query_params.join("&"));
2091 }
2092 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2093 }
2094
2095 pub async fn transfers_get_delivery_package_requiredlabtestbatches_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2102 let mut path = format!("/transfers/v1/deliveries/package/{}/requiredlabtestbatches", urlencoding::encode(id).as_ref());
2103 let mut query_params = Vec::new();
2104 if let Some(p) = no {
2105 query_params.push(format!("No={}", urlencoding::encode(&p)));
2106 }
2107 if !query_params.is_empty() {
2108 path.push_str("?");
2109 path.push_str(&query_params.join("&"));
2110 }
2111 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2112 }
2113
2114 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>> {
2122 let mut path = format!("/transfers/v2/deliveries/package/{}/requiredlabtestbatches", urlencoding::encode(id).as_ref());
2123 let mut query_params = Vec::new();
2124 if let Some(p) = page_number {
2125 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2126 }
2127 if let Some(p) = page_size {
2128 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2129 }
2130 if !query_params.is_empty() {
2131 path.push_str("?");
2132 path.push_str(&query_params.join("&"));
2133 }
2134 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2135 }
2136
2137 pub async fn transfers_get_delivery_package_wholesale_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2144 let mut path = format!("/transfers/v1/deliveries/{}/packages/wholesale", urlencoding::encode(id).as_ref());
2145 let mut query_params = Vec::new();
2146 if let Some(p) = no {
2147 query_params.push(format!("No={}", urlencoding::encode(&p)));
2148 }
2149 if !query_params.is_empty() {
2150 path.push_str("?");
2151 path.push_str(&query_params.join("&"));
2152 }
2153 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2154 }
2155
2156 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>> {
2164 let mut path = format!("/transfers/v2/deliveries/{}/packages/wholesale", urlencoding::encode(id).as_ref());
2165 let mut query_params = Vec::new();
2166 if let Some(p) = page_number {
2167 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2168 }
2169 if let Some(p) = page_size {
2170 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2171 }
2172 if !query_params.is_empty() {
2173 path.push_str("?");
2174 path.push_str(&query_params.join("&"));
2175 }
2176 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2177 }
2178
2179 pub async fn transfers_get_delivery_transporters_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2186 let mut path = format!("/transfers/v1/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
2187 let mut query_params = Vec::new();
2188 if let Some(p) = no {
2189 query_params.push(format!("No={}", urlencoding::encode(&p)));
2190 }
2191 if !query_params.is_empty() {
2192 path.push_str("?");
2193 path.push_str(&query_params.join("&"));
2194 }
2195 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2196 }
2197
2198 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>> {
2206 let mut path = format!("/transfers/v2/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
2207 let mut query_params = Vec::new();
2208 if let Some(p) = page_number {
2209 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2210 }
2211 if let Some(p) = page_size {
2212 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2213 }
2214 if !query_params.is_empty() {
2215 path.push_str("?");
2216 path.push_str(&query_params.join("&"));
2217 }
2218 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2219 }
2220
2221 pub async fn transfers_get_delivery_transporters_details_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2228 let mut path = format!("/transfers/v1/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
2229 let mut query_params = Vec::new();
2230 if let Some(p) = no {
2231 query_params.push(format!("No={}", urlencoding::encode(&p)));
2232 }
2233 if !query_params.is_empty() {
2234 path.push_str("?");
2235 path.push_str(&query_params.join("&"));
2236 }
2237 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2238 }
2239
2240 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>> {
2248 let mut path = format!("/transfers/v2/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
2249 let mut query_params = Vec::new();
2250 if let Some(p) = page_number {
2251 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2252 }
2253 if let Some(p) = page_size {
2254 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2255 }
2256 if !query_params.is_empty() {
2257 path.push_str("?");
2258 path.push_str(&query_params.join("&"));
2259 }
2260 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2261 }
2262
2263 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>> {
2271 let mut path = format!("/transfers/v2/hub");
2272 let mut query_params = Vec::new();
2273 if let Some(p) = estimated_arrival_end {
2274 query_params.push(format!("estimatedArrivalEnd={}", urlencoding::encode(&p)));
2275 }
2276 if let Some(p) = estimated_arrival_start {
2277 query_params.push(format!("estimatedArrivalStart={}", urlencoding::encode(&p)));
2278 }
2279 if let Some(p) = last_modified_end {
2280 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2281 }
2282 if let Some(p) = last_modified_start {
2283 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2284 }
2285 if let Some(p) = license_number {
2286 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2287 }
2288 if let Some(p) = page_number {
2289 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2290 }
2291 if let Some(p) = page_size {
2292 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2293 }
2294 if !query_params.is_empty() {
2295 path.push_str("?");
2296 path.push_str(&query_params.join("&"));
2297 }
2298 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2299 }
2300
2301 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>> {
2306 let mut path = format!("/transfers/v1/incoming");
2307 let mut query_params = Vec::new();
2308 if let Some(p) = last_modified_end {
2309 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2310 }
2311 if let Some(p) = last_modified_start {
2312 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2313 }
2314 if let Some(p) = license_number {
2315 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2316 }
2317 if !query_params.is_empty() {
2318 path.push_str("?");
2319 path.push_str(&query_params.join("&"));
2320 }
2321 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2322 }
2323
2324 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>> {
2332 let mut path = format!("/transfers/v2/incoming");
2333 let mut query_params = Vec::new();
2334 if let Some(p) = last_modified_end {
2335 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2336 }
2337 if let Some(p) = last_modified_start {
2338 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2339 }
2340 if let Some(p) = license_number {
2341 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2342 }
2343 if let Some(p) = page_number {
2344 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2345 }
2346 if let Some(p) = page_size {
2347 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2348 }
2349 if !query_params.is_empty() {
2350 path.push_str("?");
2351 path.push_str(&query_params.join("&"));
2352 }
2353 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2354 }
2355
2356 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>> {
2361 let mut path = format!("/transfers/v1/outgoing");
2362 let mut query_params = Vec::new();
2363 if let Some(p) = last_modified_end {
2364 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2365 }
2366 if let Some(p) = last_modified_start {
2367 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2368 }
2369 if let Some(p) = license_number {
2370 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2371 }
2372 if !query_params.is_empty() {
2373 path.push_str("?");
2374 path.push_str(&query_params.join("&"));
2375 }
2376 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2377 }
2378
2379 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>> {
2387 let mut path = format!("/transfers/v2/outgoing");
2388 let mut query_params = Vec::new();
2389 if let Some(p) = last_modified_end {
2390 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2391 }
2392 if let Some(p) = last_modified_start {
2393 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2394 }
2395 if let Some(p) = license_number {
2396 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2397 }
2398 if let Some(p) = page_number {
2399 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2400 }
2401 if let Some(p) = page_size {
2402 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2403 }
2404 if !query_params.is_empty() {
2405 path.push_str("?");
2406 path.push_str(&query_params.join("&"));
2407 }
2408 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2409 }
2410
2411 pub async fn transfers_get_rejected_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2416 let mut path = format!("/transfers/v1/rejected");
2417 let mut query_params = Vec::new();
2418 if let Some(p) = license_number {
2419 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2420 }
2421 if !query_params.is_empty() {
2422 path.push_str("?");
2423 path.push_str(&query_params.join("&"));
2424 }
2425 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2426 }
2427
2428 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>> {
2436 let mut path = format!("/transfers/v2/rejected");
2437 let mut query_params = Vec::new();
2438 if let Some(p) = license_number {
2439 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2440 }
2441 if let Some(p) = page_number {
2442 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2443 }
2444 if let Some(p) = page_size {
2445 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2446 }
2447 if !query_params.is_empty() {
2448 path.push_str("?");
2449 path.push_str(&query_params.join("&"));
2450 }
2451 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2452 }
2453
2454 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>> {
2459 let mut path = format!("/transfers/v1/templates");
2460 let mut query_params = Vec::new();
2461 if let Some(p) = last_modified_end {
2462 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2463 }
2464 if let Some(p) = last_modified_start {
2465 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2466 }
2467 if let Some(p) = license_number {
2468 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2469 }
2470 if !query_params.is_empty() {
2471 path.push_str("?");
2472 path.push_str(&query_params.join("&"));
2473 }
2474 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2475 }
2476
2477 pub async fn transfers_get_templates_delivery_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2482 let mut path = format!("/transfers/v1/templates/{}/deliveries", urlencoding::encode(id).as_ref());
2483 let mut query_params = Vec::new();
2484 if let Some(p) = no {
2485 query_params.push(format!("No={}", urlencoding::encode(&p)));
2486 }
2487 if !query_params.is_empty() {
2488 path.push_str("?");
2489 path.push_str(&query_params.join("&"));
2490 }
2491 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2492 }
2493
2494 pub async fn transfers_get_templates_delivery_package_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2501 let mut path = format!("/transfers/v1/templates/deliveries/{}/packages", urlencoding::encode(id).as_ref());
2502 let mut query_params = Vec::new();
2503 if let Some(p) = no {
2504 query_params.push(format!("No={}", urlencoding::encode(&p)));
2505 }
2506 if !query_params.is_empty() {
2507 path.push_str("?");
2508 path.push_str(&query_params.join("&"));
2509 }
2510 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2511 }
2512
2513 pub async fn transfers_get_templates_delivery_transporters_v1(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2520 let mut path = format!("/transfers/v1/templates/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
2521 let mut query_params = Vec::new();
2522 if let Some(p) = no {
2523 query_params.push(format!("No={}", urlencoding::encode(&p)));
2524 }
2525 if !query_params.is_empty() {
2526 path.push_str("?");
2527 path.push_str(&query_params.join("&"));
2528 }
2529 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2530 }
2531
2532 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>> {
2539 let mut path = format!("/transfers/v1/templates/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
2540 let mut query_params = Vec::new();
2541 if let Some(p) = no {
2542 query_params.push(format!("No={}", urlencoding::encode(&p)));
2543 }
2544 if !query_params.is_empty() {
2545 path.push_str("?");
2546 path.push_str(&query_params.join("&"));
2547 }
2548 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2549 }
2550
2551 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>> {
2559 let mut path = format!("/transfers/v2/templates/outgoing");
2560 let mut query_params = Vec::new();
2561 if let Some(p) = last_modified_end {
2562 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
2563 }
2564 if let Some(p) = last_modified_start {
2565 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
2566 }
2567 if let Some(p) = license_number {
2568 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2569 }
2570 if let Some(p) = page_number {
2571 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2572 }
2573 if let Some(p) = page_size {
2574 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2575 }
2576 if !query_params.is_empty() {
2577 path.push_str("?");
2578 path.push_str(&query_params.join("&"));
2579 }
2580 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2581 }
2582
2583 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>> {
2591 let mut path = format!("/transfers/v2/templates/outgoing/{}/deliveries", urlencoding::encode(id).as_ref());
2592 let mut query_params = Vec::new();
2593 if let Some(p) = page_number {
2594 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2595 }
2596 if let Some(p) = page_size {
2597 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2598 }
2599 if !query_params.is_empty() {
2600 path.push_str("?");
2601 path.push_str(&query_params.join("&"));
2602 }
2603 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2604 }
2605
2606 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>> {
2614 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/packages", urlencoding::encode(id).as_ref());
2615 let mut query_params = Vec::new();
2616 if let Some(p) = page_number {
2617 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2618 }
2619 if let Some(p) = page_size {
2620 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2621 }
2622 if !query_params.is_empty() {
2623 path.push_str("?");
2624 path.push_str(&query_params.join("&"));
2625 }
2626 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2627 }
2628
2629 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>> {
2637 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/transporters", urlencoding::encode(id).as_ref());
2638 let mut query_params = Vec::new();
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 transfers_get_templates_outgoing_delivery_transporters_details_v2(&self, id: &str, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2660 let mut path = format!("/transfers/v2/templates/outgoing/deliveries/{}/transporters/details", urlencoding::encode(id).as_ref());
2661 let mut query_params = Vec::new();
2662 if let Some(p) = no {
2663 query_params.push(format!("No={}", urlencoding::encode(&p)));
2664 }
2665 if !query_params.is_empty() {
2666 path.push_str("?");
2667 path.push_str(&query_params.join("&"));
2668 }
2669 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2670 }
2671
2672 pub async fn transfers_get_types_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2677 let mut path = format!("/transfers/v1/types");
2678 let mut query_params = Vec::new();
2679 if let Some(p) = license_number {
2680 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2681 }
2682 if !query_params.is_empty() {
2683 path.push_str("?");
2684 path.push_str(&query_params.join("&"));
2685 }
2686 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2687 }
2688
2689 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>> {
2696 let mut path = format!("/transfers/v2/types");
2697 let mut query_params = Vec::new();
2698 if let Some(p) = license_number {
2699 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2700 }
2701 if let Some(p) = page_number {
2702 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2703 }
2704 if let Some(p) = page_size {
2705 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2706 }
2707 if !query_params.is_empty() {
2708 path.push_str("?");
2709 path.push_str(&query_params.join("&"));
2710 }
2711 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2712 }
2713
2714 pub async fn transfers_update_external_incoming_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2719 let mut path = format!("/transfers/v1/external/incoming");
2720 let mut query_params = Vec::new();
2721 if let Some(p) = license_number {
2722 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2723 }
2724 if !query_params.is_empty() {
2725 path.push_str("?");
2726 path.push_str(&query_params.join("&"));
2727 }
2728 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2729 }
2730
2731 pub async fn transfers_update_external_incoming_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2738 let mut path = format!("/transfers/v2/external/incoming");
2739 let mut query_params = Vec::new();
2740 if let Some(p) = license_number {
2741 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2742 }
2743 if !query_params.is_empty() {
2744 path.push_str("?");
2745 path.push_str(&query_params.join("&"));
2746 }
2747 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2748 }
2749
2750 pub async fn transfers_update_templates_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2755 let mut path = format!("/transfers/v1/templates");
2756 let mut query_params = Vec::new();
2757 if let Some(p) = license_number {
2758 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2759 }
2760 if !query_params.is_empty() {
2761 path.push_str("?");
2762 path.push_str(&query_params.join("&"));
2763 }
2764 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2765 }
2766
2767 pub async fn transfers_update_templates_outgoing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2774 let mut path = format!("/transfers/v2/templates/outgoing");
2775 let mut query_params = Vec::new();
2776 if let Some(p) = license_number {
2777 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2778 }
2779 if !query_params.is_empty() {
2780 path.push_str("?");
2781 path.push_str(&query_params.join("&"));
2782 }
2783 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2784 }
2785
2786 pub async fn transporters_create_driver_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2793 let mut path = format!("/transporters/v2/drivers");
2794 let mut query_params = Vec::new();
2795 if let Some(p) = license_number {
2796 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2797 }
2798 if !query_params.is_empty() {
2799 path.push_str("?");
2800 path.push_str(&query_params.join("&"));
2801 }
2802 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2803 }
2804
2805 pub async fn transporters_create_vehicle_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2812 let mut path = format!("/transporters/v2/vehicles");
2813 let mut query_params = Vec::new();
2814 if let Some(p) = license_number {
2815 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2816 }
2817 if !query_params.is_empty() {
2818 path.push_str("?");
2819 path.push_str(&query_params.join("&"));
2820 }
2821 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2822 }
2823
2824 pub async fn transporters_delete_driver_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2831 let mut path = format!("/transporters/v2/drivers/{}", urlencoding::encode(id).as_ref());
2832 let mut query_params = Vec::new();
2833 if let Some(p) = license_number {
2834 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2835 }
2836 if !query_params.is_empty() {
2837 path.push_str("?");
2838 path.push_str(&query_params.join("&"));
2839 }
2840 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2841 }
2842
2843 pub async fn transporters_delete_vehicle_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2850 let mut path = format!("/transporters/v2/vehicles/{}", urlencoding::encode(id).as_ref());
2851 let mut query_params = Vec::new();
2852 if let Some(p) = license_number {
2853 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2854 }
2855 if !query_params.is_empty() {
2856 path.push_str("?");
2857 path.push_str(&query_params.join("&"));
2858 }
2859 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2860 }
2861
2862 pub async fn transporters_get_driver_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2869 let mut path = format!("/transporters/v2/drivers/{}", urlencoding::encode(id).as_ref());
2870 let mut query_params = Vec::new();
2871 if let Some(p) = license_number {
2872 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2873 }
2874 if !query_params.is_empty() {
2875 path.push_str("?");
2876 path.push_str(&query_params.join("&"));
2877 }
2878 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2879 }
2880
2881 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>> {
2888 let mut path = format!("/transporters/v2/drivers");
2889 let mut query_params = Vec::new();
2890 if let Some(p) = license_number {
2891 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2892 }
2893 if let Some(p) = page_number {
2894 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2895 }
2896 if let Some(p) = page_size {
2897 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2898 }
2899 if !query_params.is_empty() {
2900 path.push_str("?");
2901 path.push_str(&query_params.join("&"));
2902 }
2903 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2904 }
2905
2906 pub async fn transporters_get_vehicle_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2913 let mut path = format!("/transporters/v2/vehicles/{}", urlencoding::encode(id).as_ref());
2914 let mut query_params = Vec::new();
2915 if let Some(p) = license_number {
2916 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2917 }
2918 if !query_params.is_empty() {
2919 path.push_str("?");
2920 path.push_str(&query_params.join("&"));
2921 }
2922 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2923 }
2924
2925 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>> {
2932 let mut path = format!("/transporters/v2/vehicles");
2933 let mut query_params = Vec::new();
2934 if let Some(p) = license_number {
2935 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2936 }
2937 if let Some(p) = page_number {
2938 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
2939 }
2940 if let Some(p) = page_size {
2941 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
2942 }
2943 if !query_params.is_empty() {
2944 path.push_str("?");
2945 path.push_str(&query_params.join("&"));
2946 }
2947 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2948 }
2949
2950 pub async fn transporters_update_driver_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2957 let mut path = format!("/transporters/v2/drivers");
2958 let mut query_params = Vec::new();
2959 if let Some(p) = license_number {
2960 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2961 }
2962 if !query_params.is_empty() {
2963 path.push_str("?");
2964 path.push_str(&query_params.join("&"));
2965 }
2966 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2967 }
2968
2969 pub async fn transporters_update_vehicle_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2976 let mut path = format!("/transporters/v2/vehicles");
2977 let mut query_params = Vec::new();
2978 if let Some(p) = license_number {
2979 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2980 }
2981 if !query_params.is_empty() {
2982 path.push_str("?");
2983 path.push_str(&query_params.join("&"));
2984 }
2985 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
2986 }
2987
2988 pub async fn locations_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
2993 let mut path = format!("/locations/v1/create");
2994 let mut query_params = Vec::new();
2995 if let Some(p) = license_number {
2996 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
2997 }
2998 if !query_params.is_empty() {
2999 path.push_str("?");
3000 path.push_str(&query_params.join("&"));
3001 }
3002 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3003 }
3004
3005 pub async fn locations_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3012 let mut path = format!("/locations/v2");
3013 let mut query_params = Vec::new();
3014 if let Some(p) = license_number {
3015 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3016 }
3017 if !query_params.is_empty() {
3018 path.push_str("?");
3019 path.push_str(&query_params.join("&"));
3020 }
3021 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3022 }
3023
3024 pub async fn locations_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3029 let mut path = format!("/locations/v1/update");
3030 let mut query_params = Vec::new();
3031 if let Some(p) = license_number {
3032 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3033 }
3034 if !query_params.is_empty() {
3035 path.push_str("?");
3036 path.push_str(&query_params.join("&"));
3037 }
3038 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3039 }
3040
3041 pub async fn locations_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3046 let mut path = format!("/locations/v1/{}", urlencoding::encode(id).as_ref());
3047 let mut query_params = Vec::new();
3048 if let Some(p) = license_number {
3049 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3050 }
3051 if !query_params.is_empty() {
3052 path.push_str("?");
3053 path.push_str(&query_params.join("&"));
3054 }
3055 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3056 }
3057
3058 pub async fn locations_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3065 let mut path = format!("/locations/v2/{}", urlencoding::encode(id).as_ref());
3066 let mut query_params = Vec::new();
3067 if let Some(p) = license_number {
3068 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3069 }
3070 if !query_params.is_empty() {
3071 path.push_str("?");
3072 path.push_str(&query_params.join("&"));
3073 }
3074 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3075 }
3076
3077 pub async fn locations_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3082 let mut path = format!("/locations/v1/{}", urlencoding::encode(id).as_ref());
3083 let mut query_params = Vec::new();
3084 if let Some(p) = license_number {
3085 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3086 }
3087 if !query_params.is_empty() {
3088 path.push_str("?");
3089 path.push_str(&query_params.join("&"));
3090 }
3091 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3092 }
3093
3094 pub async fn locations_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3101 let mut path = format!("/locations/v2/{}", urlencoding::encode(id).as_ref());
3102 let mut query_params = Vec::new();
3103 if let Some(p) = license_number {
3104 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3105 }
3106 if !query_params.is_empty() {
3107 path.push_str("?");
3108 path.push_str(&query_params.join("&"));
3109 }
3110 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3111 }
3112
3113 pub async fn locations_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3118 let mut path = format!("/locations/v1/active");
3119 let mut query_params = Vec::new();
3120 if let Some(p) = license_number {
3121 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3122 }
3123 if !query_params.is_empty() {
3124 path.push_str("?");
3125 path.push_str(&query_params.join("&"));
3126 }
3127 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3128 }
3129
3130 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>> {
3137 let mut path = format!("/locations/v2/active");
3138 let mut query_params = Vec::new();
3139 if let Some(p) = last_modified_end {
3140 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3141 }
3142 if let Some(p) = last_modified_start {
3143 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3144 }
3145 if let Some(p) = license_number {
3146 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3147 }
3148 if let Some(p) = page_number {
3149 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3150 }
3151 if let Some(p) = page_size {
3152 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3153 }
3154 if !query_params.is_empty() {
3155 path.push_str("?");
3156 path.push_str(&query_params.join("&"));
3157 }
3158 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3159 }
3160
3161 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>> {
3168 let mut path = format!("/locations/v2/inactive");
3169 let mut query_params = Vec::new();
3170 if let Some(p) = license_number {
3171 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3172 }
3173 if let Some(p) = page_number {
3174 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3175 }
3176 if let Some(p) = page_size {
3177 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3178 }
3179 if !query_params.is_empty() {
3180 path.push_str("?");
3181 path.push_str(&query_params.join("&"));
3182 }
3183 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3184 }
3185
3186 pub async fn locations_get_types_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3191 let mut path = format!("/locations/v1/types");
3192 let mut query_params = Vec::new();
3193 if let Some(p) = license_number {
3194 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3195 }
3196 if !query_params.is_empty() {
3197 path.push_str("?");
3198 path.push_str(&query_params.join("&"));
3199 }
3200 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3201 }
3202
3203 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>> {
3210 let mut path = format!("/locations/v2/types");
3211 let mut query_params = Vec::new();
3212 if let Some(p) = license_number {
3213 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3214 }
3215 if let Some(p) = page_number {
3216 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3217 }
3218 if let Some(p) = page_size {
3219 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3220 }
3221 if !query_params.is_empty() {
3222 path.push_str("?");
3223 path.push_str(&query_params.join("&"));
3224 }
3225 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3226 }
3227
3228 pub async fn locations_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3235 let mut path = format!("/locations/v2");
3236 let mut query_params = Vec::new();
3237 if let Some(p) = license_number {
3238 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3239 }
3240 if !query_params.is_empty() {
3241 path.push_str("?");
3242 path.push_str(&query_params.join("&"));
3243 }
3244 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3245 }
3246
3247 pub async fn packages_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3253 let mut path = format!("/packages/v1/create");
3254 let mut query_params = Vec::new();
3255 if let Some(p) = license_number {
3256 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3257 }
3258 if !query_params.is_empty() {
3259 path.push_str("?");
3260 path.push_str(&query_params.join("&"));
3261 }
3262 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3263 }
3264
3265 pub async fn packages_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3273 let mut path = format!("/packages/v2");
3274 let mut query_params = Vec::new();
3275 if let Some(p) = license_number {
3276 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3277 }
3278 if !query_params.is_empty() {
3279 path.push_str("?");
3280 path.push_str(&query_params.join("&"));
3281 }
3282 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3283 }
3284
3285 pub async fn packages_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3291 let mut path = format!("/packages/v1/adjust");
3292 let mut query_params = Vec::new();
3293 if let Some(p) = license_number {
3294 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3295 }
3296 if !query_params.is_empty() {
3297 path.push_str("?");
3298 path.push_str(&query_params.join("&"));
3299 }
3300 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3301 }
3302
3303 pub async fn packages_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3311 let mut path = format!("/packages/v2/adjust");
3312 let mut query_params = Vec::new();
3313 if let Some(p) = license_number {
3314 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3315 }
3316 if !query_params.is_empty() {
3317 path.push_str("?");
3318 path.push_str(&query_params.join("&"));
3319 }
3320 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3321 }
3322
3323 pub async fn packages_create_change_item_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3329 let mut path = format!("/packages/v1/change/item");
3330 let mut query_params = Vec::new();
3331 if let Some(p) = license_number {
3332 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3333 }
3334 if !query_params.is_empty() {
3335 path.push_str("?");
3336 path.push_str(&query_params.join("&"));
3337 }
3338 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3339 }
3340
3341 pub async fn packages_create_change_location_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3347 let mut path = format!("/packages/v1/change/locations");
3348 let mut query_params = Vec::new();
3349 if let Some(p) = license_number {
3350 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3351 }
3352 if !query_params.is_empty() {
3353 path.push_str("?");
3354 path.push_str(&query_params.join("&"));
3355 }
3356 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3357 }
3358
3359 pub async fn packages_create_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3365 let mut path = format!("/packages/v1/finish");
3366 let mut query_params = Vec::new();
3367 if let Some(p) = license_number {
3368 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3375 }
3376
3377 pub async fn packages_create_plantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3385 let mut path = format!("/packages/v1/create/plantings");
3386 let mut query_params = Vec::new();
3387 if let Some(p) = license_number {
3388 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3389 }
3390 if !query_params.is_empty() {
3391 path.push_str("?");
3392 path.push_str(&query_params.join("&"));
3393 }
3394 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3395 }
3396
3397 pub async fn packages_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3407 let mut path = format!("/packages/v2/plantings");
3408 let mut query_params = Vec::new();
3409 if let Some(p) = license_number {
3410 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3411 }
3412 if !query_params.is_empty() {
3413 path.push_str("?");
3414 path.push_str(&query_params.join("&"));
3415 }
3416 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3417 }
3418
3419 pub async fn packages_create_remediate_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3425 let mut path = format!("/packages/v1/remediate");
3426 let mut query_params = Vec::new();
3427 if let Some(p) = license_number {
3428 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3429 }
3430 if !query_params.is_empty() {
3431 path.push_str("?");
3432 path.push_str(&query_params.join("&"));
3433 }
3434 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3435 }
3436
3437 pub async fn packages_create_testing_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3443 let mut path = format!("/packages/v1/create/testing");
3444 let mut query_params = Vec::new();
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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3453 }
3454
3455 pub async fn packages_create_testing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3463 let mut path = format!("/packages/v2/testing");
3464 let mut query_params = Vec::new();
3465 if let Some(p) = license_number {
3466 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3467 }
3468 if !query_params.is_empty() {
3469 path.push_str("?");
3470 path.push_str(&query_params.join("&"));
3471 }
3472 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3473 }
3474
3475 pub async fn packages_create_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3481 let mut path = format!("/packages/v1/unfinish");
3482 let mut query_params = Vec::new();
3483 if let Some(p) = license_number {
3484 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3485 }
3486 if !query_params.is_empty() {
3487 path.push_str("?");
3488 path.push_str(&query_params.join("&"));
3489 }
3490 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3491 }
3492
3493 pub async fn packages_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3501 let mut path = format!("/packages/v2/{}", urlencoding::encode(id).as_ref());
3502 let mut query_params = Vec::new();
3503 if let Some(p) = license_number {
3504 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3505 }
3506 if !query_params.is_empty() {
3507 path.push_str("?");
3508 path.push_str(&query_params.join("&"));
3509 }
3510 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3511 }
3512
3513 pub async fn packages_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3518 let mut path = format!("/packages/v1/{}", urlencoding::encode(id).as_ref());
3519 let mut query_params = Vec::new();
3520 if let Some(p) = license_number {
3521 query_params.push(format!("licenseNumber={}", 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 packages_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3537 let mut path = format!("/packages/v2/{}", urlencoding::encode(id).as_ref());
3538 let mut query_params = Vec::new();
3539 if let Some(p) = license_number {
3540 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3541 }
3542 if !query_params.is_empty() {
3543 path.push_str("?");
3544 path.push_str(&query_params.join("&"));
3545 }
3546 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3547 }
3548
3549 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>> {
3554 let mut path = format!("/packages/v1/active");
3555 let mut query_params = Vec::new();
3556 if let Some(p) = last_modified_end {
3557 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3558 }
3559 if let Some(p) = last_modified_start {
3560 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3561 }
3562 if let Some(p) = license_number {
3563 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3564 }
3565 if !query_params.is_empty() {
3566 path.push_str("?");
3567 path.push_str(&query_params.join("&"));
3568 }
3569 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3570 }
3571
3572 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>> {
3579 let mut path = format!("/packages/v2/active");
3580 let mut query_params = Vec::new();
3581 if let Some(p) = last_modified_end {
3582 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3583 }
3584 if let Some(p) = last_modified_start {
3585 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3586 }
3587 if let Some(p) = license_number {
3588 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3589 }
3590 if let Some(p) = page_number {
3591 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3592 }
3593 if let Some(p) = page_size {
3594 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3595 }
3596 if !query_params.is_empty() {
3597 path.push_str("?");
3598 path.push_str(&query_params.join("&"));
3599 }
3600 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3601 }
3602
3603 pub async fn packages_get_adjust_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3608 let mut path = format!("/packages/v1/adjust/reasons");
3609 let mut query_params = Vec::new();
3610 if let Some(p) = license_number {
3611 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3612 }
3613 if !query_params.is_empty() {
3614 path.push_str("?");
3615 path.push_str(&query_params.join("&"));
3616 }
3617 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3618 }
3619
3620 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>> {
3627 let mut path = format!("/packages/v2/adjust/reasons");
3628 let mut query_params = Vec::new();
3629 if let Some(p) = license_number {
3630 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3631 }
3632 if let Some(p) = page_number {
3633 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3634 }
3635 if let Some(p) = page_size {
3636 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3637 }
3638 if !query_params.is_empty() {
3639 path.push_str("?");
3640 path.push_str(&query_params.join("&"));
3641 }
3642 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3643 }
3644
3645 pub async fn packages_get_by_label_v1(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3650 let mut path = format!("/packages/v1/{}", urlencoding::encode(label).as_ref());
3651 let mut query_params = Vec::new();
3652 if let Some(p) = license_number {
3653 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3654 }
3655 if !query_params.is_empty() {
3656 path.push_str("?");
3657 path.push_str(&query_params.join("&"));
3658 }
3659 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3660 }
3661
3662 pub async fn packages_get_by_label_v2(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3669 let mut path = format!("/packages/v2/{}", urlencoding::encode(label).as_ref());
3670 let mut query_params = Vec::new();
3671 if let Some(p) = license_number {
3672 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3673 }
3674 if !query_params.is_empty() {
3675 path.push_str("?");
3676 path.push_str(&query_params.join("&"));
3677 }
3678 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3679 }
3680
3681 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>> {
3686 let mut path = format!("/packages/v1/inactive");
3687 let mut query_params = Vec::new();
3688 if let Some(p) = last_modified_end {
3689 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3690 }
3691 if let Some(p) = last_modified_start {
3692 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3693 }
3694 if let Some(p) = license_number {
3695 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3696 }
3697 if !query_params.is_empty() {
3698 path.push_str("?");
3699 path.push_str(&query_params.join("&"));
3700 }
3701 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3702 }
3703
3704 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>> {
3711 let mut path = format!("/packages/v2/inactive");
3712 let mut query_params = Vec::new();
3713 if let Some(p) = last_modified_end {
3714 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3715 }
3716 if let Some(p) = last_modified_start {
3717 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3718 }
3719 if let Some(p) = license_number {
3720 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3721 }
3722 if let Some(p) = page_number {
3723 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3724 }
3725 if let Some(p) = page_size {
3726 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3727 }
3728 if !query_params.is_empty() {
3729 path.push_str("?");
3730 path.push_str(&query_params.join("&"));
3731 }
3732 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3733 }
3734
3735 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>> {
3742 let mut path = format!("/packages/v2/intransit");
3743 let mut query_params = Vec::new();
3744 if let Some(p) = last_modified_end {
3745 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3746 }
3747 if let Some(p) = last_modified_start {
3748 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3749 }
3750 if let Some(p) = license_number {
3751 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3752 }
3753 if let Some(p) = page_number {
3754 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3755 }
3756 if let Some(p) = page_size {
3757 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3758 }
3759 if !query_params.is_empty() {
3760 path.push_str("?");
3761 path.push_str(&query_params.join("&"));
3762 }
3763 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3764 }
3765
3766 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>> {
3773 let mut path = format!("/packages/v2/labsamples");
3774 let mut query_params = Vec::new();
3775 if let Some(p) = last_modified_end {
3776 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3777 }
3778 if let Some(p) = last_modified_start {
3779 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3780 }
3781 if let Some(p) = license_number {
3782 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3783 }
3784 if let Some(p) = page_number {
3785 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3786 }
3787 if let Some(p) = page_size {
3788 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3789 }
3790 if !query_params.is_empty() {
3791 path.push_str("?");
3792 path.push_str(&query_params.join("&"));
3793 }
3794 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3795 }
3796
3797 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>> {
3802 let mut path = format!("/packages/v1/onhold");
3803 let mut query_params = Vec::new();
3804 if let Some(p) = last_modified_end {
3805 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3806 }
3807 if let Some(p) = last_modified_start {
3808 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3809 }
3810 if let Some(p) = license_number {
3811 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3812 }
3813 if !query_params.is_empty() {
3814 path.push_str("?");
3815 path.push_str(&query_params.join("&"));
3816 }
3817 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3818 }
3819
3820 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>> {
3827 let mut path = format!("/packages/v2/onhold");
3828 let mut query_params = Vec::new();
3829 if let Some(p) = last_modified_end {
3830 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3831 }
3832 if let Some(p) = last_modified_start {
3833 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3834 }
3835 if let Some(p) = license_number {
3836 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3837 }
3838 if let Some(p) = page_number {
3839 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3840 }
3841 if let Some(p) = page_size {
3842 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3843 }
3844 if !query_params.is_empty() {
3845 path.push_str("?");
3846 path.push_str(&query_params.join("&"));
3847 }
3848 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3849 }
3850
3851 pub async fn packages_get_source_harvest_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3858 let mut path = format!("/packages/v2/{}/source/harvests", urlencoding::encode(id).as_ref());
3859 let mut query_params = Vec::new();
3860 if let Some(p) = license_number {
3861 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3862 }
3863 if !query_params.is_empty() {
3864 path.push_str("?");
3865 path.push_str(&query_params.join("&"));
3866 }
3867 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3868 }
3869
3870 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>> {
3877 let mut path = format!("/packages/v2/transferred");
3878 let mut query_params = Vec::new();
3879 if let Some(p) = last_modified_end {
3880 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
3881 }
3882 if let Some(p) = last_modified_start {
3883 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
3884 }
3885 if let Some(p) = license_number {
3886 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3887 }
3888 if let Some(p) = page_number {
3889 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
3890 }
3891 if let Some(p) = page_size {
3892 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
3893 }
3894 if !query_params.is_empty() {
3895 path.push_str("?");
3896 path.push_str(&query_params.join("&"));
3897 }
3898 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3899 }
3900
3901 pub async fn packages_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3906 let mut path = format!("/packages/v1/types");
3907 let mut query_params = Vec::new();
3908 if let Some(p) = no {
3909 query_params.push(format!("No={}", urlencoding::encode(&p)));
3910 }
3911 if !query_params.is_empty() {
3912 path.push_str("?");
3913 path.push_str(&query_params.join("&"));
3914 }
3915 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3916 }
3917
3918 pub async fn packages_get_types_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3925 let mut path = format!("/packages/v2/types");
3926 let mut query_params = Vec::new();
3927 if let Some(p) = no {
3928 query_params.push(format!("No={}", urlencoding::encode(&p)));
3929 }
3930 if !query_params.is_empty() {
3931 path.push_str("?");
3932 path.push_str(&query_params.join("&"));
3933 }
3934 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3935 }
3936
3937 pub async fn packages_update_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3945 let mut path = format!("/packages/v2/adjust");
3946 let mut query_params = Vec::new();
3947 if let Some(p) = license_number {
3948 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3949 }
3950 if !query_params.is_empty() {
3951 path.push_str("?");
3952 path.push_str(&query_params.join("&"));
3953 }
3954 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3955 }
3956
3957 pub async fn packages_update_change_note_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3964 let mut path = format!("/packages/v1/change/note");
3965 let mut query_params = Vec::new();
3966 if let Some(p) = license_number {
3967 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3968 }
3969 if !query_params.is_empty() {
3970 path.push_str("?");
3971 path.push_str(&query_params.join("&"));
3972 }
3973 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3974 }
3975
3976 pub async fn packages_update_decontaminate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
3984 let mut path = format!("/packages/v2/decontaminate");
3985 let mut query_params = Vec::new();
3986 if let Some(p) = license_number {
3987 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
3988 }
3989 if !query_params.is_empty() {
3990 path.push_str("?");
3991 path.push_str(&query_params.join("&"));
3992 }
3993 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
3994 }
3995
3996 pub async fn packages_update_donation_flag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4004 let mut path = format!("/packages/v2/donation/flag");
4005 let mut query_params = Vec::new();
4006 if let Some(p) = license_number {
4007 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4008 }
4009 if !query_params.is_empty() {
4010 path.push_str("?");
4011 path.push_str(&query_params.join("&"));
4012 }
4013 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4014 }
4015
4016 pub async fn packages_update_donation_unflag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4024 let mut path = format!("/packages/v2/donation/unflag");
4025 let mut query_params = Vec::new();
4026 if let Some(p) = license_number {
4027 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4028 }
4029 if !query_params.is_empty() {
4030 path.push_str("?");
4031 path.push_str(&query_params.join("&"));
4032 }
4033 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4034 }
4035
4036 pub async fn packages_update_externalid_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4045 let mut path = format!("/packages/v2/externalid");
4046 let mut query_params = Vec::new();
4047 if let Some(p) = license_number {
4048 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4049 }
4050 if !query_params.is_empty() {
4051 path.push_str("?");
4052 path.push_str(&query_params.join("&"));
4053 }
4054 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4055 }
4056
4057 pub async fn packages_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4065 let mut path = format!("/packages/v2/finish");
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::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4075 }
4076
4077 pub async fn packages_update_item_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4085 let mut path = format!("/packages/v2/item");
4086 let mut query_params = Vec::new();
4087 if let Some(p) = license_number {
4088 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4089 }
4090 if !query_params.is_empty() {
4091 path.push_str("?");
4092 path.push_str(&query_params.join("&"));
4093 }
4094 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4095 }
4096
4097 pub async fn packages_update_lab_test_required_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4105 let mut path = format!("/packages/v2/labtests/required");
4106 let mut query_params = Vec::new();
4107 if let Some(p) = license_number {
4108 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4109 }
4110 if !query_params.is_empty() {
4111 path.push_str("?");
4112 path.push_str(&query_params.join("&"));
4113 }
4114 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4115 }
4116
4117 pub async fn packages_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4125 let mut path = format!("/packages/v2/location");
4126 let mut query_params = Vec::new();
4127 if let Some(p) = license_number {
4128 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4129 }
4130 if !query_params.is_empty() {
4131 path.push_str("?");
4132 path.push_str(&query_params.join("&"));
4133 }
4134 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4135 }
4136
4137 pub async fn packages_update_note_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4146 let mut path = format!("/packages/v2/note");
4147 let mut query_params = Vec::new();
4148 if let Some(p) = license_number {
4149 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4150 }
4151 if !query_params.is_empty() {
4152 path.push_str("?");
4153 path.push_str(&query_params.join("&"));
4154 }
4155 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4156 }
4157
4158 pub async fn packages_update_remediate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4166 let mut path = format!("/packages/v2/remediate");
4167 let mut query_params = Vec::new();
4168 if let Some(p) = license_number {
4169 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4170 }
4171 if !query_params.is_empty() {
4172 path.push_str("?");
4173 path.push_str(&query_params.join("&"));
4174 }
4175 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4176 }
4177
4178 pub async fn packages_update_tradesample_flag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4186 let mut path = format!("/packages/v2/tradesample/flag");
4187 let mut query_params = Vec::new();
4188 if let Some(p) = license_number {
4189 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4190 }
4191 if !query_params.is_empty() {
4192 path.push_str("?");
4193 path.push_str(&query_params.join("&"));
4194 }
4195 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4196 }
4197
4198 pub async fn packages_update_tradesample_unflag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4206 let mut path = format!("/packages/v2/tradesample/unflag");
4207 let mut query_params = Vec::new();
4208 if let Some(p) = license_number {
4209 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4210 }
4211 if !query_params.is_empty() {
4212 path.push_str("?");
4213 path.push_str(&query_params.join("&"));
4214 }
4215 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4216 }
4217
4218 pub async fn packages_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4226 let mut path = format!("/packages/v2/unfinish");
4227 let mut query_params = Vec::new();
4228 if let Some(p) = license_number {
4229 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4230 }
4231 if !query_params.is_empty() {
4232 path.push_str("?");
4233 path.push_str(&query_params.join("&"));
4234 }
4235 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4236 }
4237
4238 pub async fn packages_update_usebydate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4246 let mut path = format!("/packages/v2/usebydate");
4247 let mut query_params = Vec::new();
4248 if let Some(p) = license_number {
4249 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4250 }
4251 if !query_params.is_empty() {
4252 path.push_str("?");
4253 path.push_str(&query_params.join("&"));
4254 }
4255 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4256 }
4257
4258 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>> {
4265 let mut path = format!("/patients/v1/statuses/{}", urlencoding::encode(patient_license_number).as_ref());
4266 let mut query_params = Vec::new();
4267 if let Some(p) = license_number {
4268 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4269 }
4270 if !query_params.is_empty() {
4271 path.push_str("?");
4272 path.push_str(&query_params.join("&"));
4273 }
4274 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4275 }
4276
4277 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>> {
4284 let mut path = format!("/patients/v2/statuses/{}", urlencoding::encode(patient_license_number).as_ref());
4285 let mut query_params = Vec::new();
4286 if let Some(p) = license_number {
4287 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4288 }
4289 if !query_params.is_empty() {
4290 path.push_str("?");
4291 path.push_str(&query_params.join("&"));
4292 }
4293 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4294 }
4295
4296 pub async fn plant_batches_create_additives_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4301 let mut path = format!("/plantbatches/v1/additives");
4302 let mut query_params = Vec::new();
4303 if let Some(p) = license_number {
4304 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4305 }
4306 if !query_params.is_empty() {
4307 path.push_str("?");
4308 path.push_str(&query_params.join("&"));
4309 }
4310 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4311 }
4312
4313 pub async fn plant_batches_create_additives_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4320 let mut path = format!("/plantbatches/v2/additives");
4321 let mut query_params = Vec::new();
4322 if let Some(p) = license_number {
4323 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4324 }
4325 if !query_params.is_empty() {
4326 path.push_str("?");
4327 path.push_str(&query_params.join("&"));
4328 }
4329 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4330 }
4331
4332 pub async fn plant_batches_create_additives_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4339 let mut path = format!("/plantbatches/v2/additives/usingtemplate");
4340 let mut query_params = Vec::new();
4341 if let Some(p) = license_number {
4342 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4349 }
4350
4351 pub async fn plant_batches_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4357 let mut path = format!("/plantbatches/v1/adjust");
4358 let mut query_params = Vec::new();
4359 if let Some(p) = license_number {
4360 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4361 }
4362 if !query_params.is_empty() {
4363 path.push_str("?");
4364 path.push_str(&query_params.join("&"));
4365 }
4366 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4367 }
4368
4369 pub async fn plant_batches_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4377 let mut path = format!("/plantbatches/v2/adjust");
4378 let mut query_params = Vec::new();
4379 if let Some(p) = license_number {
4380 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4381 }
4382 if !query_params.is_empty() {
4383 path.push_str("?");
4384 path.push_str(&query_params.join("&"));
4385 }
4386 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4387 }
4388
4389 pub async fn plant_batches_create_changegrowthphase_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4397 let mut path = format!("/plantbatches/v1/changegrowthphase");
4398 let mut query_params = Vec::new();
4399 if let Some(p) = license_number {
4400 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4401 }
4402 if !query_params.is_empty() {
4403 path.push_str("?");
4404 path.push_str(&query_params.join("&"));
4405 }
4406 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4407 }
4408
4409 pub async fn plant_batches_create_growthphase_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4419 let mut path = format!("/plantbatches/v2/growthphase");
4420 let mut query_params = Vec::new();
4421 if let Some(p) = license_number {
4422 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4423 }
4424 if !query_params.is_empty() {
4425 path.push_str("?");
4426 path.push_str(&query_params.join("&"));
4427 }
4428 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4429 }
4430
4431 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>> {
4441 let mut path = format!("/plantbatches/v2/packages");
4442 let mut query_params = Vec::new();
4443 if let Some(p) = is_from_mother_plant {
4444 query_params.push(format!("isFromMotherPlant={}", urlencoding::encode(&p)));
4445 }
4446 if let Some(p) = license_number {
4447 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4448 }
4449 if !query_params.is_empty() {
4450 path.push_str("?");
4451 path.push_str(&query_params.join("&"));
4452 }
4453 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4454 }
4455
4456 pub async fn plant_batches_create_package_frommotherplant_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4464 let mut path = format!("/plantbatches/v1/create/packages/frommotherplant");
4465 let mut query_params = Vec::new();
4466 if let Some(p) = license_number {
4467 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4468 }
4469 if !query_params.is_empty() {
4470 path.push_str("?");
4471 path.push_str(&query_params.join("&"));
4472 }
4473 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4474 }
4475
4476 pub async fn plant_batches_create_package_frommotherplant_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4486 let mut path = format!("/plantbatches/v2/packages/frommotherplant");
4487 let mut query_params = Vec::new();
4488 if let Some(p) = license_number {
4489 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4490 }
4491 if !query_params.is_empty() {
4492 path.push_str("?");
4493 path.push_str(&query_params.join("&"));
4494 }
4495 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4496 }
4497
4498 pub async fn plant_batches_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4506 let mut path = format!("/plantbatches/v2/plantings");
4507 let mut query_params = Vec::new();
4508 if let Some(p) = license_number {
4509 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4510 }
4511 if !query_params.is_empty() {
4512 path.push_str("?");
4513 path.push_str(&query_params.join("&"));
4514 }
4515 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4516 }
4517
4518 pub async fn plant_batches_create_split_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4524 let mut path = format!("/plantbatches/v1/split");
4525 let mut query_params = Vec::new();
4526 if let Some(p) = license_number {
4527 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4528 }
4529 if !query_params.is_empty() {
4530 path.push_str("?");
4531 path.push_str(&query_params.join("&"));
4532 }
4533 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4534 }
4535
4536 pub async fn plant_batches_create_split_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4544 let mut path = format!("/plantbatches/v2/split");
4545 let mut query_params = Vec::new();
4546 if let Some(p) = license_number {
4547 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4548 }
4549 if !query_params.is_empty() {
4550 path.push_str("?");
4551 path.push_str(&query_params.join("&"));
4552 }
4553 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4554 }
4555
4556 pub async fn plant_batches_create_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4561 let mut path = format!("/plantbatches/v1/waste");
4562 let mut query_params = Vec::new();
4563 if let Some(p) = license_number {
4564 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4565 }
4566 if !query_params.is_empty() {
4567 path.push_str("?");
4568 path.push_str(&query_params.join("&"));
4569 }
4570 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4571 }
4572
4573 pub async fn plant_batches_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4580 let mut path = format!("/plantbatches/v2/waste");
4581 let mut query_params = Vec::new();
4582 if let Some(p) = license_number {
4583 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4584 }
4585 if !query_params.is_empty() {
4586 path.push_str("?");
4587 path.push_str(&query_params.join("&"));
4588 }
4589 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4590 }
4591
4592 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>> {
4600 let mut path = format!("/plantbatches/v1/createpackages");
4601 let mut query_params = Vec::new();
4602 if let Some(p) = is_from_mother_plant {
4603 query_params.push(format!("isFromMotherPlant={}", urlencoding::encode(&p)));
4604 }
4605 if let Some(p) = license_number {
4606 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4607 }
4608 if !query_params.is_empty() {
4609 path.push_str("?");
4610 path.push_str(&query_params.join("&"));
4611 }
4612 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4613 }
4614
4615 pub async fn plant_batches_createplantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4621 let mut path = format!("/plantbatches/v1/createplantings");
4622 let mut query_params = Vec::new();
4623 if let Some(p) = license_number {
4624 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4625 }
4626 if !query_params.is_empty() {
4627 path.push_str("?");
4628 path.push_str(&query_params.join("&"));
4629 }
4630 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4631 }
4632
4633 pub async fn plant_batches_delete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4639 let mut path = format!("/plantbatches/v1");
4640 let mut query_params = Vec::new();
4641 if let Some(p) = license_number {
4642 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4643 }
4644 if !query_params.is_empty() {
4645 path.push_str("?");
4646 path.push_str(&query_params.join("&"));
4647 }
4648 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4649 }
4650
4651 pub async fn plant_batches_delete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4659 let mut path = format!("/plantbatches/v2");
4660 let mut query_params = Vec::new();
4661 if let Some(p) = license_number {
4662 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4663 }
4664 if !query_params.is_empty() {
4665 path.push_str("?");
4666 path.push_str(&query_params.join("&"));
4667 }
4668 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4669 }
4670
4671 pub async fn plant_batches_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4676 let mut path = format!("/plantbatches/v1/{}", urlencoding::encode(id).as_ref());
4677 let mut query_params = Vec::new();
4678 if let Some(p) = license_number {
4679 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4680 }
4681 if !query_params.is_empty() {
4682 path.push_str("?");
4683 path.push_str(&query_params.join("&"));
4684 }
4685 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4686 }
4687
4688 pub async fn plant_batches_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4695 let mut path = format!("/plantbatches/v2/{}", urlencoding::encode(id).as_ref());
4696 let mut query_params = Vec::new();
4697 if let Some(p) = license_number {
4698 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4699 }
4700 if !query_params.is_empty() {
4701 path.push_str("?");
4702 path.push_str(&query_params.join("&"));
4703 }
4704 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4705 }
4706
4707 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>> {
4712 let mut path = format!("/plantbatches/v1/active");
4713 let mut query_params = Vec::new();
4714 if let Some(p) = last_modified_end {
4715 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4716 }
4717 if let Some(p) = last_modified_start {
4718 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4719 }
4720 if let Some(p) = license_number {
4721 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4722 }
4723 if !query_params.is_empty() {
4724 path.push_str("?");
4725 path.push_str(&query_params.join("&"));
4726 }
4727 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4728 }
4729
4730 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>> {
4737 let mut path = format!("/plantbatches/v2/active");
4738 let mut query_params = Vec::new();
4739 if let Some(p) = last_modified_end {
4740 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4741 }
4742 if let Some(p) = last_modified_start {
4743 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4744 }
4745 if let Some(p) = license_number {
4746 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4747 }
4748 if let Some(p) = page_number {
4749 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4750 }
4751 if let Some(p) = page_size {
4752 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4753 }
4754 if !query_params.is_empty() {
4755 path.push_str("?");
4756 path.push_str(&query_params.join("&"));
4757 }
4758 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4759 }
4760
4761 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>> {
4766 let mut path = format!("/plantbatches/v1/inactive");
4767 let mut query_params = Vec::new();
4768 if let Some(p) = last_modified_end {
4769 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4770 }
4771 if let Some(p) = last_modified_start {
4772 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4773 }
4774 if let Some(p) = license_number {
4775 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4776 }
4777 if !query_params.is_empty() {
4778 path.push_str("?");
4779 path.push_str(&query_params.join("&"));
4780 }
4781 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4782 }
4783
4784 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>> {
4791 let mut path = format!("/plantbatches/v2/inactive");
4792 let mut query_params = Vec::new();
4793 if let Some(p) = last_modified_end {
4794 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
4795 }
4796 if let Some(p) = last_modified_start {
4797 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
4798 }
4799 if let Some(p) = license_number {
4800 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4801 }
4802 if let Some(p) = page_number {
4803 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4804 }
4805 if let Some(p) = page_size {
4806 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4807 }
4808 if !query_params.is_empty() {
4809 path.push_str("?");
4810 path.push_str(&query_params.join("&"));
4811 }
4812 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4813 }
4814
4815 pub async fn plant_batches_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4820 let mut path = format!("/plantbatches/v1/types");
4821 let mut query_params = Vec::new();
4822 if let Some(p) = no {
4823 query_params.push(format!("No={}", urlencoding::encode(&p)));
4824 }
4825 if !query_params.is_empty() {
4826 path.push_str("?");
4827 path.push_str(&query_params.join("&"));
4828 }
4829 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4830 }
4831
4832 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>> {
4839 let mut path = format!("/plantbatches/v2/types");
4840 let mut query_params = Vec::new();
4841 if let Some(p) = page_number {
4842 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4843 }
4844 if let Some(p) = page_size {
4845 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4846 }
4847 if !query_params.is_empty() {
4848 path.push_str("?");
4849 path.push_str(&query_params.join("&"));
4850 }
4851 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4852 }
4853
4854 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>> {
4861 let mut path = format!("/plantbatches/v2/waste");
4862 let mut query_params = Vec::new();
4863 if let Some(p) = license_number {
4864 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4865 }
4866 if let Some(p) = page_number {
4867 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
4868 }
4869 if let Some(p) = page_size {
4870 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
4871 }
4872 if !query_params.is_empty() {
4873 path.push_str("?");
4874 path.push_str(&query_params.join("&"));
4875 }
4876 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4877 }
4878
4879 pub async fn plant_batches_get_waste_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4884 let mut path = format!("/plantbatches/v1/waste/reasons");
4885 let mut query_params = Vec::new();
4886 if let Some(p) = license_number {
4887 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4888 }
4889 if !query_params.is_empty() {
4890 path.push_str("?");
4891 path.push_str(&query_params.join("&"));
4892 }
4893 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4894 }
4895
4896 pub async fn plant_batches_get_waste_reasons_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4903 let mut path = format!("/plantbatches/v2/waste/reasons");
4904 let mut query_params = Vec::new();
4905 if let Some(p) = license_number {
4906 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4907 }
4908 if !query_params.is_empty() {
4909 path.push_str("?");
4910 path.push_str(&query_params.join("&"));
4911 }
4912 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4913 }
4914
4915 pub async fn plant_batches_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4923 let mut path = format!("/plantbatches/v2/location");
4924 let mut query_params = Vec::new();
4925 if let Some(p) = license_number {
4926 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4927 }
4928 if !query_params.is_empty() {
4929 path.push_str("?");
4930 path.push_str(&query_params.join("&"));
4931 }
4932 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4933 }
4934
4935 pub async fn plant_batches_update_moveplantbatches_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4940 let mut path = format!("/plantbatches/v1/moveplantbatches");
4941 let mut query_params = Vec::new();
4942 if let Some(p) = license_number {
4943 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4944 }
4945 if !query_params.is_empty() {
4946 path.push_str("?");
4947 path.push_str(&query_params.join("&"));
4948 }
4949 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4950 }
4951
4952 pub async fn plant_batches_update_name_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4960 let mut path = format!("/plantbatches/v2/name");
4961 let mut query_params = Vec::new();
4962 if let Some(p) = license_number {
4963 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4964 }
4965 if !query_params.is_empty() {
4966 path.push_str("?");
4967 path.push_str(&query_params.join("&"));
4968 }
4969 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4970 }
4971
4972 pub async fn plant_batches_update_strain_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
4980 let mut path = format!("/plantbatches/v2/strain");
4981 let mut query_params = Vec::new();
4982 if let Some(p) = license_number {
4983 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
4984 }
4985 if !query_params.is_empty() {
4986 path.push_str("?");
4987 path.push_str(&query_params.join("&"));
4988 }
4989 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
4990 }
4991
4992 pub async fn plant_batches_update_tag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5000 let mut path = format!("/plantbatches/v2/tag");
5001 let mut query_params = Vec::new();
5002 if let Some(p) = license_number {
5003 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5004 }
5005 if !query_params.is_empty() {
5006 path.push_str("?");
5007 path.push_str(&query_params.join("&"));
5008 }
5009 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5010 }
5011
5012 pub async fn plants_create_additives_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5017 let mut path = format!("/plants/v1/additives");
5018 let mut query_params = Vec::new();
5019 if let Some(p) = license_number {
5020 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5021 }
5022 if !query_params.is_empty() {
5023 path.push_str("?");
5024 path.push_str(&query_params.join("&"));
5025 }
5026 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5027 }
5028
5029 pub async fn plants_create_additives_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5036 let mut path = format!("/plants/v2/additives");
5037 let mut query_params = Vec::new();
5038 if let Some(p) = license_number {
5039 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5040 }
5041 if !query_params.is_empty() {
5042 path.push_str("?");
5043 path.push_str(&query_params.join("&"));
5044 }
5045 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5046 }
5047
5048 pub async fn plants_create_additives_bylocation_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5054 let mut path = format!("/plants/v1/additives/bylocation");
5055 let mut query_params = Vec::new();
5056 if let Some(p) = license_number {
5057 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5058 }
5059 if !query_params.is_empty() {
5060 path.push_str("?");
5061 path.push_str(&query_params.join("&"));
5062 }
5063 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5064 }
5065
5066 pub async fn plants_create_additives_bylocation_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5074 let mut path = format!("/plants/v2/additives/bylocation");
5075 let mut query_params = Vec::new();
5076 if let Some(p) = license_number {
5077 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5078 }
5079 if !query_params.is_empty() {
5080 path.push_str("?");
5081 path.push_str(&query_params.join("&"));
5082 }
5083 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5084 }
5085
5086 pub async fn plants_create_additives_bylocation_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5093 let mut path = format!("/plants/v2/additives/bylocation/usingtemplate");
5094 let mut query_params = Vec::new();
5095 if let Some(p) = license_number {
5096 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5097 }
5098 if !query_params.is_empty() {
5099 path.push_str("?");
5100 path.push_str(&query_params.join("&"));
5101 }
5102 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5103 }
5104
5105 pub async fn plants_create_additives_usingtemplate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5112 let mut path = format!("/plants/v2/additives/usingtemplate");
5113 let mut query_params = Vec::new();
5114 if let Some(p) = license_number {
5115 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5116 }
5117 if !query_params.is_empty() {
5118 path.push_str("?");
5119 path.push_str(&query_params.join("&"));
5120 }
5121 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5122 }
5123
5124 pub async fn plants_create_changegrowthphases_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5130 let mut path = format!("/plants/v1/changegrowthphases");
5131 let mut query_params = Vec::new();
5132 if let Some(p) = license_number {
5133 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5134 }
5135 if !query_params.is_empty() {
5136 path.push_str("?");
5137 path.push_str(&query_params.join("&"));
5138 }
5139 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5140 }
5141
5142 pub async fn plants_create_harvestplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5150 let mut path = format!("/plants/v1/harvestplants");
5151 let mut query_params = Vec::new();
5152 if let Some(p) = license_number {
5153 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5154 }
5155 if !query_params.is_empty() {
5156 path.push_str("?");
5157 path.push_str(&query_params.join("&"));
5158 }
5159 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5160 }
5161
5162 pub async fn plants_create_manicure_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5170 let mut path = format!("/plants/v2/manicure");
5171 let mut query_params = Vec::new();
5172 if let Some(p) = license_number {
5173 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5174 }
5175 if !query_params.is_empty() {
5176 path.push_str("?");
5177 path.push_str(&query_params.join("&"));
5178 }
5179 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5180 }
5181
5182 pub async fn plants_create_manicureplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5188 let mut path = format!("/plants/v1/manicureplants");
5189 let mut query_params = Vec::new();
5190 if let Some(p) = license_number {
5191 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5192 }
5193 if !query_params.is_empty() {
5194 path.push_str("?");
5195 path.push_str(&query_params.join("&"));
5196 }
5197 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5198 }
5199
5200 pub async fn plants_create_moveplants_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5206 let mut path = format!("/plants/v1/moveplants");
5207 let mut query_params = Vec::new();
5208 if let Some(p) = license_number {
5209 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5210 }
5211 if !query_params.is_empty() {
5212 path.push_str("?");
5213 path.push_str(&query_params.join("&"));
5214 }
5215 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5216 }
5217
5218 pub async fn plants_create_plantbatch_package_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5228 let mut path = format!("/plants/v1/create/plantbatch/packages");
5229 let mut query_params = Vec::new();
5230 if let Some(p) = license_number {
5231 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5232 }
5233 if !query_params.is_empty() {
5234 path.push_str("?");
5235 path.push_str(&query_params.join("&"));
5236 }
5237 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5238 }
5239
5240 pub async fn plants_create_plantbatch_package_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5252 let mut path = format!("/plants/v2/plantbatch/packages");
5253 let mut query_params = Vec::new();
5254 if let Some(p) = license_number {
5255 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5256 }
5257 if !query_params.is_empty() {
5258 path.push_str("?");
5259 path.push_str(&query_params.join("&"));
5260 }
5261 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5262 }
5263
5264 pub async fn plants_create_plantings_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5272 let mut path = format!("/plants/v1/create/plantings");
5273 let mut query_params = Vec::new();
5274 if let Some(p) = license_number {
5275 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5276 }
5277 if !query_params.is_empty() {
5278 path.push_str("?");
5279 path.push_str(&query_params.join("&"));
5280 }
5281 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5282 }
5283
5284 pub async fn plants_create_plantings_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5294 let mut path = format!("/plants/v2/plantings");
5295 let mut query_params = Vec::new();
5296 if let Some(p) = license_number {
5297 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5304 }
5305
5306 pub async fn plants_create_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5311 let mut path = format!("/plants/v1/waste");
5312 let mut query_params = Vec::new();
5313 if let Some(p) = license_number {
5314 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5315 }
5316 if !query_params.is_empty() {
5317 path.push_str("?");
5318 path.push_str(&query_params.join("&"));
5319 }
5320 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5321 }
5322
5323 pub async fn plants_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5330 let mut path = format!("/plants/v2/waste");
5331 let mut query_params = Vec::new();
5332 if let Some(p) = license_number {
5333 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5334 }
5335 if !query_params.is_empty() {
5336 path.push_str("?");
5337 path.push_str(&query_params.join("&"));
5338 }
5339 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5340 }
5341
5342 pub async fn plants_delete_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5348 let mut path = format!("/plants/v1");
5349 let mut query_params = Vec::new();
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::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5358 }
5359
5360 pub async fn plants_delete_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5368 let mut path = format!("/plants/v2");
5369 let mut query_params = Vec::new();
5370 if let Some(p) = license_number {
5371 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5372 }
5373 if !query_params.is_empty() {
5374 path.push_str("?");
5375 path.push_str(&query_params.join("&"));
5376 }
5377 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5378 }
5379
5380 pub async fn plants_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5385 let mut path = format!("/plants/v1/{}", urlencoding::encode(id).as_ref());
5386 let mut query_params = Vec::new();
5387 if let Some(p) = license_number {
5388 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5389 }
5390 if !query_params.is_empty() {
5391 path.push_str("?");
5392 path.push_str(&query_params.join("&"));
5393 }
5394 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5395 }
5396
5397 pub async fn plants_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5404 let mut path = format!("/plants/v2/{}", urlencoding::encode(id).as_ref());
5405 let mut query_params = Vec::new();
5406 if let Some(p) = license_number {
5407 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5408 }
5409 if !query_params.is_empty() {
5410 path.push_str("?");
5411 path.push_str(&query_params.join("&"));
5412 }
5413 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5414 }
5415
5416 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>> {
5421 let mut path = format!("/plants/v1/additives");
5422 let mut query_params = Vec::new();
5423 if let Some(p) = last_modified_end {
5424 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5425 }
5426 if let Some(p) = last_modified_start {
5427 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5428 }
5429 if let Some(p) = license_number {
5430 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5431 }
5432 if !query_params.is_empty() {
5433 path.push_str("?");
5434 path.push_str(&query_params.join("&"));
5435 }
5436 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5437 }
5438
5439 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>> {
5446 let mut path = format!("/plants/v2/additives");
5447 let mut query_params = Vec::new();
5448 if let Some(p) = last_modified_end {
5449 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5450 }
5451 if let Some(p) = last_modified_start {
5452 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5453 }
5454 if let Some(p) = license_number {
5455 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5456 }
5457 if let Some(p) = page_number {
5458 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5459 }
5460 if let Some(p) = page_size {
5461 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5462 }
5463 if !query_params.is_empty() {
5464 path.push_str("?");
5465 path.push_str(&query_params.join("&"));
5466 }
5467 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5468 }
5469
5470 pub async fn plants_get_additives_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5475 let mut path = format!("/plants/v1/additives/types");
5476 let mut query_params = Vec::new();
5477 if let Some(p) = no {
5478 query_params.push(format!("No={}", urlencoding::encode(&p)));
5479 }
5480 if !query_params.is_empty() {
5481 path.push_str("?");
5482 path.push_str(&query_params.join("&"));
5483 }
5484 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5485 }
5486
5487 pub async fn plants_get_additives_types_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5494 let mut path = format!("/plants/v2/additives/types");
5495 let mut query_params = Vec::new();
5496 if let Some(p) = no {
5497 query_params.push(format!("No={}", urlencoding::encode(&p)));
5498 }
5499 if !query_params.is_empty() {
5500 path.push_str("?");
5501 path.push_str(&query_params.join("&"));
5502 }
5503 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5504 }
5505
5506 pub async fn plants_get_by_label_v1(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5511 let mut path = format!("/plants/v1/{}", urlencoding::encode(label).as_ref());
5512 let mut query_params = Vec::new();
5513 if let Some(p) = license_number {
5514 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5515 }
5516 if !query_params.is_empty() {
5517 path.push_str("?");
5518 path.push_str(&query_params.join("&"));
5519 }
5520 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5521 }
5522
5523 pub async fn plants_get_by_label_v2(&self, label: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5530 let mut path = format!("/plants/v2/{}", urlencoding::encode(label).as_ref());
5531 let mut query_params = Vec::new();
5532 if let Some(p) = license_number {
5533 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5534 }
5535 if !query_params.is_empty() {
5536 path.push_str("?");
5537 path.push_str(&query_params.join("&"));
5538 }
5539 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5540 }
5541
5542 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>> {
5547 let mut path = format!("/plants/v1/flowering");
5548 let mut query_params = Vec::new();
5549 if let Some(p) = last_modified_end {
5550 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5551 }
5552 if let Some(p) = last_modified_start {
5553 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5554 }
5555 if let Some(p) = license_number {
5556 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5557 }
5558 if !query_params.is_empty() {
5559 path.push_str("?");
5560 path.push_str(&query_params.join("&"));
5561 }
5562 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5563 }
5564
5565 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>> {
5572 let mut path = format!("/plants/v2/flowering");
5573 let mut query_params = Vec::new();
5574 if let Some(p) = last_modified_end {
5575 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5576 }
5577 if let Some(p) = last_modified_start {
5578 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5579 }
5580 if let Some(p) = license_number {
5581 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5582 }
5583 if let Some(p) = page_number {
5584 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5585 }
5586 if let Some(p) = page_size {
5587 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5588 }
5589 if !query_params.is_empty() {
5590 path.push_str("?");
5591 path.push_str(&query_params.join("&"));
5592 }
5593 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5594 }
5595
5596 pub async fn plants_get_growth_phases_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5601 let mut path = format!("/plants/v1/growthphases");
5602 let mut query_params = Vec::new();
5603 if let Some(p) = license_number {
5604 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5605 }
5606 if !query_params.is_empty() {
5607 path.push_str("?");
5608 path.push_str(&query_params.join("&"));
5609 }
5610 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5611 }
5612
5613 pub async fn plants_get_growth_phases_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5620 let mut path = format!("/plants/v2/growthphases");
5621 let mut query_params = Vec::new();
5622 if let Some(p) = license_number {
5623 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5624 }
5625 if !query_params.is_empty() {
5626 path.push_str("?");
5627 path.push_str(&query_params.join("&"));
5628 }
5629 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5630 }
5631
5632 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>> {
5637 let mut path = format!("/plants/v1/inactive");
5638 let mut query_params = Vec::new();
5639 if let Some(p) = last_modified_end {
5640 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5641 }
5642 if let Some(p) = last_modified_start {
5643 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5644 }
5645 if let Some(p) = license_number {
5646 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5647 }
5648 if !query_params.is_empty() {
5649 path.push_str("?");
5650 path.push_str(&query_params.join("&"));
5651 }
5652 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5653 }
5654
5655 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>> {
5662 let mut path = format!("/plants/v2/inactive");
5663 let mut query_params = Vec::new();
5664 if let Some(p) = last_modified_end {
5665 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5666 }
5667 if let Some(p) = last_modified_start {
5668 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5669 }
5670 if let Some(p) = license_number {
5671 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5672 }
5673 if let Some(p) = page_number {
5674 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5675 }
5676 if let Some(p) = page_size {
5677 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5678 }
5679 if !query_params.is_empty() {
5680 path.push_str("?");
5681 path.push_str(&query_params.join("&"));
5682 }
5683 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5684 }
5685
5686 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>> {
5693 let mut path = format!("/plants/v2/mother");
5694 let mut query_params = Vec::new();
5695 if let Some(p) = last_modified_end {
5696 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5697 }
5698 if let Some(p) = last_modified_start {
5699 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5700 }
5701 if let Some(p) = license_number {
5702 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5703 }
5704 if let Some(p) = page_number {
5705 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5706 }
5707 if let Some(p) = page_size {
5708 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5709 }
5710 if !query_params.is_empty() {
5711 path.push_str("?");
5712 path.push_str(&query_params.join("&"));
5713 }
5714 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5715 }
5716
5717 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>> {
5724 let mut path = format!("/plants/v2/mother/inactive");
5725 let mut query_params = Vec::new();
5726 if let Some(p) = last_modified_end {
5727 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5728 }
5729 if let Some(p) = last_modified_start {
5730 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5731 }
5732 if let Some(p) = license_number {
5733 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5734 }
5735 if let Some(p) = page_number {
5736 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5737 }
5738 if let Some(p) = page_size {
5739 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5740 }
5741 if !query_params.is_empty() {
5742 path.push_str("?");
5743 path.push_str(&query_params.join("&"));
5744 }
5745 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5746 }
5747
5748 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>> {
5755 let mut path = format!("/plants/v2/mother/onhold");
5756 let mut query_params = Vec::new();
5757 if let Some(p) = last_modified_end {
5758 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5759 }
5760 if let Some(p) = last_modified_start {
5761 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5762 }
5763 if let Some(p) = license_number {
5764 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5765 }
5766 if let Some(p) = page_number {
5767 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5768 }
5769 if let Some(p) = page_size {
5770 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5771 }
5772 if !query_params.is_empty() {
5773 path.push_str("?");
5774 path.push_str(&query_params.join("&"));
5775 }
5776 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5777 }
5778
5779 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>> {
5784 let mut path = format!("/plants/v1/onhold");
5785 let mut query_params = Vec::new();
5786 if let Some(p) = last_modified_end {
5787 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5788 }
5789 if let Some(p) = last_modified_start {
5790 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5791 }
5792 if let Some(p) = license_number {
5793 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5794 }
5795 if !query_params.is_empty() {
5796 path.push_str("?");
5797 path.push_str(&query_params.join("&"));
5798 }
5799 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5800 }
5801
5802 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>> {
5809 let mut path = format!("/plants/v2/onhold");
5810 let mut query_params = Vec::new();
5811 if let Some(p) = last_modified_end {
5812 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5813 }
5814 if let Some(p) = last_modified_start {
5815 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5816 }
5817 if let Some(p) = license_number {
5818 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5819 }
5820 if let Some(p) = page_number {
5821 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5822 }
5823 if let Some(p) = page_size {
5824 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5825 }
5826 if !query_params.is_empty() {
5827 path.push_str("?");
5828 path.push_str(&query_params.join("&"));
5829 }
5830 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5831 }
5832
5833 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>> {
5838 let mut path = format!("/plants/v1/vegetative");
5839 let mut query_params = Vec::new();
5840 if let Some(p) = last_modified_end {
5841 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5842 }
5843 if let Some(p) = last_modified_start {
5844 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5845 }
5846 if let Some(p) = license_number {
5847 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5848 }
5849 if !query_params.is_empty() {
5850 path.push_str("?");
5851 path.push_str(&query_params.join("&"));
5852 }
5853 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5854 }
5855
5856 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>> {
5863 let mut path = format!("/plants/v2/vegetative");
5864 let mut query_params = Vec::new();
5865 if let Some(p) = last_modified_end {
5866 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
5867 }
5868 if let Some(p) = last_modified_start {
5869 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
5870 }
5871 if let Some(p) = license_number {
5872 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5873 }
5874 if let Some(p) = page_number {
5875 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5876 }
5877 if let Some(p) = page_size {
5878 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5879 }
5880 if !query_params.is_empty() {
5881 path.push_str("?");
5882 path.push_str(&query_params.join("&"));
5883 }
5884 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5885 }
5886
5887 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>> {
5894 let mut path = format!("/plants/v2/waste");
5895 let mut query_params = Vec::new();
5896 if let Some(p) = license_number {
5897 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5898 }
5899 if let Some(p) = page_number {
5900 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5901 }
5902 if let Some(p) = page_size {
5903 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5904 }
5905 if !query_params.is_empty() {
5906 path.push_str("?");
5907 path.push_str(&query_params.join("&"));
5908 }
5909 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5910 }
5911
5912 pub async fn plants_get_waste_methods_all_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
5917 let mut path = format!("/plants/v1/waste/methods/all");
5918 let mut query_params = Vec::new();
5919 if let Some(p) = no {
5920 query_params.push(format!("No={}", urlencoding::encode(&p)));
5921 }
5922 if !query_params.is_empty() {
5923 path.push_str("?");
5924 path.push_str(&query_params.join("&"));
5925 }
5926 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5927 }
5928
5929 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>> {
5936 let mut path = format!("/plants/v2/waste/methods/all");
5937 let mut query_params = Vec::new();
5938 if let Some(p) = page_number {
5939 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5940 }
5941 if let Some(p) = page_size {
5942 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5943 }
5944 if !query_params.is_empty() {
5945 path.push_str("?");
5946 path.push_str(&query_params.join("&"));
5947 }
5948 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5949 }
5950
5951 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>> {
5958 let mut path = format!("/plants/v2/waste/{}/package", urlencoding::encode(id).as_ref());
5959 let mut query_params = Vec::new();
5960 if let Some(p) = license_number {
5961 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5962 }
5963 if let Some(p) = page_number {
5964 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5965 }
5966 if let Some(p) = page_size {
5967 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5968 }
5969 if !query_params.is_empty() {
5970 path.push_str("?");
5971 path.push_str(&query_params.join("&"));
5972 }
5973 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5974 }
5975
5976 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>> {
5983 let mut path = format!("/plants/v2/waste/{}/plant", urlencoding::encode(id).as_ref());
5984 let mut query_params = Vec::new();
5985 if let Some(p) = license_number {
5986 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
5987 }
5988 if let Some(p) = page_number {
5989 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
5990 }
5991 if let Some(p) = page_size {
5992 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
5993 }
5994 if !query_params.is_empty() {
5995 path.push_str("?");
5996 path.push_str(&query_params.join("&"));
5997 }
5998 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
5999 }
6000
6001 pub async fn plants_get_waste_reasons_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6006 let mut path = format!("/plants/v1/waste/reasons");
6007 let mut query_params = Vec::new();
6008 if let Some(p) = license_number {
6009 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6010 }
6011 if !query_params.is_empty() {
6012 path.push_str("?");
6013 path.push_str(&query_params.join("&"));
6014 }
6015 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6016 }
6017
6018 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>> {
6025 let mut path = format!("/plants/v2/waste/reasons");
6026 let mut query_params = Vec::new();
6027 if let Some(p) = license_number {
6028 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6029 }
6030 if let Some(p) = page_number {
6031 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6032 }
6033 if let Some(p) = page_size {
6034 query_params.push(format!("pageSize={}", 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::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6041 }
6042
6043 pub async fn plants_update_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6051 let mut path = format!("/plants/v2/adjust");
6052 let mut query_params = Vec::new();
6053 if let Some(p) = license_number {
6054 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6055 }
6056 if !query_params.is_empty() {
6057 path.push_str("?");
6058 path.push_str(&query_params.join("&"));
6059 }
6060 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6061 }
6062
6063 pub async fn plants_update_growthphase_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6071 let mut path = format!("/plants/v2/growthphase");
6072 let mut query_params = Vec::new();
6073 if let Some(p) = license_number {
6074 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6075 }
6076 if !query_params.is_empty() {
6077 path.push_str("?");
6078 path.push_str(&query_params.join("&"));
6079 }
6080 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6081 }
6082
6083 pub async fn plants_update_harvest_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6091 let mut path = format!("/plants/v2/harvest");
6092 let mut query_params = Vec::new();
6093 if let Some(p) = license_number {
6094 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6095 }
6096 if !query_params.is_empty() {
6097 path.push_str("?");
6098 path.push_str(&query_params.join("&"));
6099 }
6100 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6101 }
6102
6103 pub async fn plants_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6111 let mut path = format!("/plants/v2/location");
6112 let mut query_params = Vec::new();
6113 if let Some(p) = license_number {
6114 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6115 }
6116 if !query_params.is_empty() {
6117 path.push_str("?");
6118 path.push_str(&query_params.join("&"));
6119 }
6120 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6121 }
6122
6123 pub async fn plants_update_merge_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6131 let mut path = format!("/plants/v2/merge");
6132 let mut query_params = Vec::new();
6133 if let Some(p) = license_number {
6134 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6135 }
6136 if !query_params.is_empty() {
6137 path.push_str("?");
6138 path.push_str(&query_params.join("&"));
6139 }
6140 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6141 }
6142
6143 pub async fn plants_update_split_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6150 let mut path = format!("/plants/v2/split");
6151 let mut query_params = Vec::new();
6152 if let Some(p) = license_number {
6153 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6154 }
6155 if !query_params.is_empty() {
6156 path.push_str("?");
6157 path.push_str(&query_params.join("&"));
6158 }
6159 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6160 }
6161
6162 pub async fn plants_update_strain_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6170 let mut path = format!("/plants/v2/strain");
6171 let mut query_params = Vec::new();
6172 if let Some(p) = license_number {
6173 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6174 }
6175 if !query_params.is_empty() {
6176 path.push_str("?");
6177 path.push_str(&query_params.join("&"));
6178 }
6179 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6180 }
6181
6182 pub async fn plants_update_tag_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6190 let mut path = format!("/plants/v2/tag");
6191 let mut query_params = Vec::new();
6192 if let Some(p) = license_number {
6193 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6194 }
6195 if !query_params.is_empty() {
6196 path.push_str("?");
6197 path.push_str(&query_params.join("&"));
6198 }
6199 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6200 }
6201
6202 pub async fn processing_jobs_create_adjust_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6207 let mut path = format!("/processing/v1/adjust");
6208 let mut query_params = Vec::new();
6209 if let Some(p) = license_number {
6210 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6211 }
6212 if !query_params.is_empty() {
6213 path.push_str("?");
6214 path.push_str(&query_params.join("&"));
6215 }
6216 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6217 }
6218
6219 pub async fn processing_jobs_create_adjust_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6226 let mut path = format!("/processing/v2/adjust");
6227 let mut query_params = Vec::new();
6228 if let Some(p) = license_number {
6229 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6230 }
6231 if !query_params.is_empty() {
6232 path.push_str("?");
6233 path.push_str(&query_params.join("&"));
6234 }
6235 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6236 }
6237
6238 pub async fn processing_jobs_create_jobtypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6243 let mut path = format!("/processing/v1/jobtypes");
6244 let mut query_params = Vec::new();
6245 if let Some(p) = license_number {
6246 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6247 }
6248 if !query_params.is_empty() {
6249 path.push_str("?");
6250 path.push_str(&query_params.join("&"));
6251 }
6252 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6253 }
6254
6255 pub async fn processing_jobs_create_jobtypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6262 let mut path = format!("/processing/v2/jobtypes");
6263 let mut query_params = Vec::new();
6264 if let Some(p) = license_number {
6265 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6266 }
6267 if !query_params.is_empty() {
6268 path.push_str("?");
6269 path.push_str(&query_params.join("&"));
6270 }
6271 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6272 }
6273
6274 pub async fn processing_jobs_create_start_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6279 let mut path = format!("/processing/v1/start");
6280 let mut query_params = Vec::new();
6281 if let Some(p) = license_number {
6282 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6283 }
6284 if !query_params.is_empty() {
6285 path.push_str("?");
6286 path.push_str(&query_params.join("&"));
6287 }
6288 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6289 }
6290
6291 pub async fn processing_jobs_create_start_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6298 let mut path = format!("/processing/v2/start");
6299 let mut query_params = Vec::new();
6300 if let Some(p) = license_number {
6301 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6302 }
6303 if !query_params.is_empty() {
6304 path.push_str("?");
6305 path.push_str(&query_params.join("&"));
6306 }
6307 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6308 }
6309
6310 pub async fn processing_jobs_createpackages_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6315 let mut path = format!("/processing/v1/createpackages");
6316 let mut query_params = Vec::new();
6317 if let Some(p) = license_number {
6318 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6319 }
6320 if !query_params.is_empty() {
6321 path.push_str("?");
6322 path.push_str(&query_params.join("&"));
6323 }
6324 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6325 }
6326
6327 pub async fn processing_jobs_createpackages_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6334 let mut path = format!("/processing/v2/createpackages");
6335 let mut query_params = Vec::new();
6336 if let Some(p) = license_number {
6337 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6338 }
6339 if !query_params.is_empty() {
6340 path.push_str("?");
6341 path.push_str(&query_params.join("&"));
6342 }
6343 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6344 }
6345
6346 pub async fn processing_jobs_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6351 let mut path = format!("/processing/v1/{}", urlencoding::encode(id).as_ref());
6352 let mut query_params = Vec::new();
6353 if let Some(p) = license_number {
6354 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6355 }
6356 if !query_params.is_empty() {
6357 path.push_str("?");
6358 path.push_str(&query_params.join("&"));
6359 }
6360 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6361 }
6362
6363 pub async fn processing_jobs_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6370 let mut path = format!("/processing/v2/{}", urlencoding::encode(id).as_ref());
6371 let mut query_params = Vec::new();
6372 if let Some(p) = license_number {
6373 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6374 }
6375 if !query_params.is_empty() {
6376 path.push_str("?");
6377 path.push_str(&query_params.join("&"));
6378 }
6379 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6380 }
6381
6382 pub async fn processing_jobs_delete_jobtypes_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6387 let mut path = format!("/processing/v1/jobtypes/{}", urlencoding::encode(id).as_ref());
6388 let mut query_params = Vec::new();
6389 if let Some(p) = license_number {
6390 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6391 }
6392 if !query_params.is_empty() {
6393 path.push_str("?");
6394 path.push_str(&query_params.join("&"));
6395 }
6396 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6397 }
6398
6399 pub async fn processing_jobs_delete_jobtypes_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6406 let mut path = format!("/processing/v2/jobtypes/{}", urlencoding::encode(id).as_ref());
6407 let mut query_params = Vec::new();
6408 if let Some(p) = license_number {
6409 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6410 }
6411 if !query_params.is_empty() {
6412 path.push_str("?");
6413 path.push_str(&query_params.join("&"));
6414 }
6415 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6416 }
6417
6418 pub async fn processing_jobs_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6423 let mut path = format!("/processing/v1/{}", urlencoding::encode(id).as_ref());
6424 let mut query_params = Vec::new();
6425 if let Some(p) = license_number {
6426 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6427 }
6428 if !query_params.is_empty() {
6429 path.push_str("?");
6430 path.push_str(&query_params.join("&"));
6431 }
6432 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6433 }
6434
6435 pub async fn processing_jobs_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6442 let mut path = format!("/processing/v2/{}", urlencoding::encode(id).as_ref());
6443 let mut query_params = Vec::new();
6444 if let Some(p) = license_number {
6445 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6446 }
6447 if !query_params.is_empty() {
6448 path.push_str("?");
6449 path.push_str(&query_params.join("&"));
6450 }
6451 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6452 }
6453
6454 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>> {
6459 let mut path = format!("/processing/v1/active");
6460 let mut query_params = Vec::new();
6461 if let Some(p) = last_modified_end {
6462 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6463 }
6464 if let Some(p) = last_modified_start {
6465 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6466 }
6467 if let Some(p) = license_number {
6468 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6469 }
6470 if !query_params.is_empty() {
6471 path.push_str("?");
6472 path.push_str(&query_params.join("&"));
6473 }
6474 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6475 }
6476
6477 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>> {
6484 let mut path = format!("/processing/v2/active");
6485 let mut query_params = Vec::new();
6486 if let Some(p) = last_modified_end {
6487 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6488 }
6489 if let Some(p) = last_modified_start {
6490 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6491 }
6492 if let Some(p) = license_number {
6493 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6494 }
6495 if let Some(p) = page_number {
6496 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6497 }
6498 if let Some(p) = page_size {
6499 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6500 }
6501 if !query_params.is_empty() {
6502 path.push_str("?");
6503 path.push_str(&query_params.join("&"));
6504 }
6505 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6506 }
6507
6508 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>> {
6513 let mut path = format!("/processing/v1/inactive");
6514 let mut query_params = Vec::new();
6515 if let Some(p) = last_modified_end {
6516 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6517 }
6518 if let Some(p) = last_modified_start {
6519 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6520 }
6521 if let Some(p) = license_number {
6522 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6523 }
6524 if !query_params.is_empty() {
6525 path.push_str("?");
6526 path.push_str(&query_params.join("&"));
6527 }
6528 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6529 }
6530
6531 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>> {
6538 let mut path = format!("/processing/v2/inactive");
6539 let mut query_params = Vec::new();
6540 if let Some(p) = last_modified_end {
6541 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6542 }
6543 if let Some(p) = last_modified_start {
6544 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6545 }
6546 if let Some(p) = license_number {
6547 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6548 }
6549 if let Some(p) = page_number {
6550 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6551 }
6552 if let Some(p) = page_size {
6553 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6554 }
6555 if !query_params.is_empty() {
6556 path.push_str("?");
6557 path.push_str(&query_params.join("&"));
6558 }
6559 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6560 }
6561
6562 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>> {
6567 let mut path = format!("/processing/v1/jobtypes/active");
6568 let mut query_params = Vec::new();
6569 if let Some(p) = last_modified_end {
6570 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6571 }
6572 if let Some(p) = last_modified_start {
6573 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6574 }
6575 if let Some(p) = license_number {
6576 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6577 }
6578 if !query_params.is_empty() {
6579 path.push_str("?");
6580 path.push_str(&query_params.join("&"));
6581 }
6582 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6583 }
6584
6585 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>> {
6592 let mut path = format!("/processing/v2/jobtypes/active");
6593 let mut query_params = Vec::new();
6594 if let Some(p) = last_modified_end {
6595 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6596 }
6597 if let Some(p) = last_modified_start {
6598 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6599 }
6600 if let Some(p) = license_number {
6601 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6602 }
6603 if let Some(p) = page_number {
6604 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6605 }
6606 if let Some(p) = page_size {
6607 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6608 }
6609 if !query_params.is_empty() {
6610 path.push_str("?");
6611 path.push_str(&query_params.join("&"));
6612 }
6613 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6614 }
6615
6616 pub async fn processing_jobs_get_jobtypes_attributes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6621 let mut path = format!("/processing/v1/jobtypes/attributes");
6622 let mut query_params = Vec::new();
6623 if let Some(p) = license_number {
6624 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6625 }
6626 if !query_params.is_empty() {
6627 path.push_str("?");
6628 path.push_str(&query_params.join("&"));
6629 }
6630 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6631 }
6632
6633 pub async fn processing_jobs_get_jobtypes_attributes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6640 let mut path = format!("/processing/v2/jobtypes/attributes");
6641 let mut query_params = Vec::new();
6642 if let Some(p) = license_number {
6643 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6644 }
6645 if !query_params.is_empty() {
6646 path.push_str("?");
6647 path.push_str(&query_params.join("&"));
6648 }
6649 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6650 }
6651
6652 pub async fn processing_jobs_get_jobtypes_categories_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6657 let mut path = format!("/processing/v1/jobtypes/categories");
6658 let mut query_params = Vec::new();
6659 if let Some(p) = license_number {
6660 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6661 }
6662 if !query_params.is_empty() {
6663 path.push_str("?");
6664 path.push_str(&query_params.join("&"));
6665 }
6666 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6667 }
6668
6669 pub async fn processing_jobs_get_jobtypes_categories_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6676 let mut path = format!("/processing/v2/jobtypes/categories");
6677 let mut query_params = Vec::new();
6678 if let Some(p) = license_number {
6679 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6680 }
6681 if !query_params.is_empty() {
6682 path.push_str("?");
6683 path.push_str(&query_params.join("&"));
6684 }
6685 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6686 }
6687
6688 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>> {
6693 let mut path = format!("/processing/v1/jobtypes/inactive");
6694 let mut query_params = Vec::new();
6695 if let Some(p) = last_modified_end {
6696 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6697 }
6698 if let Some(p) = last_modified_start {
6699 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6700 }
6701 if let Some(p) = license_number {
6702 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6703 }
6704 if !query_params.is_empty() {
6705 path.push_str("?");
6706 path.push_str(&query_params.join("&"));
6707 }
6708 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6709 }
6710
6711 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>> {
6718 let mut path = format!("/processing/v2/jobtypes/inactive");
6719 let mut query_params = Vec::new();
6720 if let Some(p) = last_modified_end {
6721 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
6722 }
6723 if let Some(p) = last_modified_start {
6724 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
6725 }
6726 if let Some(p) = license_number {
6727 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6728 }
6729 if let Some(p) = page_number {
6730 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
6731 }
6732 if let Some(p) = page_size {
6733 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
6734 }
6735 if !query_params.is_empty() {
6736 path.push_str("?");
6737 path.push_str(&query_params.join("&"));
6738 }
6739 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6740 }
6741
6742 pub async fn processing_jobs_update_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6747 let mut path = format!("/processing/v1/finish");
6748 let mut query_params = Vec::new();
6749 if let Some(p) = license_number {
6750 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6751 }
6752 if !query_params.is_empty() {
6753 path.push_str("?");
6754 path.push_str(&query_params.join("&"));
6755 }
6756 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6757 }
6758
6759 pub async fn processing_jobs_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6766 let mut path = format!("/processing/v2/finish");
6767 let mut query_params = Vec::new();
6768 if let Some(p) = license_number {
6769 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6770 }
6771 if !query_params.is_empty() {
6772 path.push_str("?");
6773 path.push_str(&query_params.join("&"));
6774 }
6775 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6776 }
6777
6778 pub async fn processing_jobs_update_jobtypes_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6783 let mut path = format!("/processing/v1/jobtypes");
6784 let mut query_params = Vec::new();
6785 if let Some(p) = license_number {
6786 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6787 }
6788 if !query_params.is_empty() {
6789 path.push_str("?");
6790 path.push_str(&query_params.join("&"));
6791 }
6792 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6793 }
6794
6795 pub async fn processing_jobs_update_jobtypes_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6802 let mut path = format!("/processing/v2/jobtypes");
6803 let mut query_params = Vec::new();
6804 if let Some(p) = license_number {
6805 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6806 }
6807 if !query_params.is_empty() {
6808 path.push_str("?");
6809 path.push_str(&query_params.join("&"));
6810 }
6811 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6812 }
6813
6814 pub async fn processing_jobs_update_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6819 let mut path = format!("/processing/v1/unfinish");
6820 let mut query_params = Vec::new();
6821 if let Some(p) = license_number {
6822 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6823 }
6824 if !query_params.is_empty() {
6825 path.push_str("?");
6826 path.push_str(&query_params.join("&"));
6827 }
6828 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6829 }
6830
6831 pub async fn processing_jobs_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6838 let mut path = format!("/processing/v2/unfinish");
6839 let mut query_params = Vec::new();
6840 if let Some(p) = license_number {
6841 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6842 }
6843 if !query_params.is_empty() {
6844 path.push_str("?");
6845 path.push_str(&query_params.join("&"));
6846 }
6847 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6848 }
6849
6850 pub async fn retail_id_create_associate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6860 let mut path = format!("/retailid/v2/associate");
6861 let mut query_params = Vec::new();
6862 if let Some(p) = license_number {
6863 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6864 }
6865 if !query_params.is_empty() {
6866 path.push_str("?");
6867 path.push_str(&query_params.join("&"));
6868 }
6869 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6870 }
6871
6872 pub async fn retail_id_create_generate_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6882 let mut path = format!("/retailid/v2/generate");
6883 let mut query_params = Vec::new();
6884 if let Some(p) = license_number {
6885 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6886 }
6887 if !query_params.is_empty() {
6888 path.push_str("?");
6889 path.push_str(&query_params.join("&"));
6890 }
6891 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6892 }
6893
6894 pub async fn retail_id_create_merge_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6903 let mut path = format!("/retailid/v2/merge");
6904 let mut query_params = Vec::new();
6905 if let Some(p) = license_number {
6906 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6907 }
6908 if !query_params.is_empty() {
6909 path.push_str("?");
6910 path.push_str(&query_params.join("&"));
6911 }
6912 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6913 }
6914
6915 pub async fn retail_id_create_package_info_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6925 let mut path = format!("/retailid/v2/packages/info");
6926 let mut query_params = Vec::new();
6927 if let Some(p) = license_number {
6928 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6935 }
6936
6937 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>> {
6947 let mut path = format!("/retailid/v2/receive/{}", urlencoding::encode(label).as_ref());
6948 let mut query_params = Vec::new();
6949 if let Some(p) = license_number {
6950 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6951 }
6952 if !query_params.is_empty() {
6953 path.push_str("?");
6954 path.push_str(&query_params.join("&"));
6955 }
6956 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6957 }
6958
6959 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>> {
6969 let mut path = format!("/retailid/v2/receive/qr/{}", urlencoding::encode(short_code).as_ref());
6970 let mut query_params = Vec::new();
6971 if let Some(p) = license_number {
6972 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
6973 }
6974 if !query_params.is_empty() {
6975 path.push_str("?");
6976 path.push_str(&query_params.join("&"));
6977 }
6978 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6979 }
6980
6981 pub async fn sandbox_create_integrator_setup_v2(&self, user_key: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
6988 let mut path = format!("/sandbox/v2/integrator/setup");
6989 let mut query_params = Vec::new();
6990 if let Some(p) = user_key {
6991 query_params.push(format!("userKey={}", urlencoding::encode(&p)));
6992 }
6993 if !query_params.is_empty() {
6994 path.push_str("?");
6995 path.push_str(&query_params.join("&"));
6996 }
6997 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
6998 }
6999
7000 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>> {
7007 let mut path = format!("/caregivers/v1/status/{}", urlencoding::encode(caregiver_license_number).as_ref());
7008 let mut query_params = Vec::new();
7009 if let Some(p) = license_number {
7010 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7011 }
7012 if !query_params.is_empty() {
7013 path.push_str("?");
7014 path.push_str(&query_params.join("&"));
7015 }
7016 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7017 }
7018
7019 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>> {
7026 let mut path = format!("/caregivers/v2/status/{}", urlencoding::encode(caregiver_license_number).as_ref());
7027 let mut query_params = Vec::new();
7028 if let Some(p) = license_number {
7029 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7030 }
7031 if !query_params.is_empty() {
7032 path.push_str("?");
7033 path.push_str(&query_params.join("&"));
7034 }
7035 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7036 }
7037
7038 pub async fn employees_get_all_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7043 let mut path = format!("/employees/v1");
7044 let mut query_params = Vec::new();
7045 if let Some(p) = license_number {
7046 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7047 }
7048 if !query_params.is_empty() {
7049 path.push_str("?");
7050 path.push_str(&query_params.join("&"));
7051 }
7052 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7053 }
7054
7055 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>> {
7063 let mut path = format!("/employees/v2");
7064 let mut query_params = Vec::new();
7065 if let Some(p) = license_number {
7066 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7067 }
7068 if let Some(p) = page_number {
7069 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7070 }
7071 if let Some(p) = page_size {
7072 query_params.push(format!("pageSize={}", 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 employees_get_permissions_v2(&self, employee_license_number: Option<String>, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7088 let mut path = format!("/employees/v2/permissions");
7089 let mut query_params = Vec::new();
7090 if let Some(p) = employee_license_number {
7091 query_params.push(format!("employeeLicenseNumber={}", urlencoding::encode(&p)));
7092 }
7093 if let Some(p) = license_number {
7094 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7095 }
7096 if !query_params.is_empty() {
7097 path.push_str("?");
7098 path.push_str(&query_params.join("&"));
7099 }
7100 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7101 }
7102
7103 pub async fn lab_tests_create_record_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7109 let mut path = format!("/labtests/v1/record");
7110 let mut query_params = Vec::new();
7111 if let Some(p) = license_number {
7112 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7113 }
7114 if !query_params.is_empty() {
7115 path.push_str("?");
7116 path.push_str(&query_params.join("&"));
7117 }
7118 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7119 }
7120
7121 pub async fn lab_tests_create_record_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7129 let mut path = format!("/labtests/v2/record");
7130 let mut query_params = Vec::new();
7131 if let Some(p) = license_number {
7132 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7133 }
7134 if !query_params.is_empty() {
7135 path.push_str("?");
7136 path.push_str(&query_params.join("&"));
7137 }
7138 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7139 }
7140
7141 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>> {
7148 let mut path = format!("/labtests/v2/batches");
7149 let mut query_params = Vec::new();
7150 if let Some(p) = page_number {
7151 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7152 }
7153 if let Some(p) = page_size {
7154 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7155 }
7156 if !query_params.is_empty() {
7157 path.push_str("?");
7158 path.push_str(&query_params.join("&"));
7159 }
7160 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7161 }
7162
7163 pub async fn lab_tests_get_labtestdocument_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7169 let mut path = format!("/labtests/v1/labtestdocument/{}", urlencoding::encode(id).as_ref());
7170 let mut query_params = Vec::new();
7171 if let Some(p) = license_number {
7172 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7173 }
7174 if !query_params.is_empty() {
7175 path.push_str("?");
7176 path.push_str(&query_params.join("&"));
7177 }
7178 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7179 }
7180
7181 pub async fn lab_tests_get_labtestdocument_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7189 let mut path = format!("/labtests/v2/labtestdocument/{}", urlencoding::encode(id).as_ref());
7190 let mut query_params = Vec::new();
7191 if let Some(p) = license_number {
7192 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7193 }
7194 if !query_params.is_empty() {
7195 path.push_str("?");
7196 path.push_str(&query_params.join("&"));
7197 }
7198 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7199 }
7200
7201 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>> {
7206 let mut path = format!("/labtests/v1/results");
7207 let mut query_params = Vec::new();
7208 if let Some(p) = license_number {
7209 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7210 }
7211 if let Some(p) = package_id {
7212 query_params.push(format!("packageId={}", urlencoding::encode(&p)));
7213 }
7214 if !query_params.is_empty() {
7215 path.push_str("?");
7216 path.push_str(&query_params.join("&"));
7217 }
7218 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7219 }
7220
7221 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>> {
7229 let mut path = format!("/labtests/v2/results");
7230 let mut query_params = Vec::new();
7231 if let Some(p) = license_number {
7232 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7233 }
7234 if let Some(p) = package_id {
7235 query_params.push(format!("packageId={}", urlencoding::encode(&p)));
7236 }
7237 if let Some(p) = page_number {
7238 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7239 }
7240 if let Some(p) = page_size {
7241 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7242 }
7243 if !query_params.is_empty() {
7244 path.push_str("?");
7245 path.push_str(&query_params.join("&"));
7246 }
7247 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7248 }
7249
7250 pub async fn lab_tests_get_states_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7255 let mut path = format!("/labtests/v1/states");
7256 let mut query_params = Vec::new();
7257 if let Some(p) = no {
7258 query_params.push(format!("No={}", urlencoding::encode(&p)));
7259 }
7260 if !query_params.is_empty() {
7261 path.push_str("?");
7262 path.push_str(&query_params.join("&"));
7263 }
7264 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7265 }
7266
7267 pub async fn lab_tests_get_states_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7274 let mut path = format!("/labtests/v2/states");
7275 let mut query_params = Vec::new();
7276 if let Some(p) = no {
7277 query_params.push(format!("No={}", urlencoding::encode(&p)));
7278 }
7279 if !query_params.is_empty() {
7280 path.push_str("?");
7281 path.push_str(&query_params.join("&"));
7282 }
7283 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7284 }
7285
7286 pub async fn lab_tests_get_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7291 let mut path = format!("/labtests/v1/types");
7292 let mut query_params = Vec::new();
7293 if let Some(p) = no {
7294 query_params.push(format!("No={}", urlencoding::encode(&p)));
7295 }
7296 if !query_params.is_empty() {
7297 path.push_str("?");
7298 path.push_str(&query_params.join("&"));
7299 }
7300 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7301 }
7302
7303 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>> {
7310 let mut path = format!("/labtests/v2/types");
7311 let mut query_params = Vec::new();
7312 if let Some(p) = page_number {
7313 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7314 }
7315 if let Some(p) = page_size {
7316 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7317 }
7318 if !query_params.is_empty() {
7319 path.push_str("?");
7320 path.push_str(&query_params.join("&"));
7321 }
7322 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7323 }
7324
7325 pub async fn lab_tests_update_labtestdocument_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7331 let mut path = format!("/labtests/v1/labtestdocument");
7332 let mut query_params = Vec::new();
7333 if let Some(p) = license_number {
7334 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7335 }
7336 if !query_params.is_empty() {
7337 path.push_str("?");
7338 path.push_str(&query_params.join("&"));
7339 }
7340 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7341 }
7342
7343 pub async fn lab_tests_update_labtestdocument_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7351 let mut path = format!("/labtests/v2/labtestdocument");
7352 let mut query_params = Vec::new();
7353 if let Some(p) = license_number {
7354 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7355 }
7356 if !query_params.is_empty() {
7357 path.push_str("?");
7358 path.push_str(&query_params.join("&"));
7359 }
7360 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7361 }
7362
7363 pub async fn lab_tests_update_result_release_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7369 let mut path = format!("/labtests/v1/results/release");
7370 let mut query_params = Vec::new();
7371 if let Some(p) = license_number {
7372 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7373 }
7374 if !query_params.is_empty() {
7375 path.push_str("?");
7376 path.push_str(&query_params.join("&"));
7377 }
7378 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7379 }
7380
7381 pub async fn lab_tests_update_result_release_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7389 let mut path = format!("/labtests/v2/results/release");
7390 let mut query_params = Vec::new();
7391 if let Some(p) = license_number {
7392 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7393 }
7394 if !query_params.is_empty() {
7395 path.push_str("?");
7396 path.push_str(&query_params.join("&"));
7397 }
7398 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7399 }
7400
7401 pub async fn sublocations_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7408 let mut path = format!("/sublocations/v2");
7409 let mut query_params = Vec::new();
7410 if let Some(p) = license_number {
7411 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7412 }
7413 if !query_params.is_empty() {
7414 path.push_str("?");
7415 path.push_str(&query_params.join("&"));
7416 }
7417 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7418 }
7419
7420 pub async fn sublocations_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7427 let mut path = format!("/sublocations/v2/{}", urlencoding::encode(id).as_ref());
7428 let mut query_params = Vec::new();
7429 if let Some(p) = license_number {
7430 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7431 }
7432 if !query_params.is_empty() {
7433 path.push_str("?");
7434 path.push_str(&query_params.join("&"));
7435 }
7436 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7437 }
7438
7439 pub async fn sublocations_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7446 let mut path = format!("/sublocations/v2/{}", urlencoding::encode(id).as_ref());
7447 let mut query_params = Vec::new();
7448 if let Some(p) = license_number {
7449 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7450 }
7451 if !query_params.is_empty() {
7452 path.push_str("?");
7453 path.push_str(&query_params.join("&"));
7454 }
7455 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7456 }
7457
7458 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>> {
7465 let mut path = format!("/sublocations/v2/active");
7466 let mut query_params = Vec::new();
7467 if let Some(p) = last_modified_end {
7468 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7469 }
7470 if let Some(p) = last_modified_start {
7471 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7472 }
7473 if let Some(p) = license_number {
7474 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7475 }
7476 if let Some(p) = page_number {
7477 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7478 }
7479 if let Some(p) = page_size {
7480 query_params.push(format!("pageSize={}", 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::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7487 }
7488
7489 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>> {
7496 let mut path = format!("/sublocations/v2/inactive");
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 let Some(p) = page_number {
7502 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7503 }
7504 if let Some(p) = page_size {
7505 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7506 }
7507 if !query_params.is_empty() {
7508 path.push_str("?");
7509 path.push_str(&query_params.join("&"));
7510 }
7511 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7512 }
7513
7514 pub async fn sublocations_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7521 let mut path = format!("/sublocations/v2");
7522 let mut query_params = Vec::new();
7523 if let Some(p) = license_number {
7524 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7525 }
7526 if !query_params.is_empty() {
7527 path.push_str("?");
7528 path.push_str(&query_params.join("&"));
7529 }
7530 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7531 }
7532
7533 pub async fn units_of_measure_get_active_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7538 let mut path = format!("/unitsofmeasure/v1/active");
7539 let mut query_params = Vec::new();
7540 if let Some(p) = no {
7541 query_params.push(format!("No={}", urlencoding::encode(&p)));
7542 }
7543 if !query_params.is_empty() {
7544 path.push_str("?");
7545 path.push_str(&query_params.join("&"));
7546 }
7547 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7548 }
7549
7550 pub async fn units_of_measure_get_active_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7557 let mut path = format!("/unitsofmeasure/v2/active");
7558 let mut query_params = Vec::new();
7559 if let Some(p) = no {
7560 query_params.push(format!("No={}", urlencoding::encode(&p)));
7561 }
7562 if !query_params.is_empty() {
7563 path.push_str("?");
7564 path.push_str(&query_params.join("&"));
7565 }
7566 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7567 }
7568
7569 pub async fn units_of_measure_get_inactive_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7576 let mut path = format!("/unitsofmeasure/v2/inactive");
7577 let mut query_params = Vec::new();
7578 if let Some(p) = no {
7579 query_params.push(format!("No={}", urlencoding::encode(&p)));
7580 }
7581 if !query_params.is_empty() {
7582 path.push_str("?");
7583 path.push_str(&query_params.join("&"));
7584 }
7585 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7586 }
7587
7588 pub async fn waste_methods_get_all_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7595 let mut path = format!("/wastemethods/v2");
7596 let mut query_params = Vec::new();
7597 if let Some(p) = no {
7598 query_params.push(format!("No={}", urlencoding::encode(&p)));
7599 }
7600 if !query_params.is_empty() {
7601 path.push_str("?");
7602 path.push_str(&query_params.join("&"));
7603 }
7604 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7605 }
7606
7607 pub async fn facilities_get_all_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7614 let mut path = format!("/facilities/v1");
7615 let mut query_params = Vec::new();
7616 if let Some(p) = no {
7617 query_params.push(format!("No={}", urlencoding::encode(&p)));
7618 }
7619 if !query_params.is_empty() {
7620 path.push_str("?");
7621 path.push_str(&query_params.join("&"));
7622 }
7623 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7624 }
7625
7626 pub async fn facilities_get_all_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7633 let mut path = format!("/facilities/v2");
7634 let mut query_params = Vec::new();
7635 if let Some(p) = no {
7636 query_params.push(format!("No={}", 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::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7643 }
7644
7645 pub async fn items_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7652 let mut path = format!("/items/v1/create");
7653 let mut query_params = Vec::new();
7654 if let Some(p) = license_number {
7655 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7656 }
7657 if !query_params.is_empty() {
7658 path.push_str("?");
7659 path.push_str(&query_params.join("&"));
7660 }
7661 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7662 }
7663
7664 pub async fn items_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7671 let mut path = format!("/items/v2");
7672 let mut query_params = Vec::new();
7673 if let Some(p) = license_number {
7674 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7675 }
7676 if !query_params.is_empty() {
7677 path.push_str("?");
7678 path.push_str(&query_params.join("&"));
7679 }
7680 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7681 }
7682
7683 pub async fn items_create_brand_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7690 let mut path = format!("/items/v2/brand");
7691 let mut query_params = Vec::new();
7692 if let Some(p) = license_number {
7693 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7694 }
7695 if !query_params.is_empty() {
7696 path.push_str("?");
7697 path.push_str(&query_params.join("&"));
7698 }
7699 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7700 }
7701
7702 pub async fn items_create_file_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7709 let mut path = format!("/items/v2/file");
7710 let mut query_params = Vec::new();
7711 if let Some(p) = license_number {
7712 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7719 }
7720
7721 pub async fn items_create_photo_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7728 let mut path = format!("/items/v1/photo");
7729 let mut query_params = Vec::new();
7730 if let Some(p) = license_number {
7731 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7738 }
7739
7740 pub async fn items_create_photo_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7747 let mut path = format!("/items/v2/photo");
7748 let mut query_params = Vec::new();
7749 if let Some(p) = license_number {
7750 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7751 }
7752 if !query_params.is_empty() {
7753 path.push_str("?");
7754 path.push_str(&query_params.join("&"));
7755 }
7756 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7757 }
7758
7759 pub async fn items_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7764 let mut path = format!("/items/v1/update");
7765 let mut query_params = Vec::new();
7766 if let Some(p) = license_number {
7767 query_params.push(format!("licenseNumber={}", 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::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7774 }
7775
7776 pub async fn items_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7781 let mut path = format!("/items/v1/{}", urlencoding::encode(id).as_ref());
7782 let mut query_params = Vec::new();
7783 if let Some(p) = license_number {
7784 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7785 }
7786 if !query_params.is_empty() {
7787 path.push_str("?");
7788 path.push_str(&query_params.join("&"));
7789 }
7790 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7791 }
7792
7793 pub async fn items_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7800 let mut path = format!("/items/v2/{}", urlencoding::encode(id).as_ref());
7801 let mut query_params = Vec::new();
7802 if let Some(p) = license_number {
7803 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7804 }
7805 if !query_params.is_empty() {
7806 path.push_str("?");
7807 path.push_str(&query_params.join("&"));
7808 }
7809 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7810 }
7811
7812 pub async fn items_delete_brand_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7819 let mut path = format!("/items/v2/brand/{}", urlencoding::encode(id).as_ref());
7820 let mut query_params = Vec::new();
7821 if let Some(p) = license_number {
7822 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7823 }
7824 if !query_params.is_empty() {
7825 path.push_str("?");
7826 path.push_str(&query_params.join("&"));
7827 }
7828 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7829 }
7830
7831 pub async fn items_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7836 let mut path = format!("/items/v1/{}", urlencoding::encode(id).as_ref());
7837 let mut query_params = Vec::new();
7838 if let Some(p) = license_number {
7839 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7840 }
7841 if !query_params.is_empty() {
7842 path.push_str("?");
7843 path.push_str(&query_params.join("&"));
7844 }
7845 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7846 }
7847
7848 pub async fn items_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7855 let mut path = format!("/items/v2/{}", urlencoding::encode(id).as_ref());
7856 let mut query_params = Vec::new();
7857 if let Some(p) = license_number {
7858 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7859 }
7860 if !query_params.is_empty() {
7861 path.push_str("?");
7862 path.push_str(&query_params.join("&"));
7863 }
7864 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7865 }
7866
7867 pub async fn items_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7872 let mut path = format!("/items/v1/active");
7873 let mut query_params = Vec::new();
7874 if let Some(p) = license_number {
7875 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7876 }
7877 if !query_params.is_empty() {
7878 path.push_str("?");
7879 path.push_str(&query_params.join("&"));
7880 }
7881 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7882 }
7883
7884 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>> {
7891 let mut path = format!("/items/v2/active");
7892 let mut query_params = Vec::new();
7893 if let Some(p) = last_modified_end {
7894 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
7895 }
7896 if let Some(p) = last_modified_start {
7897 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
7898 }
7899 if let Some(p) = license_number {
7900 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7901 }
7902 if let Some(p) = page_number {
7903 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7904 }
7905 if let Some(p) = page_size {
7906 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7907 }
7908 if !query_params.is_empty() {
7909 path.push_str("?");
7910 path.push_str(&query_params.join("&"));
7911 }
7912 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7913 }
7914
7915 pub async fn items_get_brands_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7920 let mut path = format!("/items/v1/brands");
7921 let mut query_params = Vec::new();
7922 if let Some(p) = license_number {
7923 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7924 }
7925 if !query_params.is_empty() {
7926 path.push_str("?");
7927 path.push_str(&query_params.join("&"));
7928 }
7929 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7930 }
7931
7932 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>> {
7939 let mut path = format!("/items/v2/brands");
7940 let mut query_params = Vec::new();
7941 if let Some(p) = license_number {
7942 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7943 }
7944 if let Some(p) = page_number {
7945 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7946 }
7947 if let Some(p) = page_size {
7948 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7949 }
7950 if !query_params.is_empty() {
7951 path.push_str("?");
7952 path.push_str(&query_params.join("&"));
7953 }
7954 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7955 }
7956
7957 pub async fn items_get_categories_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
7962 let mut path = format!("/items/v1/categories");
7963 let mut query_params = Vec::new();
7964 if let Some(p) = license_number {
7965 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7966 }
7967 if !query_params.is_empty() {
7968 path.push_str("?");
7969 path.push_str(&query_params.join("&"));
7970 }
7971 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7972 }
7973
7974 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>> {
7981 let mut path = format!("/items/v2/categories");
7982 let mut query_params = Vec::new();
7983 if let Some(p) = license_number {
7984 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
7985 }
7986 if let Some(p) = page_number {
7987 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
7988 }
7989 if let Some(p) = page_size {
7990 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
7991 }
7992 if !query_params.is_empty() {
7993 path.push_str("?");
7994 path.push_str(&query_params.join("&"));
7995 }
7996 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
7997 }
7998
7999 pub async fn items_get_file_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8006 let mut path = format!("/items/v2/file/{}", urlencoding::encode(id).as_ref());
8007 let mut query_params = Vec::new();
8008 if let Some(p) = license_number {
8009 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8010 }
8011 if !query_params.is_empty() {
8012 path.push_str("?");
8013 path.push_str(&query_params.join("&"));
8014 }
8015 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8016 }
8017
8018 pub async fn items_get_inactive_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8023 let mut path = format!("/items/v1/inactive");
8024 let mut query_params = Vec::new();
8025 if let Some(p) = license_number {
8026 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8027 }
8028 if !query_params.is_empty() {
8029 path.push_str("?");
8030 path.push_str(&query_params.join("&"));
8031 }
8032 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8033 }
8034
8035 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>> {
8042 let mut path = format!("/items/v2/inactive");
8043 let mut query_params = Vec::new();
8044 if let Some(p) = license_number {
8045 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8046 }
8047 if let Some(p) = page_number {
8048 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8049 }
8050 if let Some(p) = page_size {
8051 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8052 }
8053 if !query_params.is_empty() {
8054 path.push_str("?");
8055 path.push_str(&query_params.join("&"));
8056 }
8057 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8058 }
8059
8060 pub async fn items_get_photo_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8065 let mut path = format!("/items/v1/photo/{}", urlencoding::encode(id).as_ref());
8066 let mut query_params = Vec::new();
8067 if let Some(p) = license_number {
8068 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8069 }
8070 if !query_params.is_empty() {
8071 path.push_str("?");
8072 path.push_str(&query_params.join("&"));
8073 }
8074 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8075 }
8076
8077 pub async fn items_get_photo_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8084 let mut path = format!("/items/v2/photo/{}", urlencoding::encode(id).as_ref());
8085 let mut query_params = Vec::new();
8086 if let Some(p) = license_number {
8087 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8088 }
8089 if !query_params.is_empty() {
8090 path.push_str("?");
8091 path.push_str(&query_params.join("&"));
8092 }
8093 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8094 }
8095
8096 pub async fn items_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8103 let mut path = format!("/items/v2");
8104 let mut query_params = Vec::new();
8105 if let Some(p) = license_number {
8106 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8107 }
8108 if !query_params.is_empty() {
8109 path.push_str("?");
8110 path.push_str(&query_params.join("&"));
8111 }
8112 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8113 }
8114
8115 pub async fn items_update_brand_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8122 let mut path = format!("/items/v2/brand");
8123 let mut query_params = Vec::new();
8124 if let Some(p) = license_number {
8125 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8126 }
8127 if !query_params.is_empty() {
8128 path.push_str("?");
8129 path.push_str(&query_params.join("&"));
8130 }
8131 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8132 }
8133
8134 pub async fn patient_check_ins_create_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8139 let mut path = format!("/patient-checkins/v1");
8140 let mut query_params = Vec::new();
8141 if let Some(p) = license_number {
8142 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8143 }
8144 if !query_params.is_empty() {
8145 path.push_str("?");
8146 path.push_str(&query_params.join("&"));
8147 }
8148 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8149 }
8150
8151 pub async fn patient_check_ins_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8158 let mut path = format!("/patient-checkins/v2");
8159 let mut query_params = Vec::new();
8160 if let Some(p) = license_number {
8161 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8162 }
8163 if !query_params.is_empty() {
8164 path.push_str("?");
8165 path.push_str(&query_params.join("&"));
8166 }
8167 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8168 }
8169
8170 pub async fn patient_check_ins_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8175 let mut path = format!("/patient-checkins/v1/{}", urlencoding::encode(id).as_ref());
8176 let mut query_params = Vec::new();
8177 if let Some(p) = license_number {
8178 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8179 }
8180 if !query_params.is_empty() {
8181 path.push_str("?");
8182 path.push_str(&query_params.join("&"));
8183 }
8184 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8185 }
8186
8187 pub async fn patient_check_ins_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8194 let mut path = format!("/patient-checkins/v2/{}", urlencoding::encode(id).as_ref());
8195 let mut query_params = Vec::new();
8196 if let Some(p) = license_number {
8197 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8198 }
8199 if !query_params.is_empty() {
8200 path.push_str("?");
8201 path.push_str(&query_params.join("&"));
8202 }
8203 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8204 }
8205
8206 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>> {
8211 let mut path = format!("/patient-checkins/v1");
8212 let mut query_params = Vec::new();
8213 if let Some(p) = checkin_date_end {
8214 query_params.push(format!("checkinDateEnd={}", urlencoding::encode(&p)));
8215 }
8216 if let Some(p) = checkin_date_start {
8217 query_params.push(format!("checkinDateStart={}", urlencoding::encode(&p)));
8218 }
8219 if let Some(p) = license_number {
8220 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8221 }
8222 if !query_params.is_empty() {
8223 path.push_str("?");
8224 path.push_str(&query_params.join("&"));
8225 }
8226 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8227 }
8228
8229 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>> {
8236 let mut path = format!("/patient-checkins/v2");
8237 let mut query_params = Vec::new();
8238 if let Some(p) = checkin_date_end {
8239 query_params.push(format!("checkinDateEnd={}", urlencoding::encode(&p)));
8240 }
8241 if let Some(p) = checkin_date_start {
8242 query_params.push(format!("checkinDateStart={}", urlencoding::encode(&p)));
8243 }
8244 if let Some(p) = license_number {
8245 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8246 }
8247 if !query_params.is_empty() {
8248 path.push_str("?");
8249 path.push_str(&query_params.join("&"));
8250 }
8251 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8252 }
8253
8254 pub async fn patient_check_ins_get_locations_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8259 let mut path = format!("/patient-checkins/v1/locations");
8260 let mut query_params = Vec::new();
8261 if let Some(p) = no {
8262 query_params.push(format!("No={}", urlencoding::encode(&p)));
8263 }
8264 if !query_params.is_empty() {
8265 path.push_str("?");
8266 path.push_str(&query_params.join("&"));
8267 }
8268 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8269 }
8270
8271 pub async fn patient_check_ins_get_locations_v2(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8278 let mut path = format!("/patient-checkins/v2/locations");
8279 let mut query_params = Vec::new();
8280 if let Some(p) = no {
8281 query_params.push(format!("No={}", urlencoding::encode(&p)));
8282 }
8283 if !query_params.is_empty() {
8284 path.push_str("?");
8285 path.push_str(&query_params.join("&"));
8286 }
8287 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8288 }
8289
8290 pub async fn patient_check_ins_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8295 let mut path = format!("/patient-checkins/v1");
8296 let mut query_params = Vec::new();
8297 if let Some(p) = license_number {
8298 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8299 }
8300 if !query_params.is_empty() {
8301 path.push_str("?");
8302 path.push_str(&query_params.join("&"));
8303 }
8304 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8305 }
8306
8307 pub async fn patient_check_ins_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8314 let mut path = format!("/patient-checkins/v2");
8315 let mut query_params = Vec::new();
8316 if let Some(p) = license_number {
8317 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8318 }
8319 if !query_params.is_empty() {
8320 path.push_str("?");
8321 path.push_str(&query_params.join("&"));
8322 }
8323 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8324 }
8325
8326 pub async fn additives_templates_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8333 let mut path = format!("/additivestemplates/v2");
8334 let mut query_params = Vec::new();
8335 if let Some(p) = license_number {
8336 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8337 }
8338 if !query_params.is_empty() {
8339 path.push_str("?");
8340 path.push_str(&query_params.join("&"));
8341 }
8342 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8343 }
8344
8345 pub async fn additives_templates_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8352 let mut path = format!("/additivestemplates/v2/{}", urlencoding::encode(id).as_ref());
8353 let mut query_params = Vec::new();
8354 if let Some(p) = license_number {
8355 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8356 }
8357 if !query_params.is_empty() {
8358 path.push_str("?");
8359 path.push_str(&query_params.join("&"));
8360 }
8361 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8362 }
8363
8364 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>> {
8371 let mut path = format!("/additivestemplates/v2/active");
8372 let mut query_params = Vec::new();
8373 if let Some(p) = last_modified_end {
8374 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8375 }
8376 if let Some(p) = last_modified_start {
8377 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8378 }
8379 if let Some(p) = license_number {
8380 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8381 }
8382 if let Some(p) = page_number {
8383 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8384 }
8385 if let Some(p) = page_size {
8386 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8387 }
8388 if !query_params.is_empty() {
8389 path.push_str("?");
8390 path.push_str(&query_params.join("&"));
8391 }
8392 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8393 }
8394
8395 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>> {
8402 let mut path = format!("/additivestemplates/v2/inactive");
8403 let mut query_params = Vec::new();
8404 if let Some(p) = last_modified_end {
8405 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8406 }
8407 if let Some(p) = last_modified_start {
8408 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8409 }
8410 if let Some(p) = license_number {
8411 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8412 }
8413 if let Some(p) = page_number {
8414 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8415 }
8416 if let Some(p) = page_size {
8417 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8418 }
8419 if !query_params.is_empty() {
8420 path.push_str("?");
8421 path.push_str(&query_params.join("&"));
8422 }
8423 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8424 }
8425
8426 pub async fn additives_templates_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8433 let mut path = format!("/additivestemplates/v2");
8434 let mut query_params = Vec::new();
8435 if let Some(p) = license_number {
8436 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8437 }
8438 if !query_params.is_empty() {
8439 path.push_str("?");
8440 path.push_str(&query_params.join("&"));
8441 }
8442 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8443 }
8444
8445 pub async fn harvests_create_finish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8451 let mut path = format!("/harvests/v1/finish");
8452 let mut query_params = Vec::new();
8453 if let Some(p) = license_number {
8454 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8455 }
8456 if !query_params.is_empty() {
8457 path.push_str("?");
8458 path.push_str(&query_params.join("&"));
8459 }
8460 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8461 }
8462
8463 pub async fn harvests_create_package_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8471 let mut path = format!("/harvests/v1/create/packages");
8472 let mut query_params = Vec::new();
8473 if let Some(p) = license_number {
8474 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8475 }
8476 if !query_params.is_empty() {
8477 path.push_str("?");
8478 path.push_str(&query_params.join("&"));
8479 }
8480 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8481 }
8482
8483 pub async fn harvests_create_package_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8493 let mut path = format!("/harvests/v2/packages");
8494 let mut query_params = Vec::new();
8495 if let Some(p) = license_number {
8496 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8497 }
8498 if !query_params.is_empty() {
8499 path.push_str("?");
8500 path.push_str(&query_params.join("&"));
8501 }
8502 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8503 }
8504
8505 pub async fn harvests_create_package_testing_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8513 let mut path = format!("/harvests/v1/create/packages/testing");
8514 let mut query_params = Vec::new();
8515 if let Some(p) = license_number {
8516 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8517 }
8518 if !query_params.is_empty() {
8519 path.push_str("?");
8520 path.push_str(&query_params.join("&"));
8521 }
8522 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8523 }
8524
8525 pub async fn harvests_create_package_testing_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8535 let mut path = format!("/harvests/v2/packages/testing");
8536 let mut query_params = Vec::new();
8537 if let Some(p) = license_number {
8538 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8539 }
8540 if !query_params.is_empty() {
8541 path.push_str("?");
8542 path.push_str(&query_params.join("&"));
8543 }
8544 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8545 }
8546
8547 pub async fn harvests_create_remove_waste_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8553 let mut path = format!("/harvests/v1/removewaste");
8554 let mut query_params = Vec::new();
8555 if let Some(p) = license_number {
8556 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8557 }
8558 if !query_params.is_empty() {
8559 path.push_str("?");
8560 path.push_str(&query_params.join("&"));
8561 }
8562 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8563 }
8564
8565 pub async fn harvests_create_unfinish_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8571 let mut path = format!("/harvests/v1/unfinish");
8572 let mut query_params = Vec::new();
8573 if let Some(p) = license_number {
8574 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8575 }
8576 if !query_params.is_empty() {
8577 path.push_str("?");
8578 path.push_str(&query_params.join("&"));
8579 }
8580 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8581 }
8582
8583 pub async fn harvests_create_waste_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8591 let mut path = format!("/harvests/v2/waste");
8592 let mut query_params = Vec::new();
8593 if let Some(p) = license_number {
8594 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8595 }
8596 if !query_params.is_empty() {
8597 path.push_str("?");
8598 path.push_str(&query_params.join("&"));
8599 }
8600 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8601 }
8602
8603 pub async fn harvests_delete_waste_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8611 let mut path = format!("/harvests/v2/waste/{}", urlencoding::encode(id).as_ref());
8612 let mut query_params = Vec::new();
8613 if let Some(p) = license_number {
8614 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8615 }
8616 if !query_params.is_empty() {
8617 path.push_str("?");
8618 path.push_str(&query_params.join("&"));
8619 }
8620 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8621 }
8622
8623 pub async fn harvests_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8628 let mut path = format!("/harvests/v1/{}", urlencoding::encode(id).as_ref());
8629 let mut query_params = Vec::new();
8630 if let Some(p) = license_number {
8631 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8632 }
8633 if !query_params.is_empty() {
8634 path.push_str("?");
8635 path.push_str(&query_params.join("&"));
8636 }
8637 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8638 }
8639
8640 pub async fn harvests_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8647 let mut path = format!("/harvests/v2/{}", urlencoding::encode(id).as_ref());
8648 let mut query_params = Vec::new();
8649 if let Some(p) = license_number {
8650 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8651 }
8652 if !query_params.is_empty() {
8653 path.push_str("?");
8654 path.push_str(&query_params.join("&"));
8655 }
8656 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8657 }
8658
8659 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>> {
8664 let mut path = format!("/harvests/v1/active");
8665 let mut query_params = Vec::new();
8666 if let Some(p) = last_modified_end {
8667 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8668 }
8669 if let Some(p) = last_modified_start {
8670 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8671 }
8672 if let Some(p) = license_number {
8673 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8674 }
8675 if !query_params.is_empty() {
8676 path.push_str("?");
8677 path.push_str(&query_params.join("&"));
8678 }
8679 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8680 }
8681
8682 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>> {
8689 let mut path = format!("/harvests/v2/active");
8690 let mut query_params = Vec::new();
8691 if let Some(p) = last_modified_end {
8692 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8693 }
8694 if let Some(p) = last_modified_start {
8695 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8696 }
8697 if let Some(p) = license_number {
8698 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8699 }
8700 if let Some(p) = page_number {
8701 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8702 }
8703 if let Some(p) = page_size {
8704 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8705 }
8706 if !query_params.is_empty() {
8707 path.push_str("?");
8708 path.push_str(&query_params.join("&"));
8709 }
8710 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8711 }
8712
8713 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>> {
8718 let mut path = format!("/harvests/v1/inactive");
8719 let mut query_params = Vec::new();
8720 if let Some(p) = last_modified_end {
8721 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8722 }
8723 if let Some(p) = last_modified_start {
8724 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8725 }
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::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8734 }
8735
8736 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>> {
8743 let mut path = format!("/harvests/v2/inactive");
8744 let mut query_params = Vec::new();
8745 if let Some(p) = last_modified_end {
8746 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8747 }
8748 if let Some(p) = last_modified_start {
8749 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8750 }
8751 if let Some(p) = license_number {
8752 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8753 }
8754 if let Some(p) = page_number {
8755 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8756 }
8757 if let Some(p) = page_size {
8758 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8759 }
8760 if !query_params.is_empty() {
8761 path.push_str("?");
8762 path.push_str(&query_params.join("&"));
8763 }
8764 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8765 }
8766
8767 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>> {
8772 let mut path = format!("/harvests/v1/onhold");
8773 let mut query_params = Vec::new();
8774 if let Some(p) = last_modified_end {
8775 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8776 }
8777 if let Some(p) = last_modified_start {
8778 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8779 }
8780 if let Some(p) = license_number {
8781 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8782 }
8783 if !query_params.is_empty() {
8784 path.push_str("?");
8785 path.push_str(&query_params.join("&"));
8786 }
8787 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8788 }
8789
8790 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>> {
8797 let mut path = format!("/harvests/v2/onhold");
8798 let mut query_params = Vec::new();
8799 if let Some(p) = last_modified_end {
8800 query_params.push(format!("lastModifiedEnd={}", urlencoding::encode(&p)));
8801 }
8802 if let Some(p) = last_modified_start {
8803 query_params.push(format!("lastModifiedStart={}", urlencoding::encode(&p)));
8804 }
8805 if let Some(p) = license_number {
8806 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8807 }
8808 if let Some(p) = page_number {
8809 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8810 }
8811 if let Some(p) = page_size {
8812 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8813 }
8814 if !query_params.is_empty() {
8815 path.push_str("?");
8816 path.push_str(&query_params.join("&"));
8817 }
8818 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8819 }
8820
8821 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>> {
8828 let mut path = format!("/harvests/v2/waste");
8829 let mut query_params = Vec::new();
8830 if let Some(p) = harvest_id {
8831 query_params.push(format!("harvestId={}", urlencoding::encode(&p)));
8832 }
8833 if let Some(p) = license_number {
8834 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8835 }
8836 if let Some(p) = page_number {
8837 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8838 }
8839 if let Some(p) = page_size {
8840 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8841 }
8842 if !query_params.is_empty() {
8843 path.push_str("?");
8844 path.push_str(&query_params.join("&"));
8845 }
8846 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8847 }
8848
8849 pub async fn harvests_get_waste_types_v1(&self, no: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8854 let mut path = format!("/harvests/v1/waste/types");
8855 let mut query_params = Vec::new();
8856 if let Some(p) = no {
8857 query_params.push(format!("No={}", urlencoding::encode(&p)));
8858 }
8859 if !query_params.is_empty() {
8860 path.push_str("?");
8861 path.push_str(&query_params.join("&"));
8862 }
8863 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8864 }
8865
8866 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>> {
8873 let mut path = format!("/harvests/v2/waste/types");
8874 let mut query_params = Vec::new();
8875 if let Some(p) = page_number {
8876 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
8877 }
8878 if let Some(p) = page_size {
8879 query_params.push(format!("pageSize={}", urlencoding::encode(&p)));
8880 }
8881 if !query_params.is_empty() {
8882 path.push_str("?");
8883 path.push_str(&query_params.join("&"));
8884 }
8885 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8886 }
8887
8888 pub async fn harvests_update_finish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8896 let mut path = format!("/harvests/v2/finish");
8897 let mut query_params = Vec::new();
8898 if let Some(p) = license_number {
8899 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8900 }
8901 if !query_params.is_empty() {
8902 path.push_str("?");
8903 path.push_str(&query_params.join("&"));
8904 }
8905 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8906 }
8907
8908 pub async fn harvests_update_location_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8916 let mut path = format!("/harvests/v2/location");
8917 let mut query_params = Vec::new();
8918 if let Some(p) = license_number {
8919 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8920 }
8921 if !query_params.is_empty() {
8922 path.push_str("?");
8923 path.push_str(&query_params.join("&"));
8924 }
8925 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8926 }
8927
8928 pub async fn harvests_update_move_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8934 let mut path = format!("/harvests/v1/move");
8935 let mut query_params = Vec::new();
8936 if let Some(p) = license_number {
8937 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8938 }
8939 if !query_params.is_empty() {
8940 path.push_str("?");
8941 path.push_str(&query_params.join("&"));
8942 }
8943 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8944 }
8945
8946 pub async fn harvests_update_rename_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8952 let mut path = format!("/harvests/v1/rename");
8953 let mut query_params = Vec::new();
8954 if let Some(p) = license_number {
8955 query_params.push(format!("licenseNumber={}", 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::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8962 }
8963
8964 pub async fn harvests_update_rename_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8972 let mut path = format!("/harvests/v2/rename");
8973 let mut query_params = Vec::new();
8974 if let Some(p) = license_number {
8975 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8976 }
8977 if !query_params.is_empty() {
8978 path.push_str("?");
8979 path.push_str(&query_params.join("&"));
8980 }
8981 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
8982 }
8983
8984 pub async fn harvests_update_restore_harvested_plants_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
8992 let mut path = format!("/harvests/v2/restore/harvestedplants");
8993 let mut query_params = Vec::new();
8994 if let Some(p) = license_number {
8995 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
8996 }
8997 if !query_params.is_empty() {
8998 path.push_str("?");
8999 path.push_str(&query_params.join("&"));
9000 }
9001 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9002 }
9003
9004 pub async fn harvests_update_unfinish_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9012 let mut path = format!("/harvests/v2/unfinish");
9013 let mut query_params = Vec::new();
9014 if let Some(p) = license_number {
9015 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9016 }
9017 if !query_params.is_empty() {
9018 path.push_str("?");
9019 path.push_str(&query_params.join("&"));
9020 }
9021 self.send(reqwest::Method::PUT, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9022 }
9023
9024 pub async fn patients_create_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9031 let mut path = format!("/patients/v2");
9032 let mut query_params = Vec::new();
9033 if let Some(p) = license_number {
9034 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9035 }
9036 if !query_params.is_empty() {
9037 path.push_str("?");
9038 path.push_str(&query_params.join("&"));
9039 }
9040 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9041 }
9042
9043 pub async fn patients_create_add_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9048 let mut path = format!("/patients/v1/add");
9049 let mut query_params = Vec::new();
9050 if let Some(p) = license_number {
9051 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9052 }
9053 if !query_params.is_empty() {
9054 path.push_str("?");
9055 path.push_str(&query_params.join("&"));
9056 }
9057 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9058 }
9059
9060 pub async fn patients_create_update_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9065 let mut path = format!("/patients/v1/update");
9066 let mut query_params = Vec::new();
9067 if let Some(p) = license_number {
9068 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9069 }
9070 if !query_params.is_empty() {
9071 path.push_str("?");
9072 path.push_str(&query_params.join("&"));
9073 }
9074 self.send(reqwest::Method::POST, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9075 }
9076
9077 pub async fn patients_delete_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9082 let mut path = format!("/patients/v1/{}", urlencoding::encode(id).as_ref());
9083 let mut query_params = Vec::new();
9084 if let Some(p) = license_number {
9085 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9086 }
9087 if !query_params.is_empty() {
9088 path.push_str("?");
9089 path.push_str(&query_params.join("&"));
9090 }
9091 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9092 }
9093
9094 pub async fn patients_delete_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9101 let mut path = format!("/patients/v2/{}", urlencoding::encode(id).as_ref());
9102 let mut query_params = Vec::new();
9103 if let Some(p) = license_number {
9104 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9105 }
9106 if !query_params.is_empty() {
9107 path.push_str("?");
9108 path.push_str(&query_params.join("&"));
9109 }
9110 self.send(reqwest::Method::DELETE, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9111 }
9112
9113 pub async fn patients_get_v1(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9118 let mut path = format!("/patients/v1/{}", urlencoding::encode(id).as_ref());
9119 let mut query_params = Vec::new();
9120 if let Some(p) = license_number {
9121 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9122 }
9123 if !query_params.is_empty() {
9124 path.push_str("?");
9125 path.push_str(&query_params.join("&"));
9126 }
9127 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9128 }
9129
9130 pub async fn patients_get_v2(&self, id: &str, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9137 let mut path = format!("/patients/v2/{}", urlencoding::encode(id).as_ref());
9138 let mut query_params = Vec::new();
9139 if let Some(p) = license_number {
9140 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9141 }
9142 if !query_params.is_empty() {
9143 path.push_str("?");
9144 path.push_str(&query_params.join("&"));
9145 }
9146 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9147 }
9148
9149 pub async fn patients_get_active_v1(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9154 let mut path = format!("/patients/v1/active");
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 !query_params.is_empty() {
9160 path.push_str("?");
9161 path.push_str(&query_params.join("&"));
9162 }
9163 self.send(reqwest::Method::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9164 }
9165
9166 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>> {
9173 let mut path = format!("/patients/v2/active");
9174 let mut query_params = Vec::new();
9175 if let Some(p) = license_number {
9176 query_params.push(format!("licenseNumber={}", urlencoding::encode(&p)));
9177 }
9178 if let Some(p) = page_number {
9179 query_params.push(format!("pageNumber={}", urlencoding::encode(&p)));
9180 }
9181 if let Some(p) = page_size {
9182 query_params.push(format!("pageSize={}", 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::GET, &path, body.map(|b| serde_json::to_value(b).unwrap()).as_ref()).await
9189 }
9190
9191 pub async fn patients_update_v2(&self, license_number: Option<String>, body: Option<&Value>) -> Result<Option<Value>, Box<dyn Error>> {
9198 let mut path = format!("/patients/v2");
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}