feat(connector): [Boku] Implement Authorize, Psync, Refund and Rsync flow (#1699)

This commit is contained in:
Sakil Mostak
2023-08-02 14:58:22 +05:30
committed by GitHub
parent 73ed7ae7e3
commit 9cba7da0d3
14 changed files with 570 additions and 161 deletions

View File

@ -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,