class SimpleShipping::Contact

Represents the contact information of the {SimpleShipping::Party party} who takes part in shipment process.

Attributes

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