@@ -159,9 +159,9 @@ impl EmailClient {
159159 /// #
160160 /// # #[tokio::main]
161161 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
162- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
162+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
163163 ///
164- /// let mut request_body = SendRequestBody::new("[email protected] ".to_string() ); 164+ /// let mut request_body = SendRequestBody::new("[email protected] "); 165165 /// request_body.from = Some("[email protected] ".to_string()); 166166 /// request_body.subject = Some("Test subject".to_string());
167167 /// request_body.text = Some("Hello world!".to_string());
@@ -213,9 +213,9 @@ impl EmailClient {
213213 /// #
214214 /// # #[tokio::main]
215215 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
216- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
216+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
217217 ///
218- /// let query_parameters = GetBulksQueryParameters::new("some-bulk-id".to_string() );
218+ /// let query_parameters = GetBulksQueryParameters::new("some-bulk-id");
219219 ///
220220 /// let response = client.get_bulks(query_parameters).await?;
221221 ///
@@ -264,10 +264,10 @@ impl EmailClient {
264264 /// #
265265 /// # #[tokio::main]
266266 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
267- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
267+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
268268 ///
269- /// let query_params = RescheduleQueryParameters::new("test-bulk-id-rust-003".to_string() );
270- /// let request_body = RescheduleRequestBody::new("2022-10-05T17:29:52Z".to_string() );
269+ /// let query_params = RescheduleQueryParameters::new("test-bulk-id-rust-003");
270+ /// let request_body = RescheduleRequestBody::new("2022-10-05T17:29:52Z");
271271 ///
272272 /// let response = client.reschedule(query_params, request_body).await?;
273273 ///
@@ -318,9 +318,9 @@ impl EmailClient {
318318 /// #
319319 /// # #[tokio::main]
320320 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
321- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
321+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
322322 ///
323- /// let query_params = GetScheduledStatusQueryParameters::new("some-bulk-id".to_string() );
323+ /// let query_params = GetScheduledStatusQueryParameters::new("some-bulk-id");
324324 ///
325325 /// let response = client.get_scheduled_status(query_params).await?;
326326 ///
@@ -369,9 +369,9 @@ impl EmailClient {
369369 /// #
370370 /// # #[tokio::main]
371371 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
372- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
372+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
373373 ///
374- /// let query_params = UpdateScheduledStatusQueryParameters::new("some-bulk-id".to_string() );
374+ /// let query_params = UpdateScheduledStatusQueryParameters::new("some-bulk-id");
375375 /// let request_body = UpdateScheduledStatusRequestBody::new(BulkStatus::CANCELED);
376376 ///
377377 /// let response = client.update_scheduled_status(query_params, request_body).await?;
@@ -423,7 +423,7 @@ impl EmailClient {
423423 /// #
424424 /// # #[tokio::main]
425425 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
426- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
426+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
427427 ///
428428 /// let query_params = GetDeliveryReportsQueryParameters::default();
429429 ///
@@ -484,7 +484,7 @@ impl EmailClient {
484484 /// #
485485 /// # #[tokio::main]
486486 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
487- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
487+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
488488 ///
489489 /// let query_params = GetLogsQueryParameters::default();
490490 ///
@@ -559,9 +559,9 @@ impl EmailClient {
559559 /// #
560560 /// # #[tokio::main]
561561 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
562- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
562+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
563563 ///
564- /// let request_body = ValidateAddressRequestBody::new("[email protected] ".to_string() ); 564+ /// let request_body = ValidateAddressRequestBody::new("[email protected] "); 565565 ///
566566 /// let response = client.validate_address(request_body).await?;
567567 ///
@@ -608,7 +608,7 @@ impl EmailClient {
608608 /// #
609609 /// # #[tokio::main]
610610 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
611- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
611+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
612612 ///
613613 /// let query_params = GetDomainsQueryParameters::default();
614614 ///
@@ -666,9 +666,9 @@ impl EmailClient {
666666 /// #
667667 /// # #[tokio::main]
668668 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
669- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
669+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
670670 ///
671- /// let request_body = AddDomainRequestBody::new("example.com".to_string() );
671+ /// let request_body = AddDomainRequestBody::new("example.com");
672672 ///
673673 /// let response = client.add_domain(request_body).await?;
674674 ///
@@ -714,19 +714,19 @@ impl EmailClient {
714714 /// #
715715 /// # #[tokio::main]
716716 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
717- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
717+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
718718 ///
719- /// let response = client.get_domain("example.com".to_string() ).await?;
719+ /// let response = client.get_domain("example.com").await?;
720720 ///
721721 /// assert_eq!(response.status, StatusCode::OK);
722722 /// # Ok(())
723723 /// # }
724724 /// ```
725725 pub async fn get_domain (
726726 & self ,
727- domain_name : String ,
727+ domain_name : & str ,
728728 ) -> Result < SdkResponse < GetDomainResponseBody > , SdkError > {
729- let path = PATH_GET_DOMAIN . replace ( "{domainName}" , domain_name. as_str ( ) ) ;
729+ let path = PATH_GET_DOMAIN . replace ( "{domainName}" , domain_name) ;
730730
731731 let response = send_no_body_request (
732732 & self . client ,
@@ -760,19 +760,16 @@ impl EmailClient {
760760 /// #
761761 /// # #[tokio::main]
762762 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
763- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
763+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
764764 ///
765- /// let status = client.delete_domain("example.com".to_string() ).await?;
765+ /// let status = client.delete_domain("example.com").await?;
766766 ///
767767 /// assert_eq!(status, StatusCode::NO_CONTENT);
768768 /// # Ok(())
769769 /// # }
770770 /// ```
771- pub async fn delete_domain (
772- & self ,
773- domain_name : String ,
774- ) -> Result < reqwest:: StatusCode , SdkError > {
775- let path = PATH_DELETE_DOMAIN . replace ( "{domainName}" , domain_name. as_str ( ) ) ;
771+ pub async fn delete_domain ( & self , domain_name : & str ) -> Result < reqwest:: StatusCode , SdkError > {
772+ let path = PATH_DELETE_DOMAIN . replace ( "{domainName}" , domain_name) ;
776773
777774 let response = send_no_body_request (
778775 & self . client ,
@@ -805,23 +802,23 @@ impl EmailClient {
805802 /// #
806803 /// # #[tokio::main]
807804 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
808- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
805+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
809806 ///
810807 /// let mut request_body = UpdateTrackingRequestBody::default();
811808 /// request_body.clicks = Some(true);
812809 ///
813- /// let response = client.update_tracking("domain.com".to_string() , request_body).await?;
810+ /// let response = client.update_tracking("domain.com", request_body).await?;
814811 ///
815812 /// assert_eq!(response.status, StatusCode::OK);
816813 /// # Ok(())
817814 /// # }
818815 /// ```
819816 pub async fn update_tracking (
820817 & self ,
821- domain_name : String ,
818+ domain_name : & str ,
822819 request_body : UpdateTrackingRequestBody ,
823820 ) -> Result < SdkResponse < UpdateTrackingResponseBody > , SdkError > {
824- let path = PATH_UPDATE_TRACKING . replace ( "{domainName}" , domain_name. as_str ( ) ) ;
821+ let path = PATH_UPDATE_TRACKING . replace ( "{domainName}" , domain_name) ;
825822
826823 let response = send_valid_json_request (
827824 & self . client ,
@@ -856,19 +853,16 @@ impl EmailClient {
856853 /// #
857854 /// # #[tokio::main]
858855 /// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
859- /// let client = EmailClient::with_configuration(Configuration::from_dotenv_api_key ()?);
856+ /// let client = EmailClient::with_configuration(Configuration::from_env_api_key ()?);
860857 ///
861- /// let status = client.verify_domain("example.com".to_string() ).await?;
858+ /// let status = client.verify_domain("example.com").await?;
862859 ///
863860 /// assert_eq!(status, StatusCode::ACCEPTED);
864861 /// # Ok(())
865862 /// # }
866863 /// ```
867- pub async fn verify_domain (
868- & self ,
869- domain_name : String ,
870- ) -> Result < reqwest:: StatusCode , SdkError > {
871- let path = PATH_VERIFY_DOMAIN . replace ( "{domainName}" , domain_name. as_str ( ) ) ;
864+ pub async fn verify_domain ( & self , domain_name : & str ) -> Result < reqwest:: StatusCode , SdkError > {
865+ let path = PATH_VERIFY_DOMAIN . replace ( "{domainName}" , domain_name) ;
872866
873867 let response = send_no_body_request (
874868 & self . client ,
0 commit comments