Skip to content

Commit 3862c57

Browse files
authored
Merge pull request #187 from maxmind/wstorey/tweaks
Fix documentation issues
2 parents debc46e + f4e8a8c commit 3862c57

14 files changed

Lines changed: 54 additions & 33 deletions

File tree

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2016-2020 kushnir.yb
4-
Copyright (c) 2020-2025 MaxMind, Inc.
4+
Copyright (c) 2020-2026 MaxMind, Inc.
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Minfraud.configure do |c|
4848
c.license_key = 'your_license_key'
4949
c.enable_validation = true
5050
end
51-
````
51+
```
5252

5353
To use the Sandbox web service instead of the production web service, you can provide the host:
5454

@@ -69,8 +69,8 @@ creating the object.
6969

7070
After populating the object, call the method for the minFraud endpoint you
7171
want to use: `#score`, `#insights`, or `#factors`. The returned value is a
72-
`MinFraud::Response` object. You can access the response model through its
73-
`#body` attribute.
72+
`Minfraud::HTTPService::Response` object. You can access the response model
73+
through its `#body` attribute.
7474

7575
An exception will be thrown for critical errors. You should check for
7676
`warnings` related to your inputs after a request.
@@ -245,6 +245,8 @@ this functionality.
245245

246246
The gem supplies several distinct exception-types:
247247

