mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(mca): Added recipient connector call for open banking connectors (#3758)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -652,6 +652,49 @@ pub struct MerchantConnectorCreate { | ||||
|  | ||||
|     #[schema(value_type = Option<ConnectorStatus>, example = "inactive")] | ||||
|     pub status: Option<api_enums::ConnectorStatus>, | ||||
|  | ||||
|     /// In case the merchant needs to store any additional sensitive data | ||||
|     #[schema(value_type = Option<AdditionalMerchantData>)] | ||||
|     pub additional_merchant_data: Option<AdditionalMerchantData>, | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)] | ||||
| #[serde(rename_all = "snake_case")] | ||||
| pub enum AdditionalMerchantData { | ||||
|     OpenBankingRecipientData(MerchantRecipientData), | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)] | ||||
| #[serde(rename_all = "snake_case")] | ||||
| pub enum MerchantAccountData { | ||||
|     Iban { | ||||
|         #[schema(value_type= String)] | ||||
|         iban: Secret<String>, | ||||
|         name: String, | ||||
|         #[schema(value_type= Option<String>)] | ||||
|         #[serde(skip_serializing_if = "Option::is_none")] | ||||
|         connector_recipient_id: Option<Secret<String>>, | ||||
|     }, | ||||
|     Bacs { | ||||
|         #[schema(value_type= String)] | ||||
|         account_number: Secret<String>, | ||||
|         #[schema(value_type= String)] | ||||
|         sort_code: Secret<String>, | ||||
|         name: String, | ||||
|         #[schema(value_type= Option<String>)] | ||||
|         #[serde(skip_serializing_if = "Option::is_none")] | ||||
|         connector_recipient_id: Option<Secret<String>>, | ||||
|     }, | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)] | ||||
| #[serde(rename_all = "snake_case")] | ||||
| pub enum MerchantRecipientData { | ||||
|     #[schema(value_type= Option<String>)] | ||||
|     ConnectorRecipientId(Secret<String>), | ||||
|     #[schema(value_type= Option<String>)] | ||||
|     WalletId(Secret<String>), | ||||
|     AccountData(MerchantAccountData), | ||||
| } | ||||
|  | ||||
| // Different patterns of authentication. | ||||
| @ -805,6 +848,9 @@ pub struct MerchantConnectorResponse { | ||||
|  | ||||
|     #[schema(value_type = ConnectorStatus, example = "inactive")] | ||||
|     pub status: api_enums::ConnectorStatus, | ||||
|  | ||||
|     #[schema(value_type = Option<AdditionalMerchantData>)] | ||||
|     pub additional_merchant_data: Option<AdditionalMerchantData>, | ||||
| } | ||||
|  | ||||
| /// Create a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc." | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sarthak Soni
					Sarthak Soni