minfraud 1.0.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -13
  2. data/.github/workflows/test.yml +46 -0
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +108 -0
  5. data/.travis.yml +19 -3
  6. data/CHANGELOG.md +65 -1
  7. data/CODE_OF_CONDUCT.md +4 -4
  8. data/Gemfile +11 -2
  9. data/LICENSE.txt +2 -1
  10. data/README.dev.md +4 -0
  11. data/README.md +245 -59
  12. data/Rakefile +18 -3
  13. data/bin/console +4 -3
  14. data/lib/maxmind/geoip2/model/city.rb +99 -0
  15. data/lib/maxmind/geoip2/model/country.rb +94 -0
  16. data/lib/maxmind/geoip2/model/insights.rb +38 -0
  17. data/lib/maxmind/geoip2/record/abstract.rb +46 -0
  18. data/lib/maxmind/geoip2/record/city.rb +62 -0
  19. data/lib/maxmind/geoip2/record/continent.rb +61 -0
  20. data/lib/maxmind/geoip2/record/country.rb +78 -0
  21. data/lib/maxmind/geoip2/record/location.rb +97 -0
  22. data/lib/maxmind/geoip2/record/maxmind.rb +41 -0
  23. data/lib/maxmind/geoip2/record/place.rb +52 -0
  24. data/lib/maxmind/geoip2/record/postal.rb +54 -0
  25. data/lib/maxmind/geoip2/record/represented_country.rb +47 -0
  26. data/lib/maxmind/geoip2/record/subdivision.rb +72 -0
  27. data/lib/maxmind/geoip2/record/traits.rb +233 -0
  28. data/lib/minfraud.rb +48 -8
  29. data/lib/minfraud/assessments.rb +118 -49
  30. data/lib/minfraud/components/account.rb +31 -9
  31. data/lib/minfraud/components/addressable.rb +73 -26
  32. data/lib/minfraud/components/base.rb +35 -11
  33. data/lib/minfraud/components/billing.rb +5 -0
  34. data/lib/minfraud/components/credit_card.rb +67 -18
  35. data/lib/minfraud/components/custom_inputs.rb +25 -0
  36. data/lib/minfraud/components/device.rb +51 -10
  37. data/lib/minfraud/components/email.rb +29 -7
  38. data/lib/minfraud/components/event.rb +60 -13
  39. data/lib/minfraud/components/order.rb +60 -22
  40. data/lib/minfraud/components/payment.rb +165 -21
  41. data/lib/minfraud/components/report/transaction.rb +80 -0
  42. data/lib/minfraud/components/shipping.rb +14 -5
  43. data/lib/minfraud/components/shopping_cart.rb +19 -12
  44. data/lib/minfraud/components/shopping_cart_item.rb +42 -13
  45. data/lib/minfraud/enum.rb +22 -8
  46. data/lib/minfraud/error_handler.rb +45 -12
  47. data/lib/minfraud/errors.rb +22 -2
  48. data/lib/minfraud/http_service.rb +22 -8
  49. data/lib/minfraud/http_service/request.rb +19 -18
  50. data/lib/minfraud/http_service/response.rb +49 -12
  51. data/lib/minfraud/model/abstract.rb +20 -0
  52. data/lib/minfraud/model/address.rb +52 -0
  53. data/lib/minfraud/model/billing_address.rb +11 -0
  54. data/lib/minfraud/model/credit_card.rb +75 -0
  55. data/lib/minfraud/model/device.rb +54 -0
  56. data/lib/minfraud/model/disposition.rb +35 -0
  57. data/lib/minfraud/model/email.rb +54 -0
  58. data/lib/minfraud/model/email_domain.rb +24 -0
  59. data/lib/minfraud/model/error.rb +28 -0
  60. data/lib/minfraud/model/factors.rb +24 -0
  61. data/lib/minfraud/model/geoip2_location.rb +25 -0
  62. data/lib/minfraud/model/insights.rb +68 -0
  63. data/lib/minfraud/model/ip_address.rb +82 -0
  64. data/lib/minfraud/model/issuer.rb +49 -0
  65. data/lib/minfraud/model/score.rb +76 -0
  66. data/lib/minfraud/model/score_ip_address.rb +23 -0
  67. data/lib/minfraud/model/shipping_address.rb +30 -0
  68. data/lib/minfraud/model/subscores.rb +178 -0
  69. data/lib/minfraud/model/warning.rb +63 -0
  70. data/lib/minfraud/report.rb +58 -0
  71. data/lib/minfraud/resolver.rb +25 -16
  72. data/lib/minfraud/validates.rb +187 -0
  73. data/lib/minfraud/version.rb +4 -1
  74. data/minfraud.gemspec +23 -18
  75. metadata +123 -48
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'minfraud/model/abstract'
4
+
5
+ module Minfraud
6
+ module Model
7
+ # Warning about the minFraud request.
8
+ #
9
+ # Although more codes may be added in the future, the current warning codes
10
+ # are:
11
+ #
12
+ # * BILLING_CITY_NOT_FOUND - the billing city could not be found in our
13
+ # database.
14
+ # * BILLING_COUNTRY_MISSING - billing address information was provided
15
+ # without providing a billing country.
16
+ # * BILLING_COUNTRY_NOT_FOUND - the billing country could not be found in
17
+ # our database.
18
+ # * BILLING_POSTAL_NOT_FOUND - the billing postal could not be found in our
19
+ # database.
20
+ # * INPUT_INVALID - the value associated with the key does not meet the
21
+ # required constraints, e.g., "United States" in a field that requires a
22
+ # two-letter country code.
23
+ # * INPUT_UNKNOWN - an unknown key was encountered in the request body.
24
+ # * IP_ADDRESS_NOT_FOUND - the IP address could not be geolocated.
25
+ # * SHIPPING_COUNTRY_MISSING - shipping address information was provided
26
+ # without providing a shipping country.
27
+ # * SHIPPING_CITY_NOT_FOUND - the shipping city could not be found in our
28
+ # database.
29
+ # * SHIPPING_COUNTRY_NOT_FOUND - the shipping country could not be found in
30
+ # our database.
31
+ # * SHIPPING_POSTAL_NOT_FOUND - the shipping postal could not be found in
32
+ # our database.
33
+ class Warning < Abstract
34
+ # This value is a machine-readable code identifying the warning.
35
+ #
36
+ # @return [String]
37
+ attr_reader :code
38
+
39
+ # This property provides a human-readable explanation of the warning. The
40
+ # description may change at any time and should not be matched against.
41
+ #
42
+ # @return [String]
43
+ attr_reader :warning
44
+
45
+ # A JSON Pointer to the input field that the warning is associated with.
46
+ # For instance, if the warning was about the billing city, this would be
47
+ # '/billing/city'. If it was for the price in the second shopping cart
48
+ # item, it would be '/shopping_cart/1/price'.
49
+ #
50
+ # @return [String, nil]
51
+ attr_reader :input_pointer
52
+
53
+ # @!visibility private
54
+ def initialize(record)
55
+ super(record)
56
+
57
+ @code = get('code')
58
+ @warning = get('warning')
59
+ @input_pointer = get('input_pointer')
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Minfraud
4
+ # Report is used to perform minFraud Report Transaction API requests.
5
+ #
6
+ # @see https://dev.maxmind.com/minfraud/report-transaction/
7
+ class Report
8
+ include ::Minfraud::HTTPService
9
+
10
+ # The Report::Transaction component.
11
+ #
12
+ # @return [Minfraud::Components::Report::Transaction, nil]
13
+ attr_accessor :transaction
14
+
15
+ # @param params [Hash] Hash of parameters. The only supported key is
16
+ # +:transaction+, which should have a
17
+ # +Minfraud::Components::Report::Transaction+ as its value.
18
+ def initialize(params = {})
19
+ @transaction = params[:transaction]
20
+ end
21
+
22
+ # Perform a request to the minFraud Report Transaction API.
23
+ #
24
+ # @return [nil]
25
+ #
26
+ # @raise [Minfraud::AuthorizationError] If there was an authentication
27
+ # problem.
28
+ #
29
+ # @raise [Minfraud::ClientError] If there was a critical problem with one
30
+ # of your inputs.
31
+ #
32
+ # @raise [Minfraud::ServerError] If the server reported an error of some
33
+ # kind.
34
+ def report_transaction
35
+ raw = request.perform(
36
+ verb: :post,
37
+ endpoint: 'transactions/report',
38
+ body: @transaction.to_json,
39
+ )
40
+
41
+ response = ::Minfraud::HTTPService::Response.new(
42
+ status: raw.status.to_i,
43
+ body: raw.body,
44
+ headers: raw.headers
45
+ )
46
+
47
+ ::Minfraud::ErrorHandler.examine(response)
48
+
49
+ nil
50
+ end
51
+
52
+ private
53
+
54
+ def request
55
+ @request ||= Request.new(::Minfraud::HTTPService.configuration)
56
+ end
57
+ end
58
+ end
@@ -1,10 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Minfraud
4
+ # Resolver provides functionality for setting component attributes.
2
5
  module Resolver
