Skip to content

Commit a727b19

Browse files
oschwaldclaude
andcommitted
Add :clear to the tag values for report transactions
Part of STF-190. The `clear` tag retracts a previously reported fraud report tag on a transaction, restoring its label to "unknown" (distinct from the positive `:not_fraud` signal). Backend support shipped in STF-15; this adds SDK support. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b428b2a commit a727b19

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
for explicit device linking.
99
* Added the processors `:banquest`, `:fat_zebra`, `:summit_payments`, and
1010
`:yaadpay` to `Minfraud::Components::Payment`.
11+
* Added `:clear` to the valid values for the `tag` attribute on
12+
`Minfraud::Components::Report::Transaction`.
1113
* Unnecessary files were removed from the published .gem.
1214

1315
## v2.9.0 (2025-11-20)

lib/minfraud/components/report/transaction.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class Transaction < Base
2323
# A symbol indicating the likelihood that a transaction may be
2424
# fraudulent.
2525
#
26-
# This may be one of +:chargeback+, +:not_fraud+, +:spam_or_abuse+, or
27-
# +:suspected_fraud+.
26+
# This may be one of +:chargeback+, +:clear+ (to retract a previous
27+
# report), +:not_fraud+, +:spam_or_abuse+, or +:suspected_fraud+.
2828
#
2929
# @!attribute tag
3030
#
3131
# @return [Symbol, nil]
32-
enum_accessor :tag, %i[chargeback not_fraud spam_or_abuse suspected_fraud]
32+
enum_accessor :tag, %i[chargeback clear not_fraud spam_or_abuse suspected_fraud]
3333

3434
# A string which is provided by your payment processor indicating the
3535
# reason for the chargeback.

spec/components/report/transaction_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
end
1818

1919
context 'with all valid tags' do
20-
values = %i[chargeback not_fraud spam_or_abuse suspected_fraud]
20+
values = %i[chargeback clear not_fraud spam_or_abuse suspected_fraud]
2121
values.each do |val|
2222
it "accepts #{val} as a valid tag" do
2323
result = described_class.new(tag: val)

0 commit comments

Comments
 (0)