1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903
use crate::Client;
use crate::ClientResult;
pub struct Accounts {
pub client: Client,
}
impl Accounts {
#[doc(hidden)]
pub fn new(client: Client) -> Self {
Accounts { client }
}
/**
* List sub accounts.
*
* This function performs a `GET` to the `/accounts` endpoint.
*
* List all the sub accounts that have been created by a master account.<br><br>Zoom allows only [approved partners](https://marketplace.zoom.us/docs/api-reference/master-account-apis) to use master APIs and manage sub accounts. Email the partner programs team at **partner-success@zoom.us** for more details.
*
* <br>**Prerequisites:**<br>
* * Pro or a higher paid account with master account option enabled. <br>
*
* **Scope**: `account:read:admin`
* <br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
*
*
*
* **Parameters:**
*
* * `page_size: i64` -- The number of records returned within a single API call.
* * `page_number: i64` --
* **Deprecated** - This field has been deprecated and we will stop supporting it completely in a future release. Please use "next_page_token" for pagination instead of this field.
*
* The page number of the current page in the returned records.
* * `next_page_token: &str` -- The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
*/
pub async fn get(
&self,
page_size: i64,
page_number: i64,
next_page_token: &str,
) -> ClientResult<crate::Response<crate::types::Domains>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !next_page_token.is_empty() {
query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
}
if page_number > 0 {
query_args.push(("page_number".to_string(), page_number.to_string()));
}
if page_size > 0 {
query_args.push(("page_size".to_string(), page_size.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(&format!("/accounts?{}", query_), None);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Create a sub account.
*
* This function performs a `POST` to the `/accounts` endpoint.
*
* Create a sub account under a master account. Your account must be a master account in order to create sub accounts.
* <br><br>Zoom allows only [approved partners](https://marketplace.zoom.us/docs/api-reference/master-account-apis) to use master APIs and manage sub accounts. Email the partner programs team at partner-success@zoom.us. for more details. Please note that the created account user will receive a confirmation email.<br><br>
* <br>
* **Prerequisites:**<br>
* * Pro or a higher paid account with master account option enabled. <br>
*
* **Scope**: `account:write:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
*/
pub async fn create(
&self,
body: &crate::types::AccountCreateRequest,
) -> ClientResult<crate::Response<crate::types::AccountCreateResponse>> {
let url = self.client.url("/accounts", None);
self.client
.post(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: Some("application/json".to_string()),
},
)
.await
}
/**
* Get sub account details.
*
* This function performs a `GET` to the `/accounts/{accountId}` endpoint.
*
* Get details of a sub account that is listed under a master account. Your account must be a master account in order to retrieve sub accounts' details. Zoom allows only [approved partners](https://marketplace.zoom.us/docs/api-reference/master-account-apis) to use master APIs and create sub accounts. Email the partner programs team at **partner-success@zoom.us** for more details.
*
* **Prerequisites:**
* * Pro or a higher paid account with master account option enabled. <br>
*
* **Scope**: `account:write:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
*/
pub async fn account(
&self,
account_id: &str,
) -> ClientResult<crate::Response<crate::types::AccountResponse>> {
let url = self.client.url(
&format!(
"/accounts/{}",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Disassociate a sub account.
*
* This function performs a `DELETE` to the `/accounts/{accountId}` endpoint.
*
* Disassociate a sub account from its master account. This will leave the sub account intact but it will no longer be associated with the master account.<br>
*
* **Prerequisites:**
* * Pro or a higher paid account with master account option enabled. <br>
* * The account making this API request must be a [master account](https://marketplace.zoom.us/docs/api-reference/master-account-apis).<br><br>
*
*
* **Scope**: `account:write:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
*/
pub async fn disassociate(&self, account_id: &str) -> ClientResult<crate::Response<()>> {
let url = self.client.url(
&format!(
"/accounts/{}",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.delete(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Update options.
*
* This function performs a `PATCH` to the `/accounts/{accountId}/options` endpoint.
*
* Update a sub account's options under the master account.<br> <aside>Your account must be a master account in order to update the options for sub accounts. Zoom only assigns this privilege to trusted partners. </aside>
*
* **Prerequisites:**
* * Pro or a higher paid account with master account option enabled.
* * The account making this API request must be a [master account](https://marketplace.zoom.us/docs/api-reference/master-account-apis).<br><br>
*
* **Scope**: `account:write:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
*/
pub async fn options_update(
&self,
account_id: &str,
body: &crate::types::Options,
) -> ClientResult<crate::Response<()>> {
let url = self.client.url(
&format!(
"/accounts/{}/options",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.patch(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: Some("application/json".to_string()),
},
)
.await
}
/**
* Get settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/settings` endpoint.
*
* Use this API to get an account's settings information.
*
* To get the settings of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Scopes:** `account:read:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Prerequisites**:
* * The account must be a paid account
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
* \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
* \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
* \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
* \* `meeting_security` — View the account's meeting security settings.
* * `custom_query_fields: &str` -- The name of the field by which to filter the response. For example, if you provide the `host_video` value for this field, you will get a response similar to the following:
*
* `{ "schedule_meeting": { "host_video": false } }`
*
* To use multiple values, comma-separate each value. For example: `host_video,participant_video`.
*/
pub async fn settings_domains(
&self,
account_id: &str,
option: crate::types::OptionData,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::Domains>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/settings` endpoint.
*
* Use this API to get an account's settings information.
*
* To get the settings of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Scopes:** `account:read:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Prerequisites**:
* * The account must be a paid account
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
* \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
* \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
* \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
* \* `meeting_security` — View the account's meeting security settings.
* * `custom_query_fields: &str` -- The name of the field by which to filter the response. For example, if you provide the `host_video` value for this field, you will get a response similar to the following:
*
* `{ "schedule_meeting": { "host_video": false } }`
*
* To use multiple values, comma-separate each value. For example: `host_video,participant_video`.
*/
pub async fn settings_security(
&self,
account_id: &str,
option: crate::types::OptionData,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::Security>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/settings` endpoint.
*
* Use this API to get an account's settings information.
*
* To get the settings of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Scopes:** `account:read:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Prerequisites**:
* * The account must be a paid account
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
* \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
* \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
* \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
* \* `meeting_security` — View the account's meeting security settings.
* * `custom_query_fields: &str` -- The name of the field by which to filter the response. For example, if you provide the `host_video` value for this field, you will get a response similar to the following:
*
* `{ "schedule_meeting": { "host_video": false } }`
*
* To use multiple values, comma-separate each value. For example: `host_video,participant_video`.
*/
pub async fn settings_account(
&self,
account_id: &str,
option: crate::types::OptionData,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::AccountSettings>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/settings` endpoint.
*
* Use this API to get an account's settings information.
*
* To get the settings of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Scopes:** `account:read:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Prerequisites**:
* * The account must be a paid account
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
* \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
* \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
* \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
* \* `meeting_security` — View the account's meeting security settings.
* * `custom_query_fields: &str` -- The name of the field by which to filter the response. For example, if you provide the `host_video` value for this field, you will get a response similar to the following:
*
* `{ "schedule_meeting": { "host_video": false } }`
*
* To use multiple values, comma-separate each value. For example: `host_video,participant_video`.
*/
pub async fn settings_meeting_security(
&self,
account_id: &str,
option: crate::types::OptionData,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::MeetingSecuritySettings>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/settings` endpoint.
*
* Use this API to get an account's settings information.
*
* To get the settings of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Scopes:** `account:read:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Prerequisites**:
* * The account must be a paid account
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
* \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
* \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
* \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
* \* `meeting_security` — View the account's meeting security settings.
* * `custom_query_fields: &str` -- The name of the field by which to filter the response. For example, if you provide the `host_video` value for this field, you will get a response similar to the following:
*
* `{ "schedule_meeting": { "host_video": false } }`
*
* To use multiple values, comma-separate each value. For example: `host_video,participant_video`.
*/
pub async fn setting(
&self,
account_id: &str,
option: crate::types::OptionData,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::AccountSettingsResponseOneOf>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Update settings.
*
* This function performs a `PATCH` to the `/accounts/{accountId}/settings` endpoint.
*
* Update the settings of a sub account that is under a master account.<br> To update the settings of the master account, use `me` as the value of the `accountId` path parameter.<br><br>
* **Prerequisites**:
* * The sub account must be a paid account.<br>
* **Scopes**: `account:write:admin`
* <br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
* * `option: crate::types::AccountSettingsUpdateOption`
*/
pub async fn settings_update(
&self,
account_id: &str,
option: crate::types::AccountSettingsUpdateOption,
body: &crate::types::AccountSettingsUpdateRequestOneOf,
) -> ClientResult<crate::Response<()>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !option.to_string().is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.patch(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: Some("application/json".to_string()),
},
)
.await
}
/**
* Get managed domains.
*
* This function performs a `GET` to the `/accounts/{accountId}/managed_domains` endpoint.
*
* Get a sub account's [managed domains](https://support.zoom.us/hc/en-us/articles/203395207-What-is-Managed-Domain-).<br><br>
*
* **Note:** This API can be used by Zoom Accounts that are on a Pro or a higher plan as well accounts that have master and sub accounts options enabled. <br><br>
* To get managed domains of the master account, provide `me` as the value for accountId in the path parameter. Provide the sub account's Account ID as the value of accountId path parameter to get managed domains of the sub account.<br><br>
* **Prerequisites:**<br>
* * Pro or a higher paid account with master account option enabled. <br>
*
* **Scope:** `account:read:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- Unique Identifier of the account. To retrieve locked settings of the master account or a regular account, provide "me" as the value of this field. <br> To retrieve locked settings of a sub account, provide the Account ID of the sub account in this field.
*/
pub async fn managed_domain(
&self,
account_id: &str,
) -> ClientResult<crate::Response<crate::types::DomainsList>> {
let url = self.client.url(
&format!(
"/accounts/{}/managed_domains",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get trusted domains.
*
* This function performs a `GET` to the `/accounts/{accountId}/trusted_domains` endpoint.
*
* Get trusted domains of a sub account. To get the trusted domains of a master account, use `me` as the value for the `accountId` path parameter.
*
* **Prerequisites:**<br>
* * The sub account must be a paid account.<br>
* **Scope:** `account:read:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
*
* **Parameters:**
*
* * `account_id: &str` -- User's first name.
*/
pub async fn trusted_domain(
&self,
account_id: &str,
) -> ClientResult<crate::Response<crate::types::AccountTrustedDomainResponse>> {
let url = self.client.url(
&format!(
"/accounts/{}/trusted_domains",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Get locked settings.
*
* This function performs a `GET` to the `/accounts/{accountId}/lock_settings` endpoint.
*
* [Account Locked Settings](https://support.zoom.us/hc/en-us/articles/115005269866) allow you turn settings on or off for all users in your account. No user except the account admin or account owner can change these settings. With lock settings, you force the settings on for all users.
* Use this API to retrieve an account's locked settings.
*
* **Note:** This API can be used by Zoom Accounts that are on a Pro or a higher plan as well accounts that have master and sub accounts options enabled. <br><br>
* **Prerequisites:**
* * Pro or a higher paid account. <br>
*
* **Scope**: `account:read:admin`.
* <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
*
*
*
*
*
* **Scope:** account:read:admin
*
* **Parameters:**
*
* * `account_id: &str` -- Unique Identifier of the account. To retrieve locked settings of the master account or a regular account, provide "me" as the value of this field. <br> To retrieve locked settings of a sub account, provide the Account ID of the sub account in this field.
* * `option: &str` -- `meeting_security`: Use this query parameter to view meeting security settings applied on the account.<br>.
* * `custom_query_fields: &str` -- Provide the name of the field by which you would like to filter the response. For example, if you provide "host_video" as the value of this field, you will get a response similar to the following:<br>
* {
* "schedule_meeting": {
* "host_video": false
* }
* }
* <br>You can provide multiple values by separating them with commas(example: "host_video,participant_video”).
*/
pub async fn get_lock_setting(
&self,
account_id: &str,
option: &str,
custom_query_fields: &str,
) -> ClientResult<crate::Response<crate::types::Domains>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_query_fields.is_empty() {
query_args.push((
"custom_query_fields".to_string(),
custom_query_fields.to_string(),
));
}
if !option.is_empty() {
query_args.push(("option".to_string(), option.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/lock_settings?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.get(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
/**
* Update locked settings.
*
* This function performs a `PATCH` to the `/accounts/{accountId}/lock_settings` endpoint.
*
* [Account Locked Settings](https://support.zoom.us/hc/en-us/articles/115005269866) allow you turn settings on or off for all users in your account. No user except the account admin or account owner can change these settings. With lock settings, you force the settings on for all users. Use this API to update an account's locked settings.
*
* **Note:** This API can be used by Zoom Accounts that are on a Pro or a higher plan as well accounts that have master and sub accounts options enabled.<br><br>
* **Prerequisites:**<br>
* * Pro or a higher paid account. <br>
*
* **Scope:** `account:write:admin`<br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
*
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- Unique Identifier of the account. To retrieve locked settings of the master account or a regular account, provide "me" as the value of this field. <br> To retrieve locked settings of a sub account, provide the Account ID of the sub account in this field.
*/
pub async fn update_lock_settings(
&self,
account_id: &str,
) -> ClientResult<crate::Response<()>> {
let url = self.client.url(
&format!(
"/accounts/{}/lock_settings",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.patch(
&url,
crate::Message {
body: None,
content_type: Some("application/json".to_string()),
},
)
.await
}
/**
* Update the account owner.
*
* This function performs a `PUT` to the `/accounts/{accountId}/owner` endpoint.
*
* Use this API to change an account's owner.
*
* An account's current owner can [change the account's owner](https://support.zoom.us/hc/en-us/articles/115005686983-Change-Account-Owner) to another user on the same account.
*
* **Scopes:** `account:write:admin` or `account:master`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`
*
* **Prerequisites:**
* * An account owner or admin permissions of an account
* * The account making this API request must be on a Pro or a higher account plan with [Master account](https://marketplace.zoom.us/docs/api-reference/master-account-apis) privileges
*
* **Parameters:**
*
* * `account_id: &str` -- The account's account ID.
*/
pub async fn update_owner(
&self,
account_id: &str,
body: &crate::types::Members,
) -> ClientResult<crate::Response<()>> {
let url = self.client.url(
&format!(
"/accounts/{}/owner",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.put(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: Some("application/json".to_string()),
},
)
.await
}
/**
* Upload virtual background files.
*
* This function performs a `POST` to the `/accounts/{accountId}/settings/virtual_backgrounds` endpoint.
*
* Use this API to [upload virtual background files](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_01EJF3YFEWGT8YA0ZJ079JEDQE) for all users on the account to use.
*
*
* **Prerequisites:**<br>
* * Virtual background feature must be [enabled](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) on the account.
* <br> **Scope:** `account:write:admin`<br><br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
*
*
*
* **Parameters:**
*
* * `account_id: &str` -- Unique identifier of the account.
*/
pub async fn upload_vb(
&self,
account_id: &str,
body: &crate::types::UploadVbRequest,
) -> ClientResult<crate::Response<crate::types::Files>> {
let url = self.client.url(
&format!(
"/accounts/{}/settings/virtual_backgrounds",
crate::progenitor_support::encode_path(account_id),
),
None,
);
self.client
.post(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: None,
},
)
.await
}
/**
* Delete virtual background files.
*
* This function performs a `DELETE` to the `/accounts/{accountId}/settings/virtual_backgrounds` endpoint.
*
* Delete existing virtual background file(s) from an account.
*
* **Prerequisites:**<br>
* * Virtual background feature must be [enabled](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) on the account.
* <br> **Scope:** `account:write:admin`<br> <br>
* **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
*
*
*
* **Parameters:**
*
* * `file_ids: &str` -- Provide the id of the file that is to be deleted. To delete multiple files, provide comma separated values for this field.
*/
pub async fn del_vb(
&self,
account_id: &str,
file_ids: &str,
) -> ClientResult<crate::Response<()>> {
let mut query_args: Vec<(String, String)> = Default::default();
if !file_ids.is_empty() {
query_args.push(("file_ids".to_string(), file_ids.to_string()));
}
let query_ = serde_urlencoded::to_string(&query_args).unwrap();
let url = self.client.url(
&format!(
"/accounts/{}/settings/virtual_backgrounds?{}",
crate::progenitor_support::encode_path(account_id),
query_
),
None,
);
self.client
.delete(
&url,
crate::Message {
body: None,
content_type: None,
},
)
.await
}
}