Class: ContactInfo

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/contact_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#phone_area_codeObject

Returns the value of attribute phone_area_code.



28
29
30
# File 'app/models/contact_info.rb', line 28

def phone_area_code
  @phone_area_code
end

#phone_prefixObject

Returns the value of attribute phone_prefix.



28
29
30
# File 'app/models/contact_info.rb', line 28

def phone_prefix
  @phone_prefix
end

#phone_suffixObject

Returns the value of attribute phone_suffix.



28
29
30
# File 'app/models/contact_info.rb', line 28

def phone_suffix
  @phone_suffix
end

Instance Method Details

#full_nameObject



42
43
44
# File 'app/models/contact_info.rb', line 42

def full_name
  "#{first_name} #{last_name}"
end

#require_billing_address?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'app/models/contact_info.rb', line 59

def require_billing_address?
  Saasaparilla::CONFIG["require_billing_address"] == true
end

#require_phone_number?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'app/models/contact_info.rb', line 63

def require_phone_number?
  Saasaparilla::CONFIG["require_phone_number"] == true
end

#to_hashObject



46
47
48
49
50
51
52
53
54
55
56
# File 'app/models/contact_info.rb', line 46

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