fix(connector): [coinbase] make metadata as option parameter (#887)

Co-authored-by: arvindpatel24 <arvind.patel@juspay.in>
This commit is contained in:
Arvind Patel
2023-04-18 00:00:44 +05:30
committed by GitHub
parent 7a581a669c
commit f57289551c
2 changed files with 4 additions and 7 deletions

View File

@ -18,8 +18,8 @@ pub struct LocalPrice {
#[derive(Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
pub struct Metadata {
pub customer_id: String,
pub customer_name: String,
pub customer_id: Option<String>,
pub customer_name: Option<String>,
}
#[derive(Default, Debug, Serialize, Eq, PartialEq)]
@ -67,7 +67,7 @@ pub enum CoinbasePaymentStatus {
Expired,
Unresolved,
Resolved,
Cancelled,
Canceled,
#[serde(rename = "PENDING REFUND")]
PendingRefund,
Refunded,
@ -315,7 +315,7 @@ pub struct CoinbasePaymentResponseData {
pub pricing: HashMap<String, OverpaymentAbsoluteThreshold>,
pub fee_rate: f64,
pub logo_url: String,
pub metadata: Metadata,
pub metadata: Option<Metadata>,
pub payments: Vec<PaymentElement>,
pub resource: String,
pub timeline: Vec<Timeline>,

View File

@ -566,9 +566,6 @@ impl api::IncomingWebhook for Opennode {
opennode::OpennodePaymentStatus::Processing => {
Ok(api::IncomingWebhookEvent::PaymentIntentProcessing)
}
opennode::OpennodePaymentStatus::Refunded => {
Ok(api::IncomingWebhookEvent::RefundSuccess)
}
_ => Ok(api::IncomingWebhookEvent::EventNotSupported),
}
}