3
6
  class << self
4
- # @param [Object] context an object for variable assignment
5
- # @param [Hash] params a hash of parameters
6
- # @return [Array] a list of supplied params
7
- # @note Raises RequestFormatError once unpermitted key is met
7
+ # Set keys on the context based on the provided parameters.
8
+ #
9
+ # @param context [Object] An object for variable assignment.
10
+ #
11
+ # @param params [Hash] A hash of parameters.
12
+ #
13
+ # @return [Array]
14
+ #
15
+ # @raise [Minfraud::RequestFormatError] If an unexpected key is found.
8
16
  def assign(context, params)
9
17
  Array(params).each do |key, value|
10
18
  raise RequestFormatError, "#{key} does not belong to request document format" unless MAPPING[key]
@@ -15,18 +23,19 @@ module Minfraud
15
23
  end
16
24
  end
17
25
 
18
- # Mapping between components & minFraud request keys
26
+ # @!visibility private
19
27
  MAPPING = {
20
- account: ::Minfraud::Components::Account,
21
- billing: ::Minfraud::Components::Billing,
22
- credit_card: ::Minfraud::Components::CreditCard,
23
- device: ::Minfraud::Components::Device,
24
- email: ::Minfraud::Components::Email,
25
- event: ::Minfraud::Components::Event,
26
- order: ::Minfraud::Components::Order,
27
- payment: ::Minfraud::Components::Payment,
28
- shipping: ::Minfraud::Components::Shipping,
29
- shopping_cart: ::Minfraud::Components::ShoppingCart
30
- }
28
+ account: ::Minfraud::Components::Account,
29
+ billing: ::Minfraud::Components::Billing,
30
+ credit_card: ::Minfraud::Components::CreditCard,
31
+ custom_inputs: ::Minfraud::Components::CustomInputs,
32
+ device: ::Minfraud::Components::Device,
33
+ email: ::Minfraud::Components::Email,
34
+ event: ::Minfraud::Components::Event,
35
+ order: ::Minfraud::Components::Order,
36
+ payment: ::Minfraud::Components::Payment,
37
+ shipping: ::Minfraud::Components::Shipping,
38
+ shopping_cart: ::Minfraud::Components::ShoppingCart,
39
+ }.freeze
31
40
  end
