-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from maxmind/greg/phone-outputs
Add new phone outputs
- Loading branch information
Showing
5 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'minfraud/model/abstract' | ||
|
||
module Minfraud | ||
module Model | ||
# Model with information about the billing or shipping phone number. | ||
class Phone < Abstract | ||
# The two-character ISO 3166-1 country code for the country associated | ||
# with the phone number. | ||
# | ||
# @return [String, nil] | ||
attr_reader :country | ||
|
||
# This is true if the phone number is a Voice over Internet Protocol | ||
# (VoIP) number allocated by a regulator. It is false if the phone | ||
# number is not a VoIP number allocated by a regulator. The attribute | ||
# is nil when a valid phone number has not been provided or we do not | ||
# have data for the phone number. | ||
# | ||
# @return [Boolean, nil] | ||
attr_reader :is_voip | ||
|
||
# The name of the original network operator associated with the phone | ||
# number. This attribute does not reflect phone numbers that have been | ||
# ported from the original operator to another, nor does it identify | ||
# mobile virtual network operators. | ||
# | ||
# @return [String, nil] | ||
attr_reader :network_operator | ||
|
||
# One of the following values: fixed or mobile. Additional values may | ||
# be added in the future. | ||
# | ||
# @return [String, nil] | ||
attr_reader :number_type | ||
|
||
# @!visibility private | ||
def initialize(record) | ||
super | ||
|
||
@country = get('country') | ||
@is_voip = get('is_voip') | ||
@network_operator = get('network_operator') | ||
@number_type = get('number_type') | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters