Skip to content

Commit d362db6

Browse files
horghclaude
andcommitted
Add credit_application and fund_transfer to event type enum
Add support for credit_application and fund_transfer event types to the Event component's type enum field, including updated documentation and comprehensive test coverage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c84b8bf commit d362db6

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Added the processor `:securepay` to `Minfraud::Components::Payment`.
66
* Ruby 3.2+ is now required. If you're using Ruby 3.0 or 3.1, please use
77
version 2.8.0 of this gem.
8+
* Added `/event/type` values `:credit_application` and `:fund_transfer` to
9+
`Minfraud::Components::Event`.
810

911
## v2.8.0 (2025-05-23)
1012

lib/minfraud/components/event.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ class Event < Base
3535
attr_accessor :time
3636

3737
# The type of event being scored. This must be one of
38-
# +:account_creation+, +:account_login+, +:email_change+,
39-
# +:password_reset+, +:payout_change+, +:purchase+,
40-
# +:recurring_purchase+, +:referral+, or +:survey+.
38+
# +:account_creation+, +:account_login+, +:credit_application+,
39+
# +:email_change+, +:fund_transfer+, +:password_reset+,
40+
# +:payout_change+, +:purchase+, +:recurring_purchase+, +:referral+,
41+
# or +:survey+.
4142
#
4243
# @!attribute type
4344
#
@@ -46,7 +47,9 @@ class Event < Base
4647
%i[
4748
account_creation
4849
account_login
50+
credit_application
4951
email_change
52+
fund_transfer
5053
password_reset
5154
payout_change
5255
purchase

spec/components/event_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,17 @@
3131
time: '2020-08-28T14:00:00Z',
3232
)
3333
end
34+
35+
it 'accepts credit_application as a valid type' do
36+
described_class.new(
37+
type: :credit_application,
38+
)
39+
end
40+
41+
it 'accepts fund_transfer as a valid type' do
42+
described_class.new(
43+
type: :fund_transfer,
44+
)
45+
end
3446
end
3547
end

0 commit comments

Comments
 (0)