doc: update openapi (#453)

Co-authored-by: Sangamesh <sangamesh.kulkarni@juspay.in>
Co-authored-by: dracarys18 <karthikey.hegde@juspay.in>
Co-authored-by: bernard eugine <bernard.eugine@bernard.eugine-MacBookPro>
Co-authored-by: Abhishek Marrivagu <abhi.codes10@gmail.com>
This commit is contained in:
bernard-eugine
2023-01-30 16:56:37 +05:30
committed by GitHub
parent d3ef24e8e9
commit ec2f4ba257
40 changed files with 3314 additions and 283 deletions

View File

@ -37,7 +37,7 @@ pub trait PaymentsRequestData {
fn get_billing(&self) -> Result<&api::Address, Error>;
fn get_billing_country(&self) -> Result<String, Error>;
fn get_billing_phone(&self) -> Result<&api::PhoneDetails, Error>;
fn get_card(&self) -> Result<api::CCard, Error>;
fn get_card(&self) -> Result<api::Card, Error>;
}
impl PaymentsRequestData for types::PaymentsAuthorizeRouterData {
@ -56,7 +56,7 @@ impl PaymentsRequestData for types::PaymentsAuthorizeRouterData {
.ok_or_else(missing_field_err("billing.address.country"))
}
fn get_card(&self) -> Result<api::CCard, Error> {
fn get_card(&self) -> Result<api::Card, Error> {
match self.request.payment_method_data.clone() {
api::PaymentMethod::Card(card) => Ok(card),
_ => Err(missing_field_err("card")()),
@ -86,7 +86,7 @@ pub trait CardData {
fn get_card_cvc(&self) -> String;
}
impl CardData for api::CCard {
impl CardData for api::Card {
fn get_card_number(&self) -> String {
self.card_number.peek().clone()
}