32
41
  end
@@ -0,0 +1,187 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'date'
4
+ require 'ipaddr'
5
+ require 'uri'
6
+
7
+ # rubocop:disable Metrics/ModuleLength
8
+ module Minfraud
9
+ # @!visibility private
10
+ module Validates
11
+ def validate_string(field, length, value)
12
+ return if !value
13
+
14
+ if value.to_s.length > length
15
+ raise InvalidInputError, "The #{field} value is not valid. The maximum length is #{length}."
16
+ end
17
+ end
18
+
19
+ def validate_md5(field, value)
20
+ return if !value
21
+
22
+ if !value.to_s.match(/\A[a-fA-F0-9]{32}\z/)
23
+ raise InvalidInputError, "The #{field} value is not valid. It must be an MD5 hash as a string."
24
+ end
25
+ end
26
+
27
+ def validate_subdivision_code(field, value)
28
+ return if !value
29
+
30
+ if !value.to_s.match(/\A[0-9A-Z]{1,4}\z/)
31
+ raise InvalidInputError, "The #{field} value is not valid. It must be an ISO 3166-2 subdivision code."
32
+ end
33
+ end
34
+
35
+ def validate_country_code(field, value)
36
+ return if !value
37
+
38
+ if !value.to_s.match(/\A[A-Z]{2}\z/)
39
+ raise InvalidInputError, "The #{field} value is not valid. It must be an ISO 3166-1 alpha-2 country code."
40
+ end
41
+ end
42
+
43
+ def validate_telephone_country_code(field, value)
44
+ return if !value
45
+
46
+ if !value.to_s.match(/\A[0-9]{1,4}\z/)
47
+ raise InvalidInputError, "The #{field} value is not valid. It must be at most 4 digits."
48
+ end
49
+ end
50
+
51
+ def validate_regex(field, regex, value)
52
+ return if !value
53
+
54
+ if !regex.match(value.to_s)
55
+ raise InvalidInputError, "The #{field} value is not valid. It must match the pattern #{regex}."
56
+ end
57
+ end
58
+
59
+ def validate_credit_card_token(field, value)
60
+ return if !value
61
+
62
+ s = value.to_s
63
+
64
+ if !/\A[\x21-\x7E]{1,255}\z/.match(s)
65
+ raise InvalidInputError, "The #{field} value is not valid. It must contain only non-space printable ASCII characters."
66
+ end
67
+
68
+ if /\A[0-9]{1,19}\z/.match(s)
69
+ raise InvalidInputError, "The #{field} value is not valid. If it is all digits, it must be longer than 19 characters."
70
+ end
71
+ end
72
+
73
+ def validate_custom_input_value(field, value)
74
+ return if !value
75
+
76
+ if [true, false].include?(value)
77
+ return
78
+ end
79
+
80
+ if value.is_a? Numeric
81
+ if value < -1e13 + 1 || value > 1e13 - 1
82
+ raise InvalidInputError, "The #{field} value is not valid. Numeric values must be between -1e13 and 1e13."
83
+ end
84
+
85
+ return
86
+ end
87
+
88
+ validate_string(field, 255, value)
89
+ end
90
+
91
+ def validate_ip(field, value)
92
+ return if !value
93
+
94
+ s = value.to_s
95
+ if s.include? '/'
96
+ raise InvalidInputError, "The #{field} value is not valid. It must be an individual IP address."
97
+ end
98
+
99
+ # rubocop:disable Style/RescueStandardError
100
+ begin
101
+ IPAddr.new(s)
102
+ rescue
103
+ raise InvalidInputError, "The #{field} value is not valid. It must be an IPv4 or IPv6 address."
104
+ end
105
+ # rubocop:enable Style/RescueStandardError
106
+
107
+ nil
108
+ end
109
+
110
+ def validate_nonnegative_number(field, value)
111
+ return if !value
112
+
113
+ if !value.is_a? Numeric
114
+ raise InvalidInputError, "The #{field} value is not valid. It must be numeric."
115
+ end
116
+
117
+ if value < 0 || value > 1e13 - 1
118
+ raise InvalidInputError, "The #{field} value is not valid. It must be at least 0 and at most 1e13 - 1."
119
+ end
120
+ end
121
+
122
+ def validate_nonnegative_integer(field, value)
123
+ return if !value
124
+
125
+ if !value.is_a? Integer
126
+ raise InvalidInputError, "The #{field} is not valid. It must be an integer."
127
+ end
128
+
129
+ if value < 0 || value > 1e13 - 1
130
+ raise InvalidInputError, "The #{field} is not valid. It must be at least 0 and at most 1e13 - 1."
131
+ end
132
+ end
133
+
134
+ def validate_email(field, value)
135
+ return if !value
136
+
137
+ if /.@./.match(value)
138
+ validate_string(field, 255, value)
139
+ return
140
+ end
141
+
142
+ validate_md5(field, value)
143
+ end
144
+
145
+ def validate_rfc3339(field, value)
146
+ return if !value
147
+
148
+ # rubocop:disable Style/RescueStandardError
149
+ begin
150
+ DateTime.rfc3339(value)
151
+ rescue
152
+ raise InvalidInputError, "The #{field} value is not valid. It must be in the RFC 3339 date-time format."
153
+ end
154
+ # rubocop:enable Style/RescueStandardError
155
+
156
+ nil
157
+ end
158
+
159
+ def validate_boolean(field, value)
160
+ return if !value
161
+
162
+ if ![false, true].include? value
163
+ raise InvalidInputError, "The #{field} value is not valid. It must be boolean."
164
+ end
165
+ end
166
+
167
+ def validate_uri(field, value)
168
+ return if !value
169
+
170
+ if value.to_s.length > 1_024
171
+ raise InvalidInputError, "The #{field} value is not valid. It must not exceed 1024 characters."
172
+ end
173
+
174
+ # rubocop:disable Style/RescueStandardError
175
+ begin
176
+ u = URI(value)
177
+ if !u.scheme
178
+ raise InvalidInputError
179
+ end
180
+ rescue
181
+ raise InvalidInputError, "The #{field} value is not valid. It must be an absolute URI."
182
+ end
183
+ # rubocop:enable Style/RescueStandardError
184
+ end
185
+ end
186
+ end
187
+ # rubocop:enable Metrics/ModuleLength
@@ -1,3 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Minfraud
2
- VERSION = "1.0.2"
4
+ # The Gem version.
5
+ VERSION = '1.3.0'
3
6
  end
