Class: Maxmind::Request
- Inherits:
-
Object
- Object
- Maxmind::Request
- Defined in:
- lib/maxmind/request.rb
Instance Attribute Summary collapse
-
#accept_language ⇒ Object
Optional Fields.
-
#bin ⇒ Object
Optional Fields.
-
#bin_name ⇒ Object
Optional Fields.
-
#bin_phone ⇒ Object
Optional Fields.
-
#city ⇒ Object
Required Fields.
-
#client_ip ⇒ Object
Required Fields.
-
#country ⇒ Object
Required Fields.
-
#cust_phone ⇒ Object
Optional Fields.
-
#domain ⇒ Object
Optional Fields.
-
#email ⇒ Object
Optional Fields.
-
#forwarded_ip ⇒ Object
Optional Fields.
-
#password ⇒ Object
Optional Fields.
-
#postal ⇒ Object
Required Fields.
-
#region ⇒ Object
Required Fields.
-
#request_type ⇒ Object
Optional Fields.
-
#session_id ⇒ Object
Optional Fields.
-
#shipping_address ⇒ Object
Optional Fields.
-
#shipping_city ⇒ Object
Optional Fields.
-
#shipping_country ⇒ Object
Optional Fields.
-
#shipping_postal ⇒ Object
Optional Fields.
-
#shipping_region ⇒ Object
Optional Fields.
-
#transaction_id ⇒ Object
Optional Fields.
-
#user_agent ⇒ Object
Optional Fields.
-
#username ⇒ Object
Optional Fields.
Instance Method Summary collapse
- #attributes=(attrs = {}) ⇒ Object
-
#initialize(attrs = {}) ⇒ Request
constructor
A new instance of Request.
- #process ⇒ Object
- #process! ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Request
Returns a new instance of Request.
20 21 22 |
# File 'lib/maxmind/request.rb', line 20 def initialize(attrs={}) self.attributes = attrs end |
Instance Attribute Details
#accept_language ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def accept_language @accept_language end |
#bin ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def bin @bin end |
#bin_name ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def bin_name @bin_name end |
#bin_phone ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def bin_phone @bin_phone end |
#city ⇒ Object
Required Fields
12 13 14 |
# File 'lib/maxmind/request.rb', line 12 def city @city end |
#client_ip ⇒ Object
Required Fields
12 13 14 |
# File 'lib/maxmind/request.rb', line 12 def client_ip @client_ip end |
#country ⇒ Object
Required Fields
12 13 14 |
# File 'lib/maxmind/request.rb', line 12 def country @country end |
#cust_phone ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def cust_phone @cust_phone end |
#domain ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def domain @domain end |
#email ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def email @email end |
#forwarded_ip ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def forwarded_ip @forwarded_ip end |
#password ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def password @password end |
#postal ⇒ Object
Required Fields
12 13 14 |
# File 'lib/maxmind/request.rb', line 12 def postal @postal end |
#region ⇒ Object
Required Fields
12 13 14 |
# File 'lib/maxmind/request.rb', line 12 def region @region end |
#request_type ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def request_type @request_type end |
#session_id ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def session_id @session_id end |
#shipping_address ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def shipping_address @shipping_address end |
#shipping_city ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def shipping_city @shipping_city end |
#shipping_country ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def shipping_country @shipping_country end |
#shipping_postal ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def shipping_postal @shipping_postal end |
#shipping_region ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def shipping_region @shipping_region end |
#transaction_id ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def transaction_id @transaction_id end |
#user_agent ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def user_agent @user_agent end |
#username ⇒ Object
Optional Fields
15 16 17 |
# File 'lib/maxmind/request.rb', line 15 def username @username end |
Instance Method Details
#attributes=(attrs = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/maxmind/request.rb', line 25 def attributes=(attrs={}) attrs.each do |k, v| self.send("#{k}=", v) end end |
#process ⇒ Object
67 68 69 70 71 |
# File 'lib/maxmind/request.rb', line 67 def process process! rescue Exception => e false end |