Class: RepsClient::Prospect
- Inherits:
-
Modelish::Base
- Object
- Modelish::Base
- RepsClient::Prospect
- Defined in:
- lib/reps_client/lead.rb
Overview
The person on whose behalf the lead was submitted; the prospective resident.
Instance Attribute Summary collapse
-
#address1 ⇒ String
The first line of the prospect’s street address.
-
#address2 ⇒ String
The second line of the prospect’s street address.
-
#city ⇒ String
The city for the prospect’s mailing address.
-
#country ⇒ String
The country for the prospect’s mailing address.
-
#email ⇒ String
The prospect’s email address.
-
#first_name ⇒ String
The prospect’s first name.
-
#include_in_emailings ⇒ true, false
True if prospect opts in to emailings, false otherwise (defaults to false).
-
#include_in_mailings ⇒ true, false
True if prospect opts in to mailings, false otherwise (defaults to false).
-
#last_name ⇒ String
The prospect’s last name.
-
#middle_name ⇒ String
The prospect’s middle name.
-
#nickname ⇒ String
The prospect’s nickname.
-
#notes ⇒ String
Notes on the prospect (maximum 250 characters).
-
#phone ⇒ String
The prospect’s phone number.
-
#phone_extension ⇒ String
The prospect’s phone extension.
-
#prefix ⇒ String
The prospect’s salutation (e.g. ‘Mr.’, ‘Ms.’, ‘Dr.’, etc.).
-
#state ⇒ String
The state code for the prospect’s mailing address.
-
#suffix ⇒ String
The prospect’s name suffix (e.g. ‘Jr.’, ‘M.D.’, etc.).
-
#zip_code ⇒ String
The zip code for the prospect’s mailing address.
Instance Method Summary collapse
-
#to_soap_hash ⇒ Object
Wrangle the model into a format that the service will accept.
Instance Attribute Details
#address1 ⇒ String
Returns the first line of the prospect’s street address.
200 |
# File 'lib/reps_client/lead.rb', line 200 property :address1, :type => String, :max_length => 100 |
#address2 ⇒ String
Returns the second line of the prospect’s street address.
204 |
# File 'lib/reps_client/lead.rb', line 204 property :address2, :type => String, :max_length => 100 |
#city ⇒ String
Returns the city for the prospect’s mailing address.
208 |
# File 'lib/reps_client/lead.rb', line 208 property :city, :type => String, :max_length => 50 |
#country ⇒ String
Returns the country for the prospect’s mailing address.
220 |
# File 'lib/reps_client/lead.rb', line 220 property :country, :type => String |
#email ⇒ String
Returns the prospect’s email address.
232 |
# File 'lib/reps_client/lead.rb', line 232 property :email, :type => String, :max_length => 100 |
#first_name ⇒ String
Returns the prospect’s first name.
179 |
# File 'lib/reps_client/lead.rb', line 179 property :first_name, :type => String, :max_length => 30 |
#include_in_emailings ⇒ true, false
Returns true if prospect opts in to emailings, false otherwise (defaults to false).
244 |
# File 'lib/reps_client/lead.rb', line 244 property :include_in_emailings, :default => false, :type => lambda { |v| !!v } |
#include_in_mailings ⇒ true, false
Returns true if prospect opts in to mailings, false otherwise (defaults to false).
240 |
# File 'lib/reps_client/lead.rb', line 240 property :include_in_mailings, :default => false, :type => lambda { |v| !!v } |
#last_name ⇒ String
Returns the prospect’s last name.
187 |
# File 'lib/reps_client/lead.rb', line 187 property :last_name, :type => String, :max_length => 30 |
#middle_name ⇒ String
Returns the prospect’s middle name.
183 |
# File 'lib/reps_client/lead.rb', line 183 property :middle_name, :type => String, :max_length => 30 |
#nickname ⇒ String
Returns the prospect’s nickname.
196 |
# File 'lib/reps_client/lead.rb', line 196 property :nickname, :type => String, :max_length => 30 |
#notes ⇒ String
Returns notes on the prospect (maximum 250 characters).
236 |
# File 'lib/reps_client/lead.rb', line 236 property :notes, :type => String |
#phone ⇒ String
Returns the prospect’s phone number.
224 |
# File 'lib/reps_client/lead.rb', line 224 property :phone, :type => String, :max_length => 20 |
#phone_extension ⇒ String
Returns the prospect’s phone extension.
228 |
# File 'lib/reps_client/lead.rb', line 228 property :phone_extension, :type => String, :max_length => 5 |
#prefix ⇒ String
Returns the prospect’s salutation (e.g. ‘Mr.’, ‘Ms.’, ‘Dr.’, etc.).
175 |
# File 'lib/reps_client/lead.rb', line 175 property :prefix, :type => String, :max_length => 30 |
#state ⇒ String
Returns the state code for the prospect’s mailing address.
212 |
# File 'lib/reps_client/lead.rb', line 212 property :state, :type => String, :max_length => 2 |
#suffix ⇒ String
Returns the prospect’s name suffix (e.g. ‘Jr.’, ‘M.D.’, etc.).
192 |
# File 'lib/reps_client/lead.rb', line 192 property :suffix, :type => String, :max_length => 30 |
#zip_code ⇒ String
Returns the zip code for the prospect’s mailing address.
216 |
# File 'lib/reps_client/lead.rb', line 216 property :zip_code, :type => String, :max_length => 10 |
Instance Method Details
#to_soap_hash ⇒ Object
Wrangle the model into a format that the service will accept
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/reps_client/lead.rb', line 248 def to_soap_hash hash = { :order! => [] } [:prefix, :first_name, :middle_name, :last_name, :suffix, :nickname, :address1, :address2, :city, :state, :zip_code, :country, :phone, :phone_extension, :email, :notes, :include_in_mailings, :include_in_emailings].each do |prop| val = self.send(prop) unless val.nil? key = prop.to_s.camelcase hash[key] = val hash[:order!] << key end end hash end |