Skip to content

Commit

Permalink
fix ingested_at timestamp for stripe supplemental events
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinSchneider committed May 14, 2024
1 parent 3e9046c commit e2b2645
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/app/lib/stripe_helpers/supplemental_events/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def initialize(stripe_record, public_key:, stripe_event: nil, stripe_customer: n
end

def self.EVENT_NAME
"stripe.supplemental.#{self.to_s.split('::').last.underscore}"
self.to_s.split('::').last.underscore
end

def occurred_at
stripe_record.created
@stripe_event.created
end

def stripe_customer
Expand Down Expand Up @@ -49,7 +49,7 @@ def as_parsed_event
Ingestion::ParsedEventFromIngestion.new(
uuid: uuid,
swishjam_api_key: public_key,
name: self.class.EVENT_NAME,
name: "stripe.supplemental.#{self.class.EVENT_NAME}",
properties: props,
user_profile_id: user_profile_id,
occurred_at: occurred_at,
Expand Down

0 comments on commit e2b2645

Please sign in to comment.