refactor(merchant_account): add back api_key field for backward compatibility (#761)

This commit is contained in:
Sanchith Hegde
2023-03-17 15:30:20 +05:30
committed by GitHub
parent 20b93276fc
commit 661dd48ae5
11 changed files with 55 additions and 7 deletions

View File

@ -1,5 +1,5 @@
use common_utils::pii;
use masking::Secret;
use masking::{Secret, StrongSecret};
use serde::{Deserialize, Serialize};
use url;
use utoipa::ToSchema;
@ -18,6 +18,10 @@ pub struct MerchantAccountCreate {
#[schema(example = "NewAge Retailer")]
pub merchant_name: Option<String>,
/// API key that will be used for server side API access
#[schema(value_type = Option<String>, example = "Ah2354543543523")]
pub api_key: Option<StrongSecret<String>>,
/// Merchant related details
pub merchant_details: Option<MerchantDetails>,
@ -131,6 +135,10 @@ pub struct MerchantAccountResponse {
#[schema(example = "NewAge Retailer")]
pub merchant_name: Option<String>,
/// API key that will be used for server side API access
#[schema(value_type = Option<String>, example = "Ah2354543543523")]
pub api_key: Option<StrongSecret<String>>,
/// The URL to redirect after the completion of the operation
#[schema(max_length = 255, example = "https://www.example.com/success")]
pub return_url: Option<String>,