Skip to content

Commit

Permalink
refactor(kafka_message): NanoSecond precision for consolidated logs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshMathurJuspay authored Dec 12, 2024
1 parent da5c34a commit fb3a49b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions crates/router/src/services/kafka/dispute_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ pub struct KafkaDisputeEvent<'a> {
pub connector_dispute_id: &'a String,
pub connector_reason: Option<&'a String>,
pub connector_reason_code: Option<&'a String>,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub challenge_required_by: Option<OffsetDateTime>,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub connector_created_at: Option<OffsetDateTime>,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub connector_updated_at: Option<OffsetDateTime>,
#[serde(default, with = "time::serde::timestamp::milliseconds")]
#[serde(default, with = "time::serde::timestamp::nanoseconds")]
pub created_at: OffsetDateTime,
#[serde(default, with = "time::serde::timestamp::milliseconds")]
#[serde(default, with = "time::serde::timestamp::nanoseconds")]
pub modified_at: OffsetDateTime,
pub connector: &'a String,
pub evidence: &'a Secret<serde_json::Value>,
Expand Down
8 changes: 4 additions & 4 deletions crates/router/src/services/kafka/payment_attempt_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ pub struct KafkaPaymentAttemptEvent<'a> {
pub payment_method: Option<storage_enums::PaymentMethod>,
pub connector_transaction_id: Option<&'a String>,
pub capture_method: Option<storage_enums::CaptureMethod>,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub capture_on: Option<OffsetDateTime>,
pub confirm: bool,
pub authentication_type: Option<storage_enums::AuthenticationType>,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub created_at: OffsetDateTime,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub modified_at: OffsetDateTime,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub last_synced: Option<OffsetDateTime>,
pub cancellation_reason: Option<&'a String>,
pub amount_to_capture: Option<MinorUnit>,
Expand Down
12 changes: 6 additions & 6 deletions crates/router/src/services/kafka/payment_intent_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ pub struct KafkaPaymentIntentEvent<'a> {
pub connector_id: Option<&'a String>,
pub statement_descriptor_name: Option<&'a String>,
pub statement_descriptor_suffix: Option<&'a String>,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub created_at: OffsetDateTime,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub modified_at: OffsetDateTime,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub last_synced: Option<OffsetDateTime>,
pub setup_future_usage: Option<storage_enums::FutureUsage>,
pub off_session: Option<bool>,
Expand Down Expand Up @@ -60,11 +60,11 @@ pub struct KafkaPaymentIntentEvent<'a> {
pub return_url: Option<&'a String>,
pub metadata: Option<String>,
pub statement_descriptor: Option<&'a String>,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub created_at: OffsetDateTime,
#[serde(with = "time::serde::timestamp::milliseconds")]
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub modified_at: OffsetDateTime,
#[serde(default, with = "time::serde::timestamp::milliseconds::option")]
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub last_synced: Option<OffsetDateTime>,
pub setup_future_usage: Option<storage_enums::FutureUsage>,
pub off_session: Option<bool>,
Expand Down
4 changes: 2 additions & 2 deletions crates/router/src/services/kafka/refund_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pub struct KafkaRefundEvent<'a> {
pub sent_to_gateway: &'a bool,
pub refund_error_message: Option<&'a String>,
pub refund_arn: Option<&'a String>,
#[serde(default, with = "time::serde::timestamp::milliseconds")]
#[serde(default, with = "time::serde::timestamp::nanoseconds")]
pub created_at: OffsetDateTime,
#[serde(default, with = "time::serde::timestamp::milliseconds")]
#[serde(default, with = "time::serde::timestamp::nanoseconds")]
pub modified_at: OffsetDateTime,
pub description: Option<&'a String>,
pub attempt_id: &'a String,
Expand Down

0 comments on commit fb3a49b

Please sign in to comment.