mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(connector): [Boku] Implement Authorize, Psync, Refund and Rsync flow (#1699)
This commit is contained in:
@ -61,6 +61,15 @@ where
|
||||
where
|
||||
Self: Serialize;
|
||||
|
||||
///
|
||||
/// Functionality, for specifically encoding `Self` into `String`
|
||||
/// after serialization by using `serde::Serialize`
|
||||
/// specifically, to convert into XML `String`.
|
||||
///
|
||||
fn encode_to_string_of_xml(&'e self) -> CustomResult<String, errors::ParsingError>
|
||||
where
|
||||
Self: Serialize;
|
||||
|
||||
///
|
||||
/// Functionality, for specifically encoding `Self` into `serde_json::Value`
|
||||
/// after serialization by using `serde::Serialize`
|
||||
@ -131,6 +140,16 @@ where
|
||||
.attach_printable_lazy(|| format!("Unable to convert {self:?} to a request"))
|
||||
}
|
||||
|
||||
fn encode_to_string_of_xml(&'e self) -> CustomResult<String, errors::ParsingError>
|
||||
where
|
||||
Self: Serialize,
|
||||
{
|
||||
quick_xml::se::to_string(self)
|
||||
.into_report()
|
||||
.change_context(errors::ParsingError::EncodeError("xml"))
|
||||
.attach_printable_lazy(|| format!("Unable to convert {self:?} to a request"))
|
||||
}
|
||||
|
||||
fn encode_to_value(&'e self) -> CustomResult<serde_json::Value, errors::ParsingError>
|
||||
where
|
||||
Self: Serialize,
|
||||
|
||||
Reference in New Issue
Block a user