- Notifications
You must be signed in to change notification settings - Fork3.9k
feat(users): refactorProdIntent
to support product-type context and merchant-scope#7638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
20 commits Select commitHold shift + click to select a range
cb78db0
feat(users): add v2 routes for dashboard_metadata
tsdk0207d3eb7
feat(users): add product_type context while populating table and whil…
tsdk0274bd790
fix clippy errors
tsdk029353361
minor nits
tsdk021df4975
feat(users): make prodIntent merchant-scoped
tsdk029251a08
merged main
tsdk028d9d3e2
chore: run formatter
hyperswitch-bot[bot]5d0d135
feat(users): extract product_type through merchant_account db call
tsdk02c198192
merged main
tsdk02dda8479
chore: run formatter
hyperswitch-bot[bot]e52026e
minor nits
tsdk02d2455bc
resolve comments
tsdk02b082834
feat(users): obtain product_type from the request body
tsdk024d0b6ea
Merge branch 'main' into prod-intent-v2
tsdk020186b99
default product_type if not included in request body
tsdk0264b75fe
resolved comments
tsdk02140bb03
fix errors due to Copy trait derived on MerchantProductType
tsdk02c184d34
Merge branch 'main' into prod-intent-v2
tsdk025960f00
made product type to extract default value and avoided mutating the p…
tsdk020bc3446
Merge branch 'main' into prod-intent-v2
tsdk02File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
feat(users): add product_type context while populating table and whil…
…e sending email
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit07d3eb725d78fd578d6b1839f072df4cec6a7fcf
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use common_enums::{CountryAlpha2, MerchantProductType}; | ||
use common_utils::{id_type, pii}; | ||
use masking::Secret; | ||
use strum::EnumString; | ||
@@ -102,6 +102,7 @@ pub struct ProdIntent { | ||
pub poc_contact: Option<String>, | ||
pub comments: Option<String>, | ||
pub is_completed: bool, | ||
pub product_type: Option<MerchantProductType>, | ||
} | ||
tsdk02 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
#[derive(Debug, serde::Deserialize, EnumString, serde::Serialize)] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -39,6 +39,7 @@ pub enum EmailBody { | ||
legal_business_name: String, | ||
business_location: String, | ||
business_website: String, | ||
product_type: common_enums::MerchantProductType, | ||
}, | ||
ReconActivation { | ||
user_name: String, | ||
@@ -106,6 +107,7 @@ pub mod html { | ||
legal_business_name, | ||
business_location, | ||
business_website, | ||
product_type, | ||
} => { | ||
format!( | ||
include_str!("assets/bizemailprod.html"), | ||
@@ -114,6 +116,7 @@ pub mod html { | ||
business_location = business_location, | ||
business_website = business_website, | ||
username = user_name, | ||
product_type = product_type | ||
) | ||
} | ||
EmailBody::ProFeatureRequest { | ||
@@ -438,6 +441,7 @@ pub struct BizEmailProd { | ||
pub subject: &'static str, | ||
pub theme_id: Option<String>, | ||
pub theme_config: EmailThemeConfig, | ||
pub product_type: common_enums::MerchantProductType, | ||
} | ||
impl BizEmailProd { | ||
@@ -463,6 +467,7 @@ impl BizEmailProd { | ||
business_website: data.business_website.unwrap_or_default(), | ||
theme_id, | ||
theme_config, | ||
product_type: data.product_type.unwrap_or_default(), | ||
}) | ||
} | ||
} | ||
@@ -476,6 +481,7 @@ impl EmailData for BizEmailProd { | ||
legal_business_name: self.legal_business_name.clone(), | ||
business_location: self.business_location.clone(), | ||
business_website: self.business_website.clone(), | ||
product_type: self.product_type.clone(), | ||
SanchithHegde marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
}); | ||
Ok(EmailContents { | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.