feat: cards info api (#749)

Co-authored-by: Jagan <jaganelavarasan@gmail.com>
Co-authored-by: Kartikeya Hegde <karthikey.hegde@juspay.in>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Narayan Bhat
2023-03-28 19:04:58 +05:30
committed by GitHub
parent 20b4372bfe
commit b15b8f7b43
27 changed files with 1336 additions and 299 deletions

View File

@ -1 +0,0 @@

View File

@ -0,0 +1,31 @@
use std::fmt::Debug;
use utoipa::ToSchema;
#[derive(serde::Deserialize, ToSchema)]
pub struct CardsInfoRequestParams {
#[schema(example = "pay_OSERgeV9qAy7tlK7aKpc_secret_TuDUoh11Msxh12sXn3Yp")]
pub client_secret: Option<String>,
}
#[derive(serde::Deserialize, Debug)]
pub struct CardsInfoRequest {
pub client_secret: Option<String>,
pub card_iin: String,
}
#[derive(serde::Serialize, Debug, ToSchema)]
pub struct CardInfoResponse {
#[schema(example = "374431")]
pub card_iin: String,
#[schema(example = "AMEX")]
pub card_issuer: Option<String>,
#[schema(example = "AMEX")]
pub card_network: Option<String>,
#[schema(example = "CREDIT")]
pub card_type: Option<String>,
#[schema(example = "CLASSIC")]
pub card_sub_type: Option<String>,
#[schema(example = "INDIA")]
pub card_issuing_country: Option<String>,
}

View File

@ -2,7 +2,7 @@
pub mod admin;
pub mod api_keys;
pub mod bank_accounts;
pub mod cards;
pub mod cards_info;
pub mod customers;
pub mod disputes;
pub mod enums;