Skip to content

Instantly share code, notes, and snippets.

@chantra
Created February 24, 2023 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chantra/f1b450ce34fec60061048073df3d7195 to your computer and use it in GitHub Desktop.
Save chantra/f1b450ce34fec60061048073df3d7195 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
diff --git a/Cargo.lock b/Cargo.lock
index ff26a3c..e85797e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -325,6 +325,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -363,6 +364,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -652,6 +654,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -690,6 +693,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -729,6 +733,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -768,6 +773,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -807,6 +813,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -846,6 +853,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -885,6 +893,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -1192,6 +1201,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -1440,6 +1450,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -1707,6 +1718,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -1985,6 +1997,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2186,6 +2199,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2311,6 +2325,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2350,6 +2365,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2388,6 +2404,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2463,6 +2480,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -2775,6 +2793,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
@@ -3229,6 +3248,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "thiserror",
"tokio",
"url",
"uuid",
diff --git a/README.md b/README.md
index a4a6614..cf6ec3e 100644
--- a/README.md
+++ b/README.md
@@ -24,4 +24,3 @@ A place for keeping all our generated third party API clients.
- [Stripe](stripe/) [![docs.rs](https://docs.rs/dolladollabills/badge.svg)](https://docs.rs/dolladollabills)
- [TripActions](tripactions/) [![docs.rs](https://docs.rs/tripactions/badge.svg)](https://docs.rs/tripactions)
- [Zoom](zoom/) [![docs.rs](https://docs.rs/zoom-api/badge.svg)](https://docs.rs/zoom-api)
-- [GitHub](github/) [![docs.rs](https://docs.rs/octorust/badge.svg)](https://docs.rs/octorust)
diff --git a/docusign/Cargo.toml b/docusign/Cargo.toml
index 83dd2a8..1c56e29 100644
--- a/docusign/Cargo.toml
+++ b/docusign/Cargo.toml
@@ -42,6 +42,7 @@ url = { version = "2", features = ["serde"] }
bytes = { version = "1", features = ["serde"] }
async-trait = "^0.1.51"
uuid = { version = "1.1", features = ["serde", "v4"] }
+thiserror = "1"
tokio = { version = "1.25.0", features = ["full"] }
[dev-dependencies]
diff --git a/docusign/src/account_brands.rs b/docusign/src/account_brands.rs
index 0ee670a..4470530 100644
--- a/docusign/src/account_brands.rs
+++ b/docusign/src/account_brands.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountBrands {
pub client: Client,
@@ -13,26 +15,26 @@ impl AccountBrands {
}
/**
- * Gets a list of brands.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands` endpoint.
- *
- * This method returns details about all of the brands associated with an account, including the default brand profiles.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `exclude_distributor_brand: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_logos: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a list of brands.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands` endpoint.
+ *
+ * This method returns details about all of the brands associated with an account, including the default brand profiles.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `exclude_distributor_brand: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_logos: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_get(
&self,
account_id: &str,
exclude_distributor_brand: &str,
include_logos: &str,
- ) -> Result<crate::types::AccountBrands> {
+ ) -> ClientResult<crate::types::AccountBrands> {
let mut query_args: Vec<(String, String)> = Default::default();
if !exclude_distributor_brand.is_empty() {
query_args.push((
@@ -47,7 +49,7 @@ impl AccountBrands {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -63,31 +65,31 @@ impl AccountBrands {
.await
}
/**
- * Creates one or more brand profiles for an account.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/brands` endpoint.
- *
- * This method creates one or more brand profile files for an account.
- *
- * If the `brandId` property for a brand profile is already set for the account, an error is returned. To upload a new version of an existing brand profile, you must delete the profile and then upload the newer version.
- *
- * When you upload brand profile files, you must combine them into a single zip file and set the `Content-Type` to `application/zip`.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates one or more brand profiles for an account.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/brands` endpoint.
+ *
+ * This method creates one or more brand profile files for an account.
+ *
+ * If the `brandId` property for a brand profile is already set for the account, an error is returned. To upload a new version of an existing brand profile, you must delete the profile and then upload the newer version.
+ *
+ * When you upload brand profile files, you must combine them into a single zip file and set the `Content-Type` to `application/zip`.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_post(
&self,
account_id: &str,
body: &crate::types::Brand,
- ) -> Result<crate::types::AccountBrands> {
+ ) -> ClientResult<crate::types::AccountBrands> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -102,27 +104,27 @@ impl AccountBrands {
.await
}
/**
- * Deletes one or more brand profiles.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands` endpoint.
- *
- * This method deletes one or more brand profiles from an account, based on the brand ids that you include in the `brandsRequest`.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes one or more brand profiles.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands` endpoint.
+ *
+ * This method deletes one or more brand profiles from an account, based on the brand ids that you include in the `brandsRequest`.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_delete(
&self,
account_id: &str,
body: &crate::types::BrandsRequest,
- ) -> Result<crate::types::AccountBrands> {
+ ) -> ClientResult<crate::types::AccountBrands> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -137,28 +139,28 @@ impl AccountBrands {
.await
}
/**
- * Gets information about a brand.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
- *
- * This method returns details about an account brand.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_external_references: &str` -- When **true**, the landing pages and links associated with the brand are included in the response.
- * * `include_logos: &str` -- When **true**, the URIs for the logos associated with the brand are included in the response.
- */
+ * Gets information about a brand.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
+ *
+ * This method returns details about an account brand.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_external_references: &str` -- When **true**, the landing pages and links associated with the brand are included in the response.
+ * * `include_logos: &str` -- When **true**, the URIs for the logos associated with the brand are included in the response.
+ */
pub async fn brand_get(
&self,
account_id: &str,
brand_id: &str,
include_external_references: &str,
include_logos: &str,
- ) -> Result<crate::types::Brand> {
+ ) -> ClientResult<crate::types::Brand> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_external_references.is_empty() {
query_args.push((
@@ -173,8 +175,8 @@ impl AccountBrands {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
query_
),
None,
@@ -190,30 +192,30 @@ impl AccountBrands {
.await
}
/**
- * Updates an existing brand.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
- *
- * This method updates an account brand.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an existing brand.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
+ *
+ * This method updates an account brand.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brand_put(
&self,
account_id: &str,
brand_id: &str,
body: &crate::types::Brand,
- ) -> Result<crate::types::Brand> {
+ ) -> ClientResult<crate::types::Brand> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
),
None,
);
@@ -228,25 +230,25 @@ impl AccountBrands {
.await
}
/**
- * Deletes a brand.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
- *
- * This method deletes a brand from an account.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn brand_delete(&self, account_id: &str, brand_id: &str) -> Result<()> {
+ * Deletes a brand.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands/{brandId}` endpoint.
+ *
+ * This method deletes a brand from an account.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn brand_delete(&self, account_id: &str, brand_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
),
None,
);
@@ -261,25 +263,29 @@ impl AccountBrands {
.await
}
/**
- * Exports a brand.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/file` endpoint.
- *
- * This method exports information about a brand to an XML file.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn brand_export_get_file(&self, account_id: &str, brand_id: &str) -> Result<()> {
+ * Exports a brand.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/file` endpoint.
+ *
+ * This method exports information about a brand to an XML file.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn brand_export_get_file(
+ &self,
+ account_id: &str,
+ brand_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/file",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
),
None,
);
@@ -294,32 +300,32 @@ impl AccountBrands {
.await
}
/**
- * Gets a brand logo.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
- *
- * This method returns a specific logo that is used in a brand.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a brand logo.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
+ *
+ * This method returns a specific logo that is used in a brand.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brand_logo_get(
&self,
account_id: &str,
brand_id: &str,
logo_type: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/logos/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
- crate::progenitor_support::encode_path(logo_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
+ crate::progenitor_support::encode_path(&logo_type.to_string()),
),
None,
);
@@ -334,37 +340,37 @@ impl AccountBrands {
.await
}
/**
- * Updates a brand logo.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
- *
- * This method updates a single brand logo.
- *
- * You pass in the new version of the resource in the `Content-Disposition` header. Example:
- *
- * `Content-Disposition: form-data; name="file"; filename="logo.jpg"`
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates a brand logo.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
+ *
+ * This method updates a single brand logo.
+ *
+ * You pass in the new version of the resource in the `Content-Disposition` header. Example:
+ *
+ * `Content-Disposition: form-data; name="file"; filename="logo.jpg"`
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brand_logo_put<T: Into<reqwest::Body>>(
&self,
account_id: &str,
brand_id: &str,
logo_type: &str,
body: bytes::Bytes,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/logos/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
- crate::progenitor_support::encode_path(logo_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
+ crate::progenitor_support::encode_path(&logo_type.to_string()),
),
None,
);
@@ -379,32 +385,32 @@ impl AccountBrands {
.await
}
/**
- * Deletes a brand logo.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
- *
- * This method deletes a single logo from an account brand.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a brand logo.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/brands/{brandId}/logos/{logoType}` endpoint.
+ *
+ * This method deletes a single logo from an account brand.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `logo_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brand_logo_delete(
&self,
account_id: &str,
brand_id: &str,
logo_type: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/logos/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
- crate::progenitor_support::encode_path(logo_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
+ crate::progenitor_support::encode_path(&logo_type.to_string()),
),
None,
);
@@ -419,29 +425,29 @@ impl AccountBrands {
.await
}
/**
- * Returns metadata about the branding resources for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources` endpoint.
- *
- * This method returns metadata about the branding resources that are associated with an account.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns metadata about the branding resources for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources` endpoint.
+ *
+ * This method returns metadata about the branding resources that are associated with an account.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brand_resources_get_list(
&self,
account_id: &str,
brand_id: &str,
- ) -> Result<crate::types::BrandResourcesList> {
+ ) -> ClientResult<crate::types::BrandResourcesList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/resources",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
),
None,
);
@@ -456,31 +462,31 @@ impl AccountBrands {
.await
}
/**
- * Returns a branding resource file.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources/{resourceContentType}` endpoint.
- *
- * This method returns a specific branding resource file.
- *
- * A brand uses a set of brand resource files to control the sending, signing, email message, and captive (embedded) signing experiences. You can modify the default email messages and formats in these files and upload them to your brand to customize the user experience.
- *
- * **Important**: When you upload a modified resource file, only the elements that differ from the master resource file are saved as your resource file. Similarly, when you download your resource files, only the modified elements are included in the file.
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `resource_content_type: &str` -- The type of brand resource file to return. Valid values are:
- *
- * - `sending`
- * - `signing`
- * - `email`
- * - `signing_captive`.
- * * `langcode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `return_master: &str` -- Specifies which resource file data to return. When **true**, only the master resource file is returned. When **false**, only the elements that you modified are returned.
- */
+ * Returns a branding resource file.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources/{resourceContentType}` endpoint.
+ *
+ * This method returns a specific branding resource file.
+ *
+ * A brand uses a set of brand resource files to control the sending, signing, email message, and captive (embedded) signing experiences. You can modify the default email messages and formats in these files and upload them to your brand to customize the user experience.
+ *
+ * **Important**: When you upload a modified resource file, only the elements that differ from the master resource file are saved as your resource file. Similarly, when you download your resource files, only the modified elements are included in the file.
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `resource_content_type: &str` -- The type of brand resource file to return. Valid values are:
+ *
+ * - `sending`
+ * - `signing`
+ * - `email`
+ * - `signing_captive`.
+ * * `langcode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `return_master: &str` -- Specifies which resource file data to return. When **true**, only the master resource file is returned. When **false**, only the elements that you modified are returned.
+ */
pub async fn brand_resources_get(
&self,
account_id: &str,
@@ -488,7 +494,7 @@ impl AccountBrands {
resource_content_type: &str,
langcode: &str,
return_master: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !langcode.is_empty() {
query_args.push(("langcode".to_string(), langcode.to_string()));
@@ -500,9 +506,9 @@ impl AccountBrands {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/resources/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
- crate::progenitor_support::encode_path(resource_content_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
+ crate::progenitor_support::encode_path(&resource_content_type.to_string()),
query_
),
None,
@@ -518,45 +524,45 @@ impl AccountBrands {
.await
}
/**
- * Updates a branding resource file.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources/{resourceContentType}` endpoint.
- *
- * This method updates a branding resource file.
- *
- * You pass in the new version of the resource file in the `Content-Disposition` header. Example:
- *
- * `Content-Disposition: form-data; name="file"; filename="DocuSign_SigningResource_4328673.xml"`
- *
- * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
- *
- * **Important**: Customizing resource files is an advanced branding configuration option which can significantly impact your account, and should be done only by someone with expertise in XML and HTML. The master resource files are subject to change without notice. If you customize your resource files, after each release, DocuSign recommends you review any changes and update your custom files as needed.
- *
- * When you upload a modified resource file, only the elements that differ from the master resource file are saved as your resource file. Similarly, when you download your resource files, only the modified elements are included in the file.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `resource_content_type: &str` -- The type of brand resource file that you are updating. Valid values are:
- *
- * - `sending`
- * - `signing`
- * - `email`
- * - `signing_captive`.
- */
+ * Updates a branding resource file.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/brands/{brandId}/resources/{resourceContentType}` endpoint.
+ *
+ * This method updates a branding resource file.
+ *
+ * You pass in the new version of the resource file in the `Content-Disposition` header. Example:
+ *
+ * `Content-Disposition: form-data; name="file"; filename="DocuSign_SigningResource_4328673.xml"`
+ *
+ * **Note**: Branding for either signing or sending must be enabled for the account (`canSelfBrandSend` , `canSelfBrandSign`, or both of these account settings must be **true**).
+ *
+ * **Important**: Customizing resource files is an advanced branding configuration option which can significantly impact your account, and should be done only by someone with expertise in XML and HTML. The master resource files are subject to change without notice. If you customize your resource files, after each release, DocuSign recommends you review any changes and update your custom files as needed.
+ *
+ * When you upload a modified resource file, only the elements that differ from the master resource file are saved as your resource file. Similarly, when you download your resource files, only the modified elements are included in the file.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `brand_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `resource_content_type: &str` -- The type of brand resource file that you are updating. Valid values are:
+ *
+ * - `sending`
+ * - `signing`
+ * - `email`
+ * - `signing_captive`.
+ */
pub async fn brand_resources_put(
&self,
account_id: &str,
brand_id: &str,
resource_content_type: &str,
- ) -> Result<crate::types::BrandResources> {
+ ) -> ClientResult<crate::types::BrandResources> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/brands/{}/resources/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(brand_id),
- crate::progenitor_support::encode_path(resource_content_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&brand_id.to_string()),
+ crate::progenitor_support::encode_path(&resource_content_type.to_string()),
),
None,
);
diff --git a/docusign/src/account_consumer_disclosures.rs b/docusign/src/account_consumer_disclosures.rs
index 4af2ed8..6a9b56c 100644
--- a/docusign/src/account_consumer_disclosures.rs
+++ b/docusign/src/account_consumer_disclosures.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountConsumerDisclosures {
pub client: Client,
@@ -13,72 +15,72 @@ impl AccountConsumerDisclosures {
}
/**
- * Gets the default Electronic Record and Signature Disclosure for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/consumer_disclosure` endpoint.
- *
- * Retrieves the default, HTML-formatted Electronic Record and Signature Disclosure (ERSD) associated with the account.
- *
- * This is the default ERSD disclosure that DocuSign provides for the convenience of U.S.-based customers only. This default disclosure is only valid for transactions between U.S.-based parties.
- *
- * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- */
+ * Gets the default Electronic Record and Signature Disclosure for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/consumer_disclosure` endpoint.
+ *
+ * Retrieves the default, HTML-formatted Electronic Record and Signature Disclosure (ERSD) associated with the account.
+ *
+ * This is the default ERSD disclosure that DocuSign provides for the convenience of U.S.-based customers only. This default disclosure is only valid for transactions between U.S.-based parties.
+ *
+ * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ */
pub async fn consumer_disclosure_get(
&self,
account_id: &str,
lang_code: &str,
- ) -> Result<crate::types::AccountConsumerDisclosures> {
+ ) -> ClientResult<crate::types::AccountConsumerDisclosures> {
let mut query_args: Vec<(String, String)> = Default::default();
if !lang_code.is_empty() {
query_args.push(("langCode".to_string(), lang_code.to_string()));
@@ -87,7 +89,7 @@ impl AccountConsumerDisclosures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/consumer_disclosure?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -103,77 +105,77 @@ impl AccountConsumerDisclosures {
.await
}
/**
- * Gets the Electronic Record and Signature Disclosure for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/consumer_disclosure/{langCode}` endpoint.
- *
- * Retrieves the HTML-formatted Electronic Record and Signature Disclosure (ERSD) associated with the account.
- *
- * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
- *
- * **Note**: The text of the default disclosure is always in English, but if you are using a custom disclosure and have created versions of it in different signer languages, you can use the `langCode` parameter to specify the signer language version that you want to retrieve.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- */
+ * Gets the Electronic Record and Signature Disclosure for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/consumer_disclosure/{langCode}` endpoint.
+ *
+ * Retrieves the HTML-formatted Electronic Record and Signature Disclosure (ERSD) associated with the account.
+ *
+ * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
+ *
+ * **Note**: The text of the default disclosure is always in English, but if you are using a custom disclosure and have created versions of it in different signer languages, you can use the `langCode` parameter to specify the signer language version that you want to retrieve.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ */
pub async fn consumer_disclosure_get_lang_code(
&self,
account_id: &str,
lang_code: &str,
- ) -> Result<crate::types::AccountConsumerDisclosures> {
+ ) -> ClientResult<crate::types::AccountConsumerDisclosures> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/consumer_disclosure/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(lang_code),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&lang_code.to_string()),
),
None,
);
@@ -188,120 +190,120 @@ impl AccountConsumerDisclosures {
.await
}
/**
- * Updates the Electronic Record and Signature Disclosure for an account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/consumer_disclosure/{langCode}` endpoint.
- *
- * Account administrators can use this method to perform the following tasks:
- *
- * - Customize values in the default disclosure.
- * - Switch to a custom disclosure that uses your own text and HTML formatting.
- * - Change values in your existing consumer disclosure.
- *
- * To specify the signer language version of the disclosure that you are updating, use the optional `langCode` query parameter.
- *
- * **Note**: Only account administrators can use this method. Each time you change the disclosure content, all unsigned recipients of outstanding documents will be required to accept a new version.
- *
- * ## Updating the default disclosure
- *
- * When you update the default disclosure, you can edit all properties except for the following ones:
- *
- * - `accountEsignId`: This property is read only.
- * - `custom`: The default value is **false**. Editing this property causes the default disclosure to switch to a custom disclosure.
- * - `esignAgreement`: This property is read only.
- * - `esignText`: You cannot edit this property when `custom` is set to **false**. The API returns a 200 OK HTTP response, but does not update the `esignText`.
- * - Metadata properties: These properties are read only.
- *
- * **Note**: The text of the default disclosure is always in English.
- *
- * ## Switching to a custom disclosure
- *
- * To switch to a custom disclosure, set the `custom` property to **true** and customize the value for the `eSignText` property.
- *
- * You can also edit all of the other properties except for the following ones:
- *
- * - `accountEsignId`: This property is read only.
- * - `esignAgreement`: This property is read only.
- * - Metadata properties: These properties are read only.
- *
- * **Note**: When you use a custom disclosure, you can create versions of it in different signer languages and se the `langCode` parameter to specify the signer language version that you are updating.
- *
- * **Important**: When you switch from a default to a custom disclosure, note the following information:
- *
- * - You will not be able to return to using the default disclosure.
- * - Only the disclosure for the currently selected signer language is saved. DocuSign will not automatically translate your custom disclosure. You must create a disclosure for each language that your signers use.
- *
- * ## Updating a custom disclosure
- *
- * When you update a custom disclosure, you can update all of the properties except for the following ones:
- *
- * - `accountEsignId`: This property is read only.
- * - `esignAgreement`: This property is read only.
- * - Metadata properties: These properties are read only.
- *
- * **Important**: Only the disclosure for the currently selected signer language is saved. DocuSign will not automatically translate your custom disclosure. You must create a disclosure for each language that your signers use.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to update. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- * * `include_metadata: &str` -- (Optional) When set to true, the response includes metadata indicating which properties are editable.
- */
+ * Updates the Electronic Record and Signature Disclosure for an account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/consumer_disclosure/{langCode}` endpoint.
+ *
+ * Account administrators can use this method to perform the following tasks:
+ *
+ * - Customize values in the default disclosure.
+ * - Switch to a custom disclosure that uses your own text and HTML formatting.
+ * - Change values in your existing consumer disclosure.
+ *
+ * To specify the signer language version of the disclosure that you are updating, use the optional `langCode` query parameter.
+ *
+ * **Note**: Only account administrators can use this method. Each time you change the disclosure content, all unsigned recipients of outstanding documents will be required to accept a new version.
+ *
+ * ## Updating the default disclosure
+ *
+ * When you update the default disclosure, you can edit all properties except for the following ones:
+ *
+ * - `accountEsignId`: This property is read only.
+ * - `custom`: The default value is **false**. Editing this property causes the default disclosure to switch to a custom disclosure.
+ * - `esignAgreement`: This property is read only.
+ * - `esignText`: You cannot edit this property when `custom` is set to **false**. The API returns a 200 OK HTTP response, but does not update the `esignText`.
+ * - Metadata properties: These properties are read only.
+ *
+ * **Note**: The text of the default disclosure is always in English.
+ *
+ * ## Switching to a custom disclosure
+ *
+ * To switch to a custom disclosure, set the `custom` property to **true** and customize the value for the `eSignText` property.
+ *
+ * You can also edit all of the other properties except for the following ones:
+ *
+ * - `accountEsignId`: This property is read only.
+ * - `esignAgreement`: This property is read only.
+ * - Metadata properties: These properties are read only.
+ *
+ * **Note**: When you use a custom disclosure, you can create versions of it in different signer languages and se the `langCode` parameter to specify the signer language version that you are updating.
+ *
+ * **Important**: When you switch from a default to a custom disclosure, note the following information:
+ *
+ * - You will not be able to return to using the default disclosure.
+ * - Only the disclosure for the currently selected signer language is saved. DocuSign will not automatically translate your custom disclosure. You must create a disclosure for each language that your signers use.
+ *
+ * ## Updating a custom disclosure
+ *
+ * When you update a custom disclosure, you can update all of the properties except for the following ones:
+ *
+ * - `accountEsignId`: This property is read only.
+ * - `esignAgreement`: This property is read only.
+ * - Metadata properties: These properties are read only.
+ *
+ * **Important**: Only the disclosure for the currently selected signer language is saved. DocuSign will not automatically translate your custom disclosure. You must create a disclosure for each language that your signers use.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to update. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ * * `include_metadata: &str` -- (Optional) When set to true, the response includes metadata indicating which properties are editable.
+ */
pub async fn consumer_disclosure_put(
&self,
account_id: &str,
lang_code: &str,
include_metadata: &str,
body: &crate::types::ConsumerDisclosure,
- ) -> Result<crate::types::ConsumerDisclosure> {
+ ) -> ClientResult<crate::types::ConsumerDisclosure> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_metadata.is_empty() {
query_args.push(("include_metadata".to_string(), include_metadata.to_string()));
@@ -310,8 +312,8 @@ impl AccountConsumerDisclosures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/consumer_disclosure/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(lang_code),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&lang_code.to_string()),
query_
),
None,
diff --git a/docusign/src/account_custom_fields.rs b/docusign/src/account_custom_fields.rs
index 892f375..738112c 100644
--- a/docusign/src/account_custom_fields.rs
+++ b/docusign/src/account_custom_fields.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountCustomFields {
pub client: Client,
@@ -13,21 +15,21 @@ impl AccountCustomFields {
}
/**
- * Gets a list of custom fields.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/custom_fields` endpoint.
- *
- * This method returns a list of the envelope and document custom fields associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn get(&self, account_id: &str) -> Result<crate::types::AccountCustomFields> {
+ * Gets a list of custom fields.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/custom_fields` endpoint.
+ *
+ * This method returns a list of the envelope and document custom fields associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn get(&self, account_id: &str) -> ClientResult<crate::types::AccountCustomFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/custom_fields",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -42,23 +44,23 @@ impl AccountCustomFields {
.await
}
/**
- * Creates an account custom field.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/custom_fields` endpoint.
- *
- * This method creates a custom field and makes it available for all new envelopes associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `apply_to_templates: &str` -- (Optional) When set to **true**, the new custom field is applied to all of the templates on the account.
- */
+ * Creates an account custom field.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/custom_fields` endpoint.
+ *
+ * This method creates a custom field and makes it available for all new envelopes associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `apply_to_templates: &str` -- (Optional) When set to **true**, the new custom field is applied to all of the templates on the account.
+ */
pub async fn post(
&self,
account_id: &str,
apply_to_templates: &str,
body: &crate::types::CustomField,
- ) -> Result<crate::types::AccountCustomFields> {
+ ) -> ClientResult<crate::types::AccountCustomFields> {
let mut query_args: Vec<(String, String)> = Default::default();
if !apply_to_templates.is_empty() {
query_args.push((
@@ -70,7 +72,7 @@ impl AccountCustomFields {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/custom_fields?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -86,25 +88,25 @@ impl AccountCustomFields {
.await
}
/**
- * Updates an account custom field.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/custom_fields/{customFieldId}` endpoint.
- *
- * This method updates an existing account custom field.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `custom_field_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `apply_to_templates: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an account custom field.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/custom_fields/{customFieldId}` endpoint.
+ *
+ * This method updates an existing account custom field.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `custom_field_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `apply_to_templates: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
custom_field_id: &str,
apply_to_templates: &str,
body: &crate::types::CustomField,
- ) -> Result<crate::types::AccountCustomFields> {
+ ) -> ClientResult<crate::types::AccountCustomFields> {
let mut query_args: Vec<(String, String)> = Default::default();
if !apply_to_templates.is_empty() {
query_args.push((
@@ -116,8 +118,8 @@ impl AccountCustomFields {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/custom_fields/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(custom_field_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&custom_field_id.to_string()),
query_
),
None,
@@ -133,24 +135,24 @@ impl AccountCustomFields {
.await
}
/**
- * Deletes an account custom field.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/custom_fields/{customFieldId}` endpoint.
- *
- * This method deletes an existing account custom field.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `custom_field_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `apply_to_templates: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes an account custom field.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/custom_fields/{customFieldId}` endpoint.
+ *
+ * This method deletes an existing account custom field.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `custom_field_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `apply_to_templates: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete(
&self,
account_id: &str,
custom_field_id: &str,
apply_to_templates: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !apply_to_templates.is_empty() {
query_args.push((
@@ -162,8 +164,8 @@ impl AccountCustomFields {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/custom_fields/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(custom_field_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&custom_field_id.to_string()),
query_
),
None,
diff --git a/docusign/src/account_password_rules.rs b/docusign/src/account_password_rules.rs
index e389803..16230f6 100644
--- a/docusign/src/account_password_rules.rs
+++ b/docusign/src/account_password_rules.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountPasswordRules {
pub client: Client,
@@ -13,21 +15,24 @@ impl AccountPasswordRules {
}
/**
- * Gets the password rules for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/password_rules` endpoint.
- *
- * This method retrieves the password rules for an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn get(&self, account_id: &str) -> Result<crate::types::AccountPasswordRulesData> {
+ * Gets the password rules for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/password_rules` endpoint.
+ *
+ * This method retrieves the password rules for an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn get(
+ &self,
+ account_id: &str,
+ ) -> ClientResult<crate::types::AccountPasswordRulesData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/password_rules",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -42,27 +47,27 @@ impl AccountPasswordRules {
.await
}
/**
- * Updates the password rules for an account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/password_rules` endpoint.
- *
- * This method updates the password rules for an account.
- *
- * **Note**: To update the password rules for an account, you must be an account administrator.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates the password rules for an account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/password_rules` endpoint.
+ *
+ * This method updates the password rules for an account.
+ *
+ * **Note**: To update the password rules for an account, you must be an account administrator.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::AccountPasswordRulesData,
- ) -> Result<crate::types::AccountPasswordRulesData> {
+ ) -> ClientResult<crate::types::AccountPasswordRulesData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/password_rules",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -77,14 +82,16 @@ impl AccountPasswordRules {
.await
}
/**
- * Gets membership account password rules.
- *
- * This function performs a `GET` to the `/v2.1/current_user/password_rules` endpoint.
- *
- *
- */
- pub async fn password_rules_get(&self) -> Result<crate::types::UserPasswordRules> {
- let url = self.client.url("/v2.1/current_user/password_rules", None);
+ * Gets membership account password rules.
+ *
+ * This function performs a `GET` to the `/v2.1/current_user/password_rules` endpoint.
+ *
+ *
+ */
+ pub async fn password_rules_get(&self) -> ClientResult<crate::types::UserPasswordRules> {
+ let url = self
+ .client
+ .url(&"/v2.1/current_user/password_rules".to_string(), None);
self.client
.get(
&url,
diff --git a/docusign/src/account_permission_profiles.rs b/docusign/src/account_permission_profiles.rs
index 2901984..49b38cd 100644
--- a/docusign/src/account_permission_profiles.rs
+++ b/docusign/src/account_permission_profiles.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountPermissionProfiles {
pub client: Client,
@@ -13,30 +15,30 @@ impl AccountPermissionProfiles {
}
/**
- * Gets a list of permission profiles.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/permission_profiles` endpoint.
- *
- * This method returns a list of permission profiles that are associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- A comma-separated list of additional properties to return in the response. Valid values are:
- *
- * - `user_count`: The total number of users associated with the permission profile.
- * - `closed_users`: Includes closed users in the `user_count`.
- * - `account_management`: The account management settings.
- * - `metadata`: Metadata indicating whether the properties associated with the account permission profile are editable.
- *
- * Example: `user_count,closed_users`
- * .
- */
+ * Gets a list of permission profiles.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/permission_profiles` endpoint.
+ *
+ * This method returns a list of permission profiles that are associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- A comma-separated list of additional properties to return in the response. Valid values are:
+ *
+ * - `user_count`: The total number of users associated with the permission profile.
+ * - `closed_users`: Includes closed users in the `user_count`.
+ * - `account_management`: The account management settings.
+ * - `metadata`: Metadata indicating whether the properties associated with the account permission profile are editable.
+ *
+ * Example: `user_count,closed_users`
+ * .
+ */
pub async fn permission_profiles_get(
&self,
account_id: &str,
include: &str,
- ) -> Result<crate::types::PermissionProfileInformation> {
+ ) -> ClientResult<crate::types::PermissionProfileInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -45,7 +47,7 @@ impl AccountPermissionProfiles {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/permission_profiles?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -61,23 +63,23 @@ impl AccountPermissionProfiles {
.await
}
/**
- * Creates a new permission profile for an account.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/permission_profiles` endpoint.
- *
- * This method creates a new permission profile for an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
- */
+ * Creates a new permission profile for an account.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/permission_profiles` endpoint.
+ *
+ * This method creates a new permission profile for an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
+ */
pub async fn permission_profiles_post(
&self,
account_id: &str,
include: &str,
body: &crate::types::PermissionProfile,
- ) -> Result<crate::types::PermissionProfile> {
+ ) -> ClientResult<crate::types::PermissionProfile> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -86,7 +88,7 @@ impl AccountPermissionProfiles {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/permission_profiles?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -102,30 +104,30 @@ impl AccountPermissionProfiles {
.await
}
/**
- * Returns a permission profile for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
- *
- * This method returns information about a specific permission profile that is associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
- *
- * - `2301416` (for the `DocuSign Viewer` profile)
- * - `2301415` (for the `DocuSign Sender` profile)
- * - `2301414` (for the `Account Administrator` profile)
- *
- * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
- * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
- */
+ * Returns a permission profile for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
+ *
+ * This method returns information about a specific permission profile that is associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
+ *
+ * - `2301416` (for the `DocuSign Viewer` profile)
+ * - `2301415` (for the `DocuSign Sender` profile)
+ * - `2301414` (for the `Account Administrator` profile)
+ *
+ * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
+ * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
+ */
pub async fn permission_profiles_get_profile(
&self,
account_id: &str,
permission_profile_id: &str,
include: &str,
- ) -> Result<crate::types::PermissionProfile> {
+ ) -> ClientResult<crate::types::PermissionProfile> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -134,8 +136,8 @@ impl AccountPermissionProfiles {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/permission_profiles/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(permission_profile_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&permission_profile_id.to_string()),
query_
),
None,
@@ -151,31 +153,31 @@ impl AccountPermissionProfiles {
.await
}
/**
- * Updates a permission profile.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
- *
- * This method updates an account permission profile.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
- *
- * - `2301416` (for the `DocuSign Viewer` profile)
- * - `2301415` (for the `DocuSign Sender` profile)
- * - `2301414` (for the `Account Administrator` profile)
- *
- * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
- * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
- */
+ * Updates a permission profile.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
+ *
+ * This method updates an account permission profile.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
+ *
+ * - `2301416` (for the `DocuSign Viewer` profile)
+ * - `2301415` (for the `DocuSign Sender` profile)
+ * - `2301414` (for the `Account Administrator` profile)
+ *
+ * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
+ * * `include: &str` -- A comma-separated list of additional properties to return in the response. The only valid value for this request is `metadata`, which returns metadata indicating whether the properties associated with the account permission profile are editable.
+ */
pub async fn permission_profiles_put(
&self,
account_id: &str,
permission_profile_id: &str,
include: &str,
body: &crate::types::PermissionProfile,
- ) -> Result<crate::types::PermissionProfile> {
+ ) -> ClientResult<crate::types::PermissionProfile> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -184,8 +186,8 @@ impl AccountPermissionProfiles {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/permission_profiles/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(permission_profile_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&permission_profile_id.to_string()),
query_
),
None,
@@ -201,32 +203,32 @@ impl AccountPermissionProfiles {
.await
}
/**
- * Deletes a permission profile from an account.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
- *
- * This method deletes a permission profile from an account.
- *
- * To delete a permission profile, it must not have any users associated with it. When you use this method to delete a permission profile, you can reassign the users associated with it to a new permission profile at the same time by using the `move_users_to` query parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
- *
- * - `2301416` (for the `DocuSign Viewer` profile)
- * - `2301415` (for the `DocuSign Sender` profile)
- * - `2301414` (for the `Account Administrator` profile)
- *
- * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
- * * `move_users_to: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a permission profile from an account.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/permission_profiles/{permissionProfileId}` endpoint.
+ *
+ * This method deletes a permission profile from an account.
+ *
+ * To delete a permission profile, it must not have any users associated with it. When you use this method to delete a permission profile, you can reassign the users associated with it to a new permission profile at the same time by using the `move_users_to` query parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `permission_profile_id: &str` -- The ID of the permission profile. Possible values include:
+ *
+ * - `2301416` (for the `DocuSign Viewer` profile)
+ * - `2301415` (for the `DocuSign Sender` profile)
+ * - `2301414` (for the `Account Administrator` profile)
+ *
+ * In addition, any custom permission profiles associated with your account will have an automatically generated `permissionProfileId`.
+ * * `move_users_to: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn permission_profiles_delete(
&self,
account_id: &str,
permission_profile_id: &str,
move_users_to: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !move_users_to.is_empty() {
query_args.push(("move_users_to".to_string(), move_users_to.to_string()));
@@ -235,8 +237,8 @@ impl AccountPermissionProfiles {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/permission_profiles/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(permission_profile_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&permission_profile_id.to_string()),
query_
),
None,
diff --git a/docusign/src/account_seal_providers.rs b/docusign/src/account_seal_providers.rs
index deccbd3..b7b35f8 100644
--- a/docusign/src/account_seal_providers.rs
+++ b/docusign/src/account_seal_providers.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountSealProviders {
pub client: Client,
@@ -13,24 +15,24 @@ impl AccountSealProviders {
}
/**
- * Returns available seals for specified account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/seals` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns available seals for specified account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/seals` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn account_signature_providers_get_seal(
&self,
account_id: &str,
- ) -> Result<crate::types::AccountSealProviders> {
+ ) -> ClientResult<crate::types::AccountSealProviders> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/seals",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/account_signature_providers.rs b/docusign/src/account_signature_providers.rs
index f20fdd3..a756e3c 100644
--- a/docusign/src/account_signature_providers.rs
+++ b/docusign/src/account_signature_providers.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountSignatureProviders {
pub client: Client,
@@ -13,24 +15,24 @@ impl AccountSignatureProviders {
}
/**
- * Gets the available signature providers for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatureProviders` endpoint.
- *
- * Returns a list of signature providers that the specified account can use.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the available signature providers for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatureProviders` endpoint.
+ *
+ * Returns a list of signature providers that the specified account can use.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get(
&self,
account_id: &str,
- ) -> Result<crate::types::AccountSignatureProvidersData> {
+ ) -> ClientResult<crate::types::AccountSignatureProvidersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatureProviders",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/account_signatures.rs b/docusign/src/account_signatures.rs
index c695387..dbc1188 100644
--- a/docusign/src/account_signatures.rs
+++ b/docusign/src/account_signatures.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountSignatures {
pub client: Client,
@@ -13,26 +15,26 @@ impl AccountSignatures {
}
/**
- * Returns the managed signature definitions for the account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `stamp_format: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `stamp_name: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `stamp_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns the managed signature definitions for the account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `stamp_format: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `stamp_name: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `stamp_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get(
&self,
account_id: &str,
stamp_format: &str,
stamp_name: &str,
stamp_type: &str,
- ) -> Result<crate::types::AccountSignaturesInformation> {
+ ) -> ClientResult<crate::types::AccountSignaturesInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !stamp_format.is_empty() {
query_args.push(("stamp_format".to_string(), stamp_format.to_string()));
@@ -47,7 +49,7 @@ impl AccountSignatures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -78,11 +80,11 @@ impl AccountSignatures {
&self,
account_id: &str,
body: &crate::types::AccountSignaturesInformation,
- ) -> Result<crate::types::AccountSignaturesInformation> {
+ ) -> ClientResult<crate::types::AccountSignaturesInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -114,7 +116,7 @@ impl AccountSignatures {
account_id: &str,
decode_only: &str,
body: &crate::types::AccountSignaturesInformation,
- ) -> Result<crate::types::AccountSignaturesInformation> {
+ ) -> ClientResult<crate::types::AccountSignaturesInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !decode_only.is_empty() {
query_args.push(("decode_only".to_string(), decode_only.to_string()));
@@ -123,7 +125,7 @@ impl AccountSignatures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -139,27 +141,27 @@ impl AccountSignatures {
.await
}
/**
- * Returns information about the specified signature.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns information about the specified signature.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_signature(
&self,
account_id: &str,
signature_id: &str,
- ) -> Result<crate::types::AccountSignature> {
+ ) -> ClientResult<crate::types::AccountSignature> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
),
None,
);
@@ -174,25 +176,25 @@ impl AccountSignatures {
.await
}
/**
- * Updates an account signature.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `close_existing_signature: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an account signature.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `close_existing_signature: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put_signature_account_signatures(
&self,
account_id: &str,
signature_id: &str,
close_existing_signature: &str,
body: &crate::types::AccountSignatureDefinition,
- ) -> Result<crate::types::AccountSignature> {
+ ) -> ClientResult<crate::types::AccountSignature> {
let mut query_args: Vec<(String, String)> = Default::default();
if !close_existing_signature.is_empty() {
query_args.push((
@@ -204,8 +206,8 @@ impl AccountSignatures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
query_
),
None,
@@ -221,23 +223,23 @@ impl AccountSignatures {
.await
}
/**
- * Close the specified signature by ID.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete_signature(&self, account_id: &str, signature_id: &str) -> Result<()> {
+ * Close the specified signature by ID.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete_signature(&self, account_id: &str, signature_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
),
None,
);
@@ -252,29 +254,29 @@ impl AccountSignatures {
.await
}
/**
- * Returns a signature image, initials, or stamp.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `image_type: &str` -- Specificies the type of image. Valid values are:
- *
- * - `signature_image`
- * - `initials_image`.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_chrome: &str` -- When **true**, the chrome (or frame containing the added line and identifier) is included with the signature image.
- */
+ * Returns a signature image, initials, or stamp.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `image_type: &str` -- Specificies the type of image. Valid values are:
+ *
+ * - `signature_image`
+ * - `initials_image`.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_chrome: &str` -- When **true**, the chrome (or frame containing the added line and identifier) is included with the signature image.
+ */
pub async fn get_signature_image(
&self,
account_id: &str,
image_type: &str,
signature_id: &str,
include_chrome: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_chrome.is_empty() {
query_args.push(("include_chrome".to_string(), include_chrome.to_string()));
@@ -283,9 +285,9 @@ impl AccountSignatures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
- crate::progenitor_support::encode_path(image_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
+ crate::progenitor_support::encode_path(&image_type.to_string()),
query_
),
None,
@@ -301,29 +303,29 @@ impl AccountSignatures {
.await
}
/**
- * Sets a signature image, initials, or stamp.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `image_type: &str` -- Specificies the type of image. Valid values are:
- *
- * - `signature_image`
- * - `initials_image`.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `transparent_png: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Sets a signature image, initials, or stamp.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `image_type: &str` -- Specificies the type of image. Valid values are:
+ *
+ * - `signature_image`
+ * - `initials_image`.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `transparent_png: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put_signature_image(
&self,
account_id: &str,
image_type: &str,
signature_id: &str,
transparent_png: &str,
- ) -> Result<crate::types::AccountSignature> {
+ ) -> ClientResult<crate::types::AccountSignature> {
let mut query_args: Vec<(String, String)> = Default::default();
if !transparent_png.is_empty() {
query_args.push(("transparent_png".to_string(), transparent_png.to_string()));
@@ -332,9 +334,9 @@ impl AccountSignatures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
- crate::progenitor_support::encode_path(image_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
+ crate::progenitor_support::encode_path(&image_type.to_string()),
query_
),
None,
@@ -350,33 +352,33 @@ impl AccountSignatures {
.await
}
/**
- * Deletes a signature image, initials, or stamp.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `image_type: &str` -- Specificies the type of image. Valid values are:
- *
- * - `signature_image`
- * - `initials_image`.
- * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a signature image, initials, or stamp.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signatures/{signatureId}/{imageType}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `image_type: &str` -- Specificies the type of image. Valid values are:
+ *
+ * - `signature_image`
+ * - `initials_image`.
+ * * `signature_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete_signature_image(
&self,
account_id: &str,
image_type: &str,
signature_id: &str,
- ) -> Result<crate::types::AccountSignature> {
+ ) -> ClientResult<crate::types::AccountSignature> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signatures/{}/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signature_id),
- crate::progenitor_support::encode_path(image_type),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signature_id.to_string()),
+ crate::progenitor_support::encode_path(&image_type.to_string()),
),
None,
);
diff --git a/docusign/src/account_tab_settings.rs b/docusign/src/account_tab_settings.rs
index 8d3da10..9651ecb 100644
--- a/docusign/src/account_tab_settings.rs
+++ b/docusign/src/account_tab_settings.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountTabSettings {
pub client: Client,
@@ -13,24 +15,24 @@ impl AccountTabSettings {
}
/**
- * Returns tab settings list for specified account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/tabs` endpoint.
- *
- * This method returns information about the tab types and tab functionality that is currently enabled for an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns tab settings list for specified account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/tabs` endpoint.
+ *
+ * This method returns information about the tab types and tab functionality that is currently enabled for an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tab_settings_get(
&self,
account_id: &str,
- ) -> Result<crate::types::TabAccountSettings> {
+ ) -> ClientResult<crate::types::TabAccountSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/tabs",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -45,25 +47,25 @@ impl AccountTabSettings {
.await
}
/**
- * Modifies tab settings for specified account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/tabs` endpoint.
- *
- * This method modifies the tab types and tab functionality that is enabled for an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Modifies tab settings for specified account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/tabs` endpoint.
+ *
+ * This method modifies the tab types and tab functionality that is enabled for an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tab_settings_put(
&self,
account_id: &str,
body: &crate::types::TabAccountSettings,
- ) -> Result<crate::types::TabAccountSettings> {
+ ) -> ClientResult<crate::types::TabAccountSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/tabs",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/account_watermarks.rs b/docusign/src/account_watermarks.rs
index 659bb91..275632d 100644
--- a/docusign/src/account_watermarks.rs
+++ b/docusign/src/account_watermarks.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct AccountWatermarks {
pub client: Client,
@@ -13,21 +15,21 @@ impl AccountWatermarks {
}
/**
- * Get watermark information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/watermark` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn watermark_get(&self, account_id: &str) -> Result<crate::types::Watermark> {
+ * Get watermark information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/watermark` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn watermark_get(&self, account_id: &str) -> ClientResult<crate::types::Watermark> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/watermark",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -42,25 +44,25 @@ impl AccountWatermarks {
.await
}
/**
- * Update watermark information.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/watermark` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Update watermark information.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/watermark` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn watermark_put(
&self,
account_id: &str,
body: &crate::types::Watermark,
- ) -> Result<crate::types::Watermark> {
+ ) -> ClientResult<crate::types::Watermark> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/watermark",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -75,25 +77,25 @@ impl AccountWatermarks {
.await
}
/**
- * Get watermark preview.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/watermark/preview` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Get watermark preview.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/watermark/preview` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn watermark_preview_put(
&self,
account_id: &str,
body: &crate::types::Watermark,
- ) -> Result<crate::types::Watermark> {
+ ) -> ClientResult<crate::types::Watermark> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/watermark/preview",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/accounts.rs b/docusign/src/accounts.rs
index b7e903b..ab0be47 100644
--- a/docusign/src/accounts.rs
+++ b/docusign/src/accounts.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Accounts {
pub client: Client,
@@ -13,141 +15,141 @@ impl Accounts {
}
/**
- * Creates new accounts.
- *
- * This function performs a `POST` to the `/v2.1/accounts` endpoint.
- *
- * Creates new DocuSign accounts.
- * You can use this method to create
- * a single account
- * or up to 100 accounts at a time.
- *
- * **Note**: This method is restricted to partner integrations. You must work with DocuSign Professional Services or DocuSign Business Development, who will provide you with the Distributor Code and Distributor Password that you need to include in the request body.
- *
- * You must include the `X-DocuSign-Authentication` header.
- *
- * Example:
- *
- * `<DocuSignCredentials><IntegratorKey>{{integratorKey}}</IntegratorKey></DocuSignCredentials>`
- *
- * When creating a single account,
- * the body of the request is a
- * [`newAccountRequest`][newAccountRequest]
- * object.
- *
- * Example:
- *
- * ```
- * {
- * "newAccountRequest": [
- * {
- * "accountName":"Test Account",
- * "distributorCode":"MY_DIST_CODE",
- * "distributorPassword":"MY_DIST_PWD",
- * "initialUser":{
- * "email":"user@emaildomain.com",
- * "firstName":"John",
- * "middleName": "Harry",
- * "lastName":"Doe",
- * "suffixName": "",
- * "userName": "John Doe",
- * "jobTitle": "Engineer",
- * "company": "Test Company"
- * },
- * "addressInformation":{
- * "address1": "1234 Main Street",
- * "address2": "Suite 100",
- * "city": "Seattle",
- * "state": "WA",
- * "postalCode": "98101",
- * "country": "US",
- * "phone": "1234567890",
- * "fax": "1234567891"
- * },
- * "planInformation":{
- * "planId":"37085696-xxxx-xxxx-xxxx-7ea067752959"
- * },
- * "referralInformation":{
- * "includedSeats": "1",
- * "referralCode": "code",
- * "referrerName": "name"
- * }
- * }
- * ]
- * }
- *
- * ```
- * If the request succeeds,
- * it returns a
- * 201 (Created) HTTP response code.
- * The response returns the new account ID, password, and the default user
- * information for each newly created account.
- *
- *
- * When creating multiple accounts,
- * the body of the request is a
- * `newAccountRequests`
- * object,
- * which contains one or more
- * [`newAccountDefinition`][newAccountDefinition]
- * objects.
- * You can create up to 100 new accounts
- * at a time this way.
- *
- * The body for a multi-account
- * creation request
- * looks like this in JSON:
- *
- * ```
- * {
- * "newAccountRequests": [
- * {
- * "accountName": "accountone",
- * . . .
- * },
- * {
- * "accountName": "accounttwo",
- * . . .
- * }
- * ]
- * }
- * ```
- *
- * A multi-account request
- * looks like this in XML:
- *
- * ```
- * <newAccountsDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
- * <newAccountRequests>
- * <newAccountDefinition>
- * . . .
- * </newAccountDefinition>
- * <newAccountDefinition>
- * . . .
- * </newAccountDefinition>
- * </newAccountRequests>
- * </newAccountsDefinition>
- * ```
- *
- * A multi-account creation request
- * may succeed (report a 201 code)
- * even if some accounts could not be created.
- * In this case, the `errorDetails` property
- * in the response contains specific information
- * about the failure.
- *
- *
- *
- * [newAccountDefinition]: #/definitions/newAccountDefinition
- * [nameValue]: #/definitions/nameValue
- * [newAccountRequest]: #/definitions/newAccountRequest
- *
- */
+ * Creates new accounts.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts` endpoint.
+ *
+ * Creates new DocuSign accounts.
+ * You can use this method to create
+ * a single account
+ * or up to 100 accounts at a time.
+ *
+ * **Note**: This method is restricted to partner integrations. You must work with DocuSign Professional Services or DocuSign Business Development, who will provide you with the Distributor Code and Distributor Password that you need to include in the request body.
+ *
+ * You must include the `X-DocuSign-Authentication` header.
+ *
+ * Example:
+ *
+ * `<DocuSignCredentials><IntegratorKey>{{integratorKey}}</IntegratorKey></DocuSignCredentials>`
+ *
+ * When creating a single account,
+ * the body of the request is a
+ * [`newAccountRequest`][newAccountRequest]
+ * object.
+ *
+ * Example:
+ *
+ * ```
+ * {
+ * "newAccountRequest": [
+ * {
+ * "accountName":"Test Account",
+ * "distributorCode":"MY_DIST_CODE",
+ * "distributorPassword":"MY_DIST_PWD",
+ * "initialUser":{
+ * "email":"user@emaildomain.com",
+ * "firstName":"John",
+ * "middleName": "Harry",
+ * "lastName":"Doe",
+ * "suffixName": "",
+ * "userName": "John Doe",
+ * "jobTitle": "Engineer",
+ * "company": "Test Company"
+ * },
+ * "addressInformation":{
+ * "address1": "1234 Main Street",
+ * "address2": "Suite 100",
+ * "city": "Seattle",
+ * "state": "WA",
+ * "postalCode": "98101",
+ * "country": "US",
+ * "phone": "1234567890",
+ * "fax": "1234567891"
+ * },
+ * "planInformation":{
+ * "planId":"37085696-xxxx-xxxx-xxxx-7ea067752959"
+ * },
+ * "referralInformation":{
+ * "includedSeats": "1",
+ * "referralCode": "code",
+ * "referrerName": "name"
+ * }
+ * }
+ * ]
+ * }
+ *
+ * ```
+ * If the request succeeds,
+ * it returns a
+ * 201 (Created) HTTP response code.
+ * The response returns the new account ID, password, and the default user
+ * information for each newly created account.
+ *
+ *
+ * When creating multiple accounts,
+ * the body of the request is a
+ * `newAccountRequests`
+ * object,
+ * which contains one or more
+ * [`newAccountDefinition`][newAccountDefinition]
+ * objects.
+ * You can create up to 100 new accounts
+ * at a time this way.
+ *
+ * The body for a multi-account
+ * creation request
+ * looks like this in JSON:
+ *
+ * ```
+ * {
+ * "newAccountRequests": [
+ * {
+ * "accountName": "accountone",
+ * . . .
+ * },
+ * {
+ * "accountName": "accounttwo",
+ * . . .
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * A multi-account request
+ * looks like this in XML:
+ *
+ * ```
+ * <newAccountsDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
+ * <newAccountRequests>
+ * <newAccountDefinition>
+ * . . .
+ * </newAccountDefinition>
+ * <newAccountDefinition>
+ * . . .
+ * </newAccountDefinition>
+ * </newAccountRequests>
+ * </newAccountsDefinition>
+ * ```
+ *
+ * A multi-account creation request
+ * may succeed (report a 201 code)
+ * even if some accounts could not be created.
+ * In this case, the `errorDetails` property
+ * in the response contains specific information
+ * about the failure.
+ *
+ *
+ *
+ * [newAccountDefinition]: #/definitions/newAccountDefinition
+ * [nameValue]: #/definitions/nameValue
+ * [newAccountRequest]: #/definitions/newAccountRequest
+ *
+ */
pub async fn post(
&self,
body: &crate::types::NewAccountDefinition,
- ) -> Result<crate::types::NewAccountSummary> {
- let url = self.client.url("/v2.1/accounts", None);
+ ) -> ClientResult<crate::types::NewAccountSummary> {
+ let url = self.client.url(&"/v2.1/accounts".to_string(), None);
self.client
.post(
&url,
@@ -159,14 +161,16 @@ impl Accounts {
.await
}
/**
- * Retrieves the account provisioning information for the account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/provisioning` endpoint.
- *
- * Retrieves the account provisioning information for the account.
- */
- pub async fn get_provisioning(&self) -> Result<crate::types::ProvisioningInformation> {
- let url = self.client.url("/v2.1/accounts/provisioning", None);
+ * Retrieves the account provisioning information for the account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/provisioning` endpoint.
+ *
+ * Retrieves the account provisioning information for the account.
+ */
+ pub async fn get_provisioning(&self) -> ClientResult<crate::types::ProvisioningInformation> {
+ let url = self
+ .client
+ .url(&"/v2.1/accounts/provisioning".to_string(), None);
self.client
.get(
&url,
@@ -178,26 +182,26 @@ impl Accounts {
.await
}
/**
- * Retrieves the account information for the specified account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}` endpoint.
- *
- * Retrieves the account information for the specified account.
- *
- * **Response**
- * The `canUpgrade` property contains is a Boolean that indicates whether the account can be upgraded through the API.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_account_settings: &str` -- When set to **true**, includes account settings
- * in the response. If you omit this parameter, the default behavior is **false**.
- */
+ * Retrieves the account information for the specified account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}` endpoint.
+ *
+ * Retrieves the account information for the specified account.
+ *
+ * **Response**
+ * The `canUpgrade` property contains is a Boolean that indicates whether the account can be upgraded through the API.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_account_settings: &str` -- When set to **true**, includes account settings
+ * in the response. If you omit this parameter, the default behavior is **false**.
+ */
pub async fn get(
&self,
account_id: &str,
include_account_settings: &str,
- ) -> Result<crate::types::AccountInformation> {
+ ) -> ClientResult<crate::types::AccountInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_account_settings.is_empty() {
query_args.push((
@@ -209,7 +213,7 @@ impl Accounts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -225,21 +229,21 @@ impl Accounts {
.await
}
/**
- * Deletes the specified account.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}` endpoint.
- *
- * This closes the specified account. You must be an account admin to close your account. Once closed, an account must be reopened by DocuSign.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete(&self, account_id: &str) -> Result<()> {
+ * Deletes the specified account.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}` endpoint.
+ *
+ * This closes the specified account. You must be an account admin to close your account. Once closed, an account must be reopened by DocuSign.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete(&self, account_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -254,29 +258,29 @@ impl Accounts {
.await
}
/**
- * Gets list of recurring and usage charges for the account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_charges` endpoint.
- *
- * Retrieves the list of recurring and usage charges for the account. This can be used to determine the charge structure and usage of charge plan items.
- *
- * Privileges required: account administrator
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_charges: &str` -- Specifies which billing charges to return.
- * Valid values are:
- *
- * * envelopes
- * * seats
- * .
- */
+ * Gets list of recurring and usage charges for the account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_charges` endpoint.
+ *
+ * Retrieves the list of recurring and usage charges for the account. This can be used to determine the charge structure and usage of charge plan items.
+ *
+ * Privileges required: account administrator
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_charges: &str` -- Specifies which billing charges to return.
+ * Valid values are:
+ *
+ * * envelopes
+ * * seats
+ * .
+ */
pub async fn billing_charges_get(
&self,
account_id: &str,
include_charges: &str,
- ) -> Result<crate::types::BillingChargeResponse> {
+ ) -> ClientResult<crate::types::BillingChargeResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_charges.is_empty() {
query_args.push(("include_charges".to_string(), include_charges.to_string()));
@@ -285,7 +289,7 @@ impl Accounts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_charges?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -301,28 +305,28 @@ impl Accounts {
.await
}
/**
- * Deletes the signature for one or more captive recipient records.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/captive_recipients/{recipientPart}` endpoint.
- *
- * This method deletes the signature for one or more captive recipient records. It is primarily used for testing. This functionality provides a way to reset the signature associated with a client user ID so that a new signature can be created the next time the client user ID is used.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_part: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes the signature for one or more captive recipient records.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/captive_recipients/{recipientPart}` endpoint.
+ *
+ * This method deletes the signature for one or more captive recipient records. It is primarily used for testing. This functionality provides a way to reset the signature associated with a client user ID so that a new signature can be created the next time the client user ID is used.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_part: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn captive_recipients_delete_part(
&self,
account_id: &str,
recipient_part: &str,
body: &crate::types::CaptiveRecipientInformation,
- ) -> Result<crate::types::CaptiveRecipientInformation> {
+ ) -> ClientResult<crate::types::CaptiveRecipientInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/captive_recipients/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(recipient_part),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_part.to_string()),
),
None,
);
@@ -337,22 +341,22 @@ impl Accounts {
.await
}
/**
- * Gets the recipient names associated with an email address.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/recipient_names` endpoint.
- *
- * Retrieves a list of all of the names associated with the email address that you pass in. This list can include variants of a single recipient's name that are used for signing, as well as the names of multiple different recipients.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the recipient names associated with an email address.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/recipient_names` endpoint.
+ *
+ * Retrieves a list of all of the names associated with the email address that you pass in. This list can include variants of a single recipient's name that are used for signing, as well as the names of multiple different recipients.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn recipient_names_get(
&self,
account_id: &str,
email: &str,
- ) -> Result<crate::types::RecipientNamesResponse> {
+ ) -> ClientResult<crate::types::RecipientNamesResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !email.is_empty() {
query_args.push(("email".to_string(), email.to_string()));
@@ -361,7 +365,7 @@ impl Accounts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/recipient_names?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -377,24 +381,24 @@ impl Accounts {
.await
}
/**
- * Gets account settings information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings` endpoint.
- *
- * Retrieves the account settings information for the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets account settings information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings` endpoint.
+ *
+ * Retrieves the account settings information for the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn settings_get(
&self,
account_id: &str,
- ) -> Result<crate::types::AccountSettingsInformation> {
+ ) -> ClientResult<crate::types::AccountSettingsInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -409,25 +413,25 @@ impl Accounts {
.await
}
/**
- * Updates the account settings for an account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings` endpoint.
- *
- * Updates the account settings for the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates the account settings for an account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings` endpoint.
+ *
+ * Updates the account settings for the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn settings_put(
&self,
account_id: &str,
body: &crate::types::AccountSettingsInformation,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -442,26 +446,26 @@ impl Accounts {
.await
}
/**
- * Gets the envelope purge configuration for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/envelope_purge_configuration` endpoint.
- *
- * An envelope purge configuration enables account administrators to permanently remove documents and their field data from completed and voided envelopes after a specified retention period (`retentionDays`). This method retrieves the current envelope purge configuration for your account.
- *
- * **Note**: To use this method, you must be an account administrator.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the envelope purge configuration for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/envelope_purge_configuration` endpoint.
+ *
+ * An envelope purge configuration enables account administrators to permanently remove documents and their field data from completed and voided envelopes after a specified retention period (`retentionDays`). This method retrieves the current envelope purge configuration for your account.
+ *
+ * **Note**: To use this method, you must be an account administrator.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_purge_configuration_get(
&self,
account_id: &str,
- ) -> Result<crate::types::EnvelopePurgeConfiguration> {
+ ) -> ClientResult<crate::types::EnvelopePurgeConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/envelope_purge_configuration",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -476,29 +480,29 @@ impl Accounts {
.await
}
/**
- * Sets the envelope purge configuration for an account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/envelope_purge_configuration` endpoint.
- *
- * An envelope purge configuration enables account administrators to permanently remove documents and their field data from completed and voided envelopes after a specified retention period (`retentionDays`). This method sets the envelope purge configuration for your account.
- *
- * **Note**: To use this method, you must be an account administrator.
- *
- * For more information, see [Purge Envelopes](https://support.docusign.com/en/guides/ndse-user-guide-purge-envelopes).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Sets the envelope purge configuration for an account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/envelope_purge_configuration` endpoint.
+ *
+ * An envelope purge configuration enables account administrators to permanently remove documents and their field data from completed and voided envelopes after a specified retention period (`retentionDays`). This method sets the envelope purge configuration for your account.
+ *
+ * **Note**: To use this method, you must be an account administrator.
+ *
+ * For more information, see [Purge Envelopes](https://support.docusign.com/en/guides/ndse-user-guide-purge-envelopes).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_purge_configuration_put(
&self,
account_id: &str,
body: &crate::types::EnvelopePurgeConfiguration,
- ) -> Result<crate::types::EnvelopePurgeConfiguration> {
+ ) -> ClientResult<crate::types::EnvelopePurgeConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/envelope_purge_configuration",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -513,24 +517,24 @@ impl Accounts {
.await
}
/**
- * Gets envelope notification defaults.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/notification_defaults` endpoint.
- *
- * This method returns the default settings for the email notifications that signers and senders receive about envelopes.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets envelope notification defaults.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/notification_defaults` endpoint.
+ *
+ * This method returns the default settings for the email notifications that signers and senders receive about envelopes.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn notification_defaults_get(
&self,
account_id: &str,
- ) -> Result<crate::types::NotificationDefaultsData> {
+ ) -> ClientResult<crate::types::NotificationDefaultsData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/notification_defaults",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -545,25 +549,25 @@ impl Accounts {
.await
}
/**
- * Updates envelope notification default settings.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/notification_defaults` endpoint.
- *
- * This method changes the default settings for the email notifications that signers and senders receive about envelopes.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates envelope notification default settings.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/notification_defaults` endpoint.
+ *
+ * This method changes the default settings for the email notifications that signers and senders receive about envelopes.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn notification_defaults_put(
&self,
account_id: &str,
body: &crate::types::NotificationDefaultsData,
- ) -> Result<crate::types::NotificationDefaultsData> {
+ ) -> ClientResult<crate::types::NotificationDefaultsData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/notification_defaults",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -578,46 +582,46 @@ impl Accounts {
.await
}
/**
- * Reserved: Gets the shared item status for one or more users.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/shared_access` endpoint.
- *
- * Retrieves shared item status for one or more users and types of items.
- *
- * Users with account administration privileges can retrieve shared access information for all account users. Users without account administrator privileges can only retrieve shared access information for themselves, and the returned information is limited to retrieving the status of the members of the account that are sharing their folders to the user. This is equivalent to setting the `shared` parameter to `shared_from`.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- Specifies the maximum number of results included in the response. If no value is specified, this defaults to 1000.
- * * `envelopes_not_shared_user_status: &str` -- This query parameter works in conjunction with `user_ids`. When you specify one of the following user statuses, the query limits the results to only users that match the specified status:
- * - `ActivationRequired`: Membership Activation required
- * - `ActivationSent`: Membership activation sent to user
- * - `Active`: User Membership is active
- * - `Closed`: User Membership is closed
- * - `Disabled`: User Membership is disabled.
- * * `folder_ids: &str` -- A comma-separated list of folder IDs for which to return shared item information. If `item_type` is set to `folders`, at least one folder ID is required.
- * * `item_type: &str` -- Specifies the type of shared item being requested. The possible values are:
- *
- * - `envelopes`: Get information about envelope sharing between users.
- * - `templates`: Get information about template sharing among users and groups.
- * - `folders`: Get information about folder sharing among users and groups.
- * .
- * * `search_text: &str` -- Filter user names based on the specified string. The wild-card '*' (asterisk) can be used in the string.
- * * `shared: &str` -- A comma-separated list of sharing filters that specifies which users appear in the response.
- *
- * - `not_shared`: The response lists users who do not share items of `item_type` with the current user.
- *
- * - `shared_to`: The response lists users in `user_list` who are sharing items to current user.
- *
- * - `shared_from`: The response lists users in `user_list` who are sharing items from the current user.
- *
- * - `shared_to_and_from`: The response lists users in `user_list` who are sharing items to and from the current user.
- *
- * If the current user does not have administrative privileges, only the `shared_to` option is valid.
- * * `start_position: &str` -- If the number of responses is greater than `count`, this specifies the number of responses to skip. Typically this value is a multiple of `count`. The default is 0.
- * * `user_ids: &str` -- A comma-separated list of user IDs for whom the shared item information is being requested.
- */
+ * Reserved: Gets the shared item status for one or more users.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/shared_access` endpoint.
+ *
+ * Retrieves shared item status for one or more users and types of items.
+ *
+ * Users with account administration privileges can retrieve shared access information for all account users. Users without account administrator privileges can only retrieve shared access information for themselves, and the returned information is limited to retrieving the status of the members of the account that are sharing their folders to the user. This is equivalent to setting the `shared` parameter to `shared_from`.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- Specifies the maximum number of results included in the response. If no value is specified, this defaults to 1000.
+ * * `envelopes_not_shared_user_status: &str` -- This query parameter works in conjunction with `user_ids`. When you specify one of the following user statuses, the query limits the results to only users that match the specified status:
+ * - `ActivationRequired`: Membership Activation required
+ * - `ActivationSent`: Membership activation sent to user
+ * - `Active`: User Membership is active
+ * - `Closed`: User Membership is closed
+ * - `Disabled`: User Membership is disabled.
+ * * `folder_ids: &str` -- A comma-separated list of folder IDs for which to return shared item information. If `item_type` is set to `folders`, at least one folder ID is required.
+ * * `item_type: &str` -- Specifies the type of shared item being requested. The possible values are:
+ *
+ * - `envelopes`: Get information about envelope sharing between users.
+ * - `templates`: Get information about template sharing among users and groups.
+ * - `folders`: Get information about folder sharing among users and groups.
+ * .
+ * * `search_text: &str` -- Filter user names based on the specified string. The wild-card '*' (asterisk) can be used in the string.
+ * * `shared: &str` -- A comma-separated list of sharing filters that specifies which users appear in the response.
+ *
+ * - `not_shared`: The response lists users who do not share items of `item_type` with the current user.
+ *
+ * - `shared_to`: The response lists users in `user_list` who are sharing items to current user.
+ *
+ * - `shared_from`: The response lists users in `user_list` who are sharing items from the current user.
+ *
+ * - `shared_to_and_from`: The response lists users in `user_list` who are sharing items to and from the current user.
+ *
+ * If the current user does not have administrative privileges, only the `shared_to` option is valid.
+ * * `start_position: &str` -- If the number of responses is greater than `count`, this specifies the number of responses to skip. Typically this value is a multiple of `count`. The default is 0.
+ * * `user_ids: &str` -- A comma-separated list of user IDs for whom the shared item information is being requested.
+ */
pub async fn shared_access_get(
&self,
account_id: &str,
@@ -629,7 +633,7 @@ impl Accounts {
shared: &str,
start_position: &str,
user_ids: &str,
- ) -> Result<crate::types::AccountSharedAccess> {
+ ) -> ClientResult<crate::types::AccountSharedAccess> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -662,7 +666,7 @@ impl Accounts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/shared_access?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -678,35 +682,35 @@ impl Accounts {
.await
}
/**
- * Reserved: Sets the shared access information for users.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/shared_access` endpoint.
- *
- * This sets the shared access status for one or more users or templates.
- *
- * When setting user shared access, only users with account administration privileges can set shared access status for envelopes.
- *
- * When setting template shared access, only users who own a template and have sharing permission or with account administration privileges can set shared access for templates.
- *
- * Changes to the shared items status are not additive. The change always replaces the current status.
- *
- * To change template shared access, add the query parameter `item_type` = `templates` to the request. When this is set, the user and envelopes properties are not required.
- *
- * **Note**: This functionality is a newer version of the [Update Group Share](https://developers.docusign.com/docs/esign-rest-api/reference/Templates/Templates/updateGroupShare) functionality.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `item_type: &str` -- Specifies the type of shared item being set:
- * - `envelopes`: Set envelope sharing between users.
- * - `templates`: Set information about template sharing among users and groups.
- * - `folders`: Get information about folder sharing among users and groups.
- * .
- * * `preserve_existing_shared_access: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_ids: &str` -- A comma-separated list of IDs for users whose shared item access is being set.
- */
+ * Reserved: Sets the shared access information for users.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/shared_access` endpoint.
+ *
+ * This sets the shared access status for one or more users or templates.
+ *
+ * When setting user shared access, only users with account administration privileges can set shared access status for envelopes.
+ *
+ * When setting template shared access, only users who own a template and have sharing permission or with account administration privileges can set shared access for templates.
+ *
+ * Changes to the shared items status are not additive. The change always replaces the current status.
+ *
+ * To change template shared access, add the query parameter `item_type` = `templates` to the request. When this is set, the user and envelopes properties are not required.
+ *
+ * **Note**: This functionality is a newer version of the [Update Group Share](https://developers.docusign.com/docs/esign-rest-api/reference/Templates/Templates/updateGroupShare) functionality.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `item_type: &str` -- Specifies the type of shared item being set:
+ * - `envelopes`: Set envelope sharing between users.
+ * - `templates`: Set information about template sharing among users and groups.
+ * - `folders`: Get information about folder sharing among users and groups.
+ * .
+ * * `preserve_existing_shared_access: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_ids: &str` -- A comma-separated list of IDs for users whose shared item access is being set.
+ */
pub async fn shared_access_put(
&self,
account_id: &str,
@@ -714,7 +718,7 @@ impl Accounts {
preserve_existing_shared_access: &str,
user_ids: &str,
body: &crate::types::AccountSharedAccess,
- ) -> Result<crate::types::AccountSharedAccess> {
+ ) -> ClientResult<crate::types::AccountSharedAccess> {
let mut query_args: Vec<(String, String)> = Default::default();
if !item_type.is_empty() {
query_args.push(("item_type".to_string(), item_type.to_string()));
@@ -732,7 +736,7 @@ impl Accounts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/shared_access?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -748,30 +752,30 @@ impl Accounts {
.await
}
/**
- * Gets the supported languages for envelope recipients.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/supported_languages` endpoint.
- *
- * Retrieves a list of supported languages that you can set for an individual recipient when creating an envelope, as well as their simple type enumeration values. These are the languages that you can set for the standard email format and signing view for each recipient.
- *
- * For example, in the recipient's email notification, this setting affects elements such as the standard introductory text describing the request to sign. It also determines the language used for buttons and tabs in both the email notification and the signing experience.
- *
- * **Note**: Setting a language for a recipient affects only the DocuSign standard text. Any custom text that you enter for the `emailBody` and `emailSubject` of the notification is not translated, and appears exactly as you enter it.
- *
- * For more information, see [Set Recipient Language and Specify Custom Email Messages](https://support.docusign.com/en/guides/ndse-user-guide-recipient-language).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the supported languages for envelope recipients.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/supported_languages` endpoint.
+ *
+ * Retrieves a list of supported languages that you can set for an individual recipient when creating an envelope, as well as their simple type enumeration values. These are the languages that you can set for the standard email format and signing view for each recipient.
+ *
+ * For example, in the recipient's email notification, this setting affects elements such as the standard introductory text describing the request to sign. It also determines the language used for buttons and tabs in both the email notification and the signing experience.
+ *
+ * **Note**: Setting a language for a recipient affects only the DocuSign standard text. Any custom text that you enter for the `emailBody` and `emailSubject` of the notification is not translated, and appears exactly as you enter it.
+ *
+ * For more information, see [Set Recipient Language and Specify Custom Email Messages](https://support.docusign.com/en/guides/ndse-user-guide-recipient-language).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn supported_languages_get(
&self,
account_id: &str,
- ) -> Result<crate::types::SupportedLanguages> {
+ ) -> ClientResult<crate::types::SupportedLanguages> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/supported_languages",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -786,24 +790,24 @@ impl Accounts {
.await
}
/**
- * Gets a list of unsupported file types.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/unsupported_file_types` endpoint.
- *
- * Retrieves a list of file types (mime-types and file-extensions) that are not supported for upload through the DocuSign system.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a list of unsupported file types.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/unsupported_file_types` endpoint.
+ *
+ * Retrieves a list of file types (mime-types and file-extensions) that are not supported for upload through the DocuSign system.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn unsupported_file_types_get(
&self,
account_id: &str,
- ) -> Result<crate::types::FileTypeList> {
+ ) -> ClientResult<crate::types::FileTypeList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/unsupported_file_types",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -818,27 +822,27 @@ impl Accounts {
.await
}
/**
- * Retrieves an account settings comparison.
- *
- * This function performs a `GET` to the `/v2.1/organization_exports/{organizationId}/account_settings/{resultId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `organization_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `result_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Retrieves an account settings comparison.
+ *
+ * This function performs a `GET` to the `/v2.1/organization_exports/{organizationId}/account_settings/{resultId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `organization_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `result_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn organization_exports_get_settings_export(
&self,
organization_id: &str,
result_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/organization_exports/{}/account_settings/{}",
- crate::progenitor_support::encode_path(organization_id),
- crate::progenitor_support::encode_path(result_id),
+ crate::progenitor_support::encode_path(&organization_id.to_string()),
+ crate::progenitor_support::encode_path(&result_id.to_string()),
),
None,
);
diff --git a/docusign/src/appliance_info.rs b/docusign/src/appliance_info.rs
index 3ac7aff..0c5ab31 100644
--- a/docusign/src/appliance_info.rs
+++ b/docusign/src/appliance_info.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ApplianceInfo {
pub client: Client,
@@ -13,24 +15,24 @@ impl ApplianceInfo {
}
/**
- * Returns document pages for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/display_appliance_info/dynamicsystemsettings` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns document pages for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/display_appliance_info/dynamicsystemsettings` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_dynamic_system_setting(
&self,
account_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/display_appliance_info/dynamicsystemsettings",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -45,24 +47,24 @@ impl ApplianceInfo {
.await
}
/**
- * Returns whether a template was encrypted by Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/display_appliance_info/templateInfo` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns whether a template was encrypted by Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/display_appliance_info/templateInfo` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_template(
&self,
account_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/display_appliance_info/templateInfo",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -77,27 +79,27 @@ impl ApplianceInfo {
.await
}
/**
- * Returns envelope and recipient information for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns envelope and recipient information for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -112,27 +114,27 @@ impl ApplianceInfo {
.await
}
/**
- * Returns envelope account information for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/account_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns envelope account information for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/account_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_account(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::DisplayApplianceAccount> {
+ ) -> ClientResult<crate::types::DisplayApplianceAccount> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/account_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -147,27 +149,27 @@ impl ApplianceInfo {
.await
}
/**
- * Return custom fields information for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/custom_fields` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Return custom fields information for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/custom_fields` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_custom_field(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/custom_fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -182,27 +184,27 @@ impl ApplianceInfo {
.await
}
/**
- * Deletes custom fields information for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/custom_fields/delete` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes custom fields information for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/custom_fields/delete` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_delete_custom_fields(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/custom_fields/delete",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -217,27 +219,27 @@ impl ApplianceInfo {
.await
}
/**
- * Gets date signed information for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/date_signed` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets date signed information for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/date_signed` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_date_signed(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/date_signed",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -252,30 +254,30 @@ impl ApplianceInfo {
.await
}
/**
- * Updates document information for Display Applianc.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document/{documentId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates document information for Display Applianc.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document/{documentId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_put_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/document/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -290,30 +292,30 @@ impl ApplianceInfo {
.await
}
/**
- * Deletes document information for Display Appliance.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document/{documentId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes document information for Display Appliance.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document/{documentId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_delete_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/document/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -328,27 +330,27 @@ impl ApplianceInfo {
.await
}
/**
- * Return document pages for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document_page_list` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Return document pages for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/document_page_list` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_document_page(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/document_page_list",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -363,27 +365,27 @@ impl ApplianceInfo {
.await
}
/**
- * Returns images for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/image` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns images for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/image` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_image(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/image",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -398,31 +400,31 @@ impl ApplianceInfo {
.await
}
/**
- * Returns locale policy information for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/localepolicy/{userId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- */
+ * Returns locale policy information for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/localepolicy/{userId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ */
pub async fn envelope_get_locale_policy(
&self,
account_id: &str,
envelope_id: &str,
user_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/localepolicy/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(user_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
),
None,
);
@@ -437,23 +439,23 @@ impl ApplianceInfo {
.await
}
/**
- * Updates page information for Display Appliance.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn envelope_put_page(&self, account_id: &str, envelope_id: &str) -> Result<()> {
+ * Updates page information for Display Appliance.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn envelope_put_page(&self, account_id: &str, envelope_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/page_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -468,23 +470,27 @@ impl ApplianceInfo {
.await
}
/**
- * Creates page information for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn envelope_post_page(&self, account_id: &str, envelope_id: &str) -> Result<()> {
+ * Creates page information for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn envelope_post_page(
+ &self,
+ account_id: &str,
+ envelope_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/page_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -499,23 +505,27 @@ impl ApplianceInfo {
.await
}
/**
- * Deletes page information for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info/delete` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn envelope_delete_page(&self, account_id: &str, envelope_id: &str) -> Result<()> {
+ * Deletes page information for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/page_info/delete` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn envelope_delete_page(
+ &self,
+ account_id: &str,
+ envelope_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/page_info/delete",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -530,27 +540,27 @@ impl ApplianceInfo {
.await
}
/**
- * Sets latest PDF for Display Appliance.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Sets latest PDF for Display Appliance.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_put_pdf(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/pdf",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -565,32 +575,32 @@ impl ApplianceInfo {
.await
}
/**
- * Return PDF for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf/{pdfId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `pdf_id: &str` -- **Deprecated**.
- *
- * The `pdfId` property in the consumer_disclosure PUT request is deprecated. For security reasons going forward, any value provided in the request packet must be ignored.
- */
+ * Return PDF for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf/{pdfId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `pdf_id: &str` -- **Deprecated**.
+ *
+ * The `pdfId` property in the consumer_disclosure PUT request is deprecated. For security reasons going forward, any value provided in the request packet must be ignored.
+ */
pub async fn envelope_get_pdf(
&self,
account_id: &str,
envelope_id: &str,
pdf_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/pdf/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(pdf_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&pdf_id.to_string()),
),
None,
);
@@ -605,27 +615,27 @@ impl ApplianceInfo {
.await
}
/**
- * Returns PDF blobs for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns PDF blobs for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_pdf_blob(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/pdf_blobs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -640,23 +650,27 @@ impl ApplianceInfo {
.await
}
/**
- * Updates PDF blobs for Display Appliance.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn envelope_put_pdf_blob(&self, account_id: &str, envelope_id: &str) -> Result<()> {
+ * Updates PDF blobs for Display Appliance.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn envelope_put_pdf_blob(
+ &self,
+ account_id: &str,
+ envelope_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/pdf_blobs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -671,27 +685,27 @@ impl ApplianceInfo {
.await
}
/**
- * Adds PDF blobs for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds PDF blobs for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/pdf_blobs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_post_pdf_blob(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/pdf_blobs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -706,27 +720,27 @@ impl ApplianceInfo {
.await
}
/**
- * Updates RecipientDeniedDocumentCopy for Display Appliance.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/recipient_denied_copy` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates RecipientDeniedDocumentCopy for Display Appliance.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/recipient_denied_copy` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_put_recipient_denied_document_copy(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/recipient_denied_copy",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -741,27 +755,27 @@ impl ApplianceInfo {
.await
}
/**
- * Deletes RecipientDeniedDocumentCopy for Display Appliance.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/recipient_denied_copy` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes RecipientDeniedDocumentCopy for Display Appliance.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/recipient_denied_copy` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_delete_recipient_denied_document_copy(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/recipient_denied_copy",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -776,27 +790,27 @@ impl ApplianceInfo {
.await
}
/**
- * Returns signer attachment information for Display Appliance.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/signer_attachment_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns signer attachment information for Display Appliance.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/signer_attachment_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_get_signer_attachment(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ApplianceInfo> {
+ ) -> ClientResult<crate::types::ApplianceInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/signer_attachment_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -811,27 +825,27 @@ impl ApplianceInfo {
.await
}
/**
- * Deletes signer attachment information for Display Appliance.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/signer_attachment_info` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes signer attachment information for Display Appliance.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/display_appliance_info/signer_attachment_info` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn envelope_delete_signer_attachment(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/display_appliance_info/signer_attachment_info",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -846,14 +860,16 @@ impl ApplianceInfo {
.await
}
/**
- * Uploads Kazmon error for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/display_appliance_info/error` endpoint.
- *
- *
- */
- pub async fn envelope_post_error(&self) -> Result<()> {
- let url = self.client.url("/v2.1/display_appliance_info/error", None);
+ * Uploads Kazmon error for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/display_appliance_info/error` endpoint.
+ *
+ *
+ */
+ pub async fn envelope_post_error(&self) -> ClientResult<()> {
+ let url = self
+ .client
+ .url(&"/v2.1/display_appliance_info/error".to_string(), None);
self.client
.post(
&url,
@@ -865,14 +881,16 @@ impl ApplianceInfo {
.await
}
/**
- * Returns signing URL for Display Appliance.
- *
- * This function performs a `POST` to the `/v2.1/display_appliance_info/redeem` endpoint.
- *
- *
- */
- pub async fn envelope_post_redeem(&self) -> Result<crate::types::ApplianceInfo> {
- let url = self.client.url("/v2.1/display_appliance_info/redeem", None);
+ * Returns signing URL for Display Appliance.
+ *
+ * This function performs a `POST` to the `/v2.1/display_appliance_info/redeem` endpoint.
+ *
+ *
+ */
+ pub async fn envelope_post_redeem(&self) -> ClientResult<crate::types::ApplianceInfo> {
+ let url = self
+ .client
+ .url(&"/v2.1/display_appliance_info/redeem".to_string(), None);
self.client
.post(
&url,
diff --git a/docusign/src/bcc_email_archive.rs b/docusign/src/bcc_email_archive.rs
index a212394..1579922 100644
--- a/docusign/src/bcc_email_archive.rs
+++ b/docusign/src/bcc_email_archive.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct BccEmailArchive {
pub client: Client,
@@ -13,24 +15,24 @@ impl BccEmailArchive {
}
/**
- * Gets the BCC email archive configurations for an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives` endpoint.
- *
- * This method retrieves all of the BCC email archive configurations associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- (Optional) The index position within the total result set from which to start returning values. The default value is `0`.
- */
+ * Gets the BCC email archive configurations for an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives` endpoint.
+ *
+ * This method retrieves all of the BCC email archive configurations associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- (Optional) The index position within the total result set from which to start returning values. The default value is `0`.
+ */
pub async fn get_list(
&self,
account_id: &str,
count: &str,
start_position: &str,
- ) -> Result<crate::types::BccEmailArchiveList> {
+ ) -> ClientResult<crate::types::BccEmailArchiveList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -42,7 +44,7 @@ impl BccEmailArchive {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/bcc_email_archives?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -58,30 +60,30 @@ impl BccEmailArchive {
.await
}
/**
- * Creates a BCC email archive configuration.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives` endpoint.
- *
- * This method creates a BCC email archive configuration for an account (adds a BCC email address to the account for archiving the emails that DocuSign generates).
- *
- * The only property that you must set in the request body is the BCC email address that you want to use.
- *
- * **Note**: An account can have up to five active and pending email archive addresses combined, but you must use this method to add them to the account one at a time. Each email address is considered a separate BCC email archive configuration.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a BCC email archive configuration.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives` endpoint.
+ *
+ * This method creates a BCC email archive configuration for an account (adds a BCC email address to the account for archiving the emails that DocuSign generates).
+ *
+ * The only property that you must set in the request body is the BCC email address that you want to use.
+ *
+ * **Note**: An account can have up to five active and pending email archive addresses combined, but you must use this method to add them to the account one at a time. Each email address is considered a separate BCC email archive configuration.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::BccEmailArchiveData,
- ) -> Result<crate::types::BccEmailArchiveData> {
+ ) -> ClientResult<crate::types::BccEmailArchiveData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/bcc_email_archives",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -96,26 +98,26 @@ impl BccEmailArchive {
.await
}
/**
- * Gets a BCC email archive configuration and its history.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives/{bccEmailArchiveId}` endpoint.
- *
- * This method returns a specific BCC email archive configuration for an account, as well as the history of changes to the email address.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bcc_email_archive_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- (Optional) The index position within the total result set from which to start returning values. The default value is `0`.
- */
+ * Gets a BCC email archive configuration and its history.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives/{bccEmailArchiveId}` endpoint.
+ *
+ * This method returns a specific BCC email archive configuration for an account, as well as the history of changes to the email address.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bcc_email_archive_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- (Optional) The index position within the total result set from which to start returning values. The default value is `0`.
+ */
pub async fn get_history_list(
&self,
account_id: &str,
bcc_email_archive_id: &str,
count: &str,
start_position: &str,
- ) -> Result<crate::types::BccEmailArchiveHistoryList> {
+ ) -> ClientResult<crate::types::BccEmailArchiveHistoryList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -127,8 +129,8 @@ impl BccEmailArchive {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/bcc_email_archives/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bcc_email_archive_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bcc_email_archive_id.to_string()),
query_
),
None,
@@ -144,26 +146,26 @@ impl BccEmailArchive {
.await
}
/**
- * Deletes a BCC email archive configuration.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives/{bccEmailArchiveId}` endpoint.
- *
- * This method deletes a BCC email archive configuration from an account.
- *
- * When you use this method, the status of the BCC email archive configuration switches to `closed` and the BCC email address is no longer used to archive DocuSign-generated email messages.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bcc_email_archive_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete(&self, account_id: &str, bcc_email_archive_id: &str) -> Result<()> {
+ * Deletes a BCC email archive configuration.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/settings/bcc_email_archives/{bccEmailArchiveId}` endpoint.
+ *
+ * This method deletes a BCC email archive configuration from an account.
+ *
+ * When you use this method, the status of the BCC email archive configuration switches to `closed` and the BCC email address is no longer used to archive DocuSign-generated email messages.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bcc_email_archive_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete(&self, account_id: &str, bcc_email_archive_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/bcc_email_archives/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bcc_email_archive_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bcc_email_archive_id.to_string()),
),
None,
);
diff --git a/docusign/src/billing_plans.rs b/docusign/src/billing_plans.rs
index 46a887f..1f61154 100644
--- a/docusign/src/billing_plans.rs
+++ b/docusign/src/billing_plans.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct BillingPlans {
pub client: Client,
@@ -13,35 +15,35 @@ impl BillingPlans {
}
/**
- * Get Account Billing Plan.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan` endpoint.
- *
- * Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card.
- *
- * By default the successor plan and credit card information is included in the response. You can exclude this information from the response by adding the appropriate optional query string and setting it to **false**.
- *
- * Response
- *
- * The response returns the billing plan information, including the currency code, for the plan. The `billingPlan` and `succesorPlans` property values are the same as those shown in the [Billing::getBillingPlan](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/BillingPlans/get) reference. the `billingAddress` and `creditCardInformation` property values are the same as those shown in the [Billing::updatePlan](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/BillingPlans/update) reference.
- *
- * **Note**: When credit card number information displays, a mask is applied to the response so that only the last 4 digits of the card number are visible.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_credit_card_information: &str` -- When set to **true**, payment information including credit card information will show in the return.
- * * `include_metadata: &str` -- When set to **true**, the `canUpgrade` and `renewalStatus` properities are included the response and an array of `supportedCountries` is added to the `billingAddress` information. .
- * * `include_successor_plans: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Get Account Billing Plan.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan` endpoint.
+ *
+ * Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card.
+ *
+ * By default the successor plan and credit card information is included in the response. You can exclude this information from the response by adding the appropriate optional query string and setting it to **false**.
+ *
+ * Response
+ *
+ * The response returns the billing plan information, including the currency code, for the plan. The `billingPlan` and `succesorPlans` property values are the same as those shown in the [Billing::getBillingPlan](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/BillingPlans/get) reference. the `billingAddress` and `creditCardInformation` property values are the same as those shown in the [Billing::updatePlan](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/BillingPlans/update) reference.
+ *
+ * **Note**: When credit card number information displays, a mask is applied to the response so that only the last 4 digits of the card number are visible.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_credit_card_information: &str` -- When set to **true**, payment information including credit card information will show in the return.
+ * * `include_metadata: &str` -- When set to **true**, the `canUpgrade` and `renewalStatus` properities are included the response and an array of `supportedCountries` is added to the `billingAddress` information. .
+ * * `include_successor_plans: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get(
&self,
account_id: &str,
include_credit_card_information: &str,
include_metadata: &str,
include_successor_plans: &str,
- ) -> Result<crate::types::AccountBillingPlanResponse> {
+ ) -> ClientResult<crate::types::AccountBillingPlanResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_credit_card_information.is_empty() {
query_args.push((
@@ -62,7 +64,7 @@ impl BillingPlans {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -78,23 +80,23 @@ impl BillingPlans {
.await
}
/**
- * Updates an account billing plan.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan` endpoint.
- *
- * Updates the billing plan information, billing address, and credit card information for the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `preview_billing_plan: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an account billing plan.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan` endpoint.
+ *
+ * Updates the billing plan information, billing address, and credit card information for the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `preview_billing_plan: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
preview_billing_plan: &str,
body: &crate::types::BillingPlanInformation,
- ) -> Result<crate::types::BillingPlanUpdateResponse> {
+ ) -> ClientResult<crate::types::BillingPlanUpdateResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !preview_billing_plan.is_empty() {
query_args.push((
@@ -106,7 +108,7 @@ impl BillingPlans {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -122,24 +124,24 @@ impl BillingPlans {
.await
}
/**
- * Get credit card information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan/credit_card` endpoint.
- *
- * This method returns information about a credit card associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Get credit card information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan/credit_card` endpoint.
+ *
+ * This method returns information about a credit card associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_credit_card_info(
&self,
account_id: &str,
- ) -> Result<crate::types::CreditCardInformation> {
+ ) -> ClientResult<crate::types::CreditCardInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan/credit_card",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -154,24 +156,24 @@ impl BillingPlans {
.await
}
/**
- * Returns downgrade plan information for the specified account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan/downgrade` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns downgrade plan information for the specified account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_plan/downgrade` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_downgrade_request_info(
&self,
account_id: &str,
- ) -> Result<crate::types::DowngradRequestBillingInfoResponse> {
+ ) -> ClientResult<crate::types::DowngradRequestBillingInfoResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan/downgrade",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -186,25 +188,25 @@ impl BillingPlans {
.await
}
/**
- * Queues downgrade billing plan request for an account.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan/downgrade` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Queues downgrade billing plan request for an account.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan/downgrade` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put_downgrade_account(
&self,
account_id: &str,
body: &crate::types::DowngradeBillingPlanInformation,
- ) -> Result<crate::types::DowngradePlanUpdateResponse> {
+ ) -> ClientResult<crate::types::DowngradePlanUpdateResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan/downgrade",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -219,25 +221,25 @@ impl BillingPlans {
.await
}
/**
- * Reserverd: Purchase additional envelopes.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan/purchased_envelopes` endpoint.
- *
- * Reserved: At this time, this endpoint is limited to DocuSign internal use only. Completes the purchase of envelopes for your account. The actual purchase is done as part of an internal workflow interaction with an envelope vendor.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Reserverd: Purchase additional envelopes.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/billing_plan/purchased_envelopes` endpoint.
+ *
+ * Reserved: At this time, this endpoint is limited to DocuSign internal use only. Completes the purchase of envelopes for your account. The actual purchase is done as part of an internal workflow interaction with an envelope vendor.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn purchased_envelopes_put(
&self,
account_id: &str,
body: &crate::types::PurchasedEnvelopesInformation,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_plan/purchased_envelopes",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -252,14 +254,14 @@ impl BillingPlans {
.await
}
/**
- * Gets a list of available billing plans.
- *
- * This function performs a `GET` to the `/v2.1/billing_plans` endpoint.
- *
- * Retrieves a list of the billing plans associated with a distributor.
- */
- pub async fn get_billing_plans(&self) -> Result<crate::types::BillingPlansResponse> {
- let url = self.client.url("/v2.1/billing_plans", None);
+ * Gets a list of available billing plans.
+ *
+ * This function performs a `GET` to the `/v2.1/billing_plans` endpoint.
+ *
+ * Retrieves a list of the billing plans associated with a distributor.
+ */
+ pub async fn get_billing_plans(&self) -> ClientResult<crate::types::BillingPlansResponse> {
+ let url = self.client.url(&"/v2.1/billing_plans".to_string(), None);
self.client
.get(
&url,
@@ -271,24 +273,24 @@ impl BillingPlans {
.await
}
/**
- * Gets billing plan details.
- *
- * This function performs a `GET` to the `/v2.1/billing_plans/{billingPlanId}` endpoint.
- *
- * Retrieves the billing plan details for the specified billing plan ID.
- *
- * **Parameters:**
- *
- * * `billing_plan_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets billing plan details.
+ *
+ * This function performs a `GET` to the `/v2.1/billing_plans/{billingPlanId}` endpoint.
+ *
+ * Retrieves the billing plan details for the specified billing plan ID.
+ *
+ * **Parameters:**
+ *
+ * * `billing_plan_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_plan(
&self,
billing_plan_id: &str,
- ) -> Result<crate::types::BillingPlanResponse> {
+ ) -> ClientResult<crate::types::BillingPlanResponse> {
let url = self.client.url(
&format!(
"/v2.1/billing_plans/{}",
- crate::progenitor_support::encode_path(billing_plan_id),
+ crate::progenitor_support::encode_path(&billing_plan_id.to_string()),
),
None,
);
diff --git a/docusign/src/bulk_send.rs b/docusign/src/bulk_send.rs
index 14a975f..2a428ac 100644
--- a/docusign/src/bulk_send.rs
+++ b/docusign/src/bulk_send.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct BulkSend {
pub client: Client,
@@ -13,29 +15,29 @@ impl BulkSend {
}
/**
- * Returns a list of bulk send batch summaries. .
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_batch` endpoint.
- *
- * Returns a summary of bulk send batches.
- *
- * Use the `batch_ids` query parameter to narrow the list of batches.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `batch_ids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The number of results to report. Must be a value from 1 to 1000.
- *
- * Default: 100.
- * * `start_position: &str` -- The start position for results. Essentially the number of results to skip before collecting them. Must be a value greater than 0.
- * * `status: &str` -- The kind of results to collect. Must be one of:
- *
- * - all
- * - failed
- * - sent
- * - queued.
- */
+ * Returns a list of bulk send batch summaries. .
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_batch` endpoint.
+ *
+ * Returns a summary of bulk send batches.
+ *
+ * Use the `batch_ids` query parameter to narrow the list of batches.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `batch_ids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The number of results to report. Must be a value from 1 to 1000.
+ *
+ * Default: 100.
+ * * `start_position: &str` -- The start position for results. Essentially the number of results to skip before collecting them. Must be a value greater than 0.
+ * * `status: &str` -- The kind of results to collect. Must be one of:
+ *
+ * - all
+ * - failed
+ * - sent
+ * - queued.
+ */
pub async fn batch_get_batche(
&self,
account_id: &str,
@@ -43,7 +45,7 @@ impl BulkSend {
count: &str,
start_position: &str,
status: &str,
- ) -> Result<crate::types::BulkSendBatchSummaries> {
+ ) -> ClientResult<crate::types::BulkSendBatchSummaries> {
let mut query_args: Vec<(String, String)> = Default::default();
if !batch_ids.is_empty() {
query_args.push(("batch_ids".to_string(), batch_ids.to_string()));
@@ -61,7 +63,7 @@ impl BulkSend {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_batch?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -77,33 +79,33 @@ impl BulkSend {
.await
}
/**
- * Gets the status of a specific bulk send batch.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}` endpoint.
- *
- * Gets the general status of a specific bulk send batch such as:
- *
- * - number of successes
- * - number pending
- * - number of errors
- *
- * The `bulkErrors` property of the response object contains more information about the errors.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_batch_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the status of a specific bulk send batch.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}` endpoint.
+ *
+ * Gets the general status of a specific bulk send batch such as:
+ *
+ * - number of successes
+ * - number pending
+ * - number of errors
+ *
+ * The `bulkErrors` property of the response object contains more information about the errors.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_batch_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn batch_get_statu(
&self,
account_id: &str,
bulk_send_batch_id: &str,
- ) -> Result<crate::types::BulkSendBatchStatus> {
+ ) -> ClientResult<crate::types::BulkSendBatchStatus> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_batch/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_batch_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_batch_id.to_string()),
),
None,
);
@@ -118,28 +120,28 @@ impl BulkSend {
.await
}
/**
- * Updates a specific bulk send batch status.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_batch_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates a specific bulk send batch status.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_batch_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn batch_put_status(
&self,
account_id: &str,
bulk_send_batch_id: &str,
body: &crate::types::BulkSendBatchRequest,
- ) -> Result<crate::types::BulkSendBatchStatus> {
+ ) -> ClientResult<crate::types::BulkSendBatchStatus> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_batch/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_batch_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_batch_id.to_string()),
),
None,
);
@@ -154,24 +156,24 @@ impl BulkSend {
.await
}
/**
- * Gets bulk send lists.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_lists` endpoint.
- *
- * This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets bulk send lists.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_lists` endpoint.
+ *
+ * This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn v_2crud_get_list(
&self,
account_id: &str,
- ) -> Result<crate::types::BulkSendingListSummaries> {
+ ) -> ClientResult<crate::types::BulkSendingListSummaries> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -186,51 +188,51 @@ impl BulkSend {
.await
}
/**
- * Creates a bulk send list.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists` endpoint.
- *
- * This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once.
- *
- * It returns the following errors:
- *
- * | Error code | Description |
- * | :------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- * | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. |
- * | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). |
- * | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. |
- * | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. |
- * | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. |
- * | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. |
- * | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. |
- * | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. |
- * | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. |
- * | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. |
- * | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. |
- * | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. |
- * | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. |
- * | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. |
- * | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. |
- * | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. |
- * | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. |
- * | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. |
- * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. |
- * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. |
- * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a bulk send list.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists` endpoint.
+ *
+ * This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once.
+ *
+ * It returns the following errors:
+ *
+ * | Error code | Description |
+ * | :------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ * | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. |
+ * | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). |
+ * | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. |
+ * | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. |
+ * | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. |
+ * | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. |
+ * | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. |
+ * | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. |
+ * | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. |
+ * | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. |
+ * | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. |
+ * | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. |
+ * | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. |
+ * | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. |
+ * | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. |
+ * | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. |
+ * | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. |
+ * | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. |
+ * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. |
+ * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. |
+ * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn v_2crud_post_list(
&self,
account_id: &str,
body: &crate::types::BulkSendingList,
- ) -> Result<crate::types::BulkSendingList> {
+ ) -> ClientResult<crate::types::BulkSendingList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -245,27 +247,27 @@ impl BulkSend {
.await
}
/**
- * Gets a specific bulk send list.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
- *
- * This method returns all of the details associated with a specific bulk send list that belongs to the current user.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
- */
+ * Gets a specific bulk send list.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
+ *
+ * This method returns all of the details associated with a specific bulk send list that belongs to the current user.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
+ */
pub async fn v_2crud_get_list_bulk_send(
&self,
account_id: &str,
bulk_send_list_id: &str,
- ) -> Result<crate::types::BulkSendingList> {
+ ) -> ClientResult<crate::types::BulkSendingList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_list_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_list_id.to_string()),
),
None,
);
@@ -280,28 +282,28 @@ impl BulkSend {
.await
}
/**
- * Updates a bulk send list.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
- *
- * This method replaces the definition of an existing bulk send list.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
- */
+ * Updates a bulk send list.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
+ *
+ * This method replaces the definition of an existing bulk send list.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
+ */
pub async fn v_2crud_put_list(
&self,
account_id: &str,
bulk_send_list_id: &str,
body: &crate::types::BulkSendingList,
- ) -> Result<crate::types::BulkSendingList> {
+ ) -> ClientResult<crate::types::BulkSendingList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_list_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_list_id.to_string()),
),
None,
);
@@ -316,27 +318,27 @@ impl BulkSend {
.await
}
/**
- * Deletes a bulk send list.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
- *
- * This method deletes a bulk send list.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
- */
+ * Deletes a bulk send list.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}` endpoint.
+ *
+ * This method deletes a bulk send list.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
+ */
pub async fn v_2crud_delete_list(
&self,
account_id: &str,
bulk_send_list_id: &str,
- ) -> Result<crate::types::BulkSendingListSummaries> {
+ ) -> ClientResult<crate::types::BulkSendingListSummaries> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_list_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_list_id.to_string()),
),
None,
);
@@ -351,65 +353,65 @@ impl BulkSend {
.await
}
/**
- * Creates a bulk send request.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send` endpoint.
- *
- * This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template.
- *
- * Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview].
- *
- * If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message.
- *
- * **Note**: Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing.
- *
- * This method returns the following errors:
- *
- * | Error code | Description |
- * | :--------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- * | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. |
- * | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. |
- * | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. |
- * | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. |
- * | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. |
- * | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later." .Try again later, or contact DocuSign Support to request a higher tier. |
- * | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. |
- * | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. |
- * | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. |
- * | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. |
- * | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. |
- * | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. |
- * | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. |
- * | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. |
- * | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. |
- * | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. |
- * | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. |
- * | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. |
- * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. |
- * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. |
- *
- * [create_list]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendList
- * [create_test]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendTestRequest
- * [BulkSendOverview]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
- */
+ * Creates a bulk send request.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send` endpoint.
+ *
+ * This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template.
+ *
+ * Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview].
+ *
+ * If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message.
+ *
+ * **Note**: Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing.
+ *
+ * This method returns the following errors:
+ *
+ * | Error code | Description |
+ * | :--------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ * | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. |
+ * | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. |
+ * | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. |
+ * | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. |
+ * | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. |
+ * | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later." .Try again later, or contact DocuSign Support to request a higher tier. |
+ * | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. |
+ * | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. |
+ * | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. |
+ * | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. |
+ * | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. |
+ * | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. |
+ * | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. |
+ * | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. |
+ * | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. |
+ * | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. |
+ * | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. |
+ * | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. |
+ * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. |
+ * | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. |
+ *
+ * [create_list]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendList
+ * [create_test]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendTestRequest
+ * [BulkSendOverview]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
+ */
pub async fn post_request(
&self,
account_id: &str,
bulk_send_list_id: &str,
body: &crate::types::BulkSendRequest,
- ) -> Result<crate::types::BulkSendResponse> {
+ ) -> ClientResult<crate::types::BulkSendResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists/{}/send",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_list_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_list_id.to_string()),
),
None,
);
@@ -424,65 +426,65 @@ impl BulkSend {
.await
}
/**
- * Creates a bulk send test.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test` endpoint.
- *
- * This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first.
- *
- * A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred.
- *
- * If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method.
- *
- * ## Envelope Compatibility Checks
- *
- * This section describes the envelope compatibility checks that the system performs.
- *
- * **Top-Level Issues**
- *
- * - Envelopes must be in a sendable state.
- * - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account.
- * - The envelope must not be null and must be visible to the current user.
- * - The account cannot have more queued envelopes than the maximum number configured for the account.
- * - The bulk send list must exist.
- *
- * **Recipients**
- *
- * - The envelope must have recipients.
- * - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs.
- * - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send
- * functionality).
- *
- * **Recipient Tabs**
- *
- * - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope.
- *
- * **Custom Fields**
- *
- * - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the
- * envelope definition. You do not have to match the recipient-level custom fields.
- *
- * [BulkSendRequest]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendRequest
- *
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
- */
+ * Creates a bulk send test.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test` endpoint.
+ *
+ * This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first.
+ *
+ * A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred.
+ *
+ * If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method.
+ *
+ * ## Envelope Compatibility Checks
+ *
+ * This section describes the envelope compatibility checks that the system performs.
+ *
+ * **Top-Level Issues**
+ *
+ * - Envelopes must be in a sendable state.
+ * - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account.
+ * - The envelope must not be null and must be visible to the current user.
+ * - The account cannot have more queued envelopes than the maximum number configured for the account.
+ * - The bulk send list must exist.
+ *
+ * **Recipients**
+ *
+ * - The envelope must have recipients.
+ * - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs.
+ * - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send
+ * functionality).
+ *
+ * **Recipient Tabs**
+ *
+ * - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope.
+ *
+ * **Custom Fields**
+ *
+ * - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the
+ * envelope definition. You do not have to match the recipient-level custom fields.
+ *
+ * [BulkSendRequest]: https://developers.docusign.com/docs/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendRequest
+ *
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `bulk_send_list_id: &str` -- The GUID of the bulk send list. This property is created after you post a new bulk send list.
+ */
pub async fn test_post_request(
&self,
account_id: &str,
bulk_send_list_id: &str,
body: &crate::types::BulkSendRequest,
- ) -> Result<crate::types::BulkSendTestResponse> {
+ ) -> ClientResult<crate::types::BulkSendTestResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/bulk_send_lists/{}/test",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(bulk_send_list_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&bulk_send_list_id.to_string()),
),
None,
);
diff --git a/docusign/src/chunked_uploads.rs b/docusign/src/chunked_uploads.rs
index 96eae22..78d8fcf 100644
--- a/docusign/src/chunked_uploads.rs
+++ b/docusign/src/chunked_uploads.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ChunkedUploads {
pub client: Client,
@@ -13,25 +15,25 @@ impl ChunkedUploads {
}
/**
- * Initiate a new chunked upload.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/chunked_uploads` endpoint.
- *
- * This method initiates a new chunked upload with the first part of the content.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Initiate a new chunked upload.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/chunked_uploads` endpoint.
+ *
+ * This method initiates a new chunked upload with the first part of the content.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::ChunkedUploadRequest,
- ) -> Result<crate::types::ChunkedUploadResponse> {
+ ) -> ClientResult<crate::types::ChunkedUploadResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/chunked_uploads",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -46,26 +48,26 @@ impl ChunkedUploads {
.await
}
/**
- * Retrieves metadata about a chunked upload.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
- *
- * Returns the details (but not the content) about a chunked upload.
- *
- * **Note**: You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- (Optional) This parameter enables you to include additional attribute data in the response. The valid value for this method is `checksum`, which returns an SHA256 checksum of the content of the chunked upload in the response. You can use compare this checksum against your own checksum of the original content to verify that there are no missing parts before you attempt to commit the chunked upload.
- */
+ * Retrieves metadata about a chunked upload.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
+ *
+ * Returns the details (but not the content) about a chunked upload.
+ *
+ * **Note**: You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- (Optional) This parameter enables you to include additional attribute data in the response. The valid value for this method is `checksum`, which returns an SHA256 checksum of the content of the chunked upload in the response. You can use compare this checksum against your own checksum of the original content to verify that there are no missing parts before you attempt to commit the chunked upload.
+ */
pub async fn get_upload(
&self,
account_id: &str,
chunked_upload_id: &str,
include: &str,
- ) -> Result<crate::types::ChunkedUploadResponse> {
+ ) -> ClientResult<crate::types::ChunkedUploadResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -74,8 +76,8 @@ impl ChunkedUploads {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/chunked_uploads/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(chunked_upload_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&chunked_upload_id.to_string()),
query_
),
None,
@@ -91,28 +93,28 @@ impl ChunkedUploads {
.await
}
/**
- * Commit a chunked upload.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
- *
- * This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls.
- *
- * If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method.
- *
- * **Note**: After you commit a chunked upload, it no longer accepts additional parts.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `action: &str` -- (Required) You must use this query parameter with the value `commit`, which affirms the request to validate and prepare the chunked upload for use with other API calls.
- */
+ * Commit a chunked upload.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
+ *
+ * This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls.
+ *
+ * If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method.
+ *
+ * **Note**: After you commit a chunked upload, it no longer accepts additional parts.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `action: &str` -- (Required) You must use this query parameter with the value `commit`, which affirms the request to validate and prepare the chunked upload for use with other API calls.
+ */
pub async fn put(
&self,
account_id: &str,
chunked_upload_id: &str,
action: &str,
- ) -> Result<crate::types::ChunkedUploadResponse> {
+ ) -> ClientResult<crate::types::ChunkedUploadResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !action.is_empty() {
query_args.push(("action".to_string(), action.to_string()));
@@ -121,8 +123,8 @@ impl ChunkedUploads {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/chunked_uploads/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(chunked_upload_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&chunked_upload_id.to_string()),
query_
),
None,
@@ -138,35 +140,35 @@ impl ChunkedUploads {
.await
}
/**
- * Deletes a chunked upload.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
- *
- * Deletes a chunked upload that has been committed but not yet consumed.
- *
- * This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically:
- *
- *
- * - Chunked uploads that have been consumed by use in another API call.
- * - Expired chunked uploads.
- *
- * **Note**: If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a chunked upload.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}` endpoint.
+ *
+ * Deletes a chunked upload that has been committed but not yet consumed.
+ *
+ * This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically:
+ *
+ *
+ * - Chunked uploads that have been consumed by use in another API call.
+ * - Expired chunked uploads.
+ *
+ * **Note**: If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete_upload(
&self,
account_id: &str,
chunked_upload_id: &str,
- ) -> Result<crate::types::ChunkedUploadResponse> {
+ ) -> ClientResult<crate::types::ChunkedUploadResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/chunked_uploads/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(chunked_upload_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&chunked_upload_id.to_string()),
),
None,
);
@@ -181,47 +183,47 @@ impl ChunkedUploads {
.await
}
/**
- * Add a chunk to an existing chunked upload.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}` endpoint.
- *
- * Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part,
- * use this method to upload subsequent parts.
- *
- * For simplicity, we recommend that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, we recommend that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign.
- *
- * Example:
- *
- *
- * ```
- * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1
- * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2
- * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3
- * ```
- *
- * **Note**: You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `chunked_upload_part_seq: &str` -- The sequence or order of the part in the chunked upload. By default, the sequence of the first part that is uploaded as part of the Create request is `0`.
- *
- * **Note**: You can add parts out of order. However, the chunked upload must consist of a contiguous series of one or more parts before you can successfully commit it.
- */
+ * Add a chunk to an existing chunked upload.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}` endpoint.
+ *
+ * Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part,
+ * use this method to upload subsequent parts.
+ *
+ * For simplicity, we recommend that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, we recommend that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign.
+ *
+ * Example:
+ *
+ *
+ * ```
+ * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1
+ * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2
+ * PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3
+ * ```
+ *
+ * **Note**: You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `chunked_upload_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `chunked_upload_part_seq: &str` -- The sequence or order of the part in the chunked upload. By default, the sequence of the first part that is uploaded as part of the Create request is `0`.
+ *
+ * **Note**: You can add parts out of order. However, the chunked upload must consist of a contiguous series of one or more parts before you can successfully commit it.
+ */
pub async fn put_upload_part(
&self,
account_id: &str,
chunked_upload_id: &str,
chunked_upload_part_seq: &str,
body: &crate::types::ChunkedUploadRequest,
- ) -> Result<crate::types::ChunkedUploadResponse> {
+ ) -> ClientResult<crate::types::ChunkedUploadResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/chunked_uploads/{}/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(chunked_upload_id),
- crate::progenitor_support::encode_path(chunked_upload_part_seq),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&chunked_upload_id.to_string()),
+ crate::progenitor_support::encode_path(&chunked_upload_part_seq.to_string()),
),
None,
);
diff --git a/docusign/src/cloud_storage.rs b/docusign/src/cloud_storage.rs
index 1e5a431..2d71136 100644
--- a/docusign/src/cloud_storage.rs
+++ b/docusign/src/cloud_storage.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct CloudStorage {
pub client: Client,
@@ -13,40 +15,40 @@ impl CloudStorage {
}
/**
- * Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders` endpoint.
- *
- * Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `service_id: &str` -- The ID of the service to access.
- *
- * Valid values are the service name ("Box") or the numerical serviceId ("4136").
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- * * `cloud_storage_folder_path: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- An optional value that sets how many items are included in the response.
- *
- * The default setting for this is 25.
- * * `order: &str` -- (Optional) The order in which to sort the results.
- *
- * Valid values are:
- *
- *
- * * `asc`: Ascending order.
- * * `desc`: Descending order.
- * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
- *
- * Valid values are:
- *
- * * `modified`
- * * `name`.
- * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0. .
- */
+ * Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders` endpoint.
+ *
+ * Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `service_id: &str` -- The ID of the service to access.
+ *
+ * Valid values are the service name ("Box") or the numerical serviceId ("4136").
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ * * `cloud_storage_folder_path: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- An optional value that sets how many items are included in the response.
+ *
+ * The default setting for this is 25.
+ * * `order: &str` -- (Optional) The order in which to sort the results.
+ *
+ * Valid values are:
+ *
+ *
+ * * `asc`: Ascending order.
+ * * `desc`: Descending order.
+ * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
+ *
+ * Valid values are:
+ *
+ * * `modified`
+ * * `name`.
+ * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0. .
+ */
pub async fn folder_get_all(
&self,
account_id: &str,
@@ -58,7 +60,7 @@ impl CloudStorage {
order_by: &str,
search_text: &str,
start_position: &str,
- ) -> Result<crate::types::ExternalFolder> {
+ ) -> ClientResult<crate::types::ExternalFolder> {
let mut query_args: Vec<(String, String)> = Default::default();
if !cloud_storage_folder_path.is_empty() {
query_args.push((
@@ -85,9 +87,9 @@ impl CloudStorage {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage/{}/folders?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
- crate::progenitor_support::encode_path(service_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
+ crate::progenitor_support::encode_path(&service_id.to_string()),
query_
),
None,
@@ -103,44 +105,44 @@ impl CloudStorage {
.await
}
/**
- * Gets a list of items from a cloud storage provider.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}` endpoint.
- *
- * Retrieves a list of the user's items from the specified cloud storage provider.
- *
- * To limit the scope of the items returned, provide a comma-separated list of folder ids in the request.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `service_id: &str` -- The ID of the service to access.
- *
- * Valid values are the service name ("Box") or the numerical serviceId ("4136").
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- * * `cloud_storage_folder_path: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `cloud_storage_folderid_plain: &str` -- A plain-text folder id that you can use as an alternative to the existing folder id. This property is mainly used for rooms. Enter multiple folder ids as a comma-separated list.
- * * `count: &str` -- An optional value that sets how many items are included in the response.
- *
- * The default setting for this is 25.
- * * `order: &str` -- (Optional) The order in which to sort the results.
- *
- * Valid values are:
- *
- *
- * * `asc`: Ascending order.
- * * `desc`: Descending order.
- * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
- *
- * Valid values are:
- *
- * * `modified`
- * * `name`.
- * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The starting index position in the result set from which to start returning values. The default setting is `0`.
- */
+ * Gets a list of items from a cloud storage provider.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}` endpoint.
+ *
+ * Retrieves a list of the user's items from the specified cloud storage provider.
+ *
+ * To limit the scope of the items returned, provide a comma-separated list of folder ids in the request.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `service_id: &str` -- The ID of the service to access.
+ *
+ * Valid values are the service name ("Box") or the numerical serviceId ("4136").
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ * * `cloud_storage_folder_path: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `cloud_storage_folderid_plain: &str` -- A plain-text folder id that you can use as an alternative to the existing folder id. This property is mainly used for rooms. Enter multiple folder ids as a comma-separated list.
+ * * `count: &str` -- An optional value that sets how many items are included in the response.
+ *
+ * The default setting for this is 25.
+ * * `order: &str` -- (Optional) The order in which to sort the results.
+ *
+ * Valid values are:
+ *
+ *
+ * * `asc`: Ascending order.
+ * * `desc`: Descending order.
+ * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
+ *
+ * Valid values are:
+ *
+ * * `modified`
+ * * `name`.
+ * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The starting index position in the result set from which to start returning values. The default setting is `0`.
+ */
pub async fn folder_get(
&self,
account_id: &str,
@@ -154,7 +156,7 @@ impl CloudStorage {
order_by: &str,
search_text: &str,
start_position: &str,
- ) -> Result<crate::types::ExternalFolder> {
+ ) -> ClientResult<crate::types::ExternalFolder> {
let mut query_args: Vec<(String, String)> = Default::default();
if !cloud_storage_folder_path.is_empty() {
query_args.push((
@@ -187,10 +189,10 @@ impl CloudStorage {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage/{}/folders/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
- crate::progenitor_support::encode_path(service_id),
- crate::progenitor_support::encode_path(folder_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
+ crate::progenitor_support::encode_path(&service_id.to_string()),
+ crate::progenitor_support::encode_path(&folder_id.to_string()),
query_
),
None,
diff --git a/docusign/src/cloud_storage_providers.rs b/docusign/src/cloud_storage_providers.rs
index e8af0d3..aee4173 100644
--- a/docusign/src/cloud_storage_providers.rs
+++ b/docusign/src/cloud_storage_providers.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct CloudStorageProviders {
pub client: Client,
@@ -13,29 +15,29 @@ impl CloudStorageProviders {
}
/**
- * Get the Cloud Storage Provider configuration for the specified user.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
- *
- * Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- * * `redirect_url: &str` -- The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.
- *
- * The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
- * .
- */
+ * Get the Cloud Storage Provider configuration for the specified user.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
+ *
+ * Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ * * `redirect_url: &str` -- The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.
+ *
+ * The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
+ * .
+ */
pub async fn cloud_storage_get_provider(
&self,
account_id: &str,
user_id: &str,
redirect_url: &str,
- ) -> Result<crate::types::CloudStorageProvidersData> {
+ ) -> ClientResult<crate::types::CloudStorageProvidersData> {
let mut query_args: Vec<(String, String)> = Default::default();
if !redirect_url.is_empty() {
query_args.push(("redirectUrl".to_string(), redirect_url.to_string()));
@@ -44,8 +46,8 @@ impl CloudStorageProviders {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
query_
),
None,
@@ -61,29 +63,29 @@ impl CloudStorageProviders {
.await
}
/**
- * Configures the redirect URL information for one or more cloud storage providers for the specified user.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
- *
- * Configures the redirect URL information for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- */
+ * Configures the redirect URL information for one or more cloud storage providers for the specified user.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
+ *
+ * Configures the redirect URL information for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ */
pub async fn cloud_storage_post(
&self,
account_id: &str,
user_id: &str,
body: &crate::types::CloudStorageProvidersData,
- ) -> Result<crate::types::CloudStorageProvidersData> {
+ ) -> ClientResult<crate::types::CloudStorageProvidersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
),
None,
);
@@ -98,29 +100,29 @@ impl CloudStorageProviders {
.await
}
/**
- * Deletes the user authentication information for one or more cloud storage providers.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
- *
- * Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- */
+ * Deletes the user authentication information for one or more cloud storage providers.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage` endpoint.
+ *
+ * Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ */
pub async fn cloud_storage_delete_providers(
&self,
account_id: &str,
user_id: &str,
body: &crate::types::CloudStorageProvidersData,
- ) -> Result<crate::types::CloudStorageProvidersData> {
+ ) -> ClientResult<crate::types::CloudStorageProvidersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
),
None,
);
@@ -135,32 +137,32 @@ impl CloudStorageProviders {
.await
}
/**
- * Gets the specified Cloud Storage Provider configuration for the User.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}` endpoint.
- *
- * Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `service_id: &str` -- The ID of the service to access.
- *
- * Valid values are the service name ("Box") or the numerical serviceId ("4136").
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- * * `redirect_url: &str` -- The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.
- *
- * The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
- * .
- */
+ * Gets the specified Cloud Storage Provider configuration for the User.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}` endpoint.
+ *
+ * Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `service_id: &str` -- The ID of the service to access.
+ *
+ * Valid values are the service name ("Box") or the numerical serviceId ("4136").
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ * * `redirect_url: &str` -- The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.
+ *
+ * The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
+ * .
+ */
pub async fn cloud_storage_get(
&self,
account_id: &str,
service_id: &str,
user_id: &str,
redirect_url: &str,
- ) -> Result<crate::types::CloudStorageProvidersData> {
+ ) -> ClientResult<crate::types::CloudStorageProvidersData> {
let mut query_args: Vec<(String, String)> = Default::default();
if !redirect_url.is_empty() {
query_args.push(("redirectUrl".to_string(), redirect_url.to_string()));
@@ -169,9 +171,9 @@ impl CloudStorageProviders {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
- crate::progenitor_support::encode_path(service_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
+ crate::progenitor_support::encode_path(&service_id.to_string()),
query_
),
None,
@@ -187,33 +189,33 @@ impl CloudStorageProviders {
.await
}
/**
- * Deletes the user authentication information for the specified cloud storage provider.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}` endpoint.
- *
- * Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `service_id: &str` -- The ID of the service to access.
- *
- * Valid values are the service name ("Box") or the numerical serviceId ("4136").
- * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
- * .
- */
+ * Deletes the user authentication information for the specified cloud storage provider.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}` endpoint.
+ *
+ * Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `service_id: &str` -- The ID of the service to access.
+ *
+ * Valid values are the service name ("Box") or the numerical serviceId ("4136").
+ * * `user_id: &str` -- The ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, `userId` can represent another user whom the Administrator is accessing.
+ * .
+ */
pub async fn cloud_storage_delete(
&self,
account_id: &str,
service_id: &str,
user_id: &str,
- ) -> Result<crate::types::CloudStorageProvidersData> {
+ ) -> ClientResult<crate::types::CloudStorageProvidersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/users/{}/cloud_storage/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(user_id),
- crate::progenitor_support::encode_path(service_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&user_id.to_string()),
+ crate::progenitor_support::encode_path(&service_id.to_string()),
),
None,
);
diff --git a/docusign/src/comments.rs b/docusign/src/comments.rs
index ddfe2ab..9eab652 100644
--- a/docusign/src/comments.rs
+++ b/docusign/src/comments.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Comments {
pub client: Client,
@@ -13,26 +15,26 @@ impl Comments {
}
/**
- * Gets a PDF transcript of all of the comments in an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments/transcript` endpoint.
- *
- * Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope.
- *
- * **Note**: Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a PDF transcript of all of the comments in an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments/transcript` endpoint.
+ *
+ * Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope.
+ *
+ * **Note**: Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_transcript(
&self,
account_id: &str,
envelope_id: &str,
encoding: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !encoding.is_empty() {
query_args.push(("encoding".to_string(), encoding.to_string()));
@@ -41,8 +43,8 @@ impl Comments {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/comments/transcript?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
diff --git a/docusign/src/connect_configurations.rs b/docusign/src/connect_configurations.rs
index 77dfdb2..3f3c356 100644
--- a/docusign/src/connect_configurations.rs
+++ b/docusign/src/connect_configurations.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ConnectConfigurations {
pub client: Client,
@@ -13,26 +15,26 @@ impl ConnectConfigurations {
}
/**
- * Get Connect Configuration Information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect` endpoint.
- *
- * Retrieves all the DocuSign Custom Connect definitions for the specified account.
- *
- * **Note**: Connect must be enabled for your account to use this function. This does not retrieve information for Connect configurations for Box, eOriginal, or Salesforce.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Get Connect Configuration Information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect` endpoint.
+ *
+ * Retrieves all the DocuSign Custom Connect definitions for the specified account.
+ *
+ * **Note**: Connect must be enabled for your account to use this function. This does not retrieve information for Connect configurations for Box, eOriginal, or Salesforce.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_get_config(
&self,
account_id: &str,
- ) -> Result<crate::types::ConnectConfigResults> {
+ ) -> ClientResult<crate::types::ConnectConfigResults> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -47,27 +49,27 @@ impl ConnectConfigurations {
.await
}
/**
- * Updates a specified Connect configuration.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect` endpoint.
- *
- * Updates the specified DocuSign Connect configuration in your account.
- *
- * **Note**: Connect must be enabled for your account to use this function. This cannot be used to update Connect configurations for Box, eOriginal, or Salesforce.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates a specified Connect configuration.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect` endpoint.
+ *
+ * Updates the specified DocuSign Connect configuration in your account.
+ *
+ * **Note**: Connect must be enabled for your account to use this function. This cannot be used to update Connect configurations for Box, eOriginal, or Salesforce.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_put_configuration(
&self,
account_id: &str,
body: &crate::types::ConnectCustomConfiguration,
- ) -> Result<crate::types::ConnectCustomConfiguration> {
+ ) -> ClientResult<crate::types::ConnectCustomConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -82,28 +84,28 @@ impl ConnectConfigurations {
.await
}
/**
- * Creates a connect configuration for the specified account.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/connect` endpoint.
- *
- * Creates a DocuSign Custom Connect definition for your account. DocuSign Connect enables the sending of real-time data updates to external applications. These updates are generated by user transactions as the envelope progresses through actions to completion. The Connect Service provides updated information about the status of these transactions and returns updates that include the actual content of document form fields. Be aware that, these updates might or might not include the document itself. For more information about Connect, see the [DocuSign Connect](https://developers.docusign.com/esign-rest-api/guides/connect).
- *
- * **Note**: Connect must be enabled for your account to use this function. This cannot be used to set up Connect configurations for Salesforce or eOriginal.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a connect configuration for the specified account.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/connect` endpoint.
+ *
+ * Creates a DocuSign Custom Connect definition for your account. DocuSign Connect enables the sending of real-time data updates to external applications. These updates are generated by user transactions as the envelope progresses through actions to completion. The Connect Service provides updated information about the status of these transactions and returns updates that include the actual content of document form fields. Be aware that, these updates might or might not include the document itself. For more information about Connect, see the [DocuSign Connect](https://developers.docusign.com/esign-rest-api/guides/connect).
+ *
+ * **Note**: Connect must be enabled for your account to use this function. This cannot be used to set up Connect configurations for Salesforce or eOriginal.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_post_configuration(
&self,
account_id: &str,
body: &crate::types::ConnectCustomConfiguration,
- ) -> Result<crate::types::ConnectCustomConfiguration> {
+ ) -> ClientResult<crate::types::ConnectCustomConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -118,30 +120,30 @@ impl ConnectConfigurations {
.await
}
/**
- * Gets the details about a Connect configuration.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/{connectId}` endpoint.
- *
- * Retrieves the information for the specified DocuSign Connect configuration.
- *
- * **Note**: Connect must be enabled for your account to use this function.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the details about a Connect configuration.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/{connectId}` endpoint.
+ *
+ * Retrieves the information for the specified DocuSign Connect configuration.
+ *
+ * **Note**: Connect must be enabled for your account to use this function.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_get_config_connect_configurations(
&self,
account_id: &str,
connect_id: &str,
- ) -> Result<crate::types::ConnectConfigResults> {
+ ) -> ClientResult<crate::types::ConnectConfigResults> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(connect_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&connect_id.to_string()),
),
None,
);
@@ -156,28 +158,32 @@ impl ConnectConfigurations {
.await
}
/**
- * Deletes the specified connect configuration.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/{connectId}` endpoint.
- *
- * Deletes the specified DocuSign Connect configuration.
- *
- * **Note**: Connect must be enabled for your account to use this function.
- *
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn connect_delete_config(&self, account_id: &str, connect_id: &str) -> Result<()> {
+ * Deletes the specified connect configuration.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/{connectId}` endpoint.
+ *
+ * Deletes the specified DocuSign Connect configuration.
+ *
+ * **Note**: Connect must be enabled for your account to use this function.
+ *
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn connect_delete_config(
+ &self,
+ account_id: &str,
+ connect_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(connect_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&connect_id.to_string()),
),
None,
);
@@ -192,34 +198,34 @@ impl ConnectConfigurations {
.await
}
/**
- * Returns users from the configured Connect service.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/{connectId}/users` endpoint.
- *
- * Returns users from the configured Connect service.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `email_substring: &str` -- Filters returned user records by full email address or a substring of email address.
- * * `list_included_users: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
- * * `status: &str` -- Filters the results by user status.
- * You can specify a comma-separated
- * list of the following statuses:
- *
- * * ActivationRequired
- * * ActivationSent
- * * Active
- * * Closed
- * * Disabled
- * .
- * * `user_name_substring: &str` -- Filters results based on a full or partial user name.
- *
- * **Note**: When you enter a partial user name, you do not use a wildcard character.
- */
+ * Returns users from the configured Connect service.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/{connectId}/users` endpoint.
+ *
+ * Returns users from the configured Connect service.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `connect_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `email_substring: &str` -- Filters returned user records by full email address or a substring of email address.
+ * * `list_included_users: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
+ * * `status: &str` -- Filters the results by user status.
+ * You can specify a comma-separated
+ * list of the following statuses:
+ *
+ * * ActivationRequired
+ * * ActivationSent
+ * * Active
+ * * Closed
+ * * Disabled
+ * .
+ * * `user_name_substring: &str` -- Filters results based on a full or partial user name.
+ *
+ * **Note**: When you enter a partial user name, you do not use a wildcard character.
+ */
pub async fn connect_get_user(
&self,
account_id: &str,
@@ -230,7 +236,7 @@ impl ConnectConfigurations {
start_position: &str,
status: &str,
user_name_substring: &str,
- ) -> Result<crate::types::IntegratedUserInfoList> {
+ ) -> ClientResult<crate::types::IntegratedUserInfoList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -260,8 +266,8 @@ impl ConnectConfigurations {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/{}/users?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(connect_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&connect_id.to_string()),
query_
),
None,
diff --git a/docusign/src/connect_events.rs b/docusign/src/connect_events.rs
index 3a9bf9b..43fde69 100644
--- a/docusign/src/connect_events.rs
+++ b/docusign/src/connect_events.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ConnectEvents {
pub client: Client,
@@ -13,26 +15,26 @@ impl ConnectEvents {
}
/**
- * Republishes Connect information for multiple envelopes.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect/envelopes/retry_queue` endpoint.
- *
- * Republishes Connect information for the specified set of envelopes. The primary use is to republish Connect post failures by including envelope IDs for the envelopes that failed to post in the request. The list of envelope IDs that failed to post correctly can be retrieved by calling to [Connect::listEventLogs](https://developers.docusign.com/docs/esign-rest-api/reference/Connect/ConnectEvents/list) retrieve the failure log.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Republishes Connect information for multiple envelopes.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect/envelopes/retry_queue` endpoint.
+ *
+ * Republishes Connect information for the specified set of envelopes. The primary use is to republish Connect post failures by including envelope IDs for the envelopes that failed to post in the request. The list of envelope IDs that failed to post correctly can be retrieved by calling to [Connect::listEventLogs](https://developers.docusign.com/docs/esign-rest-api/reference/Connect/ConnectEvents/list) retrieve the failure log.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_publish_put_retry(
&self,
account_id: &str,
body: &crate::types::ConnectFailureFilter,
- ) -> Result<crate::types::ConnectFailureResults> {
+ ) -> ClientResult<crate::types::ConnectFailureResults> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/envelopes/retry_queue",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -47,27 +49,27 @@ impl ConnectEvents {
.await
}
/**
- * Republishes Connect information for the specified envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect/envelopes/{envelopeId}/retry_queue` endpoint.
- *
- * Republishes Connect information for the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Republishes Connect information for the specified envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/connect/envelopes/{envelopeId}/retry_queue` endpoint.
+ *
+ * Republishes Connect information for the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_publish_put_retry_envelope(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::ConnectFailureResults> {
+ ) -> ClientResult<crate::types::ConnectFailureResults> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/envelopes/{}/retry_queue",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -82,28 +84,28 @@ impl ConnectEvents {
.await
}
/**
- * Gets the Connect failure log information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/failures` endpoint.
- *
- * Retrieves the Connect failure log information. You can use this log to determine which envelopes failed to post, in order to create a republish request.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
- *
- * **Note**: If this property is null, no date filtering is applied.
- * * `to_date: &str` -- The end of a search date range in UTC DateTime format. When you use this parameter, only templates created up to this date and time are returned.
- *
- * **Note**: If this property is null, the value defaults to the current date.
- */
+ * Gets the Connect failure log information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/failures` endpoint.
+ *
+ * Retrieves the Connect failure log information. You can use this log to determine which envelopes failed to post, in order to create a republish request.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
+ *
+ * **Note**: If this property is null, no date filtering is applied.
+ * * `to_date: &str` -- The end of a search date range in UTC DateTime format. When you use this parameter, only templates created up to this date and time are returned.
+ *
+ * **Note**: If this property is null, the value defaults to the current date.
+ */
pub async fn connect_failures_get_log(
&self,
account_id: &str,
from_date: &str,
to_date: &str,
- ) -> Result<crate::types::ConnectLogs> {
+ ) -> ClientResult<crate::types::ConnectLogs> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -115,7 +117,7 @@ impl ConnectEvents {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/failures?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -131,27 +133,27 @@ impl ConnectEvents {
.await
}
/**
- * Deletes a Connect failure log entry.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/failures/{failureId}` endpoint.
- *
- * Deletes the Connect failure log information for the specified entry.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `failure_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a Connect failure log entry.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/failures/{failureId}` endpoint.
+ *
+ * Deletes the Connect failure log information for the specified entry.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `failure_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn connect_failures_delete_failure_log(
&self,
account_id: &str,
failure_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/failures/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(failure_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&failure_id.to_string()),
),
None,
);
@@ -166,30 +168,30 @@ impl ConnectEvents {
.await
}
/**
- * Gets the Connect log.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/logs` endpoint.
- *
- * Retrieves a list of connect log entries for your account.
- *
- * **Note**: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
- *
- * **Note**: If this property is null, no date filtering is applied.
- * * `to_date: &str` -- The end of a search date range in UTC DateTime format. When you use this parameter, only templates created up to this date and time are returned.
- *
- * **Note**: If this property is null, the value defaults to the current date.
- */
+ * Gets the Connect log.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/logs` endpoint.
+ *
+ * Retrieves a list of connect log entries for your account.
+ *
+ * **Note**: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
+ *
+ * **Note**: If this property is null, no date filtering is applied.
+ * * `to_date: &str` -- The end of a search date range in UTC DateTime format. When you use this parameter, only templates created up to this date and time are returned.
+ *
+ * **Note**: If this property is null, the value defaults to the current date.
+ */
pub async fn connect_log_get_log(
&self,
account_id: &str,
from_date: &str,
to_date: &str,
- ) -> Result<crate::types::ConnectLogs> {
+ ) -> ClientResult<crate::types::ConnectLogs> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -201,7 +203,7 @@ impl ConnectEvents {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/logs?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -217,21 +219,21 @@ impl ConnectEvents {
.await
}
/**
- * Deletes a list of Connect log entries.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/logs` endpoint.
- *
- * Deletes a list of Connect log entries for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn connect_log_delete_logs(&self, account_id: &str) -> Result<()> {
+ * Deletes a list of Connect log entries.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/logs` endpoint.
+ *
+ * Deletes a list of Connect log entries for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn connect_log_delete_logs(&self, account_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/logs",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -246,26 +248,26 @@ impl ConnectEvents {
.await
}
/**
- * Gets a Connect log entry.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/logs/{logId}` endpoint.
- *
- * Retrieves the specified Connect log entry for your account.
- *
- * **Note**: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `additional_info: &str` -- When set to **true**, the response includes the `connectDebugLog` information.
- */
+ * Gets a Connect log entry.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/connect/logs/{logId}` endpoint.
+ *
+ * Retrieves the specified Connect log entry for your account.
+ *
+ * **Note**: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `additional_info: &str` -- When set to **true**, the response includes the `connectDebugLog` information.
+ */
pub async fn connect_log_get(
&self,
account_id: &str,
log_id: &str,
additional_info: &str,
- ) -> Result<crate::types::ConnectLog> {
+ ) -> ClientResult<crate::types::ConnectLog> {
let mut query_args: Vec<(String, String)> = Default::default();
if !additional_info.is_empty() {
query_args.push(("additional_info".to_string(), additional_info.to_string()));
@@ -274,8 +276,8 @@ impl ConnectEvents {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/logs/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(log_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&log_id.to_string()),
query_
),
None,
@@ -291,24 +293,24 @@ impl ConnectEvents {
.await
}
/**
- * Deletes a specified Connect log entry.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/logs/{logId}` endpoint.
- *
- * Deletes a specified entry from the Connect Log.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn connect_log_delete(&self, account_id: &str, log_id: &str) -> Result<()> {
+ * Deletes a specified Connect log entry.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/logs/{logId}` endpoint.
+ *
+ * Deletes a specified entry from the Connect Log.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn connect_log_delete(&self, account_id: &str, log_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/logs/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(log_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&log_id.to_string()),
),
None,
);
diff --git a/docusign/src/connect_secret.rs b/docusign/src/connect_secret.rs
index 313f523..a3480b8 100644
--- a/docusign/src/connect_secret.rs
+++ b/docusign/src/connect_secret.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ConnectSecret {
pub client: Client,
@@ -13,23 +15,27 @@ impl ConnectSecret {
}
/**
- * Deletes the connect HMAC Secret for specified account.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/secret/{keyId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `key_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn connect_hmac_delete_secret(&self, account_id: &str, key_id: &str) -> Result<()> {
+ * Deletes the connect HMAC Secret for specified account.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/connect/secret/{keyId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `key_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn connect_hmac_delete_secret(
+ &self,
+ account_id: &str,
+ key_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/connect/secret/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(key_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&key_id.to_string()),
),
None,
);
diff --git a/docusign/src/contacts.rs b/docusign/src/contacts.rs
index e28ee25..2dd6468 100644
--- a/docusign/src/contacts.rs
+++ b/docusign/src/contacts.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Contacts {
pub client: Client,
@@ -13,25 +15,25 @@ impl Contacts {
}
/**
- * Updates one or more contacts.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
- *
- * This method updates one or more contacts associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates one or more contacts.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
+ *
+ * This method updates one or more contacts associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::ContactModRequest,
- ) -> Result<crate::types::ContactUpdateResponse> {
+ ) -> ClientResult<crate::types::ContactUpdateResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/contacts",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -46,27 +48,27 @@ impl Contacts {
.await
}
/**
- * Imports new contacts into a contacts list.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
- *
- * This method imports multiple new contacts into a contact list from a CSV, JSON, or XML file.
- *
- * To use this method, you must provide a request body in one of the supported formats and include a `content-type` header with the appropriate value.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Imports new contacts into a contacts list.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
+ *
+ * This method imports multiple new contacts into a contact list from a CSV, JSON, or XML file.
+ *
+ * To use this method, you must provide a request body in one of the supported formats and include a `content-type` header with the appropriate value.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::ContactModRequest,
- ) -> Result<crate::types::ContactUpdateResponse> {
+ ) -> ClientResult<crate::types::ContactUpdateResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/contacts",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -81,25 +83,25 @@ impl Contacts {
.await
}
/**
- * Deletes multiple contacts from an account.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
- *
- * This method deletes multiple contacts associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes multiple contacts from an account.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/contacts` endpoint.
+ *
+ * This method deletes multiple contacts associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete(
&self,
account_id: &str,
body: &crate::types::ContactModRequest,
- ) -> Result<crate::types::ContactUpdateResponse> {
+ ) -> ClientResult<crate::types::ContactUpdateResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/contacts",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -114,38 +116,38 @@ impl Contacts {
.await
}
/**
- * Gets one or more contacts.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/contacts/{contactId}` endpoint.
- *
- * This method returns one or more contacts
- * associated with a DocuSign account. You can also
- * retrieve contacts from connected [cloud storage][CloudStorage] providers by using the
- * `cloud_provider` query parameter. By default,
- * contacts are retrieved from the DocuSign account's
- * default address book.
- *
- * To return a specific contact, use the `contactId`
- * query parameter. To return all contacts associated
- * with an account, omit this parameter.
- *
- * [CloudStorage]: https://developers.docusign.com/docs/esign-rest-api/reference/CloudStorage
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `contact_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `cloud_provider: &str` -- (Optional) The cloud provider from which to retrieve the contacts. Valid values are:
- *
- * - `rooms`
- * - `docusignCore` (default).
- */
+ * Gets one or more contacts.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/contacts/{contactId}` endpoint.
+ *
+ * This method returns one or more contacts
+ * associated with a DocuSign account. You can also
+ * retrieve contacts from connected [cloud storage][CloudStorage] providers by using the
+ * `cloud_provider` query parameter. By default,
+ * contacts are retrieved from the DocuSign account's
+ * default address book.
+ *
+ * To return a specific contact, use the `contactId`
+ * query parameter. To return all contacts associated
+ * with an account, omit this parameter.
+ *
+ * [CloudStorage]: https://developers.docusign.com/docs/esign-rest-api/reference/CloudStorage
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `contact_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `cloud_provider: &str` -- (Optional) The cloud provider from which to retrieve the contacts. Valid values are:
+ *
+ * - `rooms`
+ * - `docusignCore` (default).
+ */
pub async fn get(
&self,
account_id: &str,
contact_id: &str,
cloud_provider: &str,
- ) -> Result<crate::types::ContactGetResponse> {
+ ) -> ClientResult<crate::types::ContactGetResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !cloud_provider.is_empty() {
query_args.push(("cloud_provider".to_string(), cloud_provider.to_string()));
@@ -154,8 +156,8 @@ impl Contacts {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/contacts/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(contact_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&contact_id.to_string()),
query_
),
None,
@@ -171,27 +173,27 @@ impl Contacts {
.await
}
/**
- * Deletes a contact.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/contacts/{contactId}` endpoint.
- *
- * This method deletes a contact associated with an account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `contact_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a contact.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/contacts/{contactId}` endpoint.
+ *
+ * This method deletes a contact associated with an account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `contact_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete_contacts(
&self,
account_id: &str,
contact_id: &str,
- ) -> Result<crate::types::ContactUpdateResponse> {
+ ) -> ClientResult<crate::types::ContactUpdateResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/contacts/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(contact_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&contact_id.to_string()),
),
None,
);
diff --git a/docusign/src/custom_tabs.rs b/docusign/src/custom_tabs.rs
index f0a6255..3a4eaf9 100644
--- a/docusign/src/custom_tabs.rs
+++ b/docusign/src/custom_tabs.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct CustomTabs {
pub client: Client,
@@ -13,22 +15,22 @@ impl CustomTabs {
}
/**
- * Gets a list of all account tabs.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/tab_definitions` endpoint.
- *
- * Retrieves a list of all tabs associated with the account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `custom_tab_only: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a list of all account tabs.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/tab_definitions` endpoint.
+ *
+ * Retrieves a list of all tabs associated with the account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `custom_tab_only: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_get_tab_definition(
&self,
account_id: &str,
custom_tab_only: &str,
- ) -> Result<crate::types::TabMetadataList> {
+ ) -> ClientResult<crate::types::TabMetadataList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !custom_tab_only.is_empty() {
query_args.push(("custom_tab_only".to_string(), custom_tab_only.to_string()));
@@ -37,7 +39,7 @@ impl CustomTabs {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/tab_definitions?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -53,27 +55,27 @@ impl CustomTabs {
.await
}
/**
- * Creates a custom tab.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/tab_definitions` endpoint.
- *
- * Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.
- *
- * Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a custom tab.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/tab_definitions` endpoint.
+ *
+ * Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.
+ *
+ * Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_post_tab_definitions(
&self,
account_id: &str,
body: &crate::types::TabMetadata,
- ) -> Result<crate::types::TabMetadata> {
+ ) -> ClientResult<crate::types::TabMetadata> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/tab_definitions",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -88,27 +90,27 @@ impl CustomTabs {
.await
}
/**
- * Gets custom tab information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/tab_definitions/{customTabId}` endpoint.
- *
- * Retrieves information about the requested custom tab on the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `custom_tab_id: &str` -- The DocuSign-generated custom tab id for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
- */
+ * Gets custom tab information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/tab_definitions/{customTabId}` endpoint.
+ *
+ * Retrieves information about the requested custom tab on the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `custom_tab_id: &str` -- The DocuSign-generated custom tab id for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
+ */
pub async fn tab_get_custom(
&self,
account_id: &str,
custom_tab_id: &str,
- ) -> Result<crate::types::TabMetadata> {
+ ) -> ClientResult<crate::types::TabMetadata> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/tab_definitions/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(custom_tab_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&custom_tab_id.to_string()),
),
None,
);
@@ -141,12 +143,12 @@ impl CustomTabs {
account_id: &str,
custom_tab_id: &str,
body: &crate::types::TabMetadata,
- ) -> Result<crate::types::TabMetadata> {
+ ) -> ClientResult<crate::types::TabMetadata> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/tab_definitions/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(custom_tab_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&custom_tab_id.to_string()),
),
None,
);
@@ -161,23 +163,27 @@ impl CustomTabs {
.await
}
/**
- * Deletes custom tab information.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/tab_definitions/{customTabId}` endpoint.
- *
- * Deletes the custom from the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `custom_tab_id: &str` -- The DocuSign-generated custom tab id for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
- */
- pub async fn tab_delete_custom(&self, account_id: &str, custom_tab_id: &str) -> Result<()> {
+ * Deletes custom tab information.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/tab_definitions/{customTabId}` endpoint.
+ *
+ * Deletes the custom from the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `custom_tab_id: &str` -- The DocuSign-generated custom tab id for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
+ */
+ pub async fn tab_delete_custom(
+ &self,
+ account_id: &str,
+ custom_tab_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/tab_definitions/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(custom_tab_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&custom_tab_id.to_string()),
),
None,
);
diff --git a/docusign/src/document_responsive_html_preview.rs b/docusign/src/document_responsive_html_preview.rs
index 2b8a7d4..4e27e8b 100644
--- a/docusign/src/document_responsive_html_preview.rs
+++ b/docusign/src/document_responsive_html_preview.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct DocumentResponsiveHtmlPreview {
pub client: Client,
@@ -13,37 +15,37 @@ impl DocumentResponsiveHtmlPreview {
}
/**
- * Creates a preview of the responsive version of a document.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/responsive_html_preview` endpoint.
- *
- * Creates a preview of the
- * [responsive](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/responsive/)
- * HTML version of a specific document.
- * This method enables you to preview a PDF document
- * conversion to responsive HTML across device types prior to sending.
- *
- * The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a preview of the responsive version of a document.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/responsive_html_preview` endpoint.
+ *
+ * Creates a preview of the
+ * [responsive](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/responsive/)
+ * HTML version of a specific document.
+ * This method enables you to preview a PDF document
+ * conversion to responsive HTML across device types prior to sending.
+ *
+ * The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn responsive_html_post_document_preview(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::DocumentHtmlDefinition,
- ) -> Result<crate::types::DocumentHtmlDefinitions> {
+ ) -> ClientResult<crate::types::DocumentHtmlDefinitions> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/responsive_html_preview",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
diff --git a/docusign/src/e_note_configurations.rs b/docusign/src/e_note_configurations.rs
index 589ee4c..c391c58 100644
--- a/docusign/src/e_note_configurations.rs
+++ b/docusign/src/e_note_configurations.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ENoteConfigurations {
pub client: Client,
@@ -13,21 +15,21 @@ impl ENoteConfigurations {
}
/**
- * Returns the configuration information for the eNote eOriginal integration.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn get(&self, account_id: &str) -> Result<crate::types::ENoteConfiguration> {
+ * Returns the configuration information for the eNote eOriginal integration.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn get(&self, account_id: &str) -> ClientResult<crate::types::ENoteConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/enote_configuration",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -42,25 +44,25 @@ impl ENoteConfigurations {
.await
}
/**
- * Updates configuration information for the eNote eOriginal integration.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates configuration information for the eNote eOriginal integration.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::ENoteConfiguration,
- ) -> Result<crate::types::ENoteConfiguration> {
+ ) -> ClientResult<crate::types::ENoteConfiguration> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/enote_configuration",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -75,21 +77,21 @@ impl ENoteConfigurations {
.await
}
/**
- * Deletes configuration information for the eNote eOriginal integration.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete(&self, account_id: &str) -> Result<()> {
+ * Deletes configuration information for the eNote eOriginal integration.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/settings/enote_configuration` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete(&self, account_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/settings/enote_configuration",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_attachments.rs b/docusign/src/envelope_attachments.rs
index 2b2f3af..461830e 100644
--- a/docusign/src/envelope_attachments.rs
+++ b/docusign/src/envelope_attachments.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeAttachments {
pub client: Client,
@@ -13,27 +15,27 @@ impl EnvelopeAttachments {
}
/**
- * Returns a list of attachments associated with the specified envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a list of attachments associated with the specified envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn attachments_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeAttachmentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeAttachmentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/attachments",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -48,28 +50,28 @@ impl EnvelopeAttachments {
.await
}
/**
- * Add one or more attachments to a draft or in-process envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
- *
- * Supported attachment formats include: .asp, .bmp, .csv, .doc, .docm, .docx, .dot, .dotm, .dotx, .gif, .htm, .html, .jpeg, .jpg, .msg, .pdf, .png, .pot, .potx, .pps, .ppt, .pptm, .pptx, .ps, .rtf, .tif, .tiff, .txt, .wpd, .xls, .xlsm, .xlsx, .xml, and .xps. For more information about supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Add one or more attachments to a draft or in-process envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
+ *
+ * Supported attachment formats include: .asp, .bmp, .csv, .doc, .docm, .docx, .dot, .dotm, .dotx, .gif, .htm, .html, .jpeg, .jpg, .msg, .pdf, .png, .pot, .potx, .pps, .ppt, .pptm, .pptx, .ps, .rtf, .tif, .tiff, .txt, .wpd, .xls, .xlsm, .xlsx, .xml, and .xps. For more information about supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn attachments_put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeAttachmentsRequest,
- ) -> Result<crate::types::EnvelopeAttachmentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeAttachmentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/attachments",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -84,28 +86,28 @@ impl EnvelopeAttachments {
.await
}
/**
- * Delete one or more attachments from a DRAFT envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Delete one or more attachments from a DRAFT envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn attachments_delete(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeAttachmentsRequest,
- ) -> Result<crate::types::EnvelopeAttachmentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeAttachmentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/attachments",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -120,30 +122,30 @@ impl EnvelopeAttachments {
.await
}
/**
- * Retrieves an attachment from the envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `attachment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Retrieves an attachment from the envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `attachment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn attachments_get_attachment(
&self,
account_id: &str,
attachment_id: &str,
envelope_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/attachments/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(attachment_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&attachment_id.to_string()),
),
None,
);
@@ -158,31 +160,31 @@ impl EnvelopeAttachments {
.await
}
/**
- * Add an attachment to a DRAFT or IN-PROCESS envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `attachment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Add an attachment to a DRAFT or IN-PROCESS envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `attachment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn attachments_put_attachment(
&self,
account_id: &str,
attachment_id: &str,
envelope_id: &str,
body: &crate::types::Attachment,
- ) -> Result<crate::types::EnvelopeAttachmentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeAttachmentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/attachments/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(attachment_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&attachment_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_consumer_disclosures.rs b/docusign/src/envelope_consumer_disclosures.rs
index 0a47e40..853f4d1 100644
--- a/docusign/src/envelope_consumer_disclosures.rs
+++ b/docusign/src/envelope_consumer_disclosures.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeConsumerDisclosures {
pub client: Client,
@@ -13,76 +15,76 @@ impl EnvelopeConsumerDisclosures {
}
/**
- * Gets the default Electronic Record and Signature Disclosure for an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure` endpoint.
- *
- * Retrieves the default, HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope that you specify.
- *
- * This is the default ERSD disclosure that DocuSign provides for the convenience of U.S.-based customers only. This default disclosure is only valid for transactions between U.S.-based parties.
- *
- * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- */
+ * Gets the default Electronic Record and Signature Disclosure for an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure` endpoint.
+ *
+ * Retrieves the default, HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope that you specify.
+ *
+ * This is the default ERSD disclosure that DocuSign provides for the convenience of U.S.-based customers only. This default disclosure is only valid for transactions between U.S.-based parties.
+ *
+ * To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ */
pub async fn consumer_disclosure_get_envelope_recipient(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
lang_code: &str,
- ) -> Result<crate::types::ConsumerDisclosure> {
+ ) -> ClientResult<crate::types::ConsumerDisclosure> {
let mut query_args: Vec<(String, String)> = Default::default();
if !lang_code.is_empty() {
query_args.push(("langCode".to_string(), lang_code.to_string()));
@@ -91,9 +93,9 @@ impl EnvelopeConsumerDisclosures {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/consumer_disclosure?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
query_
),
None,
@@ -109,128 +111,128 @@ impl EnvelopeConsumerDisclosures {
.await
}
/**
- * Gets the Electronic Record and Signature Disclosure for a specific envelope recipient.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure/{langCode}` endpoint.
- *
- * Retrieves the HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope recipient that you specify. This disclosure might differ from the account-level disclosure, based on the signing brand applied to the envelope and the recipient's language settings.
- *
- * To set the language of the disclosure that you want to retrieve, specify the `langCode` as either a path or query parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a path parameter. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a query parameter. The following languages are supported:
- *
- * - Arabic (`ar`)
- * - Bulgarian (`bg`)
- * - Czech (`cs`)
- * - Chinese Simplified (`zh_CN`)
- * - Chinese Traditional (`zh_TW`)
- * - Croatian (`hr`)
- * - Danish (`da`)
- * - Dutch (`nl`)
- * - English US (`en`)
- * - English UK (`en_GB`)
- * - Estonian (`et`)
- * - Farsi (`fa`)
- * - Finnish (`fi`)
- * - French (`fr`)
- * - French Canadian (`fr_CA`)
- * - German (`de`)
- * - Greek (`el`)
- * - Hebrew (`he`)
- * - Hindi (`hi`)
- * - Hungarian (`hu`)
- * - Bahasa Indonesian (`id`)
- * - Italian (`it`)
- * - Japanese (`ja`)
- * - Korean (`ko`)
- * - Latvian (`lv`)
- * - Lithuanian (`lt`)
- * - Bahasa Melayu (`ms`)
- * - Norwegian (`no`)
- * - Polish (`pl`)
- * - Portuguese (`pt`)
- * - Portuguese Brazil (`pt_BR`)
- * - Romanian (`ro`)
- * - Russian (`ru`)
- * - Serbian (`sr`)
- * - Slovak (`sk`)
- * - Slovenian (`sl`)
- * - Spanish (`es`)
- * - Spanish Latin America (`es_MX`)
- * - Swedish (`sv`)
- * - Thai (`th`)
- * - Turkish (`tr`)
- * - Ukrainian (`uk`)
- * - Vietnamese (`vi`)
- *
- * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- */
+ * Gets the Electronic Record and Signature Disclosure for a specific envelope recipient.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure/{langCode}` endpoint.
+ *
+ * Retrieves the HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope recipient that you specify. This disclosure might differ from the account-level disclosure, based on the signing brand applied to the envelope and the recipient's language settings.
+ *
+ * To set the language of the disclosure that you want to retrieve, specify the `langCode` as either a path or query parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a path parameter. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ * * `lang_code: &str` -- (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a query parameter. The following languages are supported:
+ *
+ * - Arabic (`ar`)
+ * - Bulgarian (`bg`)
+ * - Czech (`cs`)
+ * - Chinese Simplified (`zh_CN`)
+ * - Chinese Traditional (`zh_TW`)
+ * - Croatian (`hr`)
+ * - Danish (`da`)
+ * - Dutch (`nl`)
+ * - English US (`en`)
+ * - English UK (`en_GB`)
+ * - Estonian (`et`)
+ * - Farsi (`fa`)
+ * - Finnish (`fi`)
+ * - French (`fr`)
+ * - French Canadian (`fr_CA`)
+ * - German (`de`)
+ * - Greek (`el`)
+ * - Hebrew (`he`)
+ * - Hindi (`hi`)
+ * - Hungarian (`hu`)
+ * - Bahasa Indonesian (`id`)
+ * - Italian (`it`)
+ * - Japanese (`ja`)
+ * - Korean (`ko`)
+ * - Latvian (`lv`)
+ * - Lithuanian (`lt`)
+ * - Bahasa Melayu (`ms`)
+ * - Norwegian (`no`)
+ * - Polish (`pl`)
+ * - Portuguese (`pt`)
+ * - Portuguese Brazil (`pt_BR`)
+ * - Romanian (`ro`)
+ * - Russian (`ru`)
+ * - Serbian (`sr`)
+ * - Slovak (`sk`)
+ * - Slovenian (`sl`)
+ * - Spanish (`es`)
+ * - Spanish Latin America (`es_MX`)
+ * - Swedish (`sv`)
+ * - Thai (`th`)
+ * - Turkish (`tr`)
+ * - Ukrainian (`uk`)
+ * - Vietnamese (`vi`)
+ *
+ * Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
+ */
pub async fn consumer_disclosure_get_envelope_recipient_lang_code(
&self,
account_id: &str,
envelope_id: &str,
lang_code: &str,
recipient_id: &str,
- ) -> Result<crate::types::ConsumerDisclosure> {
+ ) -> ClientResult<crate::types::ConsumerDisclosure> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/consumer_disclosure/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
- crate::progenitor_support::encode_path(lang_code),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
+ crate::progenitor_support::encode_path(&lang_code.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_custom_fields.rs b/docusign/src/envelope_custom_fields.rs
index bbf8af4..df8158c 100644
--- a/docusign/src/envelope_custom_fields.rs
+++ b/docusign/src/envelope_custom_fields.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeCustomFields {
pub client: Client,
@@ -13,29 +15,29 @@ impl EnvelopeCustomFields {
}
/**
- * Gets the custom field information for the specified envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
- *
- * Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients.
- *
- * There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the custom field information for the specified envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
+ *
+ * Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients.
+ *
+ * There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn custom_fields_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::CustomFieldsEnvelope> {
+ ) -> ClientResult<crate::types::CustomFieldsEnvelope> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/custom_fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -50,31 +52,31 @@ impl EnvelopeCustomFields {
.await
}
/**
- * Updates envelope custom fields in an envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
- *
- * Updates the envelope custom fields in draft and in-process envelopes.
- *
- * Each custom field used in an envelope must have a unique name.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates envelope custom fields in an envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
+ *
+ * Updates the envelope custom fields in draft and in-process envelopes.
+ *
+ * Each custom field used in an envelope must have a unique name.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn custom_fields_put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeCustomFields,
- ) -> Result<crate::types::EnvelopeCustomFields> {
+ ) -> ClientResult<crate::types::EnvelopeCustomFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/custom_fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -89,31 +91,31 @@ impl EnvelopeCustomFields {
.await
}
/**
- * Creates envelope custom fields for an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
- *
- * Updates the envelope custom fields for draft and in-process envelopes.
- *
- * You may assign up to three envelope custom fields to an envelope. This limit does not include account (document) custom fields. Each custom field used in an envelope must have a unique name.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates envelope custom fields for an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
+ *
+ * Updates the envelope custom fields for draft and in-process envelopes.
+ *
+ * You may assign up to three envelope custom fields to an envelope. This limit does not include account (document) custom fields. Each custom field used in an envelope must have a unique name.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn custom_fields_post(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeCustomFields,
- ) -> Result<crate::types::EnvelopeCustomFields> {
+ ) -> ClientResult<crate::types::EnvelopeCustomFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/custom_fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -128,28 +130,28 @@ impl EnvelopeCustomFields {
.await
}
/**
- * Deletes envelope custom fields for draft and in-process envelopes.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
- *
- * Deletes envelope custom fields for draft and in-process envelopes.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes envelope custom fields for draft and in-process envelopes.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields` endpoint.
+ *
+ * Deletes envelope custom fields for draft and in-process envelopes.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn custom_fields_delete(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeCustomFields,
- ) -> Result<crate::types::EnvelopeCustomFields> {
+ ) -> ClientResult<crate::types::EnvelopeCustomFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/custom_fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_document_fields.rs b/docusign/src/envelope_document_fields.rs
index f8dd351..e63b82a 100644
--- a/docusign/src/envelope_document_fields.rs
+++ b/docusign/src/envelope_document_fields.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeDocumentFields {
pub client: Client,
@@ -13,30 +15,30 @@ impl EnvelopeDocumentFields {
}
/**
- * Gets the custom document fields from an existing envelope document.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
- *
- * Retrieves the custom document field information from an existing envelope document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the custom document fields from an existing envelope document.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
+ *
+ * Retrieves the custom document field information from an existing envelope document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn document_fields_get(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeDocumentFields> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -51,31 +53,31 @@ impl EnvelopeDocumentFields {
.await
}
/**
- * Updates existing custom document fields in an existing envelope document.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
- *
- * Updates existing custom document fields in an existing envelope document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates existing custom document fields in an existing envelope document.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
+ *
+ * Updates existing custom document fields in an existing envelope document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn document_fields_put(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeDocumentFields,
- ) -> Result<crate::types::EnvelopeDocumentFields> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -90,31 +92,31 @@ impl EnvelopeDocumentFields {
.await
}
/**
- * Creates custom document fields in an existing envelope document.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
- *
- * Creates custom document fields in an existing envelope document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates custom document fields in an existing envelope document.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
+ *
+ * Creates custom document fields in an existing envelope document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn document_fields_post(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeDocumentFields,
- ) -> Result<crate::types::EnvelopeDocumentFields> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -129,31 +131,31 @@ impl EnvelopeDocumentFields {
.await
}
/**
- * Deletes custom document fields from an existing envelope document.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
- *
- * Deletes custom document fields from an existing envelope document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes custom document fields from an existing envelope document.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields` endpoint.
+ *
+ * Deletes custom document fields from an existing envelope document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn document_fields_delete(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeDocumentFields,
- ) -> Result<crate::types::EnvelopeDocumentFields> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentFields> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/fields",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_document_html_definitions.rs b/docusign/src/envelope_document_html_definitions.rs
index 39febf6..62b3321 100644
--- a/docusign/src/envelope_document_html_definitions.rs
+++ b/docusign/src/envelope_document_html_definitions.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeDocumentHtmlDefinitions {
pub client: Client,
@@ -31,13 +33,13 @@ impl EnvelopeDocumentHtmlDefinitions {
account_id: &str,
document_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::DocumentHtmlDefinitionOriginals> {
+ ) -> ClientResult<crate::types::DocumentHtmlDefinitionOriginals> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/html_definitions",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_document_tabs.rs b/docusign/src/envelope_document_tabs.rs
index b05cf37..5b0810c 100644
--- a/docusign/src/envelope_document_tabs.rs
+++ b/docusign/src/envelope_document_tabs.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeDocumentTabs {
pub client: Client,
@@ -13,33 +15,33 @@ impl EnvelopeDocumentTabs {
}
/**
- * Returns tabs on the specified page.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/tabs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns tabs on the specified page.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/tabs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_get_page(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
page_number: &str,
- ) -> Result<crate::types::EnvelopeDocumentTabs> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentTabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/pages/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
- crate::progenitor_support::encode_path(page_number),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
+ crate::progenitor_support::encode_path(&page_number.to_string()),
),
None,
);
@@ -54,24 +56,24 @@ impl EnvelopeDocumentTabs {
.await
}
/**
- * Returns the tabs on a document.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
- *
- * This method returns the tabs associated with a document.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_metadata: &str` -- When set to **true**, the response includes metadata indicating which properties are editable.
- * * `page_numbers: &str` -- Filters for tabs that occur on the pages that you specify. Enter as a comma-separated list of page GUIDs.
- *
- * Example: `page_numbers=2,6`
- *
- * Note: You can only enter individual page numbers, and not a page range.
- */
+ * Returns the tabs on a document.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
+ *
+ * This method returns the tabs associated with a document.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_metadata: &str` -- When set to **true**, the response includes metadata indicating which properties are editable.
+ * * `page_numbers: &str` -- Filters for tabs that occur on the pages that you specify. Enter as a comma-separated list of page GUIDs.
+ *
+ * Example: `page_numbers=2,6`
+ *
+ * Note: You can only enter individual page numbers, and not a page range.
+ */
pub async fn tabs_get_document(
&self,
account_id: &str,
@@ -79,7 +81,7 @@ impl EnvelopeDocumentTabs {
envelope_id: &str,
include_metadata: &str,
page_numbers: &str,
- ) -> Result<crate::types::EnvelopeDocumentTabs> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentTabs> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_metadata.is_empty() {
query_args.push(("include_metadata".to_string(), include_metadata.to_string()));
@@ -91,9 +93,9 @@ impl EnvelopeDocumentTabs {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/tabs?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
query_
),
None,
@@ -109,31 +111,31 @@ impl EnvelopeDocumentTabs {
.await
}
/**
- * Updates the tabs for an envelope document.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates the tabs for an envelope document.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_put_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::Tabs,
- ) -> Result<crate::types::Tabs> {
+ ) -> ClientResult<crate::types::Tabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -148,31 +150,31 @@ impl EnvelopeDocumentTabs {
.await
}
/**
- * Adds the tabs to an envelope document.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds the tabs to an envelope document.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_post_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::Tabs,
- ) -> Result<crate::types::Tabs> {
+ ) -> ClientResult<crate::types::Tabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
@@ -187,31 +189,31 @@ impl EnvelopeDocumentTabs {
.await
}
/**
- * Deletes tabs from an envelope document.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes tabs from an envelope document.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn tabs_delete_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
body: &crate::types::Tabs,
- ) -> Result<crate::types::Tabs> {
+ ) -> ClientResult<crate::types::Tabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_document_visibility.rs b/docusign/src/envelope_document_visibility.rs
index 458d9ca..c205f58 100644
--- a/docusign/src/envelope_document_visibility.rs
+++ b/docusign/src/envelope_document_visibility.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeDocumentVisibility {
pub client: Client,
@@ -13,30 +15,30 @@ impl EnvelopeDocumentVisibility {
}
/**
- * Returns document visibility for a recipient.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility` endpoint.
- *
- * This method returns information about document visibility for a recipient.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Returns document visibility for a recipient.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility` endpoint.
+ *
+ * This method returns information about document visibility for a recipient.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_get_recipient_document_visibility(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<crate::types::DocumentVisibilityList> {
+ ) -> ClientResult<crate::types::DocumentVisibilityList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/document_visibility",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -51,33 +53,33 @@ impl EnvelopeDocumentVisibility {
.await
}
/**
- * Updates document visibility for a recipient.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility` endpoint.
- *
- * This method updates document visibility for a recipient.
- *
- * **Note**: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Updates document visibility for a recipient.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility` endpoint.
+ *
+ * This method updates document visibility for a recipient.
+ *
+ * **Note**: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_put_recipient_document_visibility(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
body: &crate::types::DocumentVisibilityList,
- ) -> Result<crate::types::DocumentVisibilityList> {
+ ) -> ClientResult<crate::types::DocumentVisibilityList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/document_visibility",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_documents.rs b/docusign/src/envelope_documents.rs
index 295c495..14b1e7f 100644
--- a/docusign/src/envelope_documents.rs
+++ b/docusign/src/envelope_documents.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeDocuments {
pub client: Client,
@@ -13,23 +15,23 @@ impl EnvelopeDocuments {
}
/**
- * Gets a list of envelope documents.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
- *
- * Retrieves a list of documents associated with the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `documents_by_userid: &str` -- When set to **true**, allows recipients to get documents by their user id. For example, if a user is included in two different routing orders with different visibilities, using this parameter returns all of the documents from both routing orders.
- * * `include_document_size: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_metadata: &str` -- When set to **true**, the response includes metadata that indicates which properties the sender can edit.
- * * `include_tabs: &str` -- When set to **true**, information about the tabs associated with the documents are included in the response.
- * * `recipient_id: &str` -- Allows the sender to retrieve the documents as one of the recipients that they control. The `documents_by_userid` parameter must be set to **false** for this to work.
- * * `shared_user_id: &str` -- The ID of a shared user that you want to impersonate in order to retrieve their view of the list of documents. This parameter is used in the context of a shared inbox (i.e., when you share envelopes from one user to another through the RADmin console).
- */
+ * Gets a list of envelope documents.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
+ *
+ * Retrieves a list of documents associated with the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `documents_by_userid: &str` -- When set to **true**, allows recipients to get documents by their user id. For example, if a user is included in two different routing orders with different visibilities, using this parameter returns all of the documents from both routing orders.
+ * * `include_document_size: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_metadata: &str` -- When set to **true**, the response includes metadata that indicates which properties the sender can edit.
+ * * `include_tabs: &str` -- When set to **true**, information about the tabs associated with the documents are included in the response.
+ * * `recipient_id: &str` -- Allows the sender to retrieve the documents as one of the recipients that they control. The `documents_by_userid` parameter must be set to **false** for this to work.
+ * * `shared_user_id: &str` -- The ID of a shared user that you want to impersonate in order to retrieve their view of the list of documents. This parameter is used in the context of a shared inbox (i.e., when you share envelopes from one user to another through the RADmin console).
+ */
pub async fn documents_get(
&self,
account_id: &str,
@@ -40,7 +42,7 @@ impl EnvelopeDocuments {
include_tabs: &str,
recipient_id: &str,
shared_user_id: &str,
- ) -> Result<crate::types::EnvelopeDocumentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentsResult> {
let mut query_args: Vec<(String, String)> = Default::default();
if !documents_by_userid.is_empty() {
query_args.push((
@@ -70,8 +72,8 @@ impl EnvelopeDocuments {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -87,37 +89,37 @@ impl EnvelopeDocuments {
.await
}
/**
- * Adds one or more documents to an existing envelope document.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
- *
- * Adds one or more documents to an existing envelope document.
- * <p>**Note**: When adding or modifying documents for an in-process envelope, DocuSign recommends locking the envelope prior to making any changes.
- *
- * If the file name of a document contains unicode characters, you need to include a `Content-Disposition` header. Example:
- *
- *
- * **Header**: `Content-Disposition`
- *
- *
- * **Value**: `file; filename=\"name\";fileExtension=ext;documentId=1`
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds one or more documents to an existing envelope document.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
+ *
+ * Adds one or more documents to an existing envelope document.
+ * <p>**Note**: When adding or modifying documents for an in-process envelope, DocuSign recommends locking the envelope prior to making any changes.
+ *
+ * If the file name of a document contains unicode characters, you need to include a `Content-Disposition` header. Example:
+ *
+ *
+ * **Header**: `Content-Disposition`
+ *
+ *
+ * **Value**: `file; filename=\"name\";fileExtension=ext;documentId=1`
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn documents_put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeDefinition,
- ) -> Result<crate::types::EnvelopeDocumentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -132,51 +134,51 @@ impl EnvelopeDocuments {
.await
}
/**
- * Deletes documents from a draft envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
- *
- * Deletes one or more documents from an existing envelope that has not yet been completed.
- *
- * To delete a document, use only the relevant parts of the [`envelopeDefinition`](#envelopeDefinition).
- * For example, this request body specifies that you want to delete the document whose `documentId` is "1".
- *
- *
- * ```text
- * {
- * "documents": [
- * {
- * "documentId": "1"
- * }
- * ]
- * }
- * ```
- *
- * The envelope status must be one of:
- *
- * - `created`
- * - `sent`
- * - `delivered`
- *
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes documents from a draft envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents` endpoint.
+ *
+ * Deletes one or more documents from an existing envelope that has not yet been completed.
+ *
+ * To delete a document, use only the relevant parts of the [`envelopeDefinition`](#envelopeDefinition).
+ * For example, this request body specifies that you want to delete the document whose `documentId` is "1".
+ *
+ *
+ * ```text
+ * {
+ * "documents": [
+ * {
+ * "documentId": "1"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * The envelope status must be one of:
+ *
+ * - `created`
+ * - `sent`
+ * - `delivered`
+ *
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn documents_delete(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeDefinition,
- ) -> Result<crate::types::EnvelopeDocumentsResult> {
+ ) -> ClientResult<crate::types::EnvelopeDocumentsResult> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -191,31 +193,31 @@ impl EnvelopeDocuments {
.await
}
/**
- * Gets a document from an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}` endpoint.
- *
- * Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- This parameter takes the following special keywords:
- *
- * - `combined`: Retrieves a PDF file that contains the combined content of all of the documents. If the account option **Attach certification of completion to envelope** is on, then the Certificate of Completion is also included in the PDF file. You set this account option in the Admin tool on the **Signing Settings** screen, or by setting the `attachCompletedEnvelope` property in the `accountSettings` object to **true**.
- * - `archive`: Retrieves a ZIP archive that contains all of the PDF documents and the Certificate of Completion.
- * .
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `certificate: &str` -- When set to **false**, the envelope signing certificate is removed from the download.
- * * `documents_by_userid: &str` -- When set to **true**, allows recipients to get documents by their user id. For example, if a user is included in two different routing orders with different visibilities, using this parameter returns all of the documents from both routing orders.
- * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `encrypt: &str` -- When set to **true**, the PDF bytes returned in the response are encrypted for all the key managers configured on your DocuSign account. You can decrypt the documents by using the Key Manager DecryptDocument API method. For more information about Key Manager, see the DocuSign Security Appliance Installation Guide that your organization received from DocuSign.
- * * `language: &str` -- Specifies the language for the Certificate of Completion in the response. The supported languages are: Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Dutch (nl), English US (en), French (fr), German (de), Italian (it), Japanese (ja), Korean (ko), Portuguese (pt), Portuguese (Brazil) (pt_BR), Russian (ru), Spanish (es). .
- * * `recipient_id: &str` -- Allows the sender to retrieve the documents as one of the recipients that they control. The `documents_by_userid` parameter must be set to **false** for this functionality to work.
- * * `shared_user_id: &str` -- The ID of a shared user that you want to impersonate in order to retrieve their view of the list of documents. This parameter is used in the context of a shared inbox (i.e., when you share envelopes from one user to another through the RADmin console).
- * * `show_changes: &str` -- When set to **true**, any changed fields for the returned PDF are highlighted in yellow and optional signatures or initials outlined in red. .
- * * `watermark: &str` -- When set to **true**, the account has the watermark feature enabled, and the envelope is not complete, then the watermark for the account is added to the PDF documents. This option can remove the watermark. .
- */
+ * Gets a document from an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}` endpoint.
+ *
+ * Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- This parameter takes the following special keywords:
+ *
+ * - `combined`: Retrieves a PDF file that contains the combined content of all of the documents. If the account option **Attach certification of completion to envelope** is on, then the Certificate of Completion is also included in the PDF file. You set this account option in the Admin tool on the **Signing Settings** screen, or by setting the `attachCompletedEnvelope` property in the `accountSettings` object to **true**.
+ * - `archive`: Retrieves a ZIP archive that contains all of the PDF documents and the Certificate of Completion.
+ * .
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `certificate: &str` -- When set to **false**, the envelope signing certificate is removed from the download.
+ * * `documents_by_userid: &str` -- When set to **true**, allows recipients to get documents by their user id. For example, if a user is included in two different routing orders with different visibilities, using this parameter returns all of the documents from both routing orders.
+ * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `encrypt: &str` -- When set to **true**, the PDF bytes returned in the response are encrypted for all the key managers configured on your DocuSign account. You can decrypt the documents by using the Key Manager DecryptDocument API method. For more information about Key Manager, see the DocuSign Security Appliance Installation Guide that your organization received from DocuSign.
+ * * `language: &str` -- Specifies the language for the Certificate of Completion in the response. The supported languages are: Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Dutch (nl), English US (en), French (fr), German (de), Italian (it), Japanese (ja), Korean (ko), Portuguese (pt), Portuguese (Brazil) (pt_BR), Russian (ru), Spanish (es). .
+ * * `recipient_id: &str` -- Allows the sender to retrieve the documents as one of the recipients that they control. The `documents_by_userid` parameter must be set to **false** for this functionality to work.
+ * * `shared_user_id: &str` -- The ID of a shared user that you want to impersonate in order to retrieve their view of the list of documents. This parameter is used in the context of a shared inbox (i.e., when you share envelopes from one user to another through the RADmin console).
+ * * `show_changes: &str` -- When set to **true**, any changed fields for the returned PDF are highlighted in yellow and optional signatures or initials outlined in red. .
+ * * `watermark: &str` -- When set to **true**, the account has the watermark feature enabled, and the envelope is not complete, then the watermark for the account is added to the PDF documents. This option can remove the watermark. .
+ */
pub async fn documents_get_document(
&self,
account_id: &str,
@@ -230,7 +232,7 @@ impl EnvelopeDocuments {
shared_user_id: &str,
show_changes: &str,
watermark: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !certificate.is_empty() {
query_args.push(("certificate".to_string(), certificate.to_string()));
@@ -266,9 +268,9 @@ impl EnvelopeDocuments {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
query_
),
None,
@@ -284,46 +286,46 @@ impl EnvelopeDocuments {
.await
}
/**
- * Adds a document to an existing draft envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}` endpoint.
- *
- * Adds a document to an existing draft envelope. The bytes of the document make up the body of the request.
- *
- *
- *
- * **Note**: When adding or modifying documents for an in-process envelope, DocuSign recommends locking the envelope prior to making any changes.
- *
- *
- *
- *
- * If the file name of the document contains unicode characters, you need to include a `Content-Disposition` header. Example:
- *
- *
- * **Header**: `Content-Disposition`
- *
- *
- * **Value**: `file; filename=\"name\";fileExtension=ext;documentId=1`
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds a document to an existing draft envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}` endpoint.
+ *
+ * Adds a document to an existing draft envelope. The bytes of the document make up the body of the request.
+ *
+ *
+ *
+ * **Note**: When adding or modifying documents for an in-process envelope, DocuSign recommends locking the envelope prior to making any changes.
+ *
+ *
+ *
+ *
+ * If the file name of the document contains unicode characters, you need to include a `Content-Disposition` header. Example:
+ *
+ *
+ * **Header**: `Content-Disposition`
+ *
+ *
+ * **Value**: `file; filename=\"name\";fileExtension=ext;documentId=1`
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn documents_put_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeDocument> {
+ ) -> ClientResult<crate::types::EnvelopeDocument> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_email_settings.rs b/docusign/src/envelope_email_settings.rs
index f90f67b..b7a86ed 100644
--- a/docusign/src/envelope_email_settings.rs
+++ b/docusign/src/envelope_email_settings.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeEmailSettings {
pub client: Client,
@@ -13,27 +15,27 @@ impl EnvelopeEmailSettings {
}
/**
- * Gets the email setting overrides for an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
- *
- * Retrieves the email override settings for the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the email setting overrides for an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
+ *
+ * Retrieves the email override settings for the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn email_settings_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EmailSettings> {
+ ) -> ClientResult<crate::types::EmailSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/email_settings",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -48,30 +50,30 @@ impl EnvelopeEmailSettings {
.await
}
/**
- * Updates the email setting overrides for an envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
- *
- * Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made.
- *
- * This can also be used to delete an individual email override setting by using an empty string for the value to be deleted.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates the email setting overrides for an envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
+ *
+ * Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made.
+ *
+ * This can also be used to delete an individual email override setting by using an empty string for the value to be deleted.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn email_settings_put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EmailSettings,
- ) -> Result<crate::types::EmailSettings> {
+ ) -> ClientResult<crate::types::EmailSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/email_settings",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -86,30 +88,30 @@ impl EnvelopeEmailSettings {
.await
}
/**
- * Adds email setting overrides to an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
- *
- * Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made.
- *
- * ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copy or Certified Delivery recipient type.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds email setting overrides to an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
+ *
+ * Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made.
+ *
+ * ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copy or Certified Delivery recipient type.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn email_settings_post(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EmailSettings,
- ) -> Result<crate::types::EmailSettings> {
+ ) -> ClientResult<crate::types::EmailSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/email_settings",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -124,27 +126,27 @@ impl EnvelopeEmailSettings {
.await
}
/**
- * Deletes the email setting overrides for an envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
- *
- * Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes the email setting overrides for an envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings` endpoint.
+ *
+ * Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn email_settings_delete(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EmailSettings> {
+ ) -> ClientResult<crate::types::EmailSettings> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/email_settings",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_form_data.rs b/docusign/src/envelope_form_data.rs
index 103edff..3e9f696 100644
--- a/docusign/src/envelope_form_data.rs
+++ b/docusign/src/envelope_form_data.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeFormData {
pub client: Client,
@@ -13,29 +15,29 @@ impl EnvelopeFormData {
}
/**
- * Returns envelope form data for an existing envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data` endpoint.
- *
- * This method downloads the envelope and field data from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them.
- *
- * **Note**: To use this feature, the Sending Setting "Allow sender to download form data" must be enabled for the account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns envelope form data for an existing envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data` endpoint.
+ *
+ * This method downloads the envelope and field data from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them.
+ *
+ * **Note**: To use this feature, the Sending Setting "Allow sender to download form data" must be enabled for the account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn form_data_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeFormDataType> {
+ ) -> ClientResult<crate::types::EnvelopeFormDataType> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/form_data",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_html_definitions.rs b/docusign/src/envelope_html_definitions.rs
index 755aa80..201c8d2 100644
--- a/docusign/src/envelope_html_definitions.rs
+++ b/docusign/src/envelope_html_definitions.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeHtmlDefinitions {
pub client: Client,
@@ -13,27 +15,27 @@ impl EnvelopeHtmlDefinitions {
}
/**
- * Gets the Original HTML Definition used to generate the Responsive HTML for the envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/html_definitions` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the Original HTML Definition used to generate the Responsive HTML for the envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/html_definitions` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn responsive_html_get_envelope_definition(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::DocumentHtmlDefinitionOriginals> {
+ ) -> ClientResult<crate::types::DocumentHtmlDefinitionOriginals> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/html_definitions",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_locks.rs b/docusign/src/envelope_locks.rs
index 8d69705..91706b0 100644
--- a/docusign/src/envelope_locks.rs
+++ b/docusign/src/envelope_locks.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeLocks {
pub client: Client,
@@ -13,39 +15,39 @@ impl EnvelopeLocks {
}
/**
- * Gets envelope lock information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
- *
- * Retrieves general information about an envelope lock.
- *
- * The user requesting the information must be the same user
- * who locked the envelope.
- *
- * You can use this method to recover the lock information,
- * including the `lockToken`,
- * for a locked envelope.
- * The `X-DocuSign-Edit` header is included in the response.
- *
- * See [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/)
- * for a description of the `X-DocuSign-Edit` header.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets envelope lock information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
+ *
+ * Retrieves general information about an envelope lock.
+ *
+ * The user requesting the information must be the same user
+ * who locked the envelope.
+ *
+ * You can use this method to recover the lock information,
+ * including the `lockToken`,
+ * for a locked envelope.
+ * The `X-DocuSign-Edit` header is included in the response.
+ *
+ * See [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/)
+ * for a description of the `X-DocuSign-Edit` header.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn lock_get_envelope(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeLocks> {
+ ) -> ClientResult<crate::types::EnvelopeLocks> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/lock",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -60,50 +62,50 @@ impl EnvelopeLocks {
.await
}
/**
- * Updates an envelope lock.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
- *
- * Updates the lock information for a locked envelope.
- *
- * You must include the `X-DocuSign-Edit` header
- * as described in
- * [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/).
- *
- *
- * Use this method to change the duration
- * of the lock (`lockDurationInSeconds`)
- * or the `lockedByApp` string.
- *
- * The request body is a full `lockRequest` object,
- * but you only need to specify the
- * properties that you are updating. For example:
- *
- * ```
- * {
- * "lockDurationInSeconds": "3600",
- * "lockedByApp": "My Application"
- * }
- * ```
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an envelope lock.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
+ *
+ * Updates the lock information for a locked envelope.
+ *
+ * You must include the `X-DocuSign-Edit` header
+ * as described in
+ * [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/).
+ *
+ *
+ * Use this method to change the duration
+ * of the lock (`lockDurationInSeconds`)
+ * or the `lockedByApp` string.
+ *
+ * The request body is a full `lockRequest` object,
+ * but you only need to specify the
+ * properties that you are updating. For example:
+ *
+ * ```
+ * {
+ * "lockDurationInSeconds": "3600",
+ * "lockedByApp": "My Application"
+ * }
+ * ```
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn lock_put_envelope(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::LockRequest,
- ) -> Result<crate::types::EnvelopeLocks> {
+ ) -> ClientResult<crate::types::EnvelopeLocks> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/lock",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -118,84 +120,84 @@ impl EnvelopeLocks {
.await
}
/**
- * Locks an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
- *
- * This method locks the specified envelope and sets the time until
- * the lock expires to prevent other users or recipients from
- * changing the envelope.
- *
- * **Note**: To use this method, the envelope locking
- * capability must be enabled for the user; that is, the user setting
- * `canLockEnvelopes` must be set to **true**.
- *
- * The response to this request includes a `lockToken` parameter
- * that you must use in the `X-DocuSign-Edit` header for
- * every PUT method (typically a method that updates an envelope)
- * while the envelope is locked.
- *
- *
- * If you do not provide the `lockToken` when accessing
- * a locked envelope, you will get the following
- * error:
- *
- * ```
- * {
- * "errorCode": "EDIT_LOCK_NOT_LOCK_OWNER",
- * "message": "The user is not the owner of the lock. The template is locked by another user or in another application"
- * }
- * ```
- *
- *
- * ### The X-DocuSign-Edit header
- *
- * The `X-DocuSign-Edit` header looks like this
- * and can be specified in either JSON or XML.
- *
- * **JSON**
- * ```
- * {
- * "LockToken": "token-from-response",
- * "LockDurationInSeconds": "600"
- * }
- * ```
- *
- * **XML**
- * ```
- * <DocuSignEdit>
- * <LockToken>token-from-response</LockToken>
- * <LockDurationInSeconds>600</LockDurationInSeconds>
- * </DocuSignEdit>
- * ```
- *
- * In the actual HTTP header, you would remove the linebreaks:
- *
- * ```
- * X-DocuSign-Edit: {"LockToken": "token-from-response", "LockDurationInSeconds": "600" }
- * or
- * X-DocuSign-Edit:<DocuSignEdit><LockToken>token-from-response</LockToken><LockDurationInSeconds>600</LockDurationInSeconds></DocuSignEdit>
- * ```
- *
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Locks an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
+ *
+ * This method locks the specified envelope and sets the time until
+ * the lock expires to prevent other users or recipients from
+ * changing the envelope.
+ *
+ * **Note**: To use this method, the envelope locking
+ * capability must be enabled for the user; that is, the user setting
+ * `canLockEnvelopes` must be set to **true**.
+ *
+ * The response to this request includes a `lockToken` parameter
+ * that you must use in the `X-DocuSign-Edit` header for
+ * every PUT method (typically a method that updates an envelope)
+ * while the envelope is locked.
+ *
+ *
+ * If you do not provide the `lockToken` when accessing
+ * a locked envelope, you will get the following
+ * error:
+ *
+ * ```
+ * {
+ * "errorCode": "EDIT_LOCK_NOT_LOCK_OWNER",
+ * "message": "The user is not the owner of the lock. The template is locked by another user or in another application"
+ * }
+ * ```
+ *
+ *
+ * ### The X-DocuSign-Edit header
+ *
+ * The `X-DocuSign-Edit` header looks like this
+ * and can be specified in either JSON or XML.
+ *
+ * **JSON**
+ * ```
+ * {
+ * "LockToken": "token-from-response",
+ * "LockDurationInSeconds": "600"
+ * }
+ * ```
+ *
+ * **XML**
+ * ```
+ * <DocuSignEdit>
+ * <LockToken>token-from-response</LockToken>
+ * <LockDurationInSeconds>600</LockDurationInSeconds>
+ * </DocuSignEdit>
+ * ```
+ *
+ * In the actual HTTP header, you would remove the linebreaks:
+ *
+ * ```
+ * X-DocuSign-Edit: {"LockToken": "token-from-response", "LockDurationInSeconds": "600" }
+ * or
+ * X-DocuSign-Edit:<DocuSignEdit><LockToken>token-from-response</LockToken><LockDurationInSeconds>600</LockDurationInSeconds></DocuSignEdit>
+ * ```
+ *
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn lock_post_envelope(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::LockRequest,
- ) -> Result<crate::types::EnvelopeLocks> {
+ ) -> ClientResult<crate::types::EnvelopeLocks> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/lock",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -210,43 +212,43 @@ impl EnvelopeLocks {
.await
}
/**
- * Deletes an envelope lock.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
- *
- * Deletes the lock from the specified envelope.
- * The user deleting the lock must be the same user
- * who locked the envelope.
- *
- * You must include the `X-DocuSign-Edit` header
- * as described in
- * [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/).
- *
- * This method takes an optional query paramter
- * that lets you specify whether
- * changes made while the envelope was locked
- * are kept or discarded.
- *
- *
- * | Query Parameter | Description |
- * | :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- * | `save_changes` | (Optional) When set to **true** (the default), any changes made while the lock was active are saved. When set to **false**, any changes made while the envelope was locked are discarded. |
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes an envelope lock.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock` endpoint.
+ *
+ * Deletes the lock from the specified envelope.
+ * The user deleting the lock must be the same user
+ * who locked the envelope.
+ *
+ * You must include the `X-DocuSign-Edit` header
+ * as described in
+ * [EnvelopeLocks: create](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/).
+ *
+ * This method takes an optional query paramter
+ * that lets you specify whether
+ * changes made while the envelope was locked
+ * are kept or discarded.
+ *
+ *
+ * | Query Parameter | Description |
+ * | :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ * | `save_changes` | (Optional) When set to **true** (the default), any changes made while the lock was active are saved. When set to **false**, any changes made while the envelope was locked are discarded. |
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn lock_delete_envelope(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeLocks> {
+ ) -> ClientResult<crate::types::EnvelopeLocks> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/lock",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_recipient_tabs.rs b/docusign/src/envelope_recipient_tabs.rs
index bc837a8..66b203b 100644
--- a/docusign/src/envelope_recipient_tabs.rs
+++ b/docusign/src/envelope_recipient_tabs.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeRecipientTabs {
pub client: Client,
@@ -13,26 +15,26 @@ impl EnvelopeRecipientTabs {
}
/**
- * Gets the tabs information for a signer or sign-in-person recipient in an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
- *
- * Retrieves information about the tabs associated
- * with a recipient. You can make a single API call
- * to get all the tab values and information from a
- * given, completed envelope in addition to draft
- * ones. Tab values can be retrieved by using the
- * [EnvelopeRecipients:list method](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/EnvelopeRecipients/list/)
- * with query parameter `include_tabs` set to **true**.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- * * `include_anchor_tab_locations: &str` -- When set to **true**, all tabs with anchor tab properties are included in the response. The default value is **false**.
- * * `include_metadata: &str` -- When set to **true**, the response includes metadata indicating which properties are editable.
- */
+ * Gets the tabs information for a signer or sign-in-person recipient in an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
+ *
+ * Retrieves information about the tabs associated
+ * with a recipient. You can make a single API call
+ * to get all the tab values and information from a
+ * given, completed envelope in addition to draft
+ * ones. Tab values can be retrieved by using the
+ * [EnvelopeRecipients:list method](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/EnvelopeRecipients/list/)
+ * with query parameter `include_tabs` set to **true**.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ * * `include_anchor_tab_locations: &str` -- When set to **true**, all tabs with anchor tab properties are included in the response. The default value is **false**.
+ * * `include_metadata: &str` -- When set to **true**, the response includes metadata indicating which properties are editable.
+ */
pub async fn recipients_get_recipient_tab(
&self,
account_id: &str,
@@ -40,7 +42,7 @@ impl EnvelopeRecipientTabs {
recipient_id: &str,
include_anchor_tab_locations: &str,
include_metadata: &str,
- ) -> Result<crate::types::EnvelopeRecipientTabs> {
+ ) -> ClientResult<crate::types::EnvelopeRecipientTabs> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_anchor_tab_locations.is_empty() {
query_args.push((
@@ -55,9 +57,9 @@ impl EnvelopeRecipientTabs {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/tabs?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
query_
),
None,
@@ -94,13 +96,13 @@ impl EnvelopeRecipientTabs {
envelope_id: &str,
recipient_id: &str,
body: &crate::types::EnvelopeRecipientTabs,
- ) -> Result<crate::types::EnvelopeRecipientTabs> {
+ ) -> ClientResult<crate::types::EnvelopeRecipientTabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -115,31 +117,31 @@ impl EnvelopeRecipientTabs {
.await
}
/**
- * Adds tabs for a recipient.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
- *
- * Adds one or more tabs for a recipient.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Adds tabs for a recipient.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
+ *
+ * Adds one or more tabs for a recipient.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_post_recipient_tabs(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
body: &crate::types::EnvelopeRecipientTabs,
- ) -> Result<crate::types::EnvelopeRecipientTabs> {
+ ) -> ClientResult<crate::types::EnvelopeRecipientTabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -154,31 +156,31 @@ impl EnvelopeRecipientTabs {
.await
}
/**
- * Deletes the tabs associated with a recipient.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
- *
- * Deletes one or more tabs associated with a recipient in a draft envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Deletes the tabs associated with a recipient.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs` endpoint.
+ *
+ * Deletes one or more tabs associated with a recipient in a draft envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_delete_recipient_tabs(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
body: &crate::types::EnvelopeRecipientTabs,
- ) -> Result<crate::types::EnvelopeRecipientTabs> {
+ ) -> ClientResult<crate::types::EnvelopeRecipientTabs> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/tabs",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_recipients.rs b/docusign/src/envelope_recipients.rs
index fae911b..0eb82f0 100644
--- a/docusign/src/envelope_recipients.rs
+++ b/docusign/src/envelope_recipients.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeRecipients {
pub client: Client,
@@ -13,23 +15,23 @@ impl EnvelopeRecipients {
}
/**
- * Gets the status of recipients for an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
- *
- * Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. This method can also be used to retrieve the tab values.
- *
- * The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_anchor_tab_locations: &str` -- When set to **true** and `include_tabs` value is set to **true**, all tabs with anchor tab properties are included in the response. .
- * * `include_extended: &str` -- When set to **true**, the extended properties are included in the response. .
- * * `include_metadata: &str` -- Boolean value that specifies whether to include metadata associated with the recipients (for envelopes only, not templates).
- * * `include_tabs: &str` -- When set to **true**, the tab information associated with the recipient is included in the response.
- */
+ * Gets the status of recipients for an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
+ *
+ * Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. This method can also be used to retrieve the tab values.
+ *
+ * The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_anchor_tab_locations: &str` -- When set to **true** and `include_tabs` value is set to **true**, all tabs with anchor tab properties are included in the response. .
+ * * `include_extended: &str` -- When set to **true**, the extended properties are included in the response. .
+ * * `include_metadata: &str` -- Boolean value that specifies whether to include metadata associated with the recipients (for envelopes only, not templates).
+ * * `include_tabs: &str` -- When set to **true**, the tab information associated with the recipient is included in the response.
+ */
pub async fn recipients_get(
&self,
account_id: &str,
@@ -38,7 +40,7 @@ impl EnvelopeRecipients {
include_extended: &str,
include_metadata: &str,
include_tabs: &str,
- ) -> Result<crate::types::EnvelopeRecipients> {
+ ) -> ClientResult<crate::types::EnvelopeRecipients> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_anchor_tab_locations.is_empty() {
query_args.push((
@@ -59,8 +61,8 @@ impl EnvelopeRecipients {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -76,49 +78,49 @@ impl EnvelopeRecipients {
.await
}
/**
- * Updates recipients in a draft envelope or corrects recipient information for an in-process envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
- *
- * Updates the recipients of a draft envelope or corrects recipient information for an in-process envelope.
- *
- * If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the EnvelopeRecipients::Create method).
- *
- * You can also use this method to resend an envelope to a recipient by using the `resend_envelope` option.
- *
- * **Updating Sent Envelopes**
- *
- * After an envelope has been sent, you can edit only the following properties:
- *
- * - `accessCode`
- * - `agentCanEditName`
- * - `agentCanEditEmail`
- * - `customFields`
- * - `deliveryMethod`
- * - `documentVisibility`
- * - `email`
- * - `emailNotification`
- * - `idCheckConfigurationName`
- * - `name`
- * - `note`
- * - `phoneAuthentication`
- * - `recipientType` (For this to work, you must also change the recipient object to match the recipient type.)
- * - `requireIdLookup`
- * - `routingOrder`
- * - `routingOrder`
- * - `signingGroupId` (You can change this id to switch to a different signing group and its corresponding set of recipients.)
- * - `smsAuthentication`
- * - `suppressEmails`
- * - `userName`
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `combine_same_order_recipients: &str` -- When set to **true**, recipients are combined or merged with matching recipients. Recipient matching occurs as part of [template matching](https://docs.docusign.com/DocuSignHelp/Content/automatic-template-matching.htm), and is based on Recipient Role and Routing Order.
- * * `offline_signing: &str` -- Indicates if offline signing is enabled for the recipient when a network connection is unavailable. .
- * * `resend_envelope: &str` -- When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient.
- */
+ * Updates recipients in a draft envelope or corrects recipient information for an in-process envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
+ *
+ * Updates the recipients of a draft envelope or corrects recipient information for an in-process envelope.
+ *
+ * If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the EnvelopeRecipients::Create method).
+ *
+ * You can also use this method to resend an envelope to a recipient by using the `resend_envelope` option.
+ *
+ * **Updating Sent Envelopes**
+ *
+ * After an envelope has been sent, you can edit only the following properties:
+ *
+ * - `accessCode`
+ * - `agentCanEditName`
+ * - `agentCanEditEmail`
+ * - `customFields`
+ * - `deliveryMethod`
+ * - `documentVisibility`
+ * - `email`
+ * - `emailNotification`
+ * - `idCheckConfigurationName`
+ * - `name`
+ * - `note`
+ * - `phoneAuthentication`
+ * - `recipientType` (For this to work, you must also change the recipient object to match the recipient type.)
+ * - `requireIdLookup`
+ * - `routingOrder`
+ * - `routingOrder`
+ * - `signingGroupId` (You can change this id to switch to a different signing group and its corresponding set of recipients.)
+ * - `smsAuthentication`
+ * - `suppressEmails`
+ * - `userName`
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `combine_same_order_recipients: &str` -- When set to **true**, recipients are combined or merged with matching recipients. Recipient matching occurs as part of [template matching](https://docs.docusign.com/DocuSignHelp/Content/automatic-template-matching.htm), and is based on Recipient Role and Routing Order.
+ * * `offline_signing: &str` -- Indicates if offline signing is enabled for the recipient when a network connection is unavailable. .
+ * * `resend_envelope: &str` -- When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient.
+ */
pub async fn recipients_put(
&self,
account_id: &str,
@@ -127,7 +129,7 @@ impl EnvelopeRecipients {
offline_signing: &str,
resend_envelope: &str,
body: &crate::types::EnvelopeRecipients,
- ) -> Result<crate::types::RecipientsUpdateSummary> {
+ ) -> ClientResult<crate::types::RecipientsUpdateSummary> {
let mut query_args: Vec<(String, String)> = Default::default();
if !combine_same_order_recipients.is_empty() {
query_args.push((
@@ -145,8 +147,8 @@ impl EnvelopeRecipients {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -162,27 +164,27 @@ impl EnvelopeRecipients {
.await
}
/**
- * Adds one or more recipients to an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
- *
- * Adds one or more recipients to an envelope.
- *
- * For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `resend_envelope: &str` -- When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient.
- */
+ * Adds one or more recipients to an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
+ *
+ * Adds one or more recipients to an envelope.
+ *
+ * For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `resend_envelope: &str` -- When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient.
+ */
pub async fn recipients_post(
&self,
account_id: &str,
envelope_id: &str,
resend_envelope: &str,
body: &crate::types::EnvelopeRecipients,
- ) -> Result<crate::types::EnvelopeRecipients> {
+ ) -> ClientResult<crate::types::EnvelopeRecipients> {
let mut query_args: Vec<(String, String)> = Default::default();
if !resend_envelope.is_empty() {
query_args.push(("resend_envelope".to_string(), resend_envelope.to_string()));
@@ -191,8 +193,8 @@ impl EnvelopeRecipients {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -208,30 +210,30 @@ impl EnvelopeRecipients {
.await
}
/**
- * Deletes recipients from an envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
- *
- * Deletes one or more recipients from a draft or sent envelope. List the recipients that you want to delete in the body of the request. This method uses the `recipientId` as the key for deleting recipients.
- *
- * If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes recipients from an envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients` endpoint.
+ *
+ * Deletes one or more recipients from a draft or sent envelope. List the recipients that you want to delete in the body of the request. This method uses the `recipientId` as the key for deleting recipients.
+ *
+ * If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn recipients_delete(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeRecipients,
- ) -> Result<crate::types::EnvelopeRecipients> {
+ ) -> ClientResult<crate::types::EnvelopeRecipients> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -246,30 +248,30 @@ impl EnvelopeRecipients {
.await
}
/**
- * Updates document visibility for recipients.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/document_visibility` endpoint.
- *
- * This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body.
- *
- * **Note**: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates document visibility for recipients.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/document_visibility` endpoint.
+ *
+ * This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body.
+ *
+ * **Note**: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn recipients_put_document_visibility(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::DocumentVisibilityList,
- ) -> Result<crate::types::DocumentVisibilityList> {
+ ) -> ClientResult<crate::types::DocumentVisibilityList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/document_visibility",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -284,32 +286,32 @@ impl EnvelopeRecipients {
.await
}
/**
- * Deletes a recipient from an envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}` endpoint.
- *
- * Deletes a recipient from a `draft` or `sent` envelope.
- *
- * If the envelope is "In Process" (has been sent and is not completed or voided), recipients that have completed their actions cannot be deleted.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Deletes a recipient from an envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}` endpoint.
+ *
+ * Deletes a recipient from a `draft` or `sent` envelope.
+ *
+ * If the envelope is "In Process" (has been sent and is not completed or voided), recipients that have completed their actions cannot be deleted.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_delete_recipient(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<crate::types::EnvelopeRecipients> {
+ ) -> ClientResult<crate::types::EnvelopeRecipients> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -324,30 +326,30 @@ impl EnvelopeRecipients {
.await
}
/**
- * Creates a resource token for a sender to request ID Evidence data. .
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof_token` endpoint.
- *
- * Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](https://developers.docusign.com/docs/idevidence-api/).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a resource token for a sender to request ID Evidence data. .
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof_token` endpoint.
+ *
+ * Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](https://developers.docusign.com/docs/idevidence-api/).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn recipients_post_recipient_proof_file_resource_token(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<crate::types::ProofServiceResourceToken> {
+ ) -> ClientResult<crate::types::ProofServiceResourceToken> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/identity_proof_token",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -362,43 +364,43 @@ impl EnvelopeRecipients {
.await
}
/**
- * Create the link to the page for manually reviewing IDs.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/views/identity_manual_review` endpoint.
- *
- * This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- A value that identifies your account. This value is automatically generated by DocuSign for any account you create. Copy the value from the API Account ID field in the [AppsI and Keys](https://support.docusign.com/en/guides/ndse-admin-guide-api-and-keys) page.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A GUID value that DocuSign assigns to identify each recipient in an envelope. This value is globally unique for all recipients, not just those in your account.
- *
- * The specified recipient must belong to a workflow that allows the [manual review](https://support.docusign.com/en/guides/Identity-Verification-DocuSign-eSignature-Admin-Guide) of IDs. In addition, the status of the automatic verification for this recipient must return `Failed` and the value of the `vendorFailureStatusCode` field must be `MANUAL_REVIEW_STARTED` as shown in the following extract of a response to the [GET ENVELOPE](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/get/) method:
- * <p>
- *
- * ```
- * "recipientAuthenticationStatus": {
- * "identityVerificationResult": {
- * "status": "Failed",
- * "eventTimestamp": "2020-09-04T16:59:42.8045667Z",
- * "vendorFailureStatusCode": "MANUAL_REVIEW_STARTED"
- * }
- * }
- * ```.
- */
+ * Create the link to the page for manually reviewing IDs.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/views/identity_manual_review` endpoint.
+ *
+ * This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- A value that identifies your account. This value is automatically generated by DocuSign for any account you create. Copy the value from the API Account ID field in the [AppsI and Keys](https://support.docusign.com/en/guides/ndse-admin-guide-api-and-keys) page.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A GUID value that DocuSign assigns to identify each recipient in an envelope. This value is globally unique for all recipients, not just those in your account.
+ *
+ * The specified recipient must belong to a workflow that allows the [manual review](https://support.docusign.com/en/guides/Identity-Verification-DocuSign-eSignature-Admin-Guide) of IDs. In addition, the status of the automatic verification for this recipient must return `Failed` and the value of the `vendorFailureStatusCode` field must be `MANUAL_REVIEW_STARTED` as shown in the following extract of a response to the [GET ENVELOPE](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/get/) method:
+ * <p>
+ *
+ * ```
+ * "recipientAuthenticationStatus": {
+ * "identityVerificationResult": {
+ * "status": "Failed",
+ * "eventTimestamp": "2020-09-04T16:59:42.8045667Z",
+ * "vendorFailureStatusCode": "MANUAL_REVIEW_STARTED"
+ * }
+ * }
+ * ```.
+ */
pub async fn views_post_recipient_manual_review_view(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<crate::types::ViewUrl> {
+ ) -> ClientResult<crate::types::ViewUrl> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/views/identity_manual_review",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -413,30 +415,30 @@ impl EnvelopeRecipients {
.await
}
/**
- * Creates an envelope recipient preview.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview` endpoint.
- *
- * This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.
- *
- * For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates an envelope recipient preview.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview` endpoint.
+ *
+ * This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.
+ *
+ * For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_preview(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::RecipientPreviewRequest,
- ) -> Result<crate::types::ViewUrl> {
+ ) -> ClientResult<crate::types::ViewUrl> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/recipient_preview",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_templates.rs b/docusign/src/envelope_templates.rs
index cb33fd7..a19be8a 100644
--- a/docusign/src/envelope_templates.rs
+++ b/docusign/src/envelope_templates.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeTemplates {
pub client: Client,
@@ -13,31 +15,31 @@ impl EnvelopeTemplates {
}
/**
- * Gets the templates associated with a document in an existing envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates` endpoint.
- *
- * Retrieves the templates associated with a document in the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- A comma-separated list that limits the results.
- * Valid values are:
- *
- * * `applied`
- * * `matched`
- * .
- */
+ * Gets the templates associated with a document in an existing envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates` endpoint.
+ *
+ * Retrieves the templates associated with a document in the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- A comma-separated list that limits the results.
+ * Valid values are:
+ *
+ * * `applied`
+ * * `matched`
+ * .
+ */
pub async fn templates_get_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
include: &str,
- ) -> Result<crate::types::TemplateInformation> {
+ ) -> ClientResult<crate::types::TemplateInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -46,9 +48,9 @@ impl EnvelopeTemplates {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/templates?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
query_
),
None,
@@ -64,19 +66,19 @@ impl EnvelopeTemplates {
.await
}
/**
- * Adds templates to a document in an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates` endpoint.
- *
- * Adds templates to a document in the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `preserve_template_recipient: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds templates to a document in an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates` endpoint.
+ *
+ * Adds templates to a document in the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `preserve_template_recipient: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn templates_post_document(
&self,
account_id: &str,
@@ -84,7 +86,7 @@ impl EnvelopeTemplates {
envelope_id: &str,
preserve_template_recipient: &str,
body: &crate::types::DocumentTemplateList,
- ) -> Result<crate::types::DocumentTemplateList> {
+ ) -> ClientResult<crate::types::DocumentTemplateList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !preserve_template_recipient.is_empty() {
query_args.push((
@@ -96,9 +98,9 @@ impl EnvelopeTemplates {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/templates?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
query_
),
None,
@@ -114,33 +116,33 @@ impl EnvelopeTemplates {
.await
}
/**
- * Deletes a template from a document in an existing envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates/{templateId}` endpoint.
- *
- * Deletes the specified template from a document in an existing envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a template from a document in an existing envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates/{templateId}` endpoint.
+ *
+ * Deletes the specified template from a document in an existing envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn templates_delete_document(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
template_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/templates/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
- crate::progenitor_support::encode_path(template_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
+ crate::progenitor_support::encode_path(&template_id.to_string()),
),
None,
);
@@ -155,25 +157,25 @@ impl EnvelopeTemplates {
.await
}
/**
- * Get List of Templates used in an Envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates` endpoint.
- *
- * This returns a list of the server-side templates, their name and ID, used in an envelope.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- The possible value is `matching_applied`, which returns template matching information for the template.
- */
+ * Get List of Templates used in an Envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates` endpoint.
+ *
+ * This returns a list of the server-side templates, their name and ID, used in an envelope.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- The possible value is `matching_applied`, which returns template matching information for the template.
+ */
pub async fn templates_get_envelope(
&self,
account_id: &str,
envelope_id: &str,
include: &str,
- ) -> Result<crate::types::TemplateInformation> {
+ ) -> ClientResult<crate::types::TemplateInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -182,8 +184,8 @@ impl EnvelopeTemplates {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/templates?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -199,25 +201,25 @@ impl EnvelopeTemplates {
.await
}
/**
- * Adds templates to an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates` endpoint.
- *
- * Adds templates to the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `preserve_template_recipient: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds templates to an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates` endpoint.
+ *
+ * Adds templates to the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `preserve_template_recipient: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn templates_post_envelope(
&self,
account_id: &str,
envelope_id: &str,
preserve_template_recipient: &str,
body: &crate::types::DocumentTemplateList,
- ) -> Result<crate::types::DocumentTemplateList> {
+ ) -> ClientResult<crate::types::DocumentTemplateList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !preserve_template_recipient.is_empty() {
query_args.push((
@@ -229,8 +231,8 @@ impl EnvelopeTemplates {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/templates?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
diff --git a/docusign/src/envelope_transfer_rules.rs b/docusign/src/envelope_transfer_rules.rs
index 05a24af..6b168bc 100644
--- a/docusign/src/envelope_transfer_rules.rs
+++ b/docusign/src/envelope_transfer_rules.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeTransferRules {
pub client: Client,
@@ -13,26 +15,26 @@ impl EnvelopeTransferRules {
}
/**
- * Gets envelope transfer rules.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
- *
- * This method retrieves a list of envelope transfer rules associated with an account.
- *
- * **Note**: Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- (Optional) The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
- */
+ * Gets envelope transfer rules.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
+ *
+ * This method retrieves a list of envelope transfer rules associated with an account.
+ *
+ * **Note**: Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- (Optional) The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
+ */
pub async fn get(
&self,
account_id: &str,
count: &str,
start_position: &str,
- ) -> Result<crate::types::EnvelopeTransferRuleInformation> {
+ ) -> ClientResult<crate::types::EnvelopeTransferRuleInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -44,7 +46,7 @@ impl EnvelopeTransferRules {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/transfer_rules?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -60,27 +62,27 @@ impl EnvelopeTransferRules {
.await
}
/**
- * Changes the status of multiple envelope transfer rules.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
- *
- * This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled.
- *
- * **Note**: You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Changes the status of multiple envelope transfer rules.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
+ *
+ * This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled.
+ *
+ * **Note**: You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::EnvelopeTransferRuleInformation,
- ) -> Result<crate::types::EnvelopeTransferRuleInformation> {
+ ) -> ClientResult<crate::types::EnvelopeTransferRuleInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/transfer_rules",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -95,36 +97,36 @@ impl EnvelopeTransferRules {
.await
}
/**
- * Creates an envelope transfer rule.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
- *
- * This method creates an envelope transfer rule.
- *
- * When you create an envelope transfer rule, you specify the following properties:
- *
- * - `eventType`
- * - `fromGroups`
- * - `toUser`
- * - `toFolder`
- * - `carbonCopyOriginalOwner`
- * - `enabled`
- *
- * **Note**: Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates an envelope transfer rule.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules` endpoint.
+ *
+ * This method creates an envelope transfer rule.
+ *
+ * When you create an envelope transfer rule, you specify the following properties:
+ *
+ * - `eventType`
+ * - `fromGroups`
+ * - `toUser`
+ * - `toFolder`
+ * - `carbonCopyOriginalOwner`
+ * - `enabled`
+ *
+ * **Note**: Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::EnvelopeTransferRuleRequest,
- ) -> Result<crate::types::EnvelopeTransferRuleInformation> {
+ ) -> ClientResult<crate::types::EnvelopeTransferRuleInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/transfer_rules",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -139,32 +141,32 @@ impl EnvelopeTransferRules {
.await
}
/**
- * Changes the status of an envelope transfer rule.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}` endpoint.
- *
- * This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled.
- *
- * You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body.
- *
- * **Note**: You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_transfer_rule_id: &str` -- The id of the envelope transfer rule. The system generates this id when the rule is first created.
- */
+ * Changes the status of an envelope transfer rule.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}` endpoint.
+ *
+ * This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled.
+ *
+ * You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body.
+ *
+ * **Note**: You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_transfer_rule_id: &str` -- The id of the envelope transfer rule. The system generates this id when the rule is first created.
+ */
pub async fn put_rule(
&self,
account_id: &str,
envelope_transfer_rule_id: &str,
body: &crate::types::EnvelopeTransferRule,
- ) -> Result<crate::types::EnvelopeTransferRule> {
+ ) -> ClientResult<crate::types::EnvelopeTransferRule> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/transfer_rules/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_transfer_rule_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_transfer_rule_id.to_string()),
),
None,
);
@@ -179,25 +181,29 @@ impl EnvelopeTransferRules {
.await
}
/**
- * Deletes an envelope transfer rule.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}` endpoint.
- *
- * This method deletes an envelope transfer rule.
- *
- * **Note**: Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_transfer_rule_id: &str` -- The id of the envelope transfer rule. The system generates this id when the rule is first created.
- */
- pub async fn delete(&self, account_id: &str, envelope_transfer_rule_id: &str) -> Result<()> {
+ * Deletes an envelope transfer rule.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}` endpoint.
+ *
+ * This method deletes an envelope transfer rule.
+ *
+ * **Note**: Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_transfer_rule_id: &str` -- The id of the envelope transfer rule. The system generates this id when the rule is first created.
+ */
+ pub async fn delete(
+ &self,
+ account_id: &str,
+ envelope_transfer_rule_id: &str,
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/transfer_rules/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_transfer_rule_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_transfer_rule_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_views.rs b/docusign/src/envelope_views.rs
index 9ac1e04..653a786 100644
--- a/docusign/src/envelope_views.rs
+++ b/docusign/src/envelope_views.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeViews {
pub client: Client,
@@ -13,43 +15,43 @@ impl EnvelopeViews {
}
/**
- * Returns a URL to the envelope correction UI.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct` endpoint.
- *
- * Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications.
- *
- * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
- *
- * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
- *
- * <blockquote>
- * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
- *
- * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
- *
- * <ul>
- * <li>Configure each sender to have their own individual user account to use this API method.</li>
- * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
- * </ul>
- * </blockquote>
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the envelope correction UI.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct` endpoint.
+ *
+ * Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications.
+ *
+ * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
+ *
+ * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
+ *
+ * <blockquote>
+ * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
+ *
+ * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
+ *
+ * <ul>
+ * <li>Configure each sender to have their own individual user account to use this API method.</li>
+ * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
+ * </ul>
+ * </blockquote>
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_envelope_correct_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::CorrectViewRequest,
- ) -> Result<crate::types::EnvelopeViews> {
+ ) -> ClientResult<crate::types::EnvelopeViews> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/correct",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -64,28 +66,28 @@ impl EnvelopeViews {
.await
}
/**
- * Revokes the correction view URL to the Envelope UI.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Revokes the correction view URL to the Envelope UI.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_delete_envelope_correct_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::CorrectViewRequest,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/correct",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -100,45 +102,45 @@ impl EnvelopeViews {
.await
}
/**
- * Returns a URL to the edit view UI.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit` endpoint.
- *
- * Returns a URL that enables you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view.
- *
- * Upon sending completion, the user is returned to the return URL provided by the API application.
- *
- * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
- *
- * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
- *
- * <blockquote>
- * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
- *
- * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
- *
- * <ul>
- * <li>Configure each sender to have their own individual user account to use this API method.</li>
- * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
- * </ul>
- * </blockquote>
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the edit view UI.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit` endpoint.
+ *
+ * Returns a URL that enables you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view.
+ *
+ * Upon sending completion, the user is returned to the return URL provided by the API application.
+ *
+ * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
+ *
+ * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
+ *
+ * <blockquote>
+ * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
+ *
+ * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
+ *
+ * <ul>
+ * <li>Configure each sender to have their own individual user account to use this API method.</li>
+ * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
+ * </ul>
+ * </blockquote>
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_envelope_edit_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::ReturnUrlRequest,
- ) -> Result<crate::types::EnvelopeViews> {
+ ) -> ClientResult<crate::types::EnvelopeViews> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/edit",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -153,54 +155,54 @@ impl EnvelopeViews {
.await
}
/**
- * Returns a URL to the recipient view UI.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient` endpoint.
- *
- * Returns a URL that enables you to embed the recipient view of the DocuSign UI in your applications. If the recipient is a signer, then the view will provide the signing ceremony.
- *
- * **Note**: Please redirect the client to the URL. iFrames should not be used, especially if the recipient is using a mobile or tablet.
- *
- * This method is only used with envelopes in the `sent` status.
- *
- * Your application is responsible for authenticating the identity of the recipient or signer when you use this method. Use the parameters `assertionId`, `authenticationInstant`, `authenticationMethod`, `clientUserId`, and `securityDomain` to record information on how the recipient was authenticated. At a minimum, `authenticationMethod` and `clientUserId` are required. The information that you provide is included in the envelope's certificate of completion.
- *
- * ## Redirects
- * After the signer completes or ends the signing ceremony, DocuSign will redirect the user's browser back to your app via the `returnUrl` that you supply. (The user is redirected through a different subdomain, depending on the region of the account sending the envelope. Please [verify your domain whitelist](https://www.docusign.com/trust/security/whitelists).)
- *
- * ### The event status parameter
- * DocuSign appends an `event` query parameter to the URL with the outcome of the signing ceremony. Your app can use this event parameter to determine the next step for the envelope. Do not fetch the envelope status by using Envelopes::get or a similar method because doing so could break the DocuSign rule against polling.
- *
- * **Note**: Because a user can cancel redirection, close their browser after signing, or spoof the landing URL. Hitting the `ReturnUrl` should not be the single source of truth for envelope status for your integration.
- *
- * ## The URL is time-limited
- * The URL returned by this method is valid for one use, and you must use or display it within a couple of minutes after it is generated. AFter the recipient is redirected to the recipient view, they must interact with the DocuSign system periodically or their session will time out.
- *
- * Because the URL is time-limited, it should not be stored or sent through email. After you receive it, immediately redirect the user's browser to the URL.
- *
- * If you want to invite someone to an embedded signing session via email, the email invitation's URL must be to your application. When invoked, your app should request a recipientView URL from DocuSign and then redirect the signer to that URL.
- *
- * ## Maintaining State
- * After the recipient completes the recipient view (or signing ceremony), they are redirected to your application. Your application can recover state information about the transaction by storing information in a cookie, or by including query parameters in the `returnUrl` field. Eg, `https://myapp.eg.com/docusign_return?myState=12345` When the user is redirected to your app, the `event` query parameter will be appended. In this example, prevent spoofing by not using a guessable value as the state value.
- *
- * **Note**: You can revoke the URL by making the DELETE call to the same URL with no request body.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the recipient view UI.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient` endpoint.
+ *
+ * Returns a URL that enables you to embed the recipient view of the DocuSign UI in your applications. If the recipient is a signer, then the view will provide the signing ceremony.
+ *
+ * **Note**: Please redirect the client to the URL. iFrames should not be used, especially if the recipient is using a mobile or tablet.
+ *
+ * This method is only used with envelopes in the `sent` status.
+ *
+ * Your application is responsible for authenticating the identity of the recipient or signer when you use this method. Use the parameters `assertionId`, `authenticationInstant`, `authenticationMethod`, `clientUserId`, and `securityDomain` to record information on how the recipient was authenticated. At a minimum, `authenticationMethod` and `clientUserId` are required. The information that you provide is included in the envelope's certificate of completion.
+ *
+ * ## Redirects
+ * After the signer completes or ends the signing ceremony, DocuSign will redirect the user's browser back to your app via the `returnUrl` that you supply. (The user is redirected through a different subdomain, depending on the region of the account sending the envelope. Please [verify your domain whitelist](https://www.docusign.com/trust/security/whitelists).)
+ *
+ * ### The event status parameter
+ * DocuSign appends an `event` query parameter to the URL with the outcome of the signing ceremony. Your app can use this event parameter to determine the next step for the envelope. Do not fetch the envelope status by using Envelopes::get or a similar method because doing so could break the DocuSign rule against polling.
+ *
+ * **Note**: Because a user can cancel redirection, close their browser after signing, or spoof the landing URL. Hitting the `ReturnUrl` should not be the single source of truth for envelope status for your integration.
+ *
+ * ## The URL is time-limited
+ * The URL returned by this method is valid for one use, and you must use or display it within a couple of minutes after it is generated. AFter the recipient is redirected to the recipient view, they must interact with the DocuSign system periodically or their session will time out.
+ *
+ * Because the URL is time-limited, it should not be stored or sent through email. After you receive it, immediately redirect the user's browser to the URL.
+ *
+ * If you want to invite someone to an embedded signing session via email, the email invitation's URL must be to your application. When invoked, your app should request a recipientView URL from DocuSign and then redirect the signer to that URL.
+ *
+ * ## Maintaining State
+ * After the recipient completes the recipient view (or signing ceremony), they are redirected to your application. Your application can recover state information about the transaction by storing information in a cookie, or by including query parameters in the `returnUrl` field. Eg, `https://myapp.eg.com/docusign_return?myState=12345` When the user is redirected to your app, the `event` query parameter will be appended. In this example, prevent spoofing by not using a guessable value as the state value.
+ *
+ * **Note**: You can revoke the URL by making the DELETE call to the same URL with no request body.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_envelope_recipient_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::RecipientViewRequest,
- ) -> Result<crate::types::EnvelopeViews> {
+ ) -> ClientResult<crate::types::EnvelopeViews> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/recipient",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -215,56 +217,56 @@ impl EnvelopeViews {
.await
}
/**
- * Returns a URL to the sender view UI.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/sender` endpoint.
- *
- * Returns a URL that enables you to embed the sender view of the DocuSign UI in your applications.
- *
- * The returned URL can only be redirected to immediately after it is generated. It can only be used once.
- * Therefore, request the URL immediately before you redirect your user to it.
- *
- * For the best user experience, don't use an iFrame. For iOS devices DocuSign recommends using a WebView.
- *
- * Multiple solutions are available for maintaining your
- * client state. See the **Maintaining State** section of the [Embedded Signing introduction.](https://developers.docusign.com/esign-rest-api/guides/embedded-signing)
- *
- * After the user has completed the sending view, the browser is redirected to the `returnUrl` supplied.
- *
- * By default, if the envelope already contains one or more documents, DocuSign will initially show the document tagging view when you redirect to the URL.
- *
- * To start with the envelope's recipients and documents view instead, examine the URL in the method's response.
- * Then change the query parameter from `send=1` to `send=0` to start with the recipients/documents view.
- *
- * **Note**: You can revoke the URL by making the DELETE call to the same URL with no request body.
- *
- * <blockquote>
- * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
- *
- * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
- *
- * <ul>
- * <li>Configure each sender to have their own individual user account to use this API method.</li>
- * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
- * </ul>
- * </blockquote>
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the sender view UI.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/sender` endpoint.
+ *
+ * Returns a URL that enables you to embed the sender view of the DocuSign UI in your applications.
+ *
+ * The returned URL can only be redirected to immediately after it is generated. It can only be used once.
+ * Therefore, request the URL immediately before you redirect your user to it.
+ *
+ * For the best user experience, don't use an iFrame. For iOS devices DocuSign recommends using a WebView.
+ *
+ * Multiple solutions are available for maintaining your
+ * client state. See the **Maintaining State** section of the [Embedded Signing introduction.](https://developers.docusign.com/esign-rest-api/guides/embedded-signing)
+ *
+ * After the user has completed the sending view, the browser is redirected to the `returnUrl` supplied.
+ *
+ * By default, if the envelope already contains one or more documents, DocuSign will initially show the document tagging view when you redirect to the URL.
+ *
+ * To start with the envelope's recipients and documents view instead, examine the URL in the method's response.
+ * Then change the query parameter from `send=1` to `send=0` to start with the recipients/documents view.
+ *
+ * **Note**: You can revoke the URL by making the DELETE call to the same URL with no request body.
+ *
+ * <blockquote>
+ * <p><b>Information Security notice</b>: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.</p>
+ *
+ * <p>If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:</p>
+ *
+ * <ul>
+ * <li>Configure each sender to have their own individual user account to use this API method.</li>
+ * <li>Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.</li>
+ * </ul>
+ * </blockquote>
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_envelope_sender_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::ReturnUrlRequest,
- ) -> Result<crate::types::EnvelopeViews> {
+ ) -> ClientResult<crate::types::EnvelopeViews> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/sender",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -279,33 +281,33 @@ impl EnvelopeViews {
.await
}
/**
- * Returns a URL to the shared recipient view UI for an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/shared` endpoint.
- *
- * Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them.
- *
- * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
- *
- * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the shared recipient view UI for an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/shared` endpoint.
+ *
+ * Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them.
+ *
+ * **Important**: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.
+ *
+ * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_envelope_recipient_shared_view(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::RecipientViewRequest,
- ) -> Result<crate::types::ViewUrl> {
+ ) -> ClientResult<crate::types::ViewUrl> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/views/shared",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -320,30 +322,30 @@ impl EnvelopeViews {
.await
}
/**
- * Returns a URL to the authentication view UI.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/views/console` endpoint.
- *
- * Returns a URL that enables you to embed the authentication view of the DocuSign UI in your applications.
- *
- * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
- *
- * <blockquote>
- * <p><b>Information Security notice</b>: This method provides full administrator access to the account.</p>
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a URL to the authentication view UI.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/views/console` endpoint.
+ *
+ * Returns a URL that enables you to embed the authentication view of the DocuSign UI in your applications.
+ *
+ * **Note**: You can revoke this URL by making the DELETE call to the same URL with no request body.
+ *
+ * <blockquote>
+ * <p><b>Information Security notice</b>: This method provides full administrator access to the account.</p>
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn views_post_account_console_view(
&self,
account_id: &str,
body: &crate::types::ConsoleViewRequest,
- ) -> Result<crate::types::EnvelopeViews> {
+ ) -> ClientResult<crate::types::EnvelopeViews> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/views/console",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelope_workflow_definition.rs b/docusign/src/envelope_workflow_definition.rs
index a587931..4a7c43a 100644
--- a/docusign/src/envelope_workflow_definition.rs
+++ b/docusign/src/envelope_workflow_definition.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct EnvelopeWorkflowDefinition {
pub client: Client,
@@ -13,23 +15,27 @@ impl EnvelopeWorkflowDefinition {
}
/**
- * Gets an envelope's workflow definition.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
- *
- * Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn get(&self, account_id: &str, envelope_id: &str) -> Result<crate::types::Workflow> {
+ * Gets an envelope's workflow definition.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
+ *
+ * Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn get(
+ &self,
+ account_id: &str,
+ envelope_id: &str,
+ ) -> ClientResult<crate::types::Workflow> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -44,28 +50,28 @@ impl EnvelopeWorkflowDefinition {
.await
}
/**
- * Updates an envelope's workflow definition.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
- *
- * Updates the specified envelope's workflow definition if it has one.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an envelope's workflow definition.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
+ *
+ * Updates the specified envelope's workflow definition if it has one.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::Workflow,
- ) -> Result<crate::types::Workflow> {
+ ) -> ClientResult<crate::types::Workflow> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -80,24 +86,24 @@ impl EnvelopeWorkflowDefinition {
.await
}
/**
- * Deletes an envelope's workflow definition.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
- *
- * Deletes the specified envelope's workflow definition if it has one.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete(&self, account_id: &str, envelope_id: &str) -> Result<()> {
+ * Deletes an envelope's workflow definition.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow` endpoint.
+ *
+ * Deletes the specified envelope's workflow definition if it has one.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete(&self, account_id: &str, envelope_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -112,27 +118,27 @@ impl EnvelopeWorkflowDefinition {
.await
}
/**
- * Gets template's workflow definition.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
- *
- * Returns template's workflow definition if the template specified by `templateId` has one.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets template's workflow definition.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
+ *
+ * Returns template's workflow definition if the template specified by `templateId` has one.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_template(
&self,
account_id: &str,
template_id: &str,
- ) -> Result<crate::types::Workflow> {
+ ) -> ClientResult<crate::types::Workflow> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/templates/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(template_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&template_id.to_string()),
),
None,
);
@@ -147,28 +153,28 @@ impl EnvelopeWorkflowDefinition {
.await
}
/**
- * Update a template's workflow definiton.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
- *
- * Updates the specified template's workflow definition if it has one.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Update a template's workflow definiton.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
+ *
+ * Updates the specified template's workflow definition if it has one.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put_template(
&self,
account_id: &str,
template_id: &str,
body: &crate::types::Workflow,
- ) -> Result<crate::types::Workflow> {
+ ) -> ClientResult<crate::types::Workflow> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/templates/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(template_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&template_id.to_string()),
),
None,
);
@@ -183,23 +189,23 @@ impl EnvelopeWorkflowDefinition {
.await
}
/**
- * Deletes a template's workflow definition.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
- *
- * Deletes the specified template's workflow definition if it has one.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete_template(&self, account_id: &str, template_id: &str) -> Result<()> {
+ * Deletes a template's workflow definition.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/templates/{templateId}/workflow` endpoint.
+ *
+ * Deletes the specified template's workflow definition if it has one.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `template_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete_template(&self, account_id: &str, template_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/templates/{}/workflow",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(template_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&template_id.to_string()),
),
None,
);
diff --git a/docusign/src/envelopes.rs b/docusign/src/envelopes.rs
index 45ef773..69ede5a 100644
--- a/docusign/src/envelopes.rs
+++ b/docusign/src/envelopes.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Envelopes {
pub client: Client,
@@ -13,262 +15,262 @@ impl Envelopes {
}
/**
- * Gets status changes for one or more envelopes.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes` endpoint.
- *
- * Retrieves a list of envelopes that match your request.
- * A large set of optional filters let you filter
- * by date,
- * by envelope ID,
- * or by status codes.
- *
- * Your request must include one or more of the following parameters:
- *
- * * `from_date`
- * * `envelope_ids`
- * * `transaction_ids`
- *
- *
- * Getting envelope status using `transaction_ids` is useful
- * for offline signing situations where it can be used
- * determine if an envelope was created or not. It can be used
- * for the cases where a network connection was lost, before
- * the envelope status could be returned.
- *
- * To avoid unnecessary database queries, the DocuSign
- * signature platform first checks requests to ensure that the
- * filter set supplied does not result in a zero-size response
- * before querying the database.
- *
- * For example, for a request with a `from_to_status` of
- * `delivered` and a current `status` of `created,sent`,
- * DocuSign will always return an empty list.
- * This is because the request translates to: find the
- * envelopes that were delivered between the `from_date` and
- * `to_date` dates that have a current status of `created` or
- * `sent`. Since an envelope that has been delivered can
- * never have a status of `created` or `sent`, a zero-size
- * response would be generated.
- * In this case, DocuSign does not query the database
- * and returns an empty list immediately.
- *
- *
- * The following table shows the valid current envelope
- * statuses (`status` parameter) for the different status
- * qualifiers (`from_to_status` parameter) in the request. If
- * the status and status qualifiers in the API request do not
- * contain any of the values shown in the Valid Current
- * Statuses column, then an empty list is returned.
- *
- * Client applications should check that the statuses (`status`
- * parameter) they are requesting make sense for a given
- * `from_to_status` parameter value.
- *
- * | Status Qualifier<br>(`from_to_status`) | Effective Status Qualifier | Valid Current Statuses |
- * | :------------------------------------- | :------------------------- | :-------------------------------------------------------------------------- |
- * | any (changed) | StatusChanged | any, created, sent, delivered, signed, completed, declined, voided, deleted |
- * | created | Created | any, created, sent, delivered, signed, completed, declined, voided, deleted |
- * | sent | Sent | any, sent, delivered, signed, completed, declined, voided, deleted |
- * | delivered | StatusChanged | any, delivered, signed, completed, declined, voided, deleted |
- * | signed | StatusChanged | any, signed, completed, declined, voided, deleted |
- * | completed | Completed | any, completed, declined, voided, deleted |
- * | declined | StatusChanged | any, declined, voided, deleted |
- * | timedout<br>always return zero results | StatusChanged | any, voided, deleted |
- * | voided | Voided | any, voided, deleted |
- * | deleted | StatusChanged | any, deleted |
- *
- * ## Extraneous results
- *
- * In some cases, a request for a specific envelope status will
- * include envelopes with additional statuses. For example, in
- * a request with a `from_date` of 2017-01-01, a `to_date` of
- * 2017-01-07 and the status qualifier (`from_to_status`) set
- * to `delivered`, the response set might contain envelopes
- * that were created during that time period, but not delivered
- * during the time period. As a workaround, check the envelope
- * status values in the result set as needed.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `ac_status: &str` -- Specifies the Authoritative Copy Status for the envelopes. The possible values are: Unknown, Original, Transferred, AuthoritativeCopy, AuthoritativeCopyExportPending, AuthoritativeCopyExported, DepositPending, Deposited, DepositedEO, or DepositFailed.
- * * `block: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `cdse_mode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `continuation_token: &str` -- A token returned in the response to a previous API call that is used to resume a search query from a specific point.
- * * `count: &str` -- Optional. Number of items to return. Currently there is no implicit maximum limit of the number of items that can be returned.
- * .
- * * `custom_field: &str` -- Optional. Specifies a envelope custom field name and value searched for in the envelopes. Format: `custom_envelope_field_name=desired_value`
- *
- * Example: If you have an envelope custom field named "Region" and you want to search for all envelopes where the value is "West" you would use set this parameter to `Region=West`.
- *
- * .
- * * `email: &str` -- Limit results to envelopes
- * sent by the account user
- * with this email address.
- *
- * `user_name` must be given as well,
- * and both `email` and `user_name`
- * must refer to an existing account user.
- * .
- * * `envelope_ids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `exclude: &str` -- Excludes information from the response. Enter as a comma-separated list (e.g., `folders,powerforms`). Valid values are:
- *
- * - `recipients`
- * - `powerforms`
- * - `folders`.
- * * `folder_ids: &str` -- Returns the envelopes from specific folders. Enter as a comma-separated list of either valid folder Guids or the following values:
- *
- * - `awaiting_my_signature`
- * - `completed`
- * - `draft`
- * - `drafts`
- * - `expiring_soon`
- * - `inbox`
- * - `out_for_signature`
- * - `recyclebin`
- * - `sentitems`
- * - `waiting_for_others`.
- * * `folder_types: &str` -- A comma-separated list of folder types you want to retrieve envelopes from. Valid values are:
- *
- * - `normal`
- * - `inbox`
- * - `sentitems`
- * - `draft`
- * - `templates`.
- * * `from_date: &str` -- Specifies the date and time
- * to start looking for status changes.
- * This parameter is required
- * unless `envelopeIds` or `transactionIds`
- * are set.
- *
- *
- * Although you can use any date format
- * supported by the .NET system library's
- * [`DateTime.Parse()`][msoft] function,
- * DocuSign recommends
- * using [ISO 8601][] format dates
- * with an explicit time zone offset
- * If you do not provide
- * a time zone offset,
- * the method uses the server's time zone.
- *
- * For example, the following dates and times refer to the same instant:
- *
- * * `2017-05-02T01:44Z`
- * * `2017-05-01T21:44-04:00`
- * * `2017-05-01T18:44-07:00`
- *
- *
- * [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse
- * [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601.
- * * `from_to_status: &str` -- This is the status type checked for in the `from_date`/`to_date` period. If `changed` is specified, then envelopes that changed status during the period are found. If for example, `created` is specified, then envelopes created during the period are found. Default is `changed`.
- *
- * Possible values are: Voided, Changed, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing.
- * * `include: &str` -- Specifies additional information to return about the envelopes. Enter a comma-separated list, such as `tabs,recipients`. Valid values are:
- *
- * - `custom_fields`: The custom fields associated with the envelope.
- * - `documents`: The documents associated with the envelope.
- * - `attachments`: The attachments associated with the envelope.
- * - `extensions`: Information about the email settings associated with the envelope.
- * - `folders`: The folders where the envelope exists.
- * - `recipients`: The recipients associated with the envelope.
- * - `powerform`: The PowerForms associated with the envelope.
- * - `payment_tabs`: The payment tabs associated with the envelope.
- * .
- * * `include_purge_information: &str` -- When set to **true**, information about envelopes that have been deleted is included in the response.
- * * `intersecting_folder_ids: &str` -- A comma-separated list of folders that you want want to get envelopes from. Valid values are:
- *
- * - `normal`
- * - `inbox`
- * - `sentitems`
- * - `draft`
- * - `templates`.
- * * `last_queried_date: &str` -- Returns envelopes that were modified prior to the specified date and time.
- *
- * Example: `2020-05-09T21:56:12.2500000Z`.
- * * `order: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `order_by: &str` -- Sorts results according to a specific property. Valid values are:
- *
- * - `last_modified`
- * - `action_required`
- * - `created`
- * - `completed`
- * - `envelope_name`
- * - `expire`
- * - `sent`
- * - `signer_list`
- * - `status`
- * - `subject`
- * - `user_name`
- * - `status_changed`
- * - `last_modified`.
- * * `powerformids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `query_budget: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `requester_date_format: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `search_text: &str` -- Free text search criteria that you can use to filter the list of envelopes that is returned.
- * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `status: &str` -- A comma-separated list of current envelope statuses to included in the response. Possible values are:
- *
- * * `completed`
- * * `created`
- * * `declined`
- * * `deleted`
- * * `delivered`
- * * `processing`
- * * `sent`
- * * `signed`
- * * `timedout`
- * * `voided`
- *
- * The `any` value is equivalent to any status.
- * .
- * * `to_date: &str` -- Specifies the date and time
- * to stop looking for status changes.
- * The default is the current date and time.
- *
- * Although you can use any date format
- * supported by the .NET system library's
- * [`DateTime.Parse()`][msoft] function,
- * DocuSign recommends
- * using [ISO 8601][] format dates
- * with an explicit time zone offset
- * If you do not provide
- * a time zone offset,
- * the method uses the server's time zone.
- *
- * For example, the following dates and times refer to the same instant:
- *
- * * `2017-05-02T01:44Z`
- * * `2017-05-01T21:44-04:00`
- * * `2017-05-01T18:44-07:00`
- *
- *
- * [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse
- * [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
- * .
- * * `transaction_ids: &str` -- If included in the query string, this is a comma separated list of envelope `transactionId`s.
- *
- * If included in the `request_body`, this is a list of envelope `transactionId`s.
- *
- * ###### Note: `transactionId`s are only valid in the DocuSign system for seven days.
- * .
- * * `user_filter: &str` -- Returns envelopes where the current user is the recipient, the sender, or the recipient only. (For example, `user_filter=sender`.) Valid values are:
- *
- * - `sender`
- * - `recipient`
- * - `recipient_only`.
- * * `user_id: &str` -- The ID of the user who created the envelopes to be retrieved. Note that an account can have multiple users, and any user with account access can retrieve envelopes by user_id from the account.
- * * `user_name: &str` -- Limit results to envelopes
- * sent by the account user
- * with this user name.
- *
- * `email` must be given as well,
- * and both `email` and `user_name`
- * must refer to an existing account user.
- * .
- */
+ * Gets status changes for one or more envelopes.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes` endpoint.
+ *
+ * Retrieves a list of envelopes that match your request.
+ * A large set of optional filters let you filter
+ * by date,
+ * by envelope ID,
+ * or by status codes.
+ *
+ * Your request must include one or more of the following parameters:
+ *
+ * * `from_date`
+ * * `envelope_ids`
+ * * `transaction_ids`
+ *
+ *
+ * Getting envelope status using `transaction_ids` is useful
+ * for offline signing situations where it can be used
+ * determine if an envelope was created or not. It can be used
+ * for the cases where a network connection was lost, before
+ * the envelope status could be returned.
+ *
+ * To avoid unnecessary database queries, the DocuSign
+ * signature platform first checks requests to ensure that the
+ * filter set supplied does not result in a zero-size response
+ * before querying the database.
+ *
+ * For example, for a request with a `from_to_status` of
+ * `delivered` and a current `status` of `created,sent`,
+ * DocuSign will always return an empty list.
+ * This is because the request translates to: find the
+ * envelopes that were delivered between the `from_date` and
+ * `to_date` dates that have a current status of `created` or
+ * `sent`. Since an envelope that has been delivered can
+ * never have a status of `created` or `sent`, a zero-size
+ * response would be generated.
+ * In this case, DocuSign does not query the database
+ * and returns an empty list immediately.
+ *
+ *
+ * The following table shows the valid current envelope
+ * statuses (`status` parameter) for the different status
+ * qualifiers (`from_to_status` parameter) in the request. If
+ * the status and status qualifiers in the API request do not
+ * contain any of the values shown in the Valid Current
+ * Statuses column, then an empty list is returned.
+ *
+ * Client applications should check that the statuses (`status`
+ * parameter) they are requesting make sense for a given
+ * `from_to_status` parameter value.
+ *
+ * | Status Qualifier<br>(`from_to_status`) | Effective Status Qualifier | Valid Current Statuses |
+ * | :------------------------------------- | :------------------------- | :-------------------------------------------------------------------------- |
+ * | any (changed) | StatusChanged | any, created, sent, delivered, signed, completed, declined, voided, deleted |
+ * | created | Created | any, created, sent, delivered, signed, completed, declined, voided, deleted |
+ * | sent | Sent | any, sent, delivered, signed, completed, declined, voided, deleted |
+ * | delivered | StatusChanged | any, delivered, signed, completed, declined, voided, deleted |
+ * | signed | StatusChanged | any, signed, completed, declined, voided, deleted |
+ * | completed | Completed | any, completed, declined, voided, deleted |
+ * | declined | StatusChanged | any, declined, voided, deleted |
+ * | timedout<br>always return zero results | StatusChanged | any, voided, deleted |
+ * | voided | Voided | any, voided, deleted |
+ * | deleted | StatusChanged | any, deleted |
+ *
+ * ## Extraneous results
+ *
+ * In some cases, a request for a specific envelope status will
+ * include envelopes with additional statuses. For example, in
+ * a request with a `from_date` of 2017-01-01, a `to_date` of
+ * 2017-01-07 and the status qualifier (`from_to_status`) set
+ * to `delivered`, the response set might contain envelopes
+ * that were created during that time period, but not delivered
+ * during the time period. As a workaround, check the envelope
+ * status values in the result set as needed.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `ac_status: &str` -- Specifies the Authoritative Copy Status for the envelopes. The possible values are: Unknown, Original, Transferred, AuthoritativeCopy, AuthoritativeCopyExportPending, AuthoritativeCopyExported, DepositPending, Deposited, DepositedEO, or DepositFailed.
+ * * `block: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `cdse_mode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `continuation_token: &str` -- A token returned in the response to a previous API call that is used to resume a search query from a specific point.
+ * * `count: &str` -- Optional. Number of items to return. Currently there is no implicit maximum limit of the number of items that can be returned.
+ * .
+ * * `custom_field: &str` -- Optional. Specifies a envelope custom field name and value searched for in the envelopes. Format: `custom_envelope_field_name=desired_value`
+ *
+ * Example: If you have an envelope custom field named "Region" and you want to search for all envelopes where the value is "West" you would use set this parameter to `Region=West`.
+ *
+ * .
+ * * `email: &str` -- Limit results to envelopes
+ * sent by the account user
+ * with this email address.
+ *
+ * `user_name` must be given as well,
+ * and both `email` and `user_name`
+ * must refer to an existing account user.
+ * .
+ * * `envelope_ids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `exclude: &str` -- Excludes information from the response. Enter as a comma-separated list (e.g., `folders,powerforms`). Valid values are:
+ *
+ * - `recipients`
+ * - `powerforms`
+ * - `folders`.
+ * * `folder_ids: &str` -- Returns the envelopes from specific folders. Enter as a comma-separated list of either valid folder Guids or the following values:
+ *
+ * - `awaiting_my_signature`
+ * - `completed`
+ * - `draft`
+ * - `drafts`
+ * - `expiring_soon`
+ * - `inbox`
+ * - `out_for_signature`
+ * - `recyclebin`
+ * - `sentitems`
+ * - `waiting_for_others`.
+ * * `folder_types: &str` -- A comma-separated list of folder types you want to retrieve envelopes from. Valid values are:
+ *
+ * - `normal`
+ * - `inbox`
+ * - `sentitems`
+ * - `draft`
+ * - `templates`.
+ * * `from_date: &str` -- Specifies the date and time
+ * to start looking for status changes.
+ * This parameter is required
+ * unless `envelopeIds` or `transactionIds`
+ * are set.
+ *
+ *
+ * Although you can use any date format
+ * supported by the .NET system library's
+ * [`DateTime.Parse()`][msoft] function,
+ * DocuSign recommends
+ * using [ISO 8601][] format dates
+ * with an explicit time zone offset
+ * If you do not provide
+ * a time zone offset,
+ * the method uses the server's time zone.
+ *
+ * For example, the following dates and times refer to the same instant:
+ *
+ * * `2017-05-02T01:44Z`
+ * * `2017-05-01T21:44-04:00`
+ * * `2017-05-01T18:44-07:00`
+ *
+ *
+ * [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse
+ * [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601.
+ * * `from_to_status: &str` -- This is the status type checked for in the `from_date`/`to_date` period. If `changed` is specified, then envelopes that changed status during the period are found. If for example, `created` is specified, then envelopes created during the period are found. Default is `changed`.
+ *
+ * Possible values are: Voided, Changed, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing.
+ * * `include: &str` -- Specifies additional information to return about the envelopes. Enter a comma-separated list, such as `tabs,recipients`. Valid values are:
+ *
+ * - `custom_fields`: The custom fields associated with the envelope.
+ * - `documents`: The documents associated with the envelope.
+ * - `attachments`: The attachments associated with the envelope.
+ * - `extensions`: Information about the email settings associated with the envelope.
+ * - `folders`: The folders where the envelope exists.
+ * - `recipients`: The recipients associated with the envelope.
+ * - `powerform`: The PowerForms associated with the envelope.
+ * - `payment_tabs`: The payment tabs associated with the envelope.
+ * .
+ * * `include_purge_information: &str` -- When set to **true**, information about envelopes that have been deleted is included in the response.
+ * * `intersecting_folder_ids: &str` -- A comma-separated list of folders that you want want to get envelopes from. Valid values are:
+ *
+ * - `normal`
+ * - `inbox`
+ * - `sentitems`
+ * - `draft`
+ * - `templates`.
+ * * `last_queried_date: &str` -- Returns envelopes that were modified prior to the specified date and time.
+ *
+ * Example: `2020-05-09T21:56:12.2500000Z`.
+ * * `order: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `order_by: &str` -- Sorts results according to a specific property. Valid values are:
+ *
+ * - `last_modified`
+ * - `action_required`
+ * - `created`
+ * - `completed`
+ * - `envelope_name`
+ * - `expire`
+ * - `sent`
+ * - `signer_list`
+ * - `status`
+ * - `subject`
+ * - `user_name`
+ * - `status_changed`
+ * - `last_modified`.
+ * * `powerformids: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `query_budget: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `requester_date_format: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `search_text: &str` -- Free text search criteria that you can use to filter the list of envelopes that is returned.
+ * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `status: &str` -- A comma-separated list of current envelope statuses to included in the response. Possible values are:
+ *
+ * * `completed`
+ * * `created`
+ * * `declined`
+ * * `deleted`
+ * * `delivered`
+ * * `processing`
+ * * `sent`
+ * * `signed`
+ * * `timedout`
+ * * `voided`
+ *
+ * The `any` value is equivalent to any status.
+ * .
+ * * `to_date: &str` -- Specifies the date and time
+ * to stop looking for status changes.
+ * The default is the current date and time.
+ *
+ * Although you can use any date format
+ * supported by the .NET system library's
+ * [`DateTime.Parse()`][msoft] function,
+ * DocuSign recommends
+ * using [ISO 8601][] format dates
+ * with an explicit time zone offset
+ * If you do not provide
+ * a time zone offset,
+ * the method uses the server's time zone.
+ *
+ * For example, the following dates and times refer to the same instant:
+ *
+ * * `2017-05-02T01:44Z`
+ * * `2017-05-01T21:44-04:00`
+ * * `2017-05-01T18:44-07:00`
+ *
+ *
+ * [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse
+ * [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
+ * .
+ * * `transaction_ids: &str` -- If included in the query string, this is a comma separated list of envelope `transactionId`s.
+ *
+ * If included in the `request_body`, this is a list of envelope `transactionId`s.
+ *
+ * ###### Note: `transactionId`s are only valid in the DocuSign system for seven days.
+ * .
+ * * `user_filter: &str` -- Returns envelopes where the current user is the recipient, the sender, or the recipient only. (For example, `user_filter=sender`.) Valid values are:
+ *
+ * - `sender`
+ * - `recipient`
+ * - `recipient_only`.
+ * * `user_id: &str` -- The ID of the user who created the envelopes to be retrieved. Note that an account can have multiple users, and any user with account access can retrieve envelopes by user_id from the account.
+ * * `user_name: &str` -- Limit results to envelopes
+ * sent by the account user
+ * with this user name.
+ *
+ * `email` must be given as well,
+ * and both `email` and `user_name`
+ * must refer to an existing account user.
+ * .
+ */
pub async fn get(
&self,
account_id: &str,
@@ -302,7 +304,7 @@ impl Envelopes {
user_filter: &str,
user_id: &str,
user_name: &str,
- ) -> Result<crate::types::EnvelopesInformation> {
+ ) -> ClientResult<crate::types::EnvelopesInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !ac_status.is_empty() {
query_args.push(("ac_status".to_string(), ac_status.to_string()));
@@ -413,7 +415,7 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -429,91 +431,91 @@ impl Envelopes {
.await
}
/**
- * Creates an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes` endpoint.
- *
- * Creates and sends an envelope or creates a draft envelope.
- * Envelopes are fundamental resources in the DocuSign platform.
- *
- * With this method you can:
- *
- * * Create and send an envelope
- * with [documents][], [recipients][], and [tabs][].
- * * [Create and send an envelope from a template](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/).
- * * [Create and send an envelope from
- * a combination of documents and templates](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/composite/).
- * * Create a draft envelope.
- *
- *
- * When you use this method
- * to create and send an envelope
- * in a single request,
- * the following parameters in the request body (an [`envelopeDefinition`][envelopeDefinition]) are required:
- *
- * | Parameter | Description |
- * | :-------- | :---------- |
- * | `status` | Set to `sent` to send the envelope to recipients.<br>Set to `created` (or don't set at all) to save the envelope as a draft. |
- * | `emailSubject` | The subject of the email used to send the envelope. |
- * | `documents` | The [documents][] to be signed. |
- * | `recipients` | The email addresses of the envelope [recipients][]. |
- *
- *
- * **Note**: If the envelope has a workflow definition
- * and the `workflowStatus` is `paused`,
- * the envelope will not be sent immediately,
- * even if the envelope's `status` is `sent`.
- *
- * There are many ways to use envelopes.
- * You can create and send an envelope
- * with a single API request,
- * or you can use several API requests
- * to create, populate, and send envelopes.
- *
- *
- * | See: | To learn about: |
- * | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
- * | [Envelopes][envelopes] | Envelopes, [adding documents][addingdocs], [tracking][], [locking][], [deleting][], [templates][] |
- * | [Documents][documents] | Documents, [attachments][], [supplemental documents][supdocs], [authoritative copies][authcopies], [purging][] |
- * | [Recipients][recipients] | Recipients, [recipient types][reciptypes], [recipient status][recipstatus] |
- * | [Tabs][tabs] | Tabs, [anchoring tabs][tabanchor], [custom tabs][tabcustom], [payments][] |
- *
- *
- * [addingdocs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
- * [attachments]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
- * [authcopies]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
- * [conoverview]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/overview
- * [deleting]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
- * [documents]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents
- * [envelopeDefinition]: https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/create/
- * [envelopes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes
- * [locking]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
- * [payments]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/payment/
- * [purging]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
- * [recipients]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients
- * [recipstatus]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients/
- * [reciptypes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients/
- * [supdocs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
- * [tabanchor]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/auto-place/
- * [tabcustom]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/custom-tabs/
- * [tabs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs
- * [tabtypes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/
- * [templates]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
- * [tracking]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
- *
- * **Note**: When you create an envelope by using a [composite template](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/composite/), you should specify the envelope custom fields in the inline template. Any custom fields that you specify at the root level are ignored.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `cdse_mode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `change_routing_order: &str` -- When true, users can define the routing order of recipients while sending documents for signature.
- * * `completed_documents_only: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `merge_roles_on_draft: &str` -- When set to **true**, template roles will be merged, and empty recipients will be removed. This parameter applies when you create a draft envelope with multiple templates. (To create a draft envelope, the `status` field is set to `created`.)
- *
- * **Note**: DocuSign recommends that this parameter should be set to **true** whenever you create a draft envelope with multiple templates.
- */
+ * Creates an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes` endpoint.
+ *
+ * Creates and sends an envelope or creates a draft envelope.
+ * Envelopes are fundamental resources in the DocuSign platform.
+ *
+ * With this method you can:
+ *
+ * * Create and send an envelope
+ * with [documents][], [recipients][], and [tabs][].
+ * * [Create and send an envelope from a template](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/).
+ * * [Create and send an envelope from
+ * a combination of documents and templates](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/composite/).
+ * * Create a draft envelope.
+ *
+ *
+ * When you use this method
+ * to create and send an envelope
+ * in a single request,
+ * the following parameters in the request body (an [`envelopeDefinition`][envelopeDefinition]) are required:
+ *
+ * | Parameter | Description |
+ * | :-------- | :---------- |
+ * | `status` | Set to `sent` to send the envelope to recipients.<br>Set to `created` (or don't set at all) to save the envelope as a draft. |
+ * | `emailSubject` | The subject of the email used to send the envelope. |
+ * | `documents` | The [documents][] to be signed. |
+ * | `recipients` | The email addresses of the envelope [recipients][]. |
+ *
+ *
+ * **Note**: If the envelope has a workflow definition
+ * and the `workflowStatus` is `paused`,
+ * the envelope will not be sent immediately,
+ * even if the envelope's `status` is `sent`.
+ *
+ * There are many ways to use envelopes.
+ * You can create and send an envelope
+ * with a single API request,
+ * or you can use several API requests
+ * to create, populate, and send envelopes.
+ *
+ *
+ * | See: | To learn about: |
+ * | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
+ * | [Envelopes][envelopes] | Envelopes, [adding documents][addingdocs], [tracking][], [locking][], [deleting][], [templates][] |
+ * | [Documents][documents] | Documents, [attachments][], [supplemental documents][supdocs], [authoritative copies][authcopies], [purging][] |
+ * | [Recipients][recipients] | Recipients, [recipient types][reciptypes], [recipient status][recipstatus] |
+ * | [Tabs][tabs] | Tabs, [anchoring tabs][tabanchor], [custom tabs][tabcustom], [payments][] |
+ *
+ *
+ * [addingdocs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
+ * [attachments]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
+ * [authcopies]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
+ * [conoverview]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/overview
+ * [deleting]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
+ * [documents]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents
+ * [envelopeDefinition]: https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/create/
+ * [envelopes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes
+ * [locking]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
+ * [payments]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/payment/
+ * [purging]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
+ * [recipients]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients
+ * [recipstatus]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients/
+ * [reciptypes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/recipients/
+ * [supdocs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/documents/
+ * [tabanchor]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/auto-place/
+ * [tabcustom]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/custom-tabs/
+ * [tabs]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs
+ * [tabtypes]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/
+ * [templates]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
+ * [tracking]: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/envelopes/
+ *
+ * **Note**: When you create an envelope by using a [composite template](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/composite/), you should specify the envelope custom fields in the inline template. Any custom fields that you specify at the root level are ignored.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `cdse_mode: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `change_routing_order: &str` -- When true, users can define the routing order of recipients while sending documents for signature.
+ * * `completed_documents_only: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `merge_roles_on_draft: &str` -- When set to **true**, template roles will be merged, and empty recipients will be removed. This parameter applies when you create a draft envelope with multiple templates. (To create a draft envelope, the `status` field is set to `created`.)
+ *
+ * **Note**: DocuSign recommends that this parameter should be set to **true** whenever you create a draft envelope with multiple templates.
+ */
pub async fn post(
&self,
account_id: &str,
@@ -522,7 +524,7 @@ impl Envelopes {
completed_documents_only: &str,
merge_roles_on_draft: &str,
body: &crate::types::EnvelopeDefinition,
- ) -> Result<crate::types::EnvelopeSummary> {
+ ) -> ClientResult<crate::types::EnvelopeSummary> {
let mut query_args: Vec<(String, String)> = Default::default();
if !cdse_mode.is_empty() {
query_args.push(("cdse_mode".to_string(), cdse_mode.to_string()));
@@ -549,7 +551,7 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -565,118 +567,118 @@ impl Envelopes {
.await
}
/**
- * Gets envelope statuses for a set of envelopes.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/status` endpoint.
- *
- * Retrieves envelope statuses for a set of envelopes.
- *
- * You must specify _one_ of the following query parameters:
- *
- * | Parameter | Description |
- * | :---------------- | :------------------------------------------------------------------------------- |
- * | `from_date` | a valid UTC DateTime: `2016-01-01` |
- * | `envelope_ids` | A comma-separated list of envelope IDs<br>or the special value `request_body` |
- * | `transaction_ids` | A comma-separated list of transaction IDs<br>or the special value `request_body` |
- *
- * When you use the special value `request_body`, the request body looks like this:
- *
- * ```
- * {
- * "envelopeIds": [
- * "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
- * "8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
- * "c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
- * ]
- * }
- * ```
- *
- * **Note**: It is an error omit the request body altogether.
- * The request body must be at least `{}`.
- *
- * ### You can find an example of using this API endpoint in the following how-to:
- *
- * * [How to list envelope status changes](https://developers.docusign.com/docs/esign-rest-api/how-to/list-envelope-status-changes/)
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `ac_status: &str` -- Specifies the Authoritative Copy Status for the envelopes. The possible values are:
- *
- * - `Unknown`
- * - `Original`
- * - `Transferred`
- * - `AuthoritativeCopy`
- * - `AuthoritativeCopyExportPending`
- * - `AuthoritativeCopyExported`
- * - `DepositPending`
- * - `Deposited`
- * - `DepositedEO`
- * - `DepositFailed`.
- * * `block: &str` -- If set to **true**, removes any results that match one of the provided `transaction_ids`.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_ids: &str` -- The envelope IDs to include in the results.
- *
- * The value of this property can be:
- * - A comma-separated list of envelope IDs
- * - The special value `request_body`. In this case, the method uses the envelope IDs in the request body.
- * * `from_date: &str` -- The date/time setting that specifies when the request begins checking for status changes for envelopes in the account. This is required unless parameters `envelope_ids` and/or `transaction_Ids` are provided.
- *
- * ****Note****: This parameter must be set to a valid `DateTime`, or `envelope_ids` and/or `transaction_ids` must be specified.
- * * `from_to_status: &str` -- The envelope status that you are checking for. Possible values are:
- *
- *
- * - `Changed` (default)
- * - `Completed`
- * - `Created`
- * - `Declined`
- * - `Deleted`
- * - `Delivered`
- * - `Processing`
- * - `Sent`
- * - `Signed`
- * - `TimedOut`
- * - `Voided`
- *
- * For example, if you specify `Changed`, this method
- * returns a list of envelopes that changed status
- * during the `from_date` to `to_date` time period.
- * .
- * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `status: &str` -- A comma-separated list of envelope status to search for. Possible values are:
- *
- * - `completed`
- * - `created`
- * - `declined`
- * - `deleted`
- * - `delivered`
- * - `processing`
- * - `sent`
- * - `signed`
- * - `template`
- * - `voided`
- * .
- * * `to_date: &str` -- Optional date/time setting
- * that specifies the last date/time
- * or envelope status changes in the result set.
- *
- * The default value is the time that you call the method.
- * .
- * * `transaction_ids: &str` -- The transaction IDs to include in the results. Note that transaction IDs are valid for seven days.
- *
- * The value of this property can be:
- * - A list of comma-separated transaction IDs
- * - The special value `request_body`. In this case, this method uses the transaction IDs in the request body.
- * * `user_name: &str` -- Limits results to envelopes
- * sent by the account user
- * with this user name.
- *
- * `email` must be given as well,
- * and both `email` and `user_name`
- * must refer to an existing account user.
- * .
- */
+ * Gets envelope statuses for a set of envelopes.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/status` endpoint.
+ *
+ * Retrieves envelope statuses for a set of envelopes.
+ *
+ * You must specify _one_ of the following query parameters:
+ *
+ * | Parameter | Description |
+ * | :---------------- | :------------------------------------------------------------------------------- |
+ * | `from_date` | a valid UTC DateTime: `2016-01-01` |
+ * | `envelope_ids` | A comma-separated list of envelope IDs<br>or the special value `request_body` |
+ * | `transaction_ids` | A comma-separated list of transaction IDs<br>or the special value `request_body` |
+ *
+ * When you use the special value `request_body`, the request body looks like this:
+ *
+ * ```
+ * {
+ * "envelopeIds": [
+ * "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
+ * "8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
+ * "c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
+ * ]
+ * }
+ * ```
+ *
+ * **Note**: It is an error omit the request body altogether.
+ * The request body must be at least `{}`.
+ *
+ * ### You can find an example of using this API endpoint in the following how-to:
+ *
+ * * [How to list envelope status changes](https://developers.docusign.com/docs/esign-rest-api/how-to/list-envelope-status-changes/)
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `ac_status: &str` -- Specifies the Authoritative Copy Status for the envelopes. The possible values are:
+ *
+ * - `Unknown`
+ * - `Original`
+ * - `Transferred`
+ * - `AuthoritativeCopy`
+ * - `AuthoritativeCopyExportPending`
+ * - `AuthoritativeCopyExported`
+ * - `DepositPending`
+ * - `Deposited`
+ * - `DepositedEO`
+ * - `DepositFailed`.
+ * * `block: &str` -- If set to **true**, removes any results that match one of the provided `transaction_ids`.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_ids: &str` -- The envelope IDs to include in the results.
+ *
+ * The value of this property can be:
+ * - A comma-separated list of envelope IDs
+ * - The special value `request_body`. In this case, the method uses the envelope IDs in the request body.
+ * * `from_date: &str` -- The date/time setting that specifies when the request begins checking for status changes for envelopes in the account. This is required unless parameters `envelope_ids` and/or `transaction_Ids` are provided.
+ *
+ * ****Note****: This parameter must be set to a valid `DateTime`, or `envelope_ids` and/or `transaction_ids` must be specified.
+ * * `from_to_status: &str` -- The envelope status that you are checking for. Possible values are:
+ *
+ *
+ * - `Changed` (default)
+ * - `Completed`
+ * - `Created`
+ * - `Declined`
+ * - `Deleted`
+ * - `Delivered`
+ * - `Processing`
+ * - `Sent`
+ * - `Signed`
+ * - `TimedOut`
+ * - `Voided`
+ *
+ * For example, if you specify `Changed`, this method
+ * returns a list of envelopes that changed status
+ * during the `from_date` to `to_date` time period.
+ * .
+ * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `status: &str` -- A comma-separated list of envelope status to search for. Possible values are:
+ *
+ * - `completed`
+ * - `created`
+ * - `declined`
+ * - `deleted`
+ * - `delivered`
+ * - `processing`
+ * - `sent`
+ * - `signed`
+ * - `template`
+ * - `voided`
+ * .
+ * * `to_date: &str` -- Optional date/time setting
+ * that specifies the last date/time
+ * or envelope status changes in the result set.
+ *
+ * The default value is the time that you call the method.
+ * .
+ * * `transaction_ids: &str` -- The transaction IDs to include in the results. Note that transaction IDs are valid for seven days.
+ *
+ * The value of this property can be:
+ * - A list of comma-separated transaction IDs
+ * - The special value `request_body`. In this case, this method uses the transaction IDs in the request body.
+ * * `user_name: &str` -- Limits results to envelopes
+ * sent by the account user
+ * with this user name.
+ *
+ * `email` must be given as well,
+ * and both `email` and `user_name`
+ * must refer to an existing account user.
+ * .
+ */
pub async fn put_status(
&self,
account_id: &str,
@@ -693,7 +695,7 @@ impl Envelopes {
transaction_ids: &str,
user_name: &str,
body: &crate::types::EnvelopeIdsRequest,
- ) -> Result<crate::types::EnvelopesInformation> {
+ ) -> ClientResult<crate::types::EnvelopesInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !ac_status.is_empty() {
query_args.push(("ac_status".to_string(), ac_status.to_string()));
@@ -735,7 +737,7 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/status?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -751,39 +753,39 @@ impl Envelopes {
.await
}
/**
- * Gets the status of a single envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}` endpoint.
- *
- * Retrieves the overall status for the specified envelope.
- * To get the status of a list of envelopes, use
- * [Envelope: listStatusChanges ](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges/).
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `advanced_update: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- Specifies additional information about the envelope to return. Enter a comma-separated list, such as `tabs,recipients`. Valid values are:
- *
- * - `custom_fields`: The custom fields associated with the envelope.
- * - `documents`: The documents associated with the envelope.
- * - `attachments`: The attachments associated with the envelope.
- * - `extensions`: Information about the email settings associated with the envelope.
- * - `folders`: The folder where the envelope exists.
- * - `recipients`: The recipients associated with the envelope.
- * - `powerform`: The PowerForms associated with the envelope.
- * - `tabs`: The tabs associated with the envelope.
- * - `payment_tabs`: The payment tabs associated with the envelope.
- * .
- */
+ * Gets the status of a single envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}` endpoint.
+ *
+ * Retrieves the overall status for the specified envelope.
+ * To get the status of a list of envelopes, use
+ * [Envelope: listStatusChanges ](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges/).
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `advanced_update: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- Specifies additional information about the envelope to return. Enter a comma-separated list, such as `tabs,recipients`. Valid values are:
+ *
+ * - `custom_fields`: The custom fields associated with the envelope.
+ * - `documents`: The documents associated with the envelope.
+ * - `attachments`: The attachments associated with the envelope.
+ * - `extensions`: Information about the email settings associated with the envelope.
+ * - `folders`: The folder where the envelope exists.
+ * - `recipients`: The recipients associated with the envelope.
+ * - `powerform`: The PowerForms associated with the envelope.
+ * - `tabs`: The tabs associated with the envelope.
+ * - `payment_tabs`: The payment tabs associated with the envelope.
+ * .
+ */
pub async fn get_envelopes(
&self,
account_id: &str,
envelope_id: &str,
advanced_update: &str,
include: &str,
- ) -> Result<crate::types::Envelope> {
+ ) -> ClientResult<crate::types::Envelope> {
let mut query_args: Vec<(String, String)> = Default::default();
if !advanced_update.is_empty() {
query_args.push(("advanced_update".to_string(), advanced_update.to_string()));
@@ -795,8 +797,8 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -812,183 +814,183 @@ impl Envelopes {
.await
}
/**
- * Send, void, or modify a draft envelope. Purge documents from a completed envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}` endpoint.
- *
- * This method enables you to make changes to an envelope.
- * You can use it to:
- *
- * * Send a draft envelope
- * * Void an in-process envelope
- * * Modify a draft envelope
- * * Purge documents and envelope metadata from the DocuSign platform
- *
- *
- * <div class="highlight highlight-info">
- * <p markdown="1">
- *
- * Although the request body for this method
- * is a complete envelope definition,
- * you only need to provide
- * the properties that
- * you're updating.
- *
- * </p>
- * </div>
- *
- *
- * ## Sending a Draft Envelope
- *
- * To send a draft envelope, include the following code in the request body:
- *
- * ```json
- * {
- * "status": "sent"
- * }
- * ```
- *
- * You can attach a workflow before sending the envelope:
- *
- * ```json
- * {
- * "status": "sent",
- * "workflow": {
- * "workflowSteps": [
- * {
- * "action": "pause_before",
- * "description": "pause_before routing order 2",
- * "itemId": 2,
- * "triggerOnItem": "routing_order"
- * }
- * ]
- * }
- * }
- * ```
- *
- * ## Working with Workflows
- *
- * To unpause a workflow, the request body should include this:
- *
- * ```json
- * {
- * "workflow": {
- * "workflowStatus": "in_progress"
- * }
- * }
- * ```
- *
- * ## Voiding an In-Process Envelope
- *
- * To void an in-process envelope, include the following code in the request body:
- *
- * ```json
- * {
- * "status": "voided",
- * "voidedReason": "The reason for voiding the envelope"
- * }
- * ```
- *
- * ## Modifying Envelope Email Information
- *
- * To change the email subject and message of a draft envelope,
- * include the following code in the request body:
- *
- * ```json
- * {
- * "emailSubject": "new email subject",
- * "emailBlurb": "new email message"
- * }
- * ```
- *
- * ## Purging Documents from DocuSign
- *
- *
- * To place only the documents
- * in the purge queue,
- * leaving any
- * corresponding attachments
- * and tabs in the DocuSign platform,
- * set the `purgeState` property
- * to `documents_queued`.
- *
- *
- * ```json
- * {
- * "purgeState": "documents_queued"
- * }
- * ```
- *
- * To place documents,
- * attachments,
- * and tabs
- * in the purge queue,
- * set the `purgeState` property
- * to `documents_and_metadata_queued`.
- *
- * ```json
- * {
- * "purgeState": "documents_and_metadata_queued"
- * }
- * ```
- *
- *
- * You can purge documents
- * only from completed envelopes
- * that are not marked as the authoritative copy.
- * The user requesting the purge
- * must have permission to purge documents
- * and
- * must be the sender or be acting on behalf of the sender.
- *
- *
- *
- * When the purge request is initiated
- * the items to be purged
- * are placed in the purge queue
- * for deletion in 14 days.
- * The sender
- * and
- * all recipients with DocuSign accounts
- * associated with the envelope
- * get an email notification
- * the the documents will be deleted in 14 days.
- * The notification contains a link
- * to the documents.
- * A second email notification
- * is sent 7 days later.
- * At the end of the 14-day period
- * the documents are deleted from the system.
- * Recipients without DocuSign accounts
- * do not receive email notifications.
- *
- *
- * If your account has a Document Retention policy,
- * envelope documents
- * are automatically placed
- * in the purge queue,
- * and notification emails are sent
- * at the end of the retention period.
- * Setting a Document Retention policy is the same as setting a
- * schedule for purging documents.
- *
- * ## Removing Documents from the Purge Queue
- *
- * To remove documents from the purge queue, include the following code in the request body:
- *
- * ```
- * {
- * "purgeState": "documents_dequeued"
- * }
- * ```
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `advanced_update: &str` -- When set to **true**, allows the caller to update recipients, tabs, custom fields, notification, email settings and other envelope attributes.
- * * `resend_envelope: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Send, void, or modify a draft envelope. Purge documents from a completed envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}` endpoint.
+ *
+ * This method enables you to make changes to an envelope.
+ * You can use it to:
+ *
+ * * Send a draft envelope
+ * * Void an in-process envelope
+ * * Modify a draft envelope
+ * * Purge documents and envelope metadata from the DocuSign platform
+ *
+ *
+ * <div class="highlight highlight-info">
+ * <p markdown="1">
+ *
+ * Although the request body for this method
+ * is a complete envelope definition,
+ * you only need to provide
+ * the properties that
+ * you're updating.
+ *
+ * </p>
+ * </div>
+ *
+ *
+ * ## Sending a Draft Envelope
+ *
+ * To send a draft envelope, include the following code in the request body:
+ *
+ * ```json
+ * {
+ * "status": "sent"
+ * }
+ * ```
+ *
+ * You can attach a workflow before sending the envelope:
+ *
+ * ```json
+ * {
+ * "status": "sent",
+ * "workflow": {
+ * "workflowSteps": [
+ * {
+ * "action": "pause_before",
+ * "description": "pause_before routing order 2",
+ * "itemId": 2,
+ * "triggerOnItem": "routing_order"
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ## Working with Workflows
+ *
+ * To unpause a workflow, the request body should include this:
+ *
+ * ```json
+ * {
+ * "workflow": {
+ * "workflowStatus": "in_progress"
+ * }
+ * }
+ * ```
+ *
+ * ## Voiding an In-Process Envelope
+ *
+ * To void an in-process envelope, include the following code in the request body:
+ *
+ * ```json
+ * {
+ * "status": "voided",
+ * "voidedReason": "The reason for voiding the envelope"
+ * }
+ * ```
+ *
+ * ## Modifying Envelope Email Information
+ *
+ * To change the email subject and message of a draft envelope,
+ * include the following code in the request body:
+ *
+ * ```json
+ * {
+ * "emailSubject": "new email subject",
+ * "emailBlurb": "new email message"
+ * }
+ * ```
+ *
+ * ## Purging Documents from DocuSign
+ *
+ *
+ * To place only the documents
+ * in the purge queue,
+ * leaving any
+ * corresponding attachments
+ * and tabs in the DocuSign platform,
+ * set the `purgeState` property
+ * to `documents_queued`.
+ *
+ *
+ * ```json
+ * {
+ * "purgeState": "documents_queued"
+ * }
+ * ```
+ *
+ * To place documents,
+ * attachments,
+ * and tabs
+ * in the purge queue,
+ * set the `purgeState` property
+ * to `documents_and_metadata_queued`.
+ *
+ * ```json
+ * {
+ * "purgeState": "documents_and_metadata_queued"
+ * }
+ * ```
+ *
+ *
+ * You can purge documents
+ * only from completed envelopes
+ * that are not marked as the authoritative copy.
+ * The user requesting the purge
+ * must have permission to purge documents
+ * and
+ * must be the sender or be acting on behalf of the sender.
+ *
+ *
+ *
+ * When the purge request is initiated
+ * the items to be purged
+ * are placed in the purge queue
+ * for deletion in 14 days.
+ * The sender
+ * and
+ * all recipients with DocuSign accounts
+ * associated with the envelope
+ * get an email notification
+ * the the documents will be deleted in 14 days.
+ * The notification contains a link
+ * to the documents.
+ * A second email notification
+ * is sent 7 days later.
+ * At the end of the 14-day period
+ * the documents are deleted from the system.
+ * Recipients without DocuSign accounts
+ * do not receive email notifications.
+ *
+ *
+ * If your account has a Document Retention policy,
+ * envelope documents
+ * are automatically placed
+ * in the purge queue,
+ * and notification emails are sent
+ * at the end of the retention period.
+ * Setting a Document Retention policy is the same as setting a
+ * schedule for purging documents.
+ *
+ * ## Removing Documents from the Purge Queue
+ *
+ * To remove documents from the purge queue, include the following code in the request body:
+ *
+ * ```
+ * {
+ * "purgeState": "documents_dequeued"
+ * }
+ * ```
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `advanced_update: &str` -- When set to **true**, allows the caller to update recipients, tabs, custom fields, notification, email settings and other envelope attributes.
+ * * `resend_envelope: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
@@ -996,7 +998,7 @@ impl Envelopes {
advanced_update: &str,
resend_envelope: &str,
body: &crate::types::Envelope,
- ) -> Result<crate::types::EnvelopeUpdateSummary> {
+ ) -> ClientResult<crate::types::EnvelopeUpdateSummary> {
let mut query_args: Vec<(String, String)> = Default::default();
if !advanced_update.is_empty() {
query_args.push(("advanced_update".to_string(), advanced_update.to_string()));
@@ -1008,8 +1010,8 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
query_
),
None,
@@ -1025,27 +1027,27 @@ impl Envelopes {
.await
}
/**
- * Gets the envelope audit events for an envelope.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/audit_events` endpoint.
- *
- * Gets the envelope audit events for the specified envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the envelope audit events for an envelope.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/audit_events` endpoint.
+ *
+ * Gets the envelope audit events for the specified envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn audit_events_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::EnvelopeAuditEventResponse> {
+ ) -> ClientResult<crate::types::EnvelopeAuditEventResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/audit_events",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -1060,25 +1062,25 @@ impl Envelopes {
.await
}
/**
- * Returns document page image(s) based on input.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages` endpoint.
- *
- * Returns images of the pages in a document for display based on the parameters that you specify.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `dpi: &str` -- The number of dots per inch (DPI) for the resulting images. Valid values are 1-310 DPI. The default value is 94.
- * * `max_height: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `max_width: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `nocache: &str` -- If **true**, using cache is disabled and image information is retrieved from a database. **True** is the default value. .
- * * `show_changes: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
- */
+ * Returns document page image(s) based on input.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages` endpoint.
+ *
+ * Returns images of the pages in a document for display based on the parameters that you specify.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `dpi: &str` -- The number of dots per inch (DPI) for the resulting images. Valid values are 1-310 DPI. The default value is 94.
+ * * `max_height: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `max_width: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `nocache: &str` -- If **true**, using cache is disabled and image information is retrieved from a database. **True** is the default value. .
+ * * `show_changes: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
+ */
pub async fn pages_get_page_image(
&self,
account_id: &str,
@@ -1091,7 +1093,7 @@ impl Envelopes {
nocache: &str,
show_changes: &str,
start_position: &str,
- ) -> Result<crate::types::PageImages> {
+ ) -> ClientResult<crate::types::PageImages> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -1118,9 +1120,9 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/pages?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
query_
),
None,
@@ -1136,33 +1138,33 @@ impl Envelopes {
.await
}
/**
- * Deletes a page from a document in an envelope.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}` endpoint.
- *
- * Deletes a page from a document in an envelope based on the page number.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes a page from a document in an envelope.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}` endpoint.
+ *
+ * Deletes a page from a document in an envelope based on the page number.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn pages_delete_page(
&self,
account_id: &str,
document_id: &str,
envelope_id: &str,
page_number: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/pages/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
- crate::progenitor_support::encode_path(page_number),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
+ crate::progenitor_support::encode_path(&page_number.to_string()),
),
None,
);
@@ -1177,23 +1179,23 @@ impl Envelopes {
.await
}
/**
- * Gets a page image from an envelope for display.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image` endpoint.
- *
- * Returns an image of a page in a document for display.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `dpi: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `max_height: &str` -- Sets the maximum height for the page image in pixels. The DPI is recalculated based on this setting.
- * * `max_width: &str` -- Sets the maximum width for the page image in pixels. The DPI is recalculated based on this setting.
- * * `show_changes: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a page image from an envelope for display.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image` endpoint.
+ *
+ * Returns an image of a page in a document for display.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `dpi: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `max_height: &str` -- Sets the maximum height for the page image in pixels. The DPI is recalculated based on this setting.
+ * * `max_width: &str` -- Sets the maximum width for the page image in pixels. The DPI is recalculated based on this setting.
+ * * `show_changes: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn pages_get_page_image_envelopes(
&self,
account_id: &str,
@@ -1204,7 +1206,7 @@ impl Envelopes {
max_height: &str,
max_width: &str,
show_changes: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !dpi.is_empty() {
query_args.push(("dpi".to_string(), dpi.to_string()));
@@ -1222,10 +1224,10 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/pages/{}/page_image?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
- crate::progenitor_support::encode_path(page_number),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
+ crate::progenitor_support::encode_path(&page_number.to_string()),
query_
),
None,
@@ -1241,19 +1243,19 @@ impl Envelopes {
.await
}
/**
- * Rotates page image from an envelope for display.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image` endpoint.
- *
- * Rotates page image from an envelope for display. The page image can be rotated to the left or right.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Rotates page image from an envelope for display.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image` endpoint.
+ *
+ * Rotates page image from an envelope for display. The page image can be rotated to the left or right.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `document_id: &str` -- The `documentId` is set by the API client. It is an integer that falls between `1` and 2,147,483,647. The value is encoded as a string without commas. The values `1`, `2`, `3`, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a `documentId` property that specifies the document on which to place the tab.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `page_number: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn pages_put_page_image(
&self,
account_id: &str,
@@ -1261,14 +1263,14 @@ impl Envelopes {
envelope_id: &str,
page_number: &str,
body: &crate::types::PageRequest,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/documents/{}/pages/{}/page_image",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(document_id),
- crate::progenitor_support::encode_path(page_number),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&document_id.to_string()),
+ crate::progenitor_support::encode_path(&page_number.to_string()),
),
None,
);
@@ -1283,27 +1285,27 @@ impl Envelopes {
.await
}
/**
- * Gets envelope notification information.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification` endpoint.
- *
- * Retrieves the envelope notification, reminders and expirations, information for an existing envelope.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets envelope notification information.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification` endpoint.
+ *
+ * Retrieves the envelope notification, reminders and expirations, information for an existing envelope.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn notification_get(
&self,
account_id: &str,
envelope_id: &str,
- ) -> Result<crate::types::Notification> {
+ ) -> ClientResult<crate::types::Notification> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/notification",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -1318,30 +1320,30 @@ impl Envelopes {
.await
}
/**
- * Sets envelope notifications for an existing envelope.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification` endpoint.
- *
- * This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope.
- *
- * Note that this request only specifies when notifications are sent; it does not initiate sending of email messages.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Sets envelope notifications for an existing envelope.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification` endpoint.
+ *
+ * This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope.
+ *
+ * Note that this request only specifies when notifications are sent; it does not initiate sending of email messages.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn notification_put(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::EnvelopeNotificationRequest,
- ) -> Result<crate::types::Notification> {
+ ) -> ClientResult<crate::types::Notification> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/notification",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
@@ -1356,34 +1358,34 @@ impl Envelopes {
.await
}
/**
- * Gets the initials image for a user.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image` endpoint.
- *
- * Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image.
- *
- * The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account.
- *
- * The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint.
- *
- * For example: "Bob Smith" to "Bob%20Smith"
- *
- * Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- * * `include_chrome: &str` -- The added line and identifier around the initial image. Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
- */
+ * Gets the initials image for a user.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image` endpoint.
+ *
+ * Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image.
+ *
+ * The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account.
+ *
+ * The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint.
+ *
+ * For example: "Bob Smith" to "Bob%20Smith"
+ *
+ * Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ * * `include_chrome: &str` -- The added line and identifier around the initial image. Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
+ */
pub async fn recipients_get_recipient_initials_image(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
include_chrome: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_chrome.is_empty() {
query_args.push(("include_chrome".to_string(), include_chrome.to_string()));
@@ -1392,9 +1394,9 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/initials_image?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
query_
),
None,
@@ -1410,32 +1412,32 @@ impl Envelopes {
.await
}
/**
- * Sets the initials image for an accountless signer.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image` endpoint.
- *
- * Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.
- *
- * For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Sets the initials image for an accountless signer.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image` endpoint.
+ *
+ * Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.
+ *
+ * For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_put_recipient_initials_image(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/initials_image",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -1450,30 +1452,30 @@ impl Envelopes {
.await
}
/**
- * Gets signature information for a signer or sign-in-person recipient.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature` endpoint.
- *
- * Retrieves signature information for a signer or sign-in-person recipient.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Gets signature information for a signer or sign-in-person recipient.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature` endpoint.
+ *
+ * Retrieves signature information for a signer or sign-in-person recipient.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_get_recipient_signature(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<crate::types::UserSignature> {
+ ) -> ClientResult<crate::types::UserSignature> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/signature",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
@@ -1488,34 +1490,34 @@ impl Envelopes {
.await
}
/**
- * Retrieve signature image information for a signer/sign-in-person recipient.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image` endpoint.
- *
- * Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image.
- *
- * The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.
- *
- * The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint.
- *
- * For example: "Bob Smith" to "Bob%20Smith"
- *
- * Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- * * `include_chrome: &str` -- When set to **true**, the response includes the chromed version of the signature image.
- */
+ * Retrieve signature image information for a signer/sign-in-person recipient.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image` endpoint.
+ *
+ * Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image.
+ *
+ * The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.
+ *
+ * The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint.
+ *
+ * For example: "Bob Smith" to "Bob%20Smith"
+ *
+ * Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ * * `include_chrome: &str` -- When set to **true**, the response includes the chromed version of the signature image.
+ */
pub async fn recipients_get_recipient_signature_image(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
include_chrome: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_chrome.is_empty() {
query_args.push(("include_chrome".to_string(), include_chrome.to_string()));
@@ -1524,9 +1526,9 @@ impl Envelopes {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/signature_image?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
query_
),
None,
@@ -1542,32 +1544,32 @@ impl Envelopes {
.await
}
/**
- * Sets the signature image for an accountless signer.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image` endpoint.
- *
- * Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.
- *
- * For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- */
+ * Sets the signature image for an accountless signer.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image` endpoint.
+ *
+ * Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.
+ *
+ * For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `recipient_id: &str` -- A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
+ */
pub async fn recipients_put_recipient_signature_image(
&self,
account_id: &str,
envelope_id: &str,
recipient_id: &str,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/recipients/{}/signature_image",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
- crate::progenitor_support::encode_path(recipient_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
+ crate::progenitor_support::encode_path(&recipient_id.to_string()),
),
None,
);
diff --git a/docusign/src/favorite_templates.rs b/docusign/src/favorite_templates.rs
index fb481d1..2fc09b0 100644
--- a/docusign/src/favorite_templates.rs
+++ b/docusign/src/favorite_templates.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct FavoriteTemplates {
pub client: Client,
@@ -13,21 +15,21 @@ impl FavoriteTemplates {
}
/**
- * Retrieves the list of favorited templates for this caller.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/favorite_templates` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn get(&self, account_id: &str) -> Result<crate::types::FavoriteTemplatesInfo> {
+ * Retrieves the list of favorited templates for this caller.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/favorite_templates` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn get(&self, account_id: &str) -> ClientResult<crate::types::FavoriteTemplatesInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/favorite_templates",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -57,11 +59,11 @@ impl FavoriteTemplates {
&self,
account_id: &str,
body: &crate::types::FavoriteTemplatesInfo,
- ) -> Result<crate::types::FavoriteTemplatesInfo> {
+ ) -> ClientResult<crate::types::FavoriteTemplatesInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/favorite_templates",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -76,25 +78,25 @@ impl FavoriteTemplates {
.await
}
/**
- * Unfavorites a template.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/favorite_templates` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Unfavorites a template.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/favorite_templates` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn un_template(
&self,
account_id: &str,
body: &crate::types::FavoriteTemplatesInfo,
- ) -> Result<crate::types::FavoriteTemplatesInfo> {
+ ) -> ClientResult<crate::types::FavoriteTemplatesInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/favorite_templates",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/folders.rs b/docusign/src/folders.rs
index fcae82c..7ad0a23 100644
--- a/docusign/src/folders.rs
+++ b/docusign/src/folders.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Folders {
pub client: Client,
@@ -13,32 +15,32 @@ impl Folders {
}
/**
- * Gets a list of the folders for the account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/folders` endpoint.
- *
- * Retrieves a list of the folders for the account, including the folder hierarchy. You can specify whether to return just the template folder or template folder and normal folders by setting the `template` query string parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include: &str` -- A comma-separated list of folder types to include in the response.
- * Valid values are:
- *
- * - `envelope_folders`: Returns a list of envelope folders. (Default)
- * - `template_folders`: Returns a list of template folders.
- * - `shared_template_folders`: Returns a list of shared template folders.
- * .
- * * `include_items: &str` -- Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
- * * `start_position: &str` -- The position within the total result set from which to start returning values.
- * * `template: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `user_filter: &str` -- Narrows down the resulting folder list by the following values:
- *
- * - `all`: Returns all templates owned or shared with the user. (default)
- * - `owned_by_me`: Returns only templates the user owns.
- * - `shared_with_me`: Returns only templates that are shared with the user.
- * .
- */
+ * Gets a list of the folders for the account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/folders` endpoint.
+ *
+ * Retrieves a list of the folders for the account, including the folder hierarchy. You can specify whether to return just the template folder or template folder and normal folders by setting the `template` query string parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include: &str` -- A comma-separated list of folder types to include in the response.
+ * Valid values are:
+ *
+ * - `envelope_folders`: Returns a list of envelope folders. (Default)
+ * - `template_folders`: Returns a list of template folders.
+ * - `shared_template_folders`: Returns a list of shared template folders.
+ * .
+ * * `include_items: &str` -- Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
+ * * `start_position: &str` -- The position within the total result set from which to start returning values.
+ * * `template: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `user_filter: &str` -- Narrows down the resulting folder list by the following values:
+ *
+ * - `all`: Returns all templates owned or shared with the user. (default)
+ * - `owned_by_me`: Returns only templates the user owns.
+ * - `shared_with_me`: Returns only templates that are shared with the user.
+ * .
+ */
pub async fn get(
&self,
account_id: &str,
@@ -47,7 +49,7 @@ impl Folders {
start_position: &str,
template: &str,
user_filter: &str,
- ) -> Result<crate::types::FoldersResponse> {
+ ) -> ClientResult<crate::types::FoldersResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include.is_empty() {
query_args.push(("include".to_string(), include.to_string()));
@@ -68,7 +70,7 @@ impl Folders {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/folders?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -84,25 +86,25 @@ impl Folders {
.await
}
/**
- * Gets a list of the envelopes in the specified folder.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/folders/{folderId}` endpoint.
- *
- * Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- The billing period end date in UTC timedate format.
- * * `include_items: &str` -- Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
- * * `owner_email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `owner_name: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `status: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `to_date: &str` -- The billing period end date in UTC timedate format.
- */
+ * Gets a list of the envelopes in the specified folder.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/folders/{folderId}` endpoint.
+ *
+ * Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- The billing period end date in UTC timedate format.
+ * * `include_items: &str` -- Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
+ * * `owner_email: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `owner_name: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `status: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `to_date: &str` -- The billing period end date in UTC timedate format.
+ */
pub async fn get_items(
&self,
account_id: &str,
@@ -115,7 +117,7 @@ impl Folders {
start_position: &str,
status: &str,
to_date: &str,
- ) -> Result<crate::types::FolderItemsResponse> {
+ ) -> ClientResult<crate::types::FolderItemsResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -145,8 +147,8 @@ impl Folders {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/folders/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(folder_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&folder_id.to_string()),
query_
),
None,
@@ -162,33 +164,33 @@ impl Folders {
.await
}
/**
- * Moves an envelope from its current folder to the specified folder.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/folders/{folderId}` endpoint.
- *
- * Moves an envelope from its current folder to the specified folder.
- *
- * You can use this method to delete envelopes by specifying `recyclebin` in the `folderId` parameter.
- * Placing an in-process envelope (envelope status of `sent` or `delivered`) in the recycle bin voids the envelope.
- *
- * You can also use this method to delete templates by specifying a template ID instead of an envelope ID in the `envelopeIds` property and specifying `recyclebin` in the `folderId` parameter.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Moves an envelope from its current folder to the specified folder.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/folders/{folderId}` endpoint.
+ *
+ * Moves an envelope from its current folder to the specified folder.
+ *
+ * You can use this method to delete envelopes by specifying `recyclebin` in the `folderId` parameter.
+ * Placing an in-process envelope (envelope status of `sent` or `delivered`) in the recycle bin voids the envelope.
+ *
+ * You can also use this method to delete templates by specifying a template ID instead of an envelope ID in the `envelopeIds` property and specifying `recyclebin` in the `folderId` parameter.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `folder_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
folder_id: &str,
body: &crate::types::FoldersRequest,
- ) -> Result<crate::types::FoldersResponse> {
+ ) -> ClientResult<crate::types::FoldersResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/folders/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(folder_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&folder_id.to_string()),
),
None,
);
@@ -203,31 +205,31 @@ impl Folders {
.await
}
/**
- * Gets a list of envelopes in folders matching the specified criteria.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/search_folders/{searchFolderId}` endpoint.
- *
- * **This method is deprecated in API v2.1.**
- *
- * Use [Envelopes::listStatusChanges](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges) instead.
- *
- * Retrieves a list of items that match the criteria specified in the query.
- *
- * If the user ID of the user making the call is the same as the user ID for any returned recipient, then the userId property is added to the returned information for those recipients.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `search_folder_id: &str` -- Specifies the envelope group that is searched by the request. These are logical groupings, not actual folder names. Valid values are: drafts, awaiting_my_signature, completed, out_for_signature.
- * * `all: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- Specifies the number of records returned in the cache. The number must be greater than 0 and less than or equal to 100.
- * * `from_date: &str` -- Specifies the start of the date range to return. If no value is provided, the default search is the previous 30 days.
- * * `include_recipients: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `order: &str` -- Specifies the order in which the list is returned. Valid values are: `asc` for ascending order, and `desc` for descending order.
- * * `order_by: &str` -- Specifies the property used to sort the list. Valid values are: `action_required`, `created`, `completed`, `sent`, `signer_list`, `status`, or `subject`.
- * * `start_position: &str` -- Specifies the the starting location in the result set of the items that are returned.
- * * `to_date: &str` -- The billing period end date in UTC timedate format.
- */
+ * Gets a list of envelopes in folders matching the specified criteria.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/search_folders/{searchFolderId}` endpoint.
+ *
+ * **This method is deprecated in API v2.1.**
+ *
+ * Use [Envelopes::listStatusChanges](https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges) instead.
+ *
+ * Retrieves a list of items that match the criteria specified in the query.
+ *
+ * If the user ID of the user making the call is the same as the user ID for any returned recipient, then the userId property is added to the returned information for those recipients.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `search_folder_id: &str` -- Specifies the envelope group that is searched by the request. These are logical groupings, not actual folder names. Valid values are: drafts, awaiting_my_signature, completed, out_for_signature.
+ * * `all: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- Specifies the number of records returned in the cache. The number must be greater than 0 and less than or equal to 100.
+ * * `from_date: &str` -- Specifies the start of the date range to return. If no value is provided, the default search is the previous 30 days.
+ * * `include_recipients: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `order: &str` -- Specifies the order in which the list is returned. Valid values are: `asc` for ascending order, and `desc` for descending order.
+ * * `order_by: &str` -- Specifies the property used to sort the list. Valid values are: `action_required`, `created`, `completed`, `sent`, `signer_list`, `status`, or `subject`.
+ * * `start_position: &str` -- Specifies the the starting location in the result set of the items that are returned.
+ * * `to_date: &str` -- The billing period end date in UTC timedate format.
+ */
pub async fn search_get_contents(
&self,
account_id: &str,
@@ -240,7 +242,7 @@ impl Folders {
order_by: &str,
start_position: &str,
to_date: &str,
- ) -> Result<crate::types::FolderItemResponse> {
+ ) -> ClientResult<crate::types::FolderItemResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !all.is_empty() {
query_args.push(("all".to_string(), all.to_string()));
@@ -273,8 +275,8 @@ impl Folders {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/search_folders/{}?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(search_folder_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&search_folder_id.to_string()),
query_
),
None,
diff --git a/docusign/src/group_brands.rs b/docusign/src/group_brands.rs
index 582965f..2d90a1f 100644
--- a/docusign/src/group_brands.rs
+++ b/docusign/src/group_brands.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct GroupBrands {
pub client: Client,
@@ -13,27 +15,27 @@ impl GroupBrands {
}
/**
- * Gets the brand information for a group.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
- *
- * This method returns information about the brands associated with a group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the brand information for a group.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
+ *
+ * This method returns information about the brands associated with a group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_get_group(
&self,
account_id: &str,
group_id: &str,
- ) -> Result<crate::types::GroupBrands> {
+ ) -> ClientResult<crate::types::GroupBrands> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/brands",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
),
None,
);
@@ -48,28 +50,28 @@ impl GroupBrands {
.await
}
/**
- * Adds an existing brand to a group.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
- *
- * This method adds one or more existing brands to a group based on the `groupId`.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds an existing brand to a group.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
+ *
+ * This method adds one or more existing brands to a group based on the `groupId`.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_put_group(
&self,
account_id: &str,
group_id: &str,
body: &crate::types::BrandsRequest,
- ) -> Result<crate::types::GroupBrands> {
+ ) -> ClientResult<crate::types::GroupBrands> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/brands",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
),
None,
);
@@ -84,28 +86,28 @@ impl GroupBrands {
.await
}
/**
- * Deletes brand information from a group.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
- *
- * This method deletes one or more brands from a group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes brand information from a group.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups/{groupId}/brands` endpoint.
+ *
+ * This method deletes one or more brands from a group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn brands_delete_group(
&self,
account_id: &str,
group_id: &str,
body: &crate::types::BrandsRequest,
- ) -> Result<crate::types::GroupBrands> {
+ ) -> ClientResult<crate::types::GroupBrands> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/brands",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
),
None,
);
diff --git a/docusign/src/group_users.rs b/docusign/src/group_users.rs
index 5e9686a..b17e7e3 100644
--- a/docusign/src/group_users.rs
+++ b/docusign/src/group_users.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct GroupUsers {
pub client: Client,
@@ -13,26 +15,26 @@ impl GroupUsers {
}
/**
- * Gets a list of users in a group.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
- *
- * Retrieves a list of users in a group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- Number of records to return. The number must be greater than 1 and less than or equal to 100. .
- * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a list of users in a group.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
+ *
+ * Retrieves a list of users in a group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- Number of records to return. The number must be greater than 1 and less than or equal to 100. .
+ * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn groups_get(
&self,
account_id: &str,
group_id: &str,
count: &str,
start_position: &str,
- ) -> Result<crate::types::UsersResponse> {
+ ) -> ClientResult<crate::types::UsersResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -44,8 +46,8 @@ impl GroupUsers {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/users?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
query_
),
None,
@@ -61,28 +63,28 @@ impl GroupUsers {
.await
}
/**
- * Adds one or more users to an existing group.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
- *
- * Adds one or more existing DocuSign users to an existing group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Adds one or more users to an existing group.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
+ *
+ * Adds one or more existing DocuSign users to an existing group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn groups_put(
&self,
account_id: &str,
group_id: &str,
body: &crate::types::UserInfoList,
- ) -> Result<crate::types::UsersResponse> {
+ ) -> ClientResult<crate::types::UsersResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/users",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
),
None,
);
@@ -97,29 +99,29 @@ impl GroupUsers {
.await
}
/**
- * Deletes one or more users from a group.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
- *
- * Deletes one or more users from a group. This request takes a `userInfoList` that contains the users that you want to delete.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes one or more users from a group.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups/{groupId}/users` endpoint.
+ *
+ * Deletes one or more users from a group. This request takes a `userInfoList` that contains the users that you want to delete.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn groups_delete(
&self,
account_id: &str,
group_id: &str,
body: &crate::types::UserInfoList,
- ) -> Result<crate::types::UsersResponse> {
+ ) -> ClientResult<crate::types::UsersResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups/{}/users",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&group_id.to_string()),
),
None,
);
diff --git a/docusign/src/groups.rs b/docusign/src/groups.rs
index 38e3e2a..d6d2a92 100644
--- a/docusign/src/groups.rs
+++ b/docusign/src/groups.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Groups {
pub client: Client,
@@ -13,21 +15,21 @@ impl Groups {
}
/**
- * Gets information about groups associated with the account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups` endpoint.
- *
- * Retrieves information about groups associated with the account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `count: &str` -- Number of records to return. The number must be greater than 1 and less than or equal to 100.
- * * `group_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_usercount: &str` -- When set to **true**, every group returned in the response includes a `userCount` property that contains the total number of users in the group. The default is **true**.
- * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets information about groups associated with the account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/groups` endpoint.
+ *
+ * Retrieves information about groups associated with the account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `count: &str` -- Number of records to return. The number must be greater than 1 and less than or equal to 100.
+ * * `group_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_usercount: &str` -- When set to **true**, every group returned in the response includes a `userCount` property that contains the total number of users in the group. The default is **true**.
+ * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get(
&self,
account_id: &str,
@@ -36,7 +38,7 @@ impl Groups {
include_usercount: &str,
search_text: &str,
start_position: &str,
- ) -> Result<crate::types::GroupInformation> {
+ ) -> ClientResult<crate::types::GroupInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
@@ -60,7 +62,7 @@ impl Groups {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -76,25 +78,25 @@ impl Groups {
.await
}
/**
- * Updates the group information for a group.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups` endpoint.
- *
- * Updates the group name and modifies, or sets, the permission profile for the group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates the group information for a group.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/groups` endpoint.
+ *
+ * Updates the group name and modifies, or sets, the permission profile for the group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::GroupInformation,
- ) -> Result<crate::types::GroupInformation> {
+ ) -> ClientResult<crate::types::GroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -109,27 +111,27 @@ impl Groups {
.await
}
/**
- * Creates one or more groups for the account.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/groups` endpoint.
- *
- * Creates one or more groups for the account.
- *
- * Groups can be used to help manage users by associating users with a group. You can associate a group with a Permission Profile, which sets the user permissions for users in that group without having to set the `userSettings` property for each user. You are not required to set Permission Profiles for a group, but it makes it easier to manage user permissions for a large number of users. You can also use groups with template sharing to limit user access to templates.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates one or more groups for the account.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/groups` endpoint.
+ *
+ * Creates one or more groups for the account.
+ *
+ * Groups can be used to help manage users by associating users with a group. You can associate a group with a Permission Profile, which sets the user permissions for users in that group without having to set the `userSettings` property for each user. You are not required to set Permission Profiles for a group, but it makes it easier to manage user permissions for a large number of users. You can also use groups with template sharing to limit user access to templates.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::GroupInformation,
- ) -> Result<crate::types::GroupInformation> {
+ ) -> ClientResult<crate::types::GroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -144,39 +146,39 @@ impl Groups {
.await
}
/**
- * Deletes an existing user group.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups` endpoint.
- *
- * Deletes an existing user group.
- *
- * When you delete a group, you include only the `groupId` in the request body.
- *
- * Example:
- *
- * ```
- * {
- * "groups": [
- * {
- * "groupId": "12345"
- * }
- * }
- * ```
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes an existing user group.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/groups` endpoint.
+ *
+ * Deletes an existing user group.
+ *
+ * When you delete a group, you include only the `groupId` in the request body.
+ *
+ * Example:
+ *
+ * ```
+ * {
+ * "groups": [
+ * {
+ * "groupId": "12345"
+ * }
+ * }
+ * ```
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete(
&self,
account_id: &str,
body: &crate::types::GroupInformation,
- ) -> Result<crate::types::GroupInformation> {
+ ) -> ClientResult<crate::types::GroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/identity_verifications.rs b/docusign/src/identity_verifications.rs
index f0f3130..ccc165d 100644
--- a/docusign/src/identity_verifications.rs
+++ b/docusign/src/identity_verifications.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct IdentityVerifications {
pub client: Client,
@@ -13,26 +15,26 @@ impl IdentityVerifications {
}
/**
- * Retrieves the Identity Verification workflows available to an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/identity_verification` endpoint.
- *
- * This method returns a list of Identity Verification workflows that are available to an account.
- *
- * **Note**: To use this method, you must either be an account administrator or a sender.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Retrieves the Identity Verification workflows available to an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/identity_verification` endpoint.
+ *
+ * This method returns a list of Identity Verification workflows that are available to an account.
+ *
+ * **Note**: To use this method, you must either be an account administrator or a sender.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn account_get(
&self,
account_id: &str,
- ) -> Result<crate::types::AccountIdentityVerificationResponse> {
+ ) -> ClientResult<crate::types::AccountIdentityVerificationResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/identity_verification",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/invoices.rs b/docusign/src/invoices.rs
index 1f619bf..6cb4863 100644
--- a/docusign/src/invoices.rs
+++ b/docusign/src/invoices.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Invoices {
pub client: Client,
@@ -13,26 +15,26 @@ impl Invoices {
}
/**
- * Get a List of Billing Invoices.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices` endpoint.
- *
- * Retrieves a list of invoices for the account. If the from date or to date queries are not specified, the response returns invoices for the last 365 days.
- *
- * Privileges required: account administrator
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- Specifies the date/time of the earliest invoice in the account to retrieve.
- * * `to_date: &str` -- Specifies the date/time of the latest invoice in the account to retrieve.
- */
+ * Get a List of Billing Invoices.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices` endpoint.
+ *
+ * Retrieves a list of invoices for the account. If the from date or to date queries are not specified, the response returns invoices for the last 365 days.
+ *
+ * Privileges required: account administrator
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- Specifies the date/time of the earliest invoice in the account to retrieve.
+ * * `to_date: &str` -- Specifies the date/time of the latest invoice in the account to retrieve.
+ */
pub async fn billing_get(
&self,
account_id: &str,
from_date: &str,
to_date: &str,
- ) -> Result<crate::types::BillingInvoicesResponse> {
+ ) -> ClientResult<crate::types::BillingInvoicesResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -44,7 +46,7 @@ impl Invoices {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_invoices?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -60,60 +62,60 @@ impl Invoices {
.await
}
/**
- * Retrieves a billing invoice.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices/{invoiceId}` endpoint.
- *
- * Retrieves the specified invoice.
- *
- * **Note**: If the `pdfAvailable` property in the response is set to *true*, you can download a PDF version of the invoice. To download the PDF, make the call again and change the value of the `Accept` property in the header to `Accept: application/pdf`.
- *
- * Privileges required: account administrator
- *
- * The response returns a list of charges and information about the charges. Quantities are usually shown as 'unlimited' or an integer. Amounts are shown in the currency set for the account.
- *
- * **Response**
- * The following table provides a description of the different `chargeName` property values. The information will grow as more chargeable items are added to the system.
- *
- * | chargeName | Description |
- * | --- | --- |
- * | id_check | ID Check Charge |
- * | in_person_signing | In Person Signing charge |
- * | envelopes Included | Sent Envelopes for the account |
- * | age_verify | Age verification check |
- * | ofac | OFAC Check |
- * | id_confirm | ID confirmation check |
- * | student_authentication | STAN PIN authentication check |
- * | wet_sign_fax | Pages for returning signed documents by fax |
- * | attachment_fax | Pages for returning attachments by fax |
- * | phone_authentication | Phone authentication charge |
- * | powerforms | PowerForm envelopes sent |
- * | signer_payments | Payment processing charge |
- * | outbound_fax | Send by fax charge |
- * | bulk_recipient_envelopes | Bulk Recipient Envelopes sent |
- * | sms_authentications | SMS authentication charge |
- * | saml_authentications | SAML authentication charge |
- * | express_signer_certificate | DocuSign Express Certificate charge |
- * | personal_signer_certificate | Personal Signer Certificate charge |
- * | safe_certificate | SAFE BioPharma Signer Certificate charge |
- * | seats | Included active seats charge |
- * | open_trust_certificate | OpenTrust Signer Certificate charge |
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `invoice_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Retrieves a billing invoice.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices/{invoiceId}` endpoint.
+ *
+ * Retrieves the specified invoice.
+ *
+ * **Note**: If the `pdfAvailable` property in the response is set to *true*, you can download a PDF version of the invoice. To download the PDF, make the call again and change the value of the `Accept` property in the header to `Accept: application/pdf`.
+ *
+ * Privileges required: account administrator
+ *
+ * The response returns a list of charges and information about the charges. Quantities are usually shown as 'unlimited' or an integer. Amounts are shown in the currency set for the account.
+ *
+ * **Response**
+ * The following table provides a description of the different `chargeName` property values. The information will grow as more chargeable items are added to the system.
+ *
+ * | chargeName | Description |
+ * | --- | --- |
+ * | id_check | ID Check Charge |
+ * | in_person_signing | In Person Signing charge |
+ * | envelopes Included | Sent Envelopes for the account |
+ * | age_verify | Age verification check |
+ * | ofac | OFAC Check |
+ * | id_confirm | ID confirmation check |
+ * | student_authentication | STAN PIN authentication check |
+ * | wet_sign_fax | Pages for returning signed documents by fax |
+ * | attachment_fax | Pages for returning attachments by fax |
+ * | phone_authentication | Phone authentication charge |
+ * | powerforms | PowerForm envelopes sent |
+ * | signer_payments | Payment processing charge |
+ * | outbound_fax | Send by fax charge |
+ * | bulk_recipient_envelopes | Bulk Recipient Envelopes sent |
+ * | sms_authentications | SMS authentication charge |
+ * | saml_authentications | SAML authentication charge |
+ * | express_signer_certificate | DocuSign Express Certificate charge |
+ * | personal_signer_certificate | Personal Signer Certificate charge |
+ * | safe_certificate | SAFE BioPharma Signer Certificate charge |
+ * | seats | Included active seats charge |
+ * | open_trust_certificate | OpenTrust Signer Certificate charge |
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `invoice_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn billing_get_invoices(
&self,
account_id: &str,
invoice_id: &str,
- ) -> Result<crate::types::BillingInvoice> {
+ ) -> ClientResult<crate::types::BillingInvoice> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_invoices/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(invoice_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&invoice_id.to_string()),
),
None,
);
@@ -128,26 +130,26 @@ impl Invoices {
.await
}
/**
- * Get a list of past due invoices.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices_past_due` endpoint.
- *
- * Returns a list past due invoices for the account and notes if payment can be made through the REST API.
- *
- * Privileges Required: account administrator
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Get a list of past due invoices.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_invoices_past_due` endpoint.
+ *
+ * Returns a list past due invoices for the account and notes if payment can be made through the REST API.
+ *
+ * Privileges Required: account administrator
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn billing_get_past_due(
&self,
account_id: &str,
- ) -> Result<crate::types::BillingInvoicesSummary> {
+ ) -> ClientResult<crate::types::BillingInvoicesSummary> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_invoices_past_due",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/lib.rs b/docusign/src/lib.rs
index 3480fae..0b87537 100644
--- a/docusign/src/lib.rs
+++ b/docusign/src/lib.rs
@@ -2182,6 +2182,7 @@ pub mod workspace_items;
pub mod workspaces;
use anyhow::{anyhow, Error, Result};
+type ClientResult<T> = Result<T>;
pub const FALLBACK_HOST: &str = "https://na4.docusign.net";
@@ -2479,7 +2480,7 @@ impl Client {
/// Refresh an access token from a refresh token. Client must have a refresh token
/// for this to work.
- pub async fn refresh_access_token(&self) -> Result<AccessToken> {
+ pub async fn refresh_access_token(&self) -> ClientResult<AccessToken> {
let response = {
let refresh_token = &self.token.read().await.refresh_token;
@@ -2526,7 +2527,7 @@ impl Client {
/// Get an access token from the code returned by the URL paramter sent to the
/// redirect URL.
- pub async fn get_access_token(&mut self, code: &str, state: &str) -> Result<AccessToken> {
+ pub async fn get_access_token(&mut self, code: &str, state: &str) -> ClientResult<AccessToken> {
let mut headers = reqwest::header::HeaderMap::new();
headers.append(
reqwest::header::ACCEPT,
@@ -2562,7 +2563,7 @@ impl Client {
Ok(t)
}
- async fn url_and_auth(&self, uri: &str) -> Result<(reqwest::Url, Option<String>)> {
+ async fn url_and_auth(&self, uri: &str) -> ClientResult<(reqwest::Url, Option<String>)> {
let parsed_url = uri.parse::<reqwest::Url>();
let auth = format!("Bearer {}", self.token.read().await.access_token);
@@ -2574,7 +2575,7 @@ impl Client {
method: &reqwest::Method,
uri: &str,
message: Message,
- ) -> Result<reqwest::Request> {
+ ) -> ClientResult<reqwest::Request> {
let (url, auth) = self.url_and_auth(uri).await?;
let instance = <&Client>::clone(&self);
@@ -2615,7 +2616,7 @@ impl Client {
method: reqwest::Method,
uri: &str,
message: Message,
- ) -> Result<reqwest::Response> {
+ ) -> ClientResult<reqwest::Response> {
if self.auto_refresh {
let expired = self.is_expired().await;
@@ -2654,7 +2655,7 @@ impl Client {
method: reqwest::Method,
uri: &str,
message: Message,
- ) -> Result<Out>
+ ) -> ClientResult<Out>
where
Out: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2694,7 +2695,7 @@ impl Client {
method: http::Method,
uri: &str,
message: Message,
- ) -> Result<(Option<crate::utils::NextLink>, Out)>
+ ) -> ClientResult<(Option<crate::utils::NextLink>, Out)>
where
Out: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2738,7 +2739,7 @@ impl Client {
/* TODO: make this more DRY */
#[allow(dead_code)]
- async fn post_form<Out>(&self, uri: &str, form: reqwest::multipart::Form) -> Result<Out>
+ async fn post_form<Out>(&self, uri: &str, form: reqwest::multipart::Form) -> ClientResult<Out>
where
Out: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2803,7 +2804,7 @@ impl Client {
method: reqwest::Method,
uri: &str,
accept_mime_type: &str,
- ) -> Result<Out>
+ ) -> ClientResult<Out>
where
Out: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2867,7 +2868,7 @@ impl Client {
uri: &str,
content: &[u8],
mime_type: &str,
- ) -> Result<Out>
+ ) -> ClientResult<Out>
where
Out: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2943,7 +2944,7 @@ impl Client {
method: http::Method,
uri: &str,
message: Message,
- ) -> Result<D>
+ ) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2952,7 +2953,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn get<D>(&self, uri: &str, message: Message) -> Result<D>
+ async fn get<D>(&self, uri: &str, message: Message) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2960,7 +2961,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn get_all_pages<D>(&self, uri: &str, _message: Message) -> Result<Vec<D>>
+ async fn get_all_pages<D>(&self, uri: &str, _message: Message) -> ClientResult<Vec<D>>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2970,7 +2971,7 @@ impl Client {
/// "unfold" paginated results of a vector of items
#[allow(dead_code)]
- async fn unfold<D>(&self, uri: &str) -> Result<Vec<D>>
+ async fn unfold<D>(&self, uri: &str) -> ClientResult<Vec<D>>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -2992,7 +2993,10 @@ impl Client {
}
#[allow(dead_code)]
- async fn get_pages<D>(&self, uri: &str) -> Result<(Option<crate::utils::NextLink>, Vec<D>)>
+ async fn get_pages<D>(
+ &self,
+ uri: &str,
+ ) -> ClientResult<(Option<crate::utils::NextLink>, Vec<D>)>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -3004,7 +3008,7 @@ impl Client {
async fn get_pages_url<D>(
&self,
url: &reqwest::Url,
- ) -> Result<(Option<crate::utils::NextLink>, Vec<D>)>
+ ) -> ClientResult<(Option<crate::utils::NextLink>, Vec<D>)>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -3013,7 +3017,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn post<D>(&self, uri: &str, message: Message) -> Result<D>
+ async fn post<D>(&self, uri: &str, message: Message) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -3021,7 +3025,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn patch<D>(&self, uri: &str, message: Message) -> Result<D>
+ async fn patch<D>(&self, uri: &str, message: Message) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -3029,7 +3033,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn put<D>(&self, uri: &str, message: Message) -> Result<D>
+ async fn put<D>(&self, uri: &str, message: Message) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
@@ -3037,7 +3041,7 @@ impl Client {
}
#[allow(dead_code)]
- async fn delete<D>(&self, uri: &str, message: Message) -> Result<D>
+ async fn delete<D>(&self, uri: &str, message: Message) -> ClientResult<D>
where
D: serde::de::DeserializeOwned + 'static + Send,
{
diff --git a/docusign/src/notary.rs b/docusign/src/notary.rs
index 6c6140c..77d7e06 100644
--- a/docusign/src/notary.rs
+++ b/docusign/src/notary.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Notary {
pub client: Client,
@@ -13,18 +15,21 @@ impl Notary {
}
/**
- * Gets settings for a notary user.
- *
- * This function performs a `GET` to the `/v2.1/current_user/notary` endpoint.
- *
- * Gets settings for a notary user.
- * The current user must be a notary.
- *
- * **Parameters:**
- *
- * * `include_jurisdictions: &str` -- If **true**, the response will include a `jurisdiction` property that contains an array of all supported jurisdictions for the current user.
- */
- pub async fn get(&self, include_jurisdictions: &str) -> Result<crate::types::NotaryResult> {
+ * Gets settings for a notary user.
+ *
+ * This function performs a `GET` to the `/v2.1/current_user/notary` endpoint.
+ *
+ * Gets settings for a notary user.
+ * The current user must be a notary.
+ *
+ * **Parameters:**
+ *
+ * * `include_jurisdictions: &str` -- If **true**, the response will include a `jurisdiction` property that contains an array of all supported jurisdictions for the current user.
+ */
+ pub async fn get(
+ &self,
+ include_jurisdictions: &str,
+ ) -> ClientResult<crate::types::NotaryResult> {
let mut query_args: Vec<(String, String)> = Default::default();
if !include_jurisdictions.is_empty() {
query_args.push((
@@ -47,14 +52,19 @@ impl Notary {
.await
}
/**
- * Updates notary information for the current user.
- *
- * This function performs a `PUT` to the `/v2.1/current_user/notary` endpoint.
- *
- * Updates notary information for the current user.
- */
- pub async fn put(&self, body: &crate::types::NotaryData) -> Result<crate::types::NotaryData> {
- let url = self.client.url("/v2.1/current_user/notary", None);
+ * Updates notary information for the current user.
+ *
+ * This function performs a `PUT` to the `/v2.1/current_user/notary` endpoint.
+ *
+ * Updates notary information for the current user.
+ */
+ pub async fn put(
+ &self,
+ body: &crate::types::NotaryData,
+ ) -> ClientResult<crate::types::NotaryData> {
+ let url = self
+ .client
+ .url(&"/v2.1/current_user/notary".to_string(), None);
self.client
.put(
&url,
@@ -66,14 +76,19 @@ impl Notary {
.await
}
/**
- * Registers the current user as a notary.
- *
- * This function performs a `POST` to the `/v2.1/current_user/notary` endpoint.
- *
- * Registers the current user as a notary.
- */
- pub async fn post(&self, body: &crate::types::NotaryData) -> Result<crate::types::NotaryData> {
- let url = self.client.url("/v2.1/current_user/notary", None);
+ * Registers the current user as a notary.
+ *
+ * This function performs a `POST` to the `/v2.1/current_user/notary` endpoint.
+ *
+ * Registers the current user as a notary.
+ */
+ pub async fn post(
+ &self,
+ body: &crate::types::NotaryData,
+ ) -> ClientResult<crate::types::NotaryData> {
+ let url = self
+ .client
+ .url(&"/v2.1/current_user/notary".to_string(), None);
self.client
.post(
&url,
diff --git a/docusign/src/notary_journals.rs b/docusign/src/notary_journals.rs
index 81130c2..65e209a 100644
--- a/docusign/src/notary_journals.rs
+++ b/docusign/src/notary_journals.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct NotaryJournals {
pub client: Client,
@@ -13,24 +15,24 @@ impl NotaryJournals {
}
/**
- * Gets notary jurisdictions for a user.
- *
- * This function performs a `GET` to the `/v2.1/current_user/notary/journals` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
- */
+ * Gets notary jurisdictions for a user.
+ *
+ * This function performs a `GET` to the `/v2.1/current_user/notary/journals` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `count: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `search_text: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
+ */
pub async fn get(
&self,
count: &str,
search_text: &str,
start_position: &str,
- ) -> Result<crate::types::NotaryJournalList> {
+ ) -> ClientResult<crate::types::NotaryJournalList> {
let mut query_args: Vec<(String, String)> = Default::default();
if !count.is_empty() {
query_args.push(("count".to_string(), count.to_string()));
diff --git a/docusign/src/notary_jurisdiction.rs b/docusign/src/notary_jurisdiction.rs
index bcc0b26..48b6ba1 100644
--- a/docusign/src/notary_jurisdiction.rs
+++ b/docusign/src/notary_jurisdiction.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct NotaryJurisdiction {
pub client: Client,
@@ -13,17 +15,17 @@ impl NotaryJurisdiction {
}
/**
- * Returns a list of jurisdictions that the notary is registered in.
- *
- * This function performs a `GET` to the `/v2.1/current_user/notary/jurisdictions` endpoint.
- *
- * Returns a list of jurisdictions that the notary is registered in.
- * The current user must be a notary.
- */
- pub async fn s_get(&self) -> Result<crate::types::NotaryJurisdictionList> {
+ * Returns a list of jurisdictions that the notary is registered in.
+ *
+ * This function performs a `GET` to the `/v2.1/current_user/notary/jurisdictions` endpoint.
+ *
+ * Returns a list of jurisdictions that the notary is registered in.
+ * The current user must be a notary.
+ */
+ pub async fn s_get(&self) -> ClientResult<crate::types::NotaryJurisdictionList> {
let url = self
.client
- .url("/v2.1/current_user/notary/jurisdictions", None);
+ .url(&"/v2.1/current_user/notary/jurisdictions".to_string(), None);
self.client
.get(
&url,
@@ -35,19 +37,19 @@ impl NotaryJurisdiction {
.await
}
/**
- * Creates a jurisdiction object.
- *
- * This function performs a `POST` to the `/v2.1/current_user/notary/jurisdictions` endpoint.
- *
- * Creates a jurisdiction object.
- */
+ * Creates a jurisdiction object.
+ *
+ * This function performs a `POST` to the `/v2.1/current_user/notary/jurisdictions` endpoint.
+ *
+ * Creates a jurisdiction object.
+ */
pub async fn s_post(
&self,
body: &crate::types::NotaryJurisdictionData,
- ) -> Result<crate::types::NotaryJurisdictionData> {
+ ) -> ClientResult<crate::types::NotaryJurisdictionData> {
let url = self
.client
- .url("/v2.1/current_user/notary/jurisdictions", None);
+ .url(&"/v2.1/current_user/notary/jurisdictions".to_string(), None);
self.client
.post(
&url,
@@ -59,56 +61,56 @@ impl NotaryJurisdiction {
.await
}
/**
- * Gets a jurisdiction object for the current user. The user must be a notary.
- *
- * This function performs a `GET` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
- *
- * Gets a jurisdiction object for the current user. The following restrictions apply:
- *
- * - The current user must be a notary.
- * - The `jurisdictionId` must be a jurisdiction that the notary is registered for.
- *
- *
- * **Parameters:**
- *
- * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
- * The following jurisdictions
- * are supported:
- *
- * - `5 - California`
- * - `6 - Colorado`
- * - `9 - Florida`
- * - `10 - Georgia`
- * - `12 - Idaho`
- * - `13 - Illinois`
- * - `14 - Indiana`
- * - `15 - Iowa`
- * - `17 - Kentucky`
- * - `23 - Minnesota`
- * - `25 - Missouri`
- * - `30 - New Jersey`
- * - `32 - New York`
- * - `33 - North Carolina`
- * - `35 - Ohio`
- * - `37 - Oregon`
- * - `38 - Pennsylvania`
- * - `40 - South Carolina`
- * - `43 - Texas`
- * - `44 - Utah`
- * - `47 - Washington`
- * - `48 - West Virginia`
- * - `49 - Wisconsin`
- * - `62 - Florida Commissioner of Deeds`
- * .
- */
+ * Gets a jurisdiction object for the current user. The user must be a notary.
+ *
+ * This function performs a `GET` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
+ *
+ * Gets a jurisdiction object for the current user. The following restrictions apply:
+ *
+ * - The current user must be a notary.
+ * - The `jurisdictionId` must be a jurisdiction that the notary is registered for.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
+ * The following jurisdictions
+ * are supported:
+ *
+ * - `5 - California`
+ * - `6 - Colorado`
+ * - `9 - Florida`
+ * - `10 - Georgia`
+ * - `12 - Idaho`
+ * - `13 - Illinois`
+ * - `14 - Indiana`
+ * - `15 - Iowa`
+ * - `17 - Kentucky`
+ * - `23 - Minnesota`
+ * - `25 - Missouri`
+ * - `30 - New Jersey`
+ * - `32 - New York`
+ * - `33 - North Carolina`
+ * - `35 - Ohio`
+ * - `37 - Oregon`
+ * - `38 - Pennsylvania`
+ * - `40 - South Carolina`
+ * - `43 - Texas`
+ * - `44 - Utah`
+ * - `47 - Washington`
+ * - `48 - West Virginia`
+ * - `49 - Wisconsin`
+ * - `62 - Florida Commissioner of Deeds`
+ * .
+ */
pub async fn s_get_jurisdiction(
&self,
jurisdiction_id: &str,
- ) -> Result<crate::types::NotaryJurisdictionData> {
+ ) -> ClientResult<crate::types::NotaryJurisdictionData> {
let url = self.client.url(
&format!(
"/v2.1/current_user/notary/jurisdictions/{}",
- crate::progenitor_support::encode_path(jurisdiction_id),
+ crate::progenitor_support::encode_path(&jurisdiction_id.to_string()),
),
None,
);
@@ -123,111 +125,111 @@ impl NotaryJurisdiction {
.await
}
/**
- * Updates the jurisdiction information about a notary.
- *
- * This function performs a `PUT` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
- *
- * Updates the jurisdiction information about a notary.
- *
- * The following restrictions apply:
- *
- * - The current user must be a notary.
- * - The `jurisdictionId` path parameter must be a jurisdiction that the notary is registered for.
- * - The `jurisdictionId` path parameter must match the request body's `jurisdiction.jurisdictionId`.
- *
- * The request body must have a full `jurisdiction` object for the jurisdiction property.
- * The best way to do this is to use `getNotaryJurisdiction` to obtain the current values and update the properties you want to change.
- *
- * For example, assume `getNotaryJurisdiction` returns this:
- *
- * ```
- * {
- * "jurisdiction": {
- * "jurisdictionId": "15",
- * "name": "Iowa",
- * "county": "",
- * "enabled": "true",
- * "countyInSeal": "false",
- * "commissionIdInSeal": "true",
- * "stateNameInSeal": "true",
- * "notaryPublicInSeal": "true",
- * "allowSystemCreatedSeal": "true",
- * "allowUserUploadedSeal": "false"
- * },
- * "commissionId": "123456",
- * "commissionExpiration": "2020-08-31T07:00:00.0000000Z",
- * "registeredName": "Bob Notary",
- * "county": "Adams",
- * "sealType": "system_created"
- * }
- * ```
- *
- * If you want to change the name of the notary from "Bob Notary" to "Robert Notary", your request body would be:
- *
- * ```
- * {
- * "jurisdiction": {
- * "jurisdictionId": "15",
- * "name": "Iowa",
- * "county": "",
- * "enabled": "true",
- * "countyInSeal": "false",
- * "commissionIdInSeal": "true",
- * "stateNameInSeal": "true",
- * "notaryPublicInSeal": "true",
- * "allowSystemCreatedSeal": "true",
- * "allowUserUploadedSeal": "false"
- * },
- * "commissionId": "123456",
- * "commissionExpiration": "2020-08-31T07:00:00.0000000Z",
- * "registeredName": "Robert Notary",
- * "county": "Adams",
- * "sealType": "system_created"
- * }
- * ```
- *
- *
- * **Parameters:**
- *
- * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
- * The following jurisdictions
- * are supported:
- *
- * - `5 - California`
- * - `6 - Colorado`
- * - `9 - Florida`
- * - `10 - Georgia`
- * - `12 - Idaho`
- * - `13 - Illinois`
- * - `14 - Indiana`
- * - `15 - Iowa`
- * - `17 - Kentucky`
- * - `23 - Minnesota`
- * - `25 - Missouri`
- * - `30 - New Jersey`
- * - `32 - New York`
- * - `33 - North Carolina`
- * - `35 - Ohio`
- * - `37 - Oregon`
- * - `38 - Pennsylvania`
- * - `40 - South Carolina`
- * - `43 - Texas`
- * - `44 - Utah`
- * - `47 - Washington`
- * - `48 - West Virginia`
- * - `49 - Wisconsin`
- * - `62 - Florida Commissioner of Deeds`
- * .
- */
+ * Updates the jurisdiction information about a notary.
+ *
+ * This function performs a `PUT` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
+ *
+ * Updates the jurisdiction information about a notary.
+ *
+ * The following restrictions apply:
+ *
+ * - The current user must be a notary.
+ * - The `jurisdictionId` path parameter must be a jurisdiction that the notary is registered for.
+ * - The `jurisdictionId` path parameter must match the request body's `jurisdiction.jurisdictionId`.
+ *
+ * The request body must have a full `jurisdiction` object for the jurisdiction property.
+ * The best way to do this is to use `getNotaryJurisdiction` to obtain the current values and update the properties you want to change.
+ *
+ * For example, assume `getNotaryJurisdiction` returns this:
+ *
+ * ```
+ * {
+ * "jurisdiction": {
+ * "jurisdictionId": "15",
+ * "name": "Iowa",
+ * "county": "",
+ * "enabled": "true",
+ * "countyInSeal": "false",
+ * "commissionIdInSeal": "true",
+ * "stateNameInSeal": "true",
+ * "notaryPublicInSeal": "true",
+ * "allowSystemCreatedSeal": "true",
+ * "allowUserUploadedSeal": "false"
+ * },
+ * "commissionId": "123456",
+ * "commissionExpiration": "2020-08-31T07:00:00.0000000Z",
+ * "registeredName": "Bob Notary",
+ * "county": "Adams",
+ * "sealType": "system_created"
+ * }
+ * ```
+ *
+ * If you want to change the name of the notary from "Bob Notary" to "Robert Notary", your request body would be:
+ *
+ * ```
+ * {
+ * "jurisdiction": {
+ * "jurisdictionId": "15",
+ * "name": "Iowa",
+ * "county": "",
+ * "enabled": "true",
+ * "countyInSeal": "false",
+ * "commissionIdInSeal": "true",
+ * "stateNameInSeal": "true",
+ * "notaryPublicInSeal": "true",
+ * "allowSystemCreatedSeal": "true",
+ * "allowUserUploadedSeal": "false"
+ * },
+ * "commissionId": "123456",
+ * "commissionExpiration": "2020-08-31T07:00:00.0000000Z",
+ * "registeredName": "Robert Notary",
+ * "county": "Adams",
+ * "sealType": "system_created"
+ * }
+ * ```
+ *
+ *
+ * **Parameters:**
+ *
+ * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
+ * The following jurisdictions
+ * are supported:
+ *
+ * - `5 - California`
+ * - `6 - Colorado`
+ * - `9 - Florida`
+ * - `10 - Georgia`
+ * - `12 - Idaho`
+ * - `13 - Illinois`
+ * - `14 - Indiana`
+ * - `15 - Iowa`
+ * - `17 - Kentucky`
+ * - `23 - Minnesota`
+ * - `25 - Missouri`
+ * - `30 - New Jersey`
+ * - `32 - New York`
+ * - `33 - North Carolina`
+ * - `35 - Ohio`
+ * - `37 - Oregon`
+ * - `38 - Pennsylvania`
+ * - `40 - South Carolina`
+ * - `43 - Texas`
+ * - `44 - Utah`
+ * - `47 - Washington`
+ * - `48 - West Virginia`
+ * - `49 - Wisconsin`
+ * - `62 - Florida Commissioner of Deeds`
+ * .
+ */
pub async fn s_put_jurisdiction(
&self,
jurisdiction_id: &str,
body: &crate::types::NotaryJurisdictionData,
- ) -> Result<crate::types::NotaryJurisdictionData> {
+ ) -> ClientResult<crate::types::NotaryJurisdictionData> {
let url = self.client.url(
&format!(
"/v2.1/current_user/notary/jurisdictions/{}",
- crate::progenitor_support::encode_path(jurisdiction_id),
+ crate::progenitor_support::encode_path(&jurisdiction_id.to_string()),
),
None,
);
@@ -242,49 +244,49 @@ impl NotaryJurisdiction {
.await
}
/**
- * Deletes the specified jurisdiction.
- *
- * This function performs a `DELETE` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
- *
- * Deletes the specified jurisdiction.
- *
- * **Parameters:**
- *
- * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
- * The following jurisdictions
- * are supported:
- *
- * - `5 - California`
- * - `6 - Colorado`
- * - `9 - Florida`
- * - `10 - Georgia`
- * - `12 - Idaho`
- * - `13 - Illinois`
- * - `14 - Indiana`
- * - `15 - Iowa`
- * - `17 - Kentucky`
- * - `23 - Minnesota`
- * - `25 - Missouri`
- * - `30 - New Jersey`
- * - `32 - New York`
- * - `33 - North Carolina`
- * - `35 - Ohio`
- * - `37 - Oregon`
- * - `38 - Pennsylvania`
- * - `40 - South Carolina`
- * - `43 - Texas`
- * - `44 - Utah`
- * - `47 - Washington`
- * - `48 - West Virginia`
- * - `49 - Wisconsin`
- * - `62 - Florida Commissioner of Deeds`
- * .
- */
- pub async fn s_delete_jurisdiction(&self, jurisdiction_id: &str) -> Result<()> {
+ * Deletes the specified jurisdiction.
+ *
+ * This function performs a `DELETE` to the `/v2.1/current_user/notary/jurisdictions/{jurisdictionId}` endpoint.
+ *
+ * Deletes the specified jurisdiction.
+ *
+ * **Parameters:**
+ *
+ * * `jurisdiction_id: &str` -- The ID of the jurisdiction.
+ * The following jurisdictions
+ * are supported:
+ *
+ * - `5 - California`
+ * - `6 - Colorado`
+ * - `9 - Florida`
+ * - `10 - Georgia`
+ * - `12 - Idaho`
+ * - `13 - Illinois`
+ * - `14 - Indiana`
+ * - `15 - Iowa`
+ * - `17 - Kentucky`
+ * - `23 - Minnesota`
+ * - `25 - Missouri`
+ * - `30 - New Jersey`
+ * - `32 - New York`
+ * - `33 - North Carolina`
+ * - `35 - Ohio`
+ * - `37 - Oregon`
+ * - `38 - Pennsylvania`
+ * - `40 - South Carolina`
+ * - `43 - Texas`
+ * - `44 - Utah`
+ * - `47 - Washington`
+ * - `48 - West Virginia`
+ * - `49 - Wisconsin`
+ * - `62 - Florida Commissioner of Deeds`
+ * .
+ */
+ pub async fn s_delete_jurisdiction(&self, jurisdiction_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/current_user/notary/jurisdictions/{}",
- crate::progenitor_support::encode_path(jurisdiction_id),
+ crate::progenitor_support::encode_path(&jurisdiction_id.to_string()),
),
None,
);
diff --git a/docusign/src/payment_gateway_accounts.rs b/docusign/src/payment_gateway_accounts.rs
index dbc6918..25920e2 100644
--- a/docusign/src/payment_gateway_accounts.rs
+++ b/docusign/src/payment_gateway_accounts.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct PaymentGatewayAccounts {
pub client: Client,
@@ -13,24 +15,24 @@ impl PaymentGatewayAccounts {
}
/**
- * List payment gateway accounts.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/payment_gateway_accounts` endpoint.
- *
- * This method returns a list of payment gateway accounts and basic information about them.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * List payment gateway accounts.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/payment_gateway_accounts` endpoint.
+ *
+ * This method returns a list of payment gateway accounts and basic information about them.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_all(
&self,
account_id: &str,
- ) -> Result<crate::types::PaymentGatewayAccountsInfo> {
+ ) -> ClientResult<crate::types::PaymentGatewayAccountsInfo> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/payment_gateway_accounts",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
diff --git a/docusign/src/payments.rs b/docusign/src/payments.rs
index b50e36c..e5933a0 100644
--- a/docusign/src/payments.rs
+++ b/docusign/src/payments.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Payments {
pub client: Client,
@@ -13,26 +15,26 @@ impl Payments {
}
/**
- * Gets payment information for one or more payments.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_payments` endpoint.
- *
- * Retrieves a list containing information about one or more payments. If the from date or to date queries are not used, the response returns payment information for the last 365 days.
- *
- * Privileges required: account administrator
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- Specifies the date/time of the earliest payment in the account to retrieve.
- * * `to_date: &str` -- Specifies the date/time of the latest payment in the account to retrieve.
- */
+ * Gets payment information for one or more payments.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_payments` endpoint.
+ *
+ * Retrieves a list containing information about one or more payments. If the from date or to date queries are not used, the response returns payment information for the last 365 days.
+ *
+ * Privileges required: account administrator
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- Specifies the date/time of the earliest payment in the account to retrieve.
+ * * `to_date: &str` -- Specifies the date/time of the latest payment in the account to retrieve.
+ */
pub async fn billing_get_list(
&self,
account_id: &str,
from_date: &str,
to_date: &str,
- ) -> Result<crate::types::BillingPaymentsResponse> {
+ ) -> ClientResult<crate::types::BillingPaymentsResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -44,7 +46,7 @@ impl Payments {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_payments?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -60,32 +62,32 @@ impl Payments {
.await
}
/**
- * Posts a payment to a past due invoice.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/billing_payments` endpoint.
- *
- * Posts a payment to a past due invoice.
- *
- * This method can only be used if the `paymentAllowed` value for a past due invoice is true. This can be determined calling [Billing::listInvoicesPastDue](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/Invoices/listPastDue).
- *
- * The response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the `nextUri` and `previousUri` properties are not returned.
- *
- * Privileges required: account administrator
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Posts a payment to a past due invoice.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/billing_payments` endpoint.
+ *
+ * Posts a payment to a past due invoice.
+ *
+ * This method can only be used if the `paymentAllowed` value for a past due invoice is true. This can be determined calling [Billing::listInvoicesPastDue](https://developers.docusign.com/docs/esign-rest-api/reference/Billing/Invoices/listPastDue).
+ *
+ * The response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the `nextUri` and `previousUri` properties are not returned.
+ *
+ * Privileges required: account administrator
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn billing_post(
&self,
account_id: &str,
body: &crate::types::BillingPaymentRequest,
- ) -> Result<crate::types::BillingPaymentResponse> {
+ ) -> ClientResult<crate::types::BillingPaymentResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_payments",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -100,29 +102,29 @@ impl Payments {
.await
}
/**
- * Gets billing payment information for a specific payment.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_payments/{paymentId}` endpoint.
- *
- * Retrieves the information for a specified payment.
- *
- * Privileges required: account administrator
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `payment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets billing payment information for a specific payment.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/billing_payments/{paymentId}` endpoint.
+ *
+ * Retrieves the information for a specified payment.
+ *
+ * Privileges required: account administrator
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `payment_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn billing_get(
&self,
account_id: &str,
payment_id: &str,
- ) -> Result<crate::types::BillingPaymentItem> {
+ ) -> ClientResult<crate::types::BillingPaymentItem> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/billing_payments/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(payment_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&payment_id.to_string()),
),
None,
);
diff --git a/docusign/src/power_form_data.rs b/docusign/src/power_form_data.rs
index 61a5713..1f143b3 100644
--- a/docusign/src/power_form_data.rs
+++ b/docusign/src/power_form_data.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct PowerFormData {
pub client: Client,
@@ -13,36 +15,36 @@ impl PowerFormData {
}
/**
- * Returns the data that users entered in a PowerForm.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}/form_data` endpoint.
- *
- * This method enables Powerform Administrators or the sender of a PowerForm to download the data that recipients have entered into a PowerForm.
- *
- * You specify the format in which you want to retrieve the data in the `Accept` header. This header accepts the following values:
- *
- *
- * - `application/json`: JSON format
- * - `application/xml`: XML format
- * - `text/csv`: Comma-separated value (CSV) format
- *
- * **Note**: Only PowerForm Administrators or the PowerForm Sender can download the data associated with a PowerForm.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `data_layout: &str` -- The layout in which to return the PowerForm data. Valid values are:
- *
- * - `Native`
- * - `Csv_Classic`
- * - `Csv_One_Envelope_Per_Line`
- * - `Xml_Classic`.
- * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
- *
- * **Note**: If this property is null, no date filtering is applied.
- * * `to_date: &str` -- The end date of a date range in UTC DateTime format. The default value is `UtcNow`.
- */
+ * Returns the data that users entered in a PowerForm.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}/form_data` endpoint.
+ *
+ * This method enables Powerform Administrators or the sender of a PowerForm to download the data that recipients have entered into a PowerForm.
+ *
+ * You specify the format in which you want to retrieve the data in the `Accept` header. This header accepts the following values:
+ *
+ *
+ * - `application/json`: JSON format
+ * - `application/xml`: XML format
+ * - `text/csv`: Comma-separated value (CSV) format
+ *
+ * **Note**: Only PowerForm Administrators or the PowerForm Sender can download the data associated with a PowerForm.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `data_layout: &str` -- The layout in which to return the PowerForm data. Valid values are:
+ *
+ * - `Native`
+ * - `Csv_Classic`
+ * - `Csv_One_Envelope_Per_Line`
+ * - `Xml_Classic`.
+ * * `from_date: &str` -- The start date for a date range in UTC DateTime format.
+ *
+ * **Note**: If this property is null, no date filtering is applied.
+ * * `to_date: &str` -- The end date of a date range in UTC DateTime format. The default value is `UtcNow`.
+ */
pub async fn power_forms_get_form_data(
&self,
account_id: &str,
@@ -50,7 +52,7 @@ impl PowerFormData {
data_layout: &str,
from_date: &str,
to_date: &str,
- ) -> Result<crate::types::PowerFormsFormDataResponse> {
+ ) -> ClientResult<crate::types::PowerFormsFormDataResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !data_layout.is_empty() {
query_args.push(("data_layout".to_string(), data_layout.to_string()));
@@ -65,8 +67,8 @@ impl PowerFormData {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms/{}/form_data?{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(power_form_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&power_form_id.to_string()),
query_
),
None,
diff --git a/docusign/src/power_forms.rs b/docusign/src/power_forms.rs
index f2557a0..987fe27 100644
--- a/docusign/src/power_forms.rs
+++ b/docusign/src/power_forms.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct PowerForms {
pub client: Client,
@@ -13,35 +15,35 @@ impl PowerForms {
}
/**
- * Returns a list of PowerForms.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
- *
- * This method returns a list of PowerForms that are available to the user.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `from_date: &str` -- (Optional) The start date for a date range.
- *
- * **Note**: If no value is provided, no date filtering is applied.
- * * `order: &str` -- (Optional) The order in which to sort the results.
- *
- * Valid values are:
- *
- *
- * * `asc`: Ascending order.
- * * `desc`: Descending order.
- * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
- *
- * Valid values are:
- *
- * * `modified`
- * * `name`.
- * * `to_date: &str` -- (Optional) The end date for a date range.
- *
- * **Note**: If no value is provided, this property defaults to the current date.
- */
+ * Returns a list of PowerForms.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
+ *
+ * This method returns a list of PowerForms that are available to the user.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `from_date: &str` -- (Optional) The start date for a date range.
+ *
+ * **Note**: If no value is provided, no date filtering is applied.
+ * * `order: &str` -- (Optional) The order in which to sort the results.
+ *
+ * Valid values are:
+ *
+ *
+ * * `asc`: Ascending order.
+ * * `desc`: Descending order.
+ * * `order_by: &str` -- (Optional) The file attribute to use to sort the results.
+ *
+ * Valid values are:
+ *
+ * * `modified`
+ * * `name`.
+ * * `to_date: &str` -- (Optional) The end date for a date range.
+ *
+ * **Note**: If no value is provided, this property defaults to the current date.
+ */
pub async fn get_list(
&self,
account_id: &str,
@@ -49,7 +51,7 @@ impl PowerForms {
order: &str,
order_by: &str,
to_date: &str,
- ) -> Result<crate::types::PowerFormsResponse> {
+ ) -> ClientResult<crate::types::PowerFormsResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !from_date.is_empty() {
query_args.push(("from_date".to_string(), from_date.to_string()));
@@ -67,7 +69,7 @@ impl PowerForms {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -83,64 +85,64 @@ impl PowerForms {
.await
}
/**
- * Creates a new PowerForm.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
- *
- * This method creates a new PowerForm.
- *
- * You create a PowerForm from an existing DocuSign [template](https://developers.docusign.com/docs/esign-rest-api/reference/templates/templates/create/), based on the `templateId` in the request body.
- *
- * PowerForms that you create from a template are referred to as *web PowerForms*.
- *
- * **Note**: The RADmin console also supports creating a PowerForm by uploading a PDF file that has active form fields (referred to as a *PDF PowerForm*). However, PDF PowerForms are deprecated and are not supported in the API.
- *
- * **Note**: A PowerForm can have only one sender. (Because PowerForms are not necessarily sent by email, this user is also referred to as the PowerForm *initiator*.) If you need to associate multiple senders with a PowerForm, create multiple copies of the PowerForm by using the same template (one copy for each sender). By default, the sender is the PowerForm Administrator who creates the PowerForm.
- *
- *
- * ### Signing modes
- *
- * You can use one of the following signing modes for a PowerForm:
- *
- * **`email`**
- *
- * This mode verifies the recipient's identity by using email authentication before the recipient can sign a document. The recipient enters their email address on the landing page and then clicks **Begin Signing** to begin the signing process. The system then sends an email message with a validation code to the recipient. If the recipient does not provide a valid email address, they do not receive the email message containing the access code and are not able to open and sign the document.
- *
- * Alternatively, you can make the process easier for signers by using email authentication only and omitting the access code. To do this, you append the `activateonly` flag to the PowerForm URL and set it to true by passing in the value `1`. When the flag is active, the first recipient receives an email with a link that initiates the signing session without having to enter access code.
- *
- * Example: `activateonly=1`
- *
- * **`direct`**
- *
- * This mode does not require any verification. After a recipient enters their email address on the landing page and clicks **Begin Signing**, a new browser tab opens and the recipient can immediately begin the signing process.
- *
- * Because the `direct` signing mode does not verify the recipient's identity by using email authentication, we strongly recommend that you use this mode only when the PowerForm is accessible behind a secure portal where the recipient's identity is already authenticated, or where another form of authentication is specified for the recipient in the DocuSign template (for example, an access code, phone authentication, or ID check).
- *
- * **Note**: In the account settings, `enablePowerFormDirect` must be **true** to use `direct` as the `signingMode`.
- *
- * ### Redirect URLs
- *
- * You can control the URL to which signers are redirected after signing your PowerForm. However, the URL is specified elsewhere, outside of the PowerForm creation process. For details, see [How do I specify a URL to redirect to when a PowerForm is completed?](https://support.docusign.com/en/articles/How-do-I-specify-a-URL-to-redirect-to-when-a-Powerform-is-completed).
- *
- * ### More information
- *
- * For more information about creating PowerForms, see [Create a PowerForm](https://support.docusign.com/en/guides/ndse-user-guide-create-a-powerform).
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a new PowerForm.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
+ *
+ * This method creates a new PowerForm.
+ *
+ * You create a PowerForm from an existing DocuSign [template](https://developers.docusign.com/docs/esign-rest-api/reference/templates/templates/create/), based on the `templateId` in the request body.
+ *
+ * PowerForms that you create from a template are referred to as *web PowerForms*.
+ *
+ * **Note**: The RADmin console also supports creating a PowerForm by uploading a PDF file that has active form fields (referred to as a *PDF PowerForm*). However, PDF PowerForms are deprecated and are not supported in the API.
+ *
+ * **Note**: A PowerForm can have only one sender. (Because PowerForms are not necessarily sent by email, this user is also referred to as the PowerForm *initiator*.) If you need to associate multiple senders with a PowerForm, create multiple copies of the PowerForm by using the same template (one copy for each sender). By default, the sender is the PowerForm Administrator who creates the PowerForm.
+ *
+ *
+ * ### Signing modes
+ *
+ * You can use one of the following signing modes for a PowerForm:
+ *
+ * **`email`**
+ *
+ * This mode verifies the recipient's identity by using email authentication before the recipient can sign a document. The recipient enters their email address on the landing page and then clicks **Begin Signing** to begin the signing process. The system then sends an email message with a validation code to the recipient. If the recipient does not provide a valid email address, they do not receive the email message containing the access code and are not able to open and sign the document.
+ *
+ * Alternatively, you can make the process easier for signers by using email authentication only and omitting the access code. To do this, you append the `activateonly` flag to the PowerForm URL and set it to true by passing in the value `1`. When the flag is active, the first recipient receives an email with a link that initiates the signing session without having to enter access code.
+ *
+ * Example: `activateonly=1`
+ *
+ * **`direct`**
+ *
+ * This mode does not require any verification. After a recipient enters their email address on the landing page and clicks **Begin Signing**, a new browser tab opens and the recipient can immediately begin the signing process.
+ *
+ * Because the `direct` signing mode does not verify the recipient's identity by using email authentication, we strongly recommend that you use this mode only when the PowerForm is accessible behind a secure portal where the recipient's identity is already authenticated, or where another form of authentication is specified for the recipient in the DocuSign template (for example, an access code, phone authentication, or ID check).
+ *
+ * **Note**: In the account settings, `enablePowerFormDirect` must be **true** to use `direct` as the `signingMode`.
+ *
+ * ### Redirect URLs
+ *
+ * You can control the URL to which signers are redirected after signing your PowerForm. However, the URL is specified elsewhere, outside of the PowerForm creation process. For details, see [How do I specify a URL to redirect to when a PowerForm is completed?](https://support.docusign.com/en/articles/How-do-I-specify-a-URL-to-redirect-to-when-a-Powerform-is-completed).
+ *
+ * ### More information
+ *
+ * For more information about creating PowerForms, see [Create a PowerForm](https://support.docusign.com/en/guides/ndse-user-guide-create-a-powerform).
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post_form(
&self,
account_id: &str,
body: &crate::types::PowerForm,
- ) -> Result<crate::types::PowerForm> {
+ ) -> ClientResult<crate::types::PowerForm> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -155,25 +157,25 @@ impl PowerForms {
.await
}
/**
- * Deletes one or more PowerForms.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
- *
- * This method deletes one or more PowerForms. The request body takes an array of PowerForm objects that are deleted based on the `powerFormId`.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes one or more PowerForms.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/powerforms` endpoint.
+ *
+ * This method deletes one or more PowerForms. The request body takes an array of PowerForm objects that are deleted based on the `powerFormId`.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete_list(
&self,
account_id: &str,
body: &crate::types::PowerFormsRequest,
- ) -> Result<crate::types::PowerFormsResponse> {
+ ) -> ClientResult<crate::types::PowerFormsResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -188,22 +190,22 @@ impl PowerForms {
.await
}
/**
- * Gets PowerForm senders.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/senders` endpoint.
- *
- * This method returns a list of users who have sent PowerForms.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
- */
+ * Gets PowerForm senders.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/senders` endpoint.
+ *
+ * This method returns a list of users who have sent PowerForms.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `start_position: &str` -- The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
+ */
pub async fn get_senders(
&self,
account_id: &str,
start_position: &str,
- ) -> Result<crate::types::PowerFormSendersResponse> {
+ ) -> ClientResult<crate::types::PowerFormSendersResponse> {
let mut query_args: Vec<(String, String)> = Default::default();
if !start_position.is_empty() {
query_args.push(("start_position".to_string(), start_position.to_string()));
@@ -212,7 +214,7 @@ impl PowerForms {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms/senders?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -228,27 +230,27 @@ impl PowerForms {
.await
}
/**
- * Returns a single PowerForm.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
- *
- * This method returns detailed information about a specific PowerForm.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns a single PowerForm.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
+ *
+ * This method returns detailed information about a specific PowerForm.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get_form(
&self,
account_id: &str,
power_form_id: &str,
- ) -> Result<crate::types::PowerForm> {
+ ) -> ClientResult<crate::types::PowerForm> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(power_form_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&power_form_id.to_string()),
),
None,
);
@@ -263,28 +265,28 @@ impl PowerForms {
.await
}
/**
- * Updates an existing PowerForm.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
- *
- * This method updates an existing PowerForm.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates an existing PowerForm.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
+ *
+ * This method updates an existing PowerForm.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put_form(
&self,
account_id: &str,
power_form_id: &str,
body: &crate::types::PowerForm,
- ) -> Result<crate::types::PowerForm> {
+ ) -> ClientResult<crate::types::PowerForm> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(power_form_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&power_form_id.to_string()),
),
None,
);
@@ -299,23 +301,23 @@ impl PowerForms {
.await
}
/**
- * Deletes a PowerForm.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
- *
- * This method deletes a PowerForm.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn delete_form(&self, account_id: &str, power_form_id: &str) -> Result<()> {
+ * Deletes a PowerForm.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/powerforms/{powerFormId}` endpoint.
+ *
+ * This method deletes a PowerForm.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `power_form_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn delete_form(&self, account_id: &str, power_form_id: &str) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/powerforms/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(power_form_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&power_form_id.to_string()),
),
None,
);
diff --git a/docusign/src/reports.rs b/docusign/src/reports.rs
index 9567ce1..df9194d 100644
--- a/docusign/src/reports.rs
+++ b/docusign/src/reports.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Reports {
pub client: Client,
@@ -27,11 +29,11 @@ impl Reports {
pub async fn product_get_list(
&self,
account_id: &str,
- ) -> Result<crate::types::ReportInProductList> {
+ ) -> ClientResult<crate::types::ReportInProductList> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -46,25 +48,25 @@ impl Reports {
.await
}
/**
- * Creates a customized report.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/reports` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a customized report.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/reports` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_post_create(
&self,
account_id: &str,
body: &crate::types::ReportInProductRunRequest,
- ) -> Result<crate::types::ReportInProductSaveResponse> {
+ ) -> ClientResult<crate::types::ReportInProductSaveResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -79,25 +81,25 @@ impl Reports {
.await
}
/**
- * Returns the result set from running the specified report.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/report_results` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns the result set from running the specified report.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/report_results` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_put_run_results(
&self,
account_id: &str,
body: &crate::types::ReportInProductRunRequest,
- ) -> Result<crate::types::ReportInProductRunResponse> {
+ ) -> ClientResult<crate::types::ReportInProductRunResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports/report_results",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -112,25 +114,25 @@ impl Reports {
.await
}
/**
- * Returns the specified report as a CSV string.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/report_results_csv` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Returns the specified report as a CSV string.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/report_results_csv` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_put_results_csv(
&self,
account_id: &str,
body: &crate::types::ReportInProductCsvRunRequest,
- ) -> Result<()> {
+ ) -> ClientResult<()> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports/report_results_csv",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -145,27 +147,27 @@ impl Reports {
.await
}
/**
- * Gets the specified report.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets the specified report.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_get(
&self,
account_id: &str,
id: &str,
- ) -> Result<crate::types::ReportInProductGet> {
+ ) -> ClientResult<crate::types::ReportInProductGet> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&id.to_string()),
),
None,
);
@@ -180,28 +182,28 @@ impl Reports {
.await
}
/**
- * Saves a customized report.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Saves a customized report.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_put_save(
&self,
account_id: &str,
id: &str,
body: &crate::types::ReportInProductRunRequest,
- ) -> Result<crate::types::ReportInProductSaveResponse> {
+ ) -> ClientResult<crate::types::ReportInProductSaveResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&id.to_string()),
),
None,
);
@@ -216,27 +218,27 @@ impl Reports {
.await
}
/**
- * Removes a customized report.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
- *
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Removes a customized report.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/reports/{id}` endpoint.
+ *
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn product_delete(
&self,
account_id: &str,
id: &str,
- ) -> Result<crate::types::ReportInProductSaveResponse> {
+ ) -> ClientResult<crate::types::ReportInProductSaveResponse> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/reports/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&id.to_string()),
),
None,
);
diff --git a/docusign/src/request_logs.rs b/docusign/src/request_logs.rs
index b0229e0..8aec75a 100644
--- a/docusign/src/request_logs.rs
+++ b/docusign/src/request_logs.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct RequestLogs {
pub client: Client,
@@ -13,21 +15,24 @@ impl RequestLogs {
}
/**
- * Gets the API request logging log files.
- *
- * This function performs a `GET` to the `/v2.1/diagnostics/request_logs` endpoint.
- *
- * Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.
- *
- * If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.
- *
- * If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below.
- *
- * **Parameters:**
- *
- * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn api_get_log(&self, encoding: &str) -> Result<crate::types::ApiRequestLogsResult> {
+ * Gets the API request logging log files.
+ *
+ * This function performs a `GET` to the `/v2.1/diagnostics/request_logs` endpoint.
+ *
+ * Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.
+ *
+ * If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.
+ *
+ * If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below.
+ *
+ * **Parameters:**
+ *
+ * * `encoding: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn api_get_log(
+ &self,
+ encoding: &str,
+ ) -> ClientResult<crate::types::ApiRequestLogsResult> {
let mut query_args: Vec<(String, String)> = Default::default();
if !encoding.is_empty() {
query_args.push(("encoding".to_string(), encoding.to_string()));
@@ -47,14 +52,16 @@ impl RequestLogs {
.await
}
/**
- * Deletes the request log files.
- *
- * This function performs a `DELETE` to the `/v2.1/diagnostics/request_logs` endpoint.
- *
- * Deletes the request log files.
- */
- pub async fn api_delete_logs(&self) -> Result<()> {
- let url = self.client.url("/v2.1/diagnostics/request_logs", None);
+ * Deletes the request log files.
+ *
+ * This function performs a `DELETE` to the `/v2.1/diagnostics/request_logs` endpoint.
+ *
+ * Deletes the request log files.
+ */
+ pub async fn api_delete_logs(&self) -> ClientResult<()> {
+ let url = self
+ .client
+ .url(&"/v2.1/diagnostics/request_logs".to_string(), None);
self.client
.delete(
&url,
@@ -66,27 +73,27 @@ impl RequestLogs {
.await
}
/**
- * Gets a request logging log file.
- *
- * This function performs a `GET` to the `/v2.1/diagnostics/request_logs/{requestLogId}` endpoint.
- *
- * Retrieves information for a single log entry.
- *
- * **Request**
- * The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.
- *
- * **Response**
- * If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
- *
- * **Parameters:**
- *
- * * `request_log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
- pub async fn api_get(&self, request_log_id: &str) -> Result<bytes::Bytes> {
+ * Gets a request logging log file.
+ *
+ * This function performs a `GET` to the `/v2.1/diagnostics/request_logs/{requestLogId}` endpoint.
+ *
+ * Retrieves information for a single log entry.
+ *
+ * **Request**
+ * The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.
+ *
+ * **Response**
+ * If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
+ *
+ * **Parameters:**
+ *
+ * * `request_log_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
+ pub async fn api_get(&self, request_log_id: &str) -> ClientResult<bytes::Bytes> {
let url = self.client.url(
&format!(
"/v2.1/diagnostics/request_logs/{}",
- crate::progenitor_support::encode_path(request_log_id),
+ crate::progenitor_support::encode_path(&request_log_id.to_string()),
),
None,
);
@@ -101,17 +108,21 @@ impl RequestLogs {
.await
}
/**
- * Gets the API request logging settings.
- *
- * This function performs a `GET` to the `/v2.1/diagnostics/settings` endpoint.
- *
- * Retrieves the current API request logging setting for the user and remaining log entries.
- *
- * **Response**
- * The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
- */
- pub async fn api_get_setting(&self) -> Result<crate::types::DiagnosticsSettingsInformation> {
- let url = self.client.url("/v2.1/diagnostics/settings", None);
+ * Gets the API request logging settings.
+ *
+ * This function performs a `GET` to the `/v2.1/diagnostics/settings` endpoint.
+ *
+ * Retrieves the current API request logging setting for the user and remaining log entries.
+ *
+ * **Response**
+ * The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
+ */
+ pub async fn api_get_setting(
+ &self,
+ ) -> ClientResult<crate::types::DiagnosticsSettingsInformation> {
+ let url = self
+ .client
+ .url(&"/v2.1/diagnostics/settings".to_string(), None);
self.client
.get(
&url,
@@ -123,28 +134,30 @@ impl RequestLogs {
.await
}
/**
- * Enables or disables API request logging for troubleshooting.
- *
- * This function performs a `PUT` to the `/v2.1/diagnostics/settings` endpoint.
- *
- * Enables or disables API request logging for troubleshooting.
- *
- * When enabled (`apiRequestLogging` is **true**), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.
- *
- * You can call [Diagnostics::getRequestLog
- * ](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/get) or [Diagnostics::listRequestLogs](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/list) to download the log files (individually or as a zip file). Call [Diagnostics::deleteRequestLogs
- * ](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/delete) to clear the log by deleting current entries.
- *
- * Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.
- *
- * API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId is not logged.
- *
- */
+ * Enables or disables API request logging for troubleshooting.
+ *
+ * This function performs a `PUT` to the `/v2.1/diagnostics/settings` endpoint.
+ *
+ * Enables or disables API request logging for troubleshooting.
+ *
+ * When enabled (`apiRequestLogging` is **true**), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.
+ *
+ * You can call [Diagnostics::getRequestLog
+ * ](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/get) or [Diagnostics::listRequestLogs](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/list) to download the log files (individually or as a zip file). Call [Diagnostics::deleteRequestLogs
+ * ](https://developers.docusign.com/esign-rest-api/reference/Diagnostics/RequestLogs/delete) to clear the log by deleting current entries.
+ *
+ * Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.
+ *
+ * API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId is not logged.
+ *
+ */
pub async fn api_put_settings(
&self,
body: &crate::types::DiagnosticsSettingsInformation,
- ) -> Result<crate::types::DiagnosticsSettingsInformation> {
- let url = self.client.url("/v2.1/diagnostics/settings", None);
+ ) -> ClientResult<crate::types::DiagnosticsSettingsInformation> {
+ let url = self
+ .client
+ .url(&"/v2.1/diagnostics/settings".to_string(), None);
self.client
.put(
&url,
diff --git a/docusign/src/resources.rs b/docusign/src/resources.rs
index 3a31b43..ffb2924 100644
--- a/docusign/src/resources.rs
+++ b/docusign/src/resources.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Resources {
pub client: Client,
@@ -13,22 +15,22 @@ impl Resources {
}
/**
- * Lists resources for REST version specified.
- *
- * This function performs a `GET` to the `/v2.1` endpoint.
- *
- * Retrieves the base resources available for the DocuSign REST APIs.
- *
- * You do not need an integrator key to view the REST API versions and resources.
- *
- * Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.
- *
- * To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.
- *
- * Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
- */
- pub async fn service_information_get(&self) -> Result<crate::types::ResourceInformation> {
- let url = self.client.url("/v2.1", None);
+ * Lists resources for REST version specified.
+ *
+ * This function performs a `GET` to the `/v2.1` endpoint.
+ *
+ * Retrieves the base resources available for the DocuSign REST APIs.
+ *
+ * You do not need an integrator key to view the REST API versions and resources.
+ *
+ * Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.
+ *
+ * To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.
+ *
+ * Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
+ */
+ pub async fn service_information_get(&self) -> ClientResult<crate::types::ResourceInformation> {
+ let url = self.client.url(&"/v2.1".to_string(), None);
self.client
.get(
&url,
diff --git a/docusign/src/responsive_html_preview.rs b/docusign/src/responsive_html_preview.rs
index 7aa2fc3..9b0539c 100644
--- a/docusign/src/responsive_html_preview.rs
+++ b/docusign/src/responsive_html_preview.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct ResponsiveHtmlPreview {
pub client: Client,
@@ -13,39 +15,39 @@ impl ResponsiveHtmlPreview {
}
/**
- * Creates a preview of the responsive versions of all of the documents in an envelope.
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview` endpoint.
- *
- * Creates a preview of the
- * [responsive](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/responsive/),
- * HTML versions of all of the documents in an
- * envelope. This method enables you to preview the
- * PDF document conversions to responsive HTML across
- * device types prior to sending.
- *
- * The request body is a `documentHtmlDefinition`
- * object, which holds the responsive signing
- * parameters that define how to generate the HTML
- * version of the documents.
- *
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a preview of the responsive versions of all of the documents in an envelope.
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview` endpoint.
+ *
+ * Creates a preview of the
+ * [responsive](https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/responsive/),
+ * HTML versions of all of the documents in an
+ * envelope. This method enables you to preview the
+ * PDF document conversions to responsive HTML across
+ * device types prior to sending.
+ *
+ * The request body is a `documentHtmlDefinition`
+ * object, which holds the responsive signing
+ * parameters that define how to generate the HTML
+ * version of the documents.
+ *
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `envelope_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn responsive_html_post_preview(
&self,
account_id: &str,
envelope_id: &str,
body: &crate::types::DocumentHtmlDefinition,
- ) -> Result<crate::types::DocumentHtmlDefinitions> {
+ ) -> ClientResult<crate::types::DocumentHtmlDefinitions> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/envelopes/{}/responsive_html_preview",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(envelope_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&envelope_id.to_string()),
),
None,
);
diff --git a/docusign/src/services.rs b/docusign/src/services.rs
index 2b1c2de..311c63b 100644
--- a/docusign/src/services.rs
+++ b/docusign/src/services.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct Services {
pub client: Client,
@@ -13,19 +15,19 @@ impl Services {
}
/**
- * Retrieves the available REST API versions.
- *
- * This function performs a `GET` to the `/service_information` endpoint.
- *
- * Retrieves the available REST API versions.
- *
- * DocuSign Production system: https://www.docusign.net/restapi/service_information
- * DocuSign Demo system: https://demo.docusign.net/restapi/service_information
- *
- * You do not need an integrator key to view the REST API versions and resources.
- */
- pub async fn information_get(&self) -> Result<crate::types::ServiceInformation> {
- let url = self.client.url("/service_information", None);
+ * Retrieves the available REST API versions.
+ *
+ * This function performs a `GET` to the `/service_information` endpoint.
+ *
+ * Retrieves the available REST API versions.
+ *
+ * DocuSign Production system: https://www.docusign.net/restapi/service_information
+ * DocuSign Demo system: https://demo.docusign.net/restapi/service_information
+ *
+ * You do not need an integrator key to view the REST API versions and resources.
+ */
+ pub async fn information_get(&self) -> ClientResult<crate::types::ServiceInformation> {
+ let url = self.client.url(&"/service_information".to_string(), None);
self.client
.get(
&url,
diff --git a/docusign/src/signing_group_users.rs b/docusign/src/signing_group_users.rs
index d68d32a..ce6e1ea 100644
--- a/docusign/src/signing_group_users.rs
+++ b/docusign/src/signing_group_users.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct SigningGroupUsers {
pub client: Client,
@@ -13,29 +15,29 @@ impl SigningGroupUsers {
}
/**
- * Gets a list of members in a Signing Group.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
- *
- * Retrieves the list of members in the specified Signing Group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
- *
- * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
- */
+ * Gets a list of members in a Signing Group.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
+ *
+ * Retrieves the list of members in the specified Signing Group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
+ *
+ * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
+ */
pub async fn signing_groups_get_group_user(
&self,
account_id: &str,
signing_group_id: &str,
- ) -> Result<crate::types::SigningGroupUsersData> {
+ ) -> ClientResult<crate::types::SigningGroupUsersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups/{}/users",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signing_group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signing_group_id.to_string()),
),
None,
);
@@ -50,30 +52,30 @@ impl SigningGroupUsers {
.await
}
/**
- * Adds members to a signing group. .
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
- *
- * Adds one or more new members to a signing group. A signing group can have a maximum of 50 members.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
- *
- * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
- */
+ * Adds members to a signing group. .
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
+ *
+ * Adds one or more new members to a signing group. A signing group can have a maximum of 50 members.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
+ *
+ * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
+ */
pub async fn signing_groups_put_group_users(
&self,
account_id: &str,
signing_group_id: &str,
body: &crate::types::SigningGroupUsersData,
- ) -> Result<crate::types::SigningGroupUsersData> {
+ ) -> ClientResult<crate::types::SigningGroupUsersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups/{}/users",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signing_group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signing_group_id.to_string()),
),
None,
);
@@ -88,30 +90,30 @@ impl SigningGroupUsers {
.await
}
/**
- * Deletes one or more members from a signing group.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
- *
- * Deletes one or more members from the specified signing group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
- *
- * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
- */
+ * Deletes one or more members from a signing group.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}/users` endpoint.
+ *
+ * Deletes one or more members from the specified signing group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
+ *
+ * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
+ */
pub async fn signing_groups_delete_group_users(
&self,
account_id: &str,
signing_group_id: &str,
body: &crate::types::SigningGroupUsersData,
- ) -> Result<crate::types::SigningGroupUsersData> {
+ ) -> ClientResult<crate::types::SigningGroupUsersData> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups/{}/users",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signing_group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signing_group_id.to_string()),
),
None,
);
diff --git a/docusign/src/signing_groups.rs b/docusign/src/signing_groups.rs
index c78be8c..3457fa4 100644
--- a/docusign/src/signing_groups.rs
+++ b/docusign/src/signing_groups.rs
@@ -1,6 +1,8 @@
+#[allow(unused_imports)]
use anyhow::Result;
use crate::Client;
+use crate::ClientResult;
pub struct SigningGroups {
pub client: Client,
@@ -13,24 +15,24 @@ impl SigningGroups {
}
/**
- * Gets a list of the Signing Groups in an account.
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
- *
- * Retrieves a list of all signing groups in the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `group_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `include_users: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Gets a list of the Signing Groups in an account.
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
+ *
+ * Retrieves a list of all signing groups in the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `group_type: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `include_users: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn get(
&self,
account_id: &str,
group_type: &str,
include_users: &str,
- ) -> Result<crate::types::SigningGroupInformation> {
+ ) -> ClientResult<crate::types::SigningGroupInformation> {
let mut query_args: Vec<(String, String)> = Default::default();
if !group_type.is_empty() {
query_args.push(("group_type".to_string(), group_type.to_string()));
@@ -42,7 +44,7 @@ impl SigningGroups {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups?{}",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
query_
),
None,
@@ -58,25 +60,25 @@ impl SigningGroups {
.await
}
/**
- * Updates signing group names.
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
- *
- * Updates the name of one or more existing signing groups.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Updates signing group names.
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
+ *
+ * Updates the name of one or more existing signing groups.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn put(
&self,
account_id: &str,
body: &crate::types::SigningGroupInformation,
- ) -> Result<crate::types::SigningGroupInformation> {
+ ) -> ClientResult<crate::types::SigningGroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -91,31 +93,31 @@ impl SigningGroups {
.await
}
/**
- * Creates a signing group. .
- *
- * This function performs a `POST` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
- *
- * Creates one or more signing groups.
- *
- * Multiple signing groups can be created in one call. Only users with account administrator privileges can create signing groups.
- *
- * An account can have a maximum of 50 signing groups. Each signing group can have a maximum of 50 group members.
- *
- * Signing groups can be used by any account user.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Creates a signing group. .
+ *
+ * This function performs a `POST` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
+ *
+ * Creates one or more signing groups.
+ *
+ * Multiple signing groups can be created in one call. Only users with account administrator privileges can create signing groups.
+ *
+ * An account can have a maximum of 50 signing groups. Each signing group can have a maximum of 50 group members.
+ *
+ * Signing groups can be used by any account user.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn post(
&self,
account_id: &str,
body: &crate::types::SigningGroupInformation,
- ) -> Result<crate::types::SigningGroupInformation> {
+ ) -> ClientResult<crate::types::SigningGroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -130,25 +132,25 @@ impl SigningGroups {
.await
}
/**
- * Deletes one or more signing groups.
- *
- * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
- *
- * Deletes one or more signing groups in the specified account.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- */
+ * Deletes one or more signing groups.
+ *
+ * This function performs a `DELETE` to the `/v2.1/accounts/{accountId}/signing_groups` endpoint.
+ *
+ * Deletes one or more signing groups in the specified account.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ */
pub async fn delete(
&self,
account_id: &str,
body: &crate::types::SigningGroupInformation,
- ) -> Result<crate::types::SigningGroupInformation> {
+ ) -> ClientResult<crate::types::SigningGroupInformation> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups",
- crate::progenitor_support::encode_path(account_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
),
None,
);
@@ -163,29 +165,29 @@ impl SigningGroups {
.await
}
/**
- * Gets information about a signing group. .
- *
- * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}` endpoint.
- *
- * Retrieves information, including group member information, for the specified signing group.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
- *
- * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
- */
+ * Gets information about a signing group. .
+ *
+ * This function performs a `GET` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}` endpoint.
+ *
+ * Retrieves information, including group member information, for the specified signing group.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
+ *
+ * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
+ */
pub async fn get_group(
&self,
account_id: &str,
signing_group_id: &str,
- ) -> Result<crate::types::SigningGroup> {
+ ) -> ClientResult<crate::types::SigningGroup> {
let url = self.client.url(
&format!(
"/v2.1/accounts/{}/signing_groups/{}",
- crate::progenitor_support::encode_path(account_id),
- crate::progenitor_support::encode_path(signing_group_id),
+ crate::progenitor_support::encode_path(&account_id.to_string()),
+ crate::progenitor_support::encode_path(&signing_group_id.to_string()),
),
None,
);
@@ -200,30 +202,30 @@ impl SigningGroups {
.await
}
/**
- * Updates a signing group. .
- *
- * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}` endpoint.
- *
- * Updates signing group name and member information. You can also add new members to the signing group. A signing group can have a maximum of 50 members.
- *
- * **Parameters:**
- *
- * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
- * * `signing_group_id: &str` -- Optional. The ID of the [signing group](https://support.docusign.com/en/guides/ndse-user-guide-signing-groups).
- *
- * **Note**: When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature. For this reason, we recommend that you do not include non-signer recipients (such as carbon copy recipients) in the same signing group as signer recipients. However, you could create a second signing group for the non-signer recipients and change the default action of Needs to Sign to a different value, such as Receives a Copy.
- */
+ * Updates a signing group. .
+ *
+ * This function performs a `PUT` to the `/v2.1/accounts/{accountId}/signing_groups/{signingGroupId}` endpoint.
+ *
+ * Updates signing group name and member information. You can also add new members to the signing group. A signing group can have a maximum of 50 members.
+ *
+ * **Parameters:**
+ *
+ * * `account_id: &str` -- The brand that envelope recipients see when a brand is not explicitly set.
+ * * `signing_group_id: &str` -- Optional. The ID of the [s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment