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.



30
31
32
# File 'app/models/contact_info.rb', line 30

def phone_area_code
  @phone_area_code
end

#phone_prefixObject

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_suffixObject

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_nameObject



44
45
46
# File 'app/models/contact_info.rb', line 44

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

#require_billing_address?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


65
66
67
# File 'app/models/contact_info.rb', line 65

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

#to_hashObject



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