minfraud 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2805f5d3d40b2d325926a4a5614b86248bba07f905ffb37ec7dfa9589e97103
4
- data.tar.gz: 6d70e15b76a295c376232e6bf277e619ed783c23e46460e89e527458813b44ec
3
+ metadata.gz: 0f6c78c29956e0fd0302d07fe250d84bf9d750fb0ef5d713f57afd8bd8ec355d
4
+ data.tar.gz: f438db4f7d05466e6074192031900ce47fffdd1f2f6256706b63fa2d49ca4c56
5
5
  SHA512:
6
- metadata.gz: 7a4e77f3d92e6173426e5151b234badc9fbe2503e41178d104eeda51c016835c6459308eaaa810063666030369e89828f1919731add25be6b51e0bf50821704a
7
- data.tar.gz: a07520d278d5191c2ac5dc9684d9d52ca670a494b088b56b4f8b920a0198ad53469e473d8114e9d33a891e4daa3f5ffa3573cf2190284dfb993b7e57742f9ca3
6
+ metadata.gz: 837c85526868ce32e3485da88043dc5d2d5ec1aeda9b66ed7f30dd75f609eb8bdf9a0645aade8a3ae7b7993384559dbe6d6455be1f36cae0cda873d10b4f829d
7
+ data.tar.gz: ebb55de945c03a0ba68a78ec6c75f3c71b51533be2a5adaf321f35a64e64c6905fca90ba9c996351d9ed190730a97d7cbbc19fb14147e919b29da7457ab409c4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.2.0 (2022-03-28)
4
+
5
+ * Added the input `/credit_card/country`. This is the country where the
6
+ issuer of the card is located. This may be passed instead of the
7
+ `/credit_card/issuer_id_number` if you do not wish to pass partial
8
+ account numbers or if your payment processor does not provide them. You
9
+ may provide this using the `country` attribute on
10
+ `Minfraud::Components::CreditCard`.
11
+
3
12
  ## v2.1.0 (2022-01-25)
4
13
 
5
14
  * Adds the following new processor to `Minfraud::Components::Payment`:
@@ -41,6 +41,16 @@ module Minfraud
41
41
  # @return [String, nil]
42
42
  attr_accessor :bank_phone_number
43
43
 
44
+ # The two character ISO 3166-1 alpha-2 country code where the issuer of
45
+ # the card is located. This may be passed instead of {::issuer_id_number}
46
+ # if you do not wish to pass partial account numbers, or if your payment
47
+ # processor does not provide them.
48
+ #
49
+ # @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
50
+ #
51
+ # @return [String, nil]
52
+ attr_accessor :country
53
+
44
54
  # A token uniquely identifying the card. The token should consist of
45
55
  # non-space printable ASCII characters. If the token is all digits, it
46
56
  # must be more than 19 characters long. The token must not be a primary
@@ -96,6 +106,7 @@ module Minfraud
96
106
  # correspond to one of the available attributes.
97
107
  def initialize(params = {})
98
108
  @bank_phone_country_code = params[:bank_phone_country_code]
109
+ @country = params[:country]
99
110
  @issuer_id_number = params[:issuer_id_number]
100
111
  @last_digits = params[:last_digits] || params[:last_4_digits]
101
112
  @bank_name = params[:bank_name]
@@ -114,6 +125,7 @@ module Minfraud
114
125
  return if !Minfraud.enable_validation
115
126
 
116
127
  validate_telephone_country_code('bank_phone_country_code', @bank_phone_country_code)
128
+ validate_country_code('country', @country)
117
129
  validate_regex('issuer_id_number', /\A(?:[0-9]{6}|[0-9]{8})\z/, @issuer_id_number)
118
130
  validate_regex('last_digits', /\A(?:[0-9]{2}|[0-9]{4})\z/, @last_digits)
119
131
  validate_string('bank_name', 255, @bank_name)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Minfraud
4
4
  # The Gem version.
5
- VERSION = '2.1.0'
5
+ VERSION = '2.2.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfraud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kushnir.yb
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-01-25 00:00:00.000000000 Z
12
+ date: 2022-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: connection_pool
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubygems_version: 3.2.22
240
+ rubygems_version: 3.3.3
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Ruby API for the minFraud Score, Insights, Factors, and Report Transactions