Class: OpenSRS::Contact
- Inherits:
-
Struct
- Object
- Struct
- OpenSRS::Contact
- Defined in:
- lib/opensrs/contact.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#org_name ⇒ Object
Returns the value of attribute org_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#address1 ⇒ Object
Returns the value of attribute address1
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def address2 @address2 end |
#city ⇒ Object
Returns the value of attribute city
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def city @city end |
#country ⇒ Object
Returns the value of attribute country
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def country @country end |
#email ⇒ Object
Returns the value of attribute email
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def last_name @last_name end |
#org_name ⇒ Object
Returns the value of attribute org_name
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def org_name @org_name end |
#phone ⇒ Object
Returns the value of attribute phone
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state
2 3 4 |
# File 'lib/opensrs/contact.rb', line 2 def state @state end |
Class Method Details
.from_hash(hash) ⇒ Object
7 8 9 |
# File 'lib/opensrs/contact.rb', line 7 def self.from_hash(hash) new(**hash.transform_keys(&:to_sym).slice(*members)) end |
Instance Method Details
#to_api_hash ⇒ Object
11 12 13 |
# File 'lib/opensrs/contact.rb', line 11 def to_api_hash to_h.compact.transform_keys(&:to_s) end |