@@ -1,29 +1,34 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', File.dirname(File.realpath(__FILE__)))
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
4
6
  require 'minfraud/version'
5
7
 
6
8
  Gem::Specification.new do |spec|
7
- spec.name = "minfraud"
9
+ spec.name = 'minfraud'
8
10
  spec.version = Minfraud::VERSION
9
- spec.authors = ["kushnir.yb"]
10
- spec.email = ["kushnir.yb@gmail.com"]
11
+ spec.authors = ['kushnir.yb']
12
+ spec.email = ['support@maxmind.com']
11
13
 
12
- spec.summary = %q{Ruby interface to the MaxMind minFraud v2.0 API services}
13
- spec.homepage = "https://github.com/kushniryb/minfraud-api-v2"
14
- spec.license = "MIT"
14
+ spec.summary = 'Ruby API for the minFraud Score, Insights, Factors, and Report Transactions services'
15
+ spec.homepage = 'https://github.com/maxmind/minfraud-api-ruby'
16
+ spec.license = 'MIT'
15
17
 
16
- spec.required_ruby_version = '>= 1.9'
18
+ spec.required_ruby_version = '>= 2.0'
17
19
 
18
20
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = "exe"
21
+ spec.bindir = 'exe'
20
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
22
-
23
- spec.add_runtime_dependency 'faraday', '~> 0.9', '>= 0.9.1'
24
- spec.add_runtime_dependency 'faraday_middleware', '~> 0.9', '>= 0.9.1'
25
- spec.add_runtime_dependency 'hashie', '~> 3.0'
26
- spec.add_development_dependency "bundler", "~> 1.12"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rspec", "~> 3.0"
23
+ spec.require_paths = ['lib']
24
+
25
+ spec.add_runtime_dependency 'faraday', '>= 0.9.1', '< 2.0'
26
+ spec.add_runtime_dependency 'faraday_middleware', '>= 0.9.1', '< 2.0'
27
+ spec.add_runtime_dependency 'net-http-persistent', '>= 2.0.0', '< 5.0'
28
+
29
+ spec.add_development_dependency 'bundler', '>= 1.16'
30
+ spec.add_development_dependency 'rake'
31
+ spec.add_development_dependency 'rspec', '~> 3.0'
32
+ spec.add_development_dependency 'rubocop'
33
+ spec.add_development_dependency 'webmock'
29
34
  end