248+
* `InvalidInputError` - Raised if an input value is invalid when client-side
249+
validation is enabled
248250
* `RequestFormatError` - Raised if an unknown key is provided to the
249251
`Minfraud::Assessments` constructor
250252
* `ClientError` - Raised if the IP address is absent, reserved, or the JSON
@@ -295,7 +297,7 @@ This API uses [Semantic Versioning](https://semver.org/).
295297

296298
Copyright (c) 2016-2020 kushnir.yb.
297299

298-
Copyright (c) 2020-2025 MaxMind, Inc.
300+
Copyright (c) 2020-2026 MaxMind, Inc.
299301

300302
The gem is available as open source under the terms of the [MIT
301303
License](https://opensource.org/licenses/MIT).

lib/minfraud/components/credit_card.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class CreditCard < Base
1414
# @return [String, nil]
1515
attr_accessor :issuer_id_number
1616

17-
# The last two or four digits of the credit card number.
17+
# The last two or four digits of the credit card number. In most cases,
18+
# you should send the last four digits for +last_digits+.
1819
#
1920
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--credit-card__last_digits
2021
#
@@ -42,7 +43,7 @@ class CreditCard < Base
4243
attr_accessor :bank_phone_number
4344

4445
# 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+
# the card is located. This may be passed instead of {#issuer_id_number}
4647
# if you do not wish to pass partial account numbers, or if your payment
4748
# processor does not provide them.
4849
#
@@ -74,7 +75,7 @@ class CreditCard < Base
7475
# @return [String, nil]
7576
attr_accessor :cvv_result
7677

77-
# Whether the outcome of 3-D Secure verification (e.g. Safekey,
78+
# Whether the outcome of 3-D Secure verification (e.g. SafeKey,
7879
# SecureCode, Verified by Visa) was successful. +true+ if customer
7980
# verification was successful, or +false+ if the customer failed
8081
# verification. If 3-D Secure verification was not used, was unavailable,
@@ -86,7 +87,7 @@ class CreditCard < Base
8687

8788
# Get the last digits of the credit card number.
8889
#
89-
# @deprecated Use {::last_digits} instead.
90+
# @deprecated Use {#last_digits} instead.
9091
#
9192
# @return [String, nil]
9293
def last_4_digits
@@ -95,7 +96,7 @@ def last_4_digits
9596

9697
# Set the last digits of the credit card number.
9798
#
98-
# @deprecated Use {::last_digits} instead.
99+
# @deprecated Use {#last_digits} instead.
99100
#
100101
# @return [String, nil]
101102
def last_4_digits=(last4)

lib/minfraud/components/email.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Minfraud
77
module Components
88
# Email corresponds to the email object of a minFraud request.
99
#
10-
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--email
10+
# @see https://dev.maxmind.com/minfraud/api-documentation/requests/?lang=en#email
1111
class Email < Base
1212
include Minfraud::Validates
1313

lib/minfraud/components/event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Event < Base
3838

3939
# The date and time the event occurred. The string must be in the RFC
4040
# 3339 date-time format, e.g., "2012-04-12T23:20:50.52Z". The time must
41-
# be within the past 10 years. If this field is not in the request, the
41+
# be within the past year. If this field is not in the request, the
4242
# current time will be used.
4343
#
4444
# @see https://tools.ietf.org/html/rfc3339

lib/minfraud/components/order.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Order < Base
99
include Minfraud::Validates
1010

1111
# The total order amount for the transaction before taxes and discounts.
12-
# The value must be at least 0 and at most 1e14 - 1.
12+
# The value must be at least 0 and at most 1e13 - 1.
1313
#
1414
# @return [Float, nil]
1515
attr_accessor :amount

lib/minfraud/components/shopping_cart_item.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ module Components
55
# ShoppingCartItem corresponds to objects in the shopping_cart object
66
# of a minFraud request.
77
#
8-
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--shopping-cart--item
8+
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--shopping-cart
99
class ShoppingCartItem < Base
1010
include Minfraud::Validates
1111

1212
# The category of the item. This can also be a hashed value; see link.
1313
#
14-
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--shopping-cart--item__category
14+
# @see https://dev.maxmind.com/minfraud/api-documentation/requests/?lang=en#schema--request--shopping-cart__category
1515
#
1616
# @return [String, nil]
1717
attr_accessor :category
1818

1919
# The internal ID of the item. This can also be a hashed value; see link.
2020
#
21-
# @see https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#schema--request--shopping-cart--item__item_id
21+
# @see https://dev.maxmind.com/minfraud/api-documentation/requests/?lang=en#schema--request--shopping-cart__item_id
2222
#
2323
# @return [String, nil]
2424
attr_accessor :item_id
@@ -31,7 +31,7 @@ class ShoppingCartItem < Base
3131

3232
# The per-unit price of this item in the shopping cart. This should use
3333
# the same currency as the order currency. The value must be at least 0
34-
# and at most 1e14 - 1.
34+
# and at most 1e13 - 1.
3535
#
3636
# @return [Float, nil]
3737
attr_accessor :price

lib/minfraud/http_service/response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ module HTTPService
1212
class Response
1313
# Response HTTP status code.
1414
#
15-
# @return [Fixnum, nil]
15+
# @return [Integer, nil]
1616
attr_reader :status
1717

1818
# Response model.
1919
#
2020
# @return [Minfraud::Model::Score, Minfraud::Model::Insights,
21-
# Minfraud::Model::Factors, nil]
21+
# Minfraud::Model::Factors, Minfraud::Model::Error, nil]
2222
attr_reader :body
2323

2424
# @param endpoint [Symbol, nil] endpoint name, like :score.

lib/minfraud/model/email.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class Email < Abstract
1414

1515
# A date string (e.g. 2017-04-24) to identify the date an email address
1616
# was first seen by MaxMind. This is expressed using the ISO 8601 date
17-
# format.
17+
# format YYYY-MM-DD. The earliest date that may be returned is January
18+
# 1, 2008.
1819
#
1920
# @return [String, nil]
2021
attr_reader :first_seen

lib/minfraud/model/email_domain.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ class EmailDomain < Abstract
1616
# @return [String, nil]
1717
attr_reader :classification
1818

19-
# A date string (e.g. 2017-04-24) to identify the date an email domain
19+
# A date string (e.g. 2019-01-01) to identify the date an email domain
2020
# was first seen by MaxMind. This is expressed using the ISO 8601 date
21-
# format.
21+
# format YYYY-MM-DD. The earliest date that may be returned is January
22+
# 1, 2019.
2223
#
2324
# @return [String, nil]
2425
attr_reader :first_seen

0 commit comments

Comments
 (0)