Class: QuotesHelper::QuoteRecipientPerson

Inherits:
Data
  • Object
show all
Defined in:
app/helpers/quotes_helper.rb

Overview

A person who could receive / manage the online quote: the customer and
each of its contacts, with their email + whether they have an online
account (so they could log in). Only people who can log in and have an
email address are selectable as recipients on the transmit screen.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#can_loginObject (readonly)

Returns the value of attribute can_login

Returns:

  • (Object)

    the current value of can_login



186
187
188
# File 'app/helpers/quotes_helper.rb', line 186

def 
  @can_login
end

#email_contact_pointObject (readonly)

Returns the value of attribute email_contact_point

Returns:

  • (Object)

    the current value of email_contact_point



186
187
188
# File 'app/helpers/quotes_helper.rb', line 186

def email_contact_point
  @email_contact_point
end

#partyObject (readonly)

Returns the value of attribute party

Returns:

  • (Object)

    the current value of party



186
187
188
# File 'app/helpers/quotes_helper.rb', line 186

def party
  @party
end

#preselectedObject (readonly)

Returns the value of attribute preselected

Returns:

  • (Object)

    the current value of preselected



186
187
188
# File 'app/helpers/quotes_helper.rb', line 186

def preselected
  @preselected
end

#roleObject (readonly)

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



186
187
188
# File 'app/helpers/quotes_helper.rb', line 186

def role
  @role
end

Instance Method Details

#emailObject



188
189
190
191
# File 'app/helpers/quotes_helper.rb', line 188

def email = email_contact_point&.detail
# Selectable as an email recipient = has an email on file. Login is no
# longer required — the online quote is read-only, so a recipient just
# needs a mailbox to receive the link, not an account to manage it.

#nameObject



187
# File 'app/helpers/quotes_helper.rb', line 187

def name = party.full_name

#selectable?Boolean

Selectable as an email recipient = has an email on file. Login is no
longer required — the online quote is read-only, so a recipient just
needs a mailbox to receive the link, not an account to manage it.

Returns:

  • (Boolean)


192
# File 'app/helpers/quotes_helper.rb', line 192

def selectable? = email_contact_point.present?