revert(order_details): revert back order_details to be an object, and removing meta_data from PaymentIntent (#1279)

This commit is contained in:
rishavkar
2023-05-26 13:19:33 +05:30
committed by GitHub
parent e78b3a65d4
commit 597ec16907
16 changed files with 56 additions and 114 deletions

View File

@ -173,7 +173,7 @@ pub trait PaymentsAuthorizeRequestData {
fn is_auto_capture(&self) -> Result<bool, Error>;
fn get_email(&self) -> Result<Email, Error>;
fn get_browser_info(&self) -> Result<types::BrowserInformation, Error>;
fn get_order_details(&self) -> Result<Vec<OrderDetails>, Error>;
fn get_order_details(&self) -> Result<OrderDetails, Error>;
fn get_card(&self) -> Result<api::Card, Error>;
fn get_return_url(&self) -> Result<String, Error>;
fn connector_mandate_id(&self) -> Option<String>;
@ -200,7 +200,7 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
.clone()
.ok_or_else(missing_field_err("browser_info"))
}
fn get_order_details(&self) -> Result<Vec<OrderDetails>, Error> {
fn get_order_details(&self) -> Result<OrderDetails, Error> {
self.order_details
.clone()
.ok_or_else(missing_field_err("order_details"))