Class: Minfraud::Components::Addressable
- Defined in:
- lib/minfraud/components/addressable.rb
Overview
This is a parent class for the Billing and Shipping components.
Instance Attribute Summary collapse
-
#address ⇒ String?
The first line of the user’s billing / shipping address.
-
#address_2 ⇒ String?
The second line of the user’s billing / shipping address.
-
#city ⇒ String?
The city of the user’s billing / shipping address.
-
#company ⇒ String?
The company of the end user as provided in their billing / shipping information.
-
#country ⇒ String?
The two character ISO 3166-1 alpha-2 country code of the user’s billing / shipping address.
-
#first_name ⇒ String?
The first name of the end user as provided in their billing / shipping information.
-
#last_name ⇒ String?
The last name of the end user as provided in their billing / shipping information.
-
#phone_country_code ⇒ String?
The country code for the phone number associated with the user’s billing / shipping address.
-
#phone_number ⇒ String?
The phone number without the country code for the user’s billing / shipping address.
-
#postal ⇒ String?
The postal code of the user’s billing / shipping address.
-
#region ⇒ String?
The ISO 3166-2 subdivision code for the user’s billing / shipping address.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Addressable
constructor
A new instance of Addressable.
Methods inherited from Base
Constructor Details
#initialize(params = {}) ⇒ Addressable
Returns a new instance of Addressable.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/minfraud/components/addressable.rb', line 79 def initialize(params = {}) @first_name = params[:first_name] @last_name = params[:last_name] @company = params[:company] @address = params[:address] @address_2 = params[:address_2] @city = params[:city] @region = params[:region] @country = params[:country] @postal = params[:postal] @phone_number = params[:phone_number] @phone_country_code = params[:phone_country_code] validate end |
Instance Attribute Details
#address ⇒ String?
The first line of the user’s billing / shipping address.
30 31 32 |
# File 'lib/minfraud/components/addressable.rb', line 30 def address @address end |
#address_2 ⇒ String?
The second line of the user’s billing / shipping address.
35 36 37 |
# File 'lib/minfraud/components/addressable.rb', line 35 def address_2 @address_2 end |
#city ⇒ String?
The city of the user’s billing / shipping address.
40 41 42 |
# File 'lib/minfraud/components/addressable.rb', line 40 def city @city end |
#company ⇒ String?
The company of the end user as provided in their billing / shipping information.
25 26 27 |
# File 'lib/minfraud/components/addressable.rb', line 25 def company @company end |
#country ⇒ String?
The two character ISO 3166-1 alpha-2 country code of the user’s billing / shipping address.
56 57 58 |
# File 'lib/minfraud/components/addressable.rb', line 56 def country @country end |
#first_name ⇒ String?
The first name of the end user as provided in their billing / shipping information.
13 14 15 |
# File 'lib/minfraud/components/addressable.rb', line 13 def first_name @first_name end |
#last_name ⇒ String?
The last name of the end user as provided in their billing / shipping information.
19 20 21 |
# File 'lib/minfraud/components/addressable.rb', line 19 def last_name @last_name end |
#phone_country_code ⇒ String?
The country code for the phone number associated with the user’s billing / shipping address. If you provide this information then you must provide at least one digit.
75 76 77 |
# File 'lib/minfraud/components/addressable.rb', line 75 def phone_country_code @phone_country_code end |
#phone_number ⇒ String?
The phone number without the country code for the user’s billing / shipping address. Punctuation characters will be stripped. After stripping punctuation characters, the number must contain only digits.
68 69 70 |
# File 'lib/minfraud/components/addressable.rb', line 68 def phone_number @phone_number end |
#postal ⇒ String?
The postal code of the user’s billing / shipping address.
61 62 63 |
# File 'lib/minfraud/components/addressable.rb', line 61 def postal @postal end |
#region ⇒ String?
The ISO 3166-2 subdivision code for the user’s billing / shipping address.
48 49 50 |
# File 'lib/minfraud/components/addressable.rb', line 48 def region @region end |