refactor(router): get route for applepay_verified_domains (#2157)

This commit is contained in:
Prajjwal Kumar
2023-09-14 17:20:37 +05:30
committed by GitHub
parent 05696d326f
commit fb1760b1d8
7 changed files with 157 additions and 89 deletions

View File

@ -1,6 +1,6 @@
/// The request body for verification of merchant (everything except domain_names are prefilled)
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "snake_case")]
pub struct ApplepayMerchantVerificationConfigs {
pub domain_names: Vec<String>,
pub encrypt_to: String,
@ -10,7 +10,7 @@ pub struct ApplepayMerchantVerificationConfigs {
/// The derivation point for domain names from request body
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "snake_case")]
pub struct ApplepayMerchantVerificationRequest {
pub domain_names: Vec<String>,
pub merchant_connector_account_id: String,
@ -18,22 +18,21 @@ pub struct ApplepayMerchantVerificationRequest {
/// Response to be sent for the verify/applepay api
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "snake_case")]
pub struct ApplepayMerchantResponse {
pub status_message: String,
pub status_code: u16,
}
/// QueryParams to be send by the merchant for fetching the verified domains
#[derive(Debug, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "snake_case")]
pub struct ApplepayGetVerifiedDomainsParam {
pub business_profile_id: String,
pub merchant_id: String,
pub merchant_connector_account_id: String,
}
/// Response to be sent for derivation of the already verified domains
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "snake_case")]
pub struct ApplepayVerifiedDomainsResponse {
pub status_code: u16,
pub verified_domains: Vec<String>,
}