Class: ContactInfo
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ContactInfo
- Defined in:
- app/models/contact_info.rb
Instance Attribute Summary collapse
-
#phone_area_code ⇒ Object
Returns the value of attribute phone_area_code.
-
#phone_prefix ⇒ Object
Returns the value of attribute phone_prefix.
-
#phone_suffix ⇒ Object
Returns the value of attribute phone_suffix.
Instance Method Summary collapse
- #full_name ⇒ Object
- #require_billing_address? ⇒ Boolean
- #require_phone_number? ⇒ Boolean
- #to_hash ⇒ Object
Instance Attribute Details
#phone_area_code ⇒ Object
Returns the value of attribute phone_area_code.
30 31 32 |
# File 'app/models/contact_info.rb', line 30 def phone_area_code @phone_area_code end |
#phone_prefix ⇒ Object
Returns the value of attribute phone_prefix.
30 31 32 |
# File 'app/models/contact_info.rb', line 30 def phone_prefix @phone_prefix end |
#phone_suffix ⇒ Object
Returns the value of attribute phone_suffix.
30 31 32 |
# File 'app/models/contact_info.rb', line 30 def phone_suffix @phone_suffix end |
Instance Method Details
#full_name ⇒ Object
44 45 46 |
# File 'app/models/contact_info.rb', line 44 def full_name "#{first_name} #{last_name}" end |
#require_billing_address? ⇒ Boolean
61 62 63 |
# File 'app/models/contact_info.rb', line 61 def require_billing_address? Saasaparilla::CONFIG["require_billing_address"] == true end |
#require_phone_number? ⇒ Boolean
65 66 67 |
# File 'app/models/contact_info.rb', line 65 def require_phone_number? Saasaparilla::CONFIG["require_phone_number"] == true end |
#to_hash ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'app/models/contact_info.rb', line 48 def to_hash return {:first_name => first_name, :last_name => last_name, :address => address, :company => company, :city => city, :state => state, :zip => zip, :country => "US", :phone_number => phone_number} end |