metadata CHANGED
@@ -1,129 +1,180 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfraud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kushnir.yb
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-11 00:00:00.000000000 Z
11
+ date: 2020-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- - - ! '>='
17
+ - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 0.9.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '0.9'
30
- - - ! '>='
27
+ - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: 0.9.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: faraday_middleware
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
38
- - !ruby/object:Gem::Version
39
- version: '0.9'
40
- - - ! '>='
37
+ - - ">="
41
38
  - !ruby/object:Gem::Version
42
39
  version: 0.9.1
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '2.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- version: '0.9'
50
- - - ! '>='
47
+ - - ">="
51
48
  - !ruby/object:Gem::Version
52
49
  version: 0.9.1
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '2.0'
53
53
  - !ruby/object:Gem::Dependency
54
- name: hashie
54
+ name: net-http-persistent
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ~>
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '3.0'
59
+ version: 2.0.0
60
+ - - "<"
61
+ - !ruby/object:Gem::Version
62
+ version: '5.0'
60
63
  type: :runtime
61
64
  prerelease: false
62
65
  version_requirements: !ruby/object:Gem::Requirement
63
66
  requirements:
64
- - - ~>
67
+ - - ">="
65
68
  - !ruby/object:Gem::Version
66
- version: '3.0'
69
+ version: 2.0.0
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '5.0'
67
73
  - !ruby/object:Gem::Dependency
