Class: NVX::SDS::ContactInfo
- Inherits:
-
Object
- Object
- NVX::SDS::ContactInfo
- Defined in:
- lib/nvx/sds/APIClasses/contactinfo.rb
Overview
The contact information is stored from the GetAccountInfo call.
Instance Method Summary collapse
- #address_line1 ⇒ Object
- #address_line2 ⇒ Object
- #city ⇒ Object
- #country ⇒ Object
- #email_address ⇒ Object
- #email_format ⇒ Object
- #first_name ⇒ Object
-
#initialize(doc) ⇒ ContactInfo
constructor
A new instance of ContactInfo.
- #last_name ⇒ Object
- #middle_initial ⇒ Object
- #phone_number ⇒ Object
- #postal_code ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize(doc) ⇒ ContactInfo
Returns a new instance of ContactInfo.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 9 def initialize(doc) @first_name = (text = doc.root.elements["//FirstName"].get_text and text.value) @last_name = (text = doc.root.elements["//LastName"].get_text and text.value) @middle_initial = (text = doc.root.elements["//MiddleInitial"].get_text and text.value) @phone_number = (text = doc.root.elements["//PhoneNumber"].get_text and text.value) @email_address = (text = doc.root.elements["//EmailAddress"].get_text and text.value) @email_format = (text = doc.root.elements["//EmailFormat"].get_text and text.value) @address_line1 = (text = doc.root.elements["//AddressLine1"].get_text and text.value) @address_line2 = (text = doc.root.elements["//AddressLine2"].get_text and text.value) @city = (text = doc.root.elements["//City"].get_text and text.value) @state = (text = doc.root.elements["//State"].get_text and text.value) @country = (text = doc.root.elements["//CountryID"].get_text and text.value) @postal_code = (text = doc.root.elements["//PostalCode"].get_text and text.value) end |
Instance Method Details
#address_line1 ⇒ Object
48 49 50 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 48 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
52 53 54 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 52 def address_line2 @address_line2 end |
#city ⇒ Object
56 57 58 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 56 def city @city end |
#country ⇒ Object
64 65 66 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 64 def country @country end |
#email_address ⇒ Object
40 41 42 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 40 def email_address @email_address end |
#email_format ⇒ Object
44 45 46 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 44 def email_format @email_format end |
#first_name ⇒ Object
24 25 26 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 24 def first_name @first_name end |
#last_name ⇒ Object
28 29 30 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 28 def last_name @last_name end |
#middle_initial ⇒ Object
32 33 34 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 32 def middle_initial @middle_initial end |
#phone_number ⇒ Object
36 37 38 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 36 def phone_number @phone_number end |
#postal_code ⇒ Object
68 69 70 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 68 def postal_code @postal_code end |
#state ⇒ Object
60 61 62 |
# File 'lib/nvx/sds/APIClasses/contactinfo.rb', line 60 def state @state end |