1
1
use api_models:: user:: dashboard_metadata:: ProdIntent ;
2
- use common_enums:: EntityType ;
2
+ use common_enums:: { EntityType , MerchantProductType } ;
3
3
use common_utils:: { errors:: CustomResult , pii, types:: theme:: EmailThemeConfig } ;
4
4
use error_stack:: ResultExt ;
5
5
use external_services:: email:: { EmailContents , EmailData , EmailError } ;
@@ -64,6 +64,7 @@ pub enum EmailBody {
64
64
legal_business_name : String ,
65
65
business_location : String ,
66
66
business_website : String ,
67
+ product_type : MerchantProductType ,
67
68
} ,
68
69
ReconActivation {
69
70
user_name : String ,
@@ -199,6 +200,7 @@ pub mod html {
199
200
legal_business_name,
200
201
business_location,
201
202
business_website,
203
+ product_type,
202
204
} => {
203
205
format ! (
204
206
include_str!( "assets/bizemailprod.html" ) ,
@@ -207,6 +209,7 @@ pub mod html {
207
209
business_location = business_location,
208
210
business_website = business_website,
209
211
username = user_name,
212
+ product_type = product_type
210
213
)
211
214
}
212
215
EmailBody :: ProFeatureRequest {
@@ -558,6 +561,7 @@ pub struct BizEmailProd {
558
561
pub settings : std:: sync:: Arc < configs:: Settings > ,
559
562
pub theme_id : Option < String > ,
560
563
pub theme_config : EmailThemeConfig ,
564
+ pub product_type : MerchantProductType ,
561
565
}
562
566
563
567
impl BizEmailProd {
@@ -582,6 +586,7 @@ impl BizEmailProd {
582
586
business_website : data. business_website . unwrap_or_default ( ) ,
583
587
theme_id,
584
588
theme_config,
589
+ product_type : data. product_type ,
585
590
} )
586
591
}
587
592
}
@@ -595,6 +600,7 @@ impl EmailData for BizEmailProd {
595
600
legal_business_name : self . legal_business_name . clone ( ) ,
596
601
business_location : self . business_location . clone ( ) ,
597
602
business_website : self . business_website . clone ( ) ,
603
+ product_type : self . product_type ,
598
604
} ) ;
599
605
600
606
Ok ( EmailContents {
0 commit comments