68
74
  name: bundler
69
75
  requirement: !ruby/object:Gem::Requirement
70
76
  requirements:
71
- - - ~>
77
+ - - ">="
72
78
  - !ruby/object:Gem::Version
73
- version: '1.12'
79
+ version: '1.16'
74
80
  type: :development
75
81
  prerelease: false
76
82
  version_requirements: !ruby/object:Gem::Requirement
77
83
  requirements:
78
- - - ~>
84
+ - - ">="
79
85
  - !ruby/object:Gem::Version
80
- version: '1.12'
86
+ version: '1.16'
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: rake
83
89
  requirement: !ruby/object:Gem::Requirement
84
90
  requirements:
85
- - - ~>
91
+ - - ">="
86
92
  - !ruby/object:Gem::Version
87
- version: '10.0'
93
+ version: '0'
88
94
  type: :development
89
95
  prerelease: false
90
96
  version_requirements: !ruby/object:Gem::Requirement
91
97
  requirements:
92
- - - ~>
98
+ - - ">="
93
99
  - !ruby/object:Gem::Version
94
- version: '10.0'
100
+ version: '0'
95
101
  - !ruby/object:Gem::Dependency
96
102
  name: rspec
97
103
  requirement: !ruby/object:Gem::Requirement
98
104
  requirements:
99
- - - ~>
105
+ - - "~>"
100
106
  - !ruby/object:Gem::Version
101
107
  version: '3.0'
102
108
  type: :development
103
109
  prerelease: false
104
110
  version_requirements: !ruby/object:Gem::Requirement
105
111
  requirements:
106
- - - ~>
112
+ - - "~>"
107
113
  - !ruby/object:Gem::Version
108
114
  version: '3.0'
109
- description:
115
+ - !ruby/object:Gem::Dependency
116
+ name: rubocop
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: webmock
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ description:
110
144
  email:
111
- - kushnir.yb@gmail.com
145
+ - support@maxmind.com
112
146
  executables: []
113
147
  extensions: []
114
148
  extra_rdoc_files: []
115
149
  files:
116
- - .gitignore
117
- - .rspec
118
- - .travis.yml
150
+ - ".github/workflows/test.yml"
151
+ - ".gitignore"
152
+ - ".rspec"
153
+ - ".rubocop.yml"
154
+ - ".travis.yml"
119
155
  - CHANGELOG.md
120
156
  - CODE_OF_CONDUCT.md
121
157
  - Gemfile
122
158
  - LICENSE.txt
159
+ - README.dev.md
123
160
  - README.md
124
161
  - Rakefile
125
162
  - bin/console
126
163
  - bin/setup
164
+ - lib/maxmind/geoip2/model/city.rb
165
+ - lib/maxmind/geoip2/model/country.rb
166
+ - lib/maxmind/geoip2/model/insights.rb
167
+ - lib/maxmind/geoip2/record/abstract.rb
168
+ - lib/maxmind/geoip2/record/city.rb
169
+ - lib/maxmind/geoip2/record/continent.rb
170
+ - lib/maxmind/geoip2/record/country.rb
171
+ - lib/maxmind/geoip2/record/location.rb
172
+ - lib/maxmind/geoip2/record/maxmind.rb
173
+ - lib/maxmind/geoip2/record/place.rb
174
+ - lib/maxmind/geoip2/record/postal.rb
175
+ - lib/maxmind/geoip2/record/represented_country.rb
176
+ - lib/maxmind/geoip2/record/subdivision.rb
177
+ - lib/maxmind/geoip2/record/traits.rb
127
178
  - lib/minfraud.rb
