From a727b197a8c2e0e193ee98005f959585f847f069 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 22 Apr 2026 21:26:08 +0000 Subject: [PATCH 1/2] 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) --- CHANGELOG.md | 2 ++ lib/minfraud/components/report/transaction.rb | 6 +++--- spec/components/report/transaction_spec.rb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba52c5..92548c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ for explicit device linking. * Added the processors `:banquest`, `:fat_zebra`, `:summit_payments`, and `:yaadpay` to `Minfraud::Components::Payment`. +* Added `:clear` to the valid values for the `tag` attribute on + `Minfraud::Components::Report::Transaction`. * Unnecessary files were removed from the published .gem. ## v2.9.0 (2025-11-20) diff --git a/lib/minfraud/components/report/transaction.rb b/lib/minfraud/components/report/transaction.rb index a78ef91..16fc187 100644 --- a/lib/minfraud/components/report/transaction.rb +++ b/lib/minfraud/components/report/transaction.rb @@ -23,13 +23,13 @@ class Transaction < Base # A symbol indicating the likelihood that a transaction may be # fraudulent. # - # This may be one of +:chargeback+, +:not_fraud+, +:spam_or_abuse+, or - # +:suspected_fraud+. + # This may be one of +:chargeback+, +:clear+ (to retract a previous + # report), +:not_fraud+, +:spam_or_abuse+, or +:suspected_fraud+. # # @!attribute tag # # @return [Symbol, nil] - enum_accessor :tag, %i[chargeback not_fraud spam_or_abuse suspected_fraud] + enum_accessor :tag, %i[chargeback clear not_fraud spam_or_abuse suspected_fraud] # A string which is provided by your payment processor indicating the # reason for the chargeback. diff --git a/spec/components/report/transaction_spec.rb b/spec/components/report/transaction_spec.rb index 5b58966..1d5ef02 100644 --- a/spec/components/report/transaction_spec.rb +++ b/spec/components/report/transaction_spec.rb @@ -17,7 +17,7 @@ end context 'with all valid tags' do - values = %i[chargeback not_fraud spam_or_abuse suspected_fraud] + values = %i[chargeback clear not_fraud spam_or_abuse suspected_fraud] values.each do |val| it "accepts #{val} as a valid tag" do result = described_class.new(tag: val) From 6658b9f8ddd81e54a10186757b06bed8531e1219 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 22 Apr 2026 21:32:15 +0000 Subject: [PATCH 2/2] Add mise configuration for local toolchain management Sets up `mise` for automatic Ruby provisioning, matching the pattern already in use in minfraud-api-dotnet and GeoIP2-dotnet. Uses `latest` to let contributors pick up the newest stable Ruby, mirroring the behavior of the dotnet repos. Co-Authored-By: Claude Opus 4.7 (1M context) --- mise.lock | 32 ++++++++++++++++++++++++++++++++ mise.toml | 17 +++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 mise.lock create mode 100644 mise.toml diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..a5872a9 --- /dev/null +++ b/mise.lock @@ -0,0 +1,32 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +[[tools.ruby]] +version = "4.0.3" +backend = "core:ruby" + +[tools.ruby."platforms.linux-arm64"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.linux-arm64-musl"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.linux-x64"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.linux-x64-musl"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.macos-arm64"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.macos-x64"] +checksum = "sha256:77964acc370d5c8375b9502e5ba6c13c03ef91ab9eb9f521c84fb42b9c9a6b0f" +url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.3.tar.gz" + +[tools.ruby."platforms.windows-x64"] +url = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-4.0.3-1/rubyinstaller-4.0.3-1-x64.7z" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..bea4666 --- /dev/null +++ b/mise.toml @@ -0,0 +1,17 @@ +[settings] +experimental = true +lockfile = true +disable_backends = [ + "asdf", + "vfox", +] + +[tools] +ruby = "latest" + +[hooks] +enter = "mise install --quiet --locked" + +[[watch_files]] +patterns = ["mise.toml", "mise.lock"] +run = "mise install --quiet --locked"