class SimpleShipping::Contact
Represents the contact information of the {SimpleShipping::Party party} who takes part in shipment process.
Attributes¶ ↑
-
person_name (optional if
company_name
is provided) -
company_name (optional if
person_name
is provided) -
phone_number
-
email (optional)
Attributes
company_name[RW]
email[RW]
person_name[RW]
phone_number[RW]
Public Instance Methods
validate_name()
click to toggle source
Validate presence of person or company name.
# File lib/simple_shipping/contact.rb, line 20 def validate_name errors.add(:abstract, "person_name or company_name must be present") unless (person_name || company_name) end