128
179
  - lib/minfraud/assessments.rb
129
180
  - lib/minfraud/components/account.rb
@@ -131,11 +182,13 @@ files:
131
182
  - lib/minfraud/components/base.rb
132
183
  - lib/minfraud/components/billing.rb
133
184
  - lib/minfraud/components/credit_card.rb
185
+ - lib/minfraud/components/custom_inputs.rb
134
186
  - lib/minfraud/components/device.rb
135
187
  - lib/minfraud/components/email.rb
136
188
  - lib/minfraud/components/event.rb
137
189
  - lib/minfraud/components/order.rb
138
190
  - lib/minfraud/components/payment.rb
191
+ - lib/minfraud/components/report/transaction.rb
139
192
  - lib/minfraud/components/shipping.rb
140
193
  - lib/minfraud/components/shopping_cart.rb
141
194
  - lib/minfraud/components/shopping_cart_item.rb
@@ -145,31 +198,53 @@ files:
145
198
  - lib/minfraud/http_service.rb
146
199
  - lib/minfraud/http_service/request.rb
147
200
  - lib/minfraud/http_service/response.rb
201
+ - lib/minfraud/model/abstract.rb
202
+ - lib/minfraud/model/address.rb
203
+ - lib/minfraud/model/billing_address.rb
204
+ - lib/minfraud/model/credit_card.rb
205
+ - lib/minfraud/model/device.rb
206
+ - lib/minfraud/model/disposition.rb
207
+ - lib/minfraud/model/email.rb
208
+ - lib/minfraud/model/email_domain.rb
209
+ - lib/minfraud/model/error.rb
210
+ - lib/minfraud/model/factors.rb
211
+ - lib/minfraud/model/geoip2_location.rb
212
+ - lib/minfraud/model/insights.rb
213
+ - lib/minfraud/model/ip_address.rb
214
+ - lib/minfraud/model/issuer.rb
215
+ - lib/minfraud/model/score.rb
216
+ - lib/minfraud/model/score_ip_address.rb
217
+ - lib/minfraud/model/shipping_address.rb
218
+ - lib/minfraud/model/subscores.rb
219
+ - lib/minfraud/model/warning.rb
220
+ - lib/minfraud/report.rb
148
221
  - lib/minfraud/resolver.rb
222
+ - lib/minfraud/validates.rb
149
223
  - lib/minfraud/version.rb
150
224
  - minfraud.gemspec
151
- homepage: https://github.com/kushniryb/minfraud-api-v2
225
+ homepage: https://github.com/maxmind/minfraud-api-ruby
152
226
  licenses:
153
227
  - MIT
154
228
  metadata: {}
155
- post_install_message:
229
+ post_install_message:
156
230
  rdoc_options: []
157
231
  require_paths:
158
232
  - lib
159
233
  required_ruby_version: !ruby/object:Gem::Requirement
160
234
  requirements:
161
- - - ! '>='
235
+ - - ">="
162
236
  - !ruby/object:Gem::Version
163
- version: '1.9'
237
+ version: '2.0'
164
238
  required_rubygems_version: !ruby/object:Gem::Requirement
165
239
  requirements:
166
- - - ! '>='
240
+ - - ">="
167
241
  - !ruby/object:Gem::Version
168
242
  version: '0'
169
243
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.4.3
172
- signing_key:
244
+ rubyforge_project:
245
+ rubygems_version: 2.7.6.2
246
+ signing_key:
173
247
  specification_version: 4
174
- summary: Ruby interface to the MaxMind minFraud v2.0 API services
248
+ summary: Ruby API for the minFraud Score, Insights, Factors, and Report Transactions
249
+ services
175
250
  test_files: []