SmeeView.Aspects.Contact (SmeeView v0.1.0) View Source
Represents and processes <ContactPerson> elements in entity metadata as Aspect structs.
The functions in this module are intended to be applied to individual Aspect structs - for extracting and processing collections of these records please use the matching View module.
Link to this section Summary
Functions
Returns the company name, if present (it probably isn't!)
Returns the suggested display name of a contact, derived from given name, surname and company.
Returns the email address as a bare email address (without name, not a URL)
Returns the contact's email address as a URL (as it's stored in the metadata, probably)
Returns the contact's givenname, if present
Is this aspect relevant to the IdP role?
Returns the email address and name in RFC5322 name-addr format (name address@domain)
Returns the phone number of the contact, if present.
Returns the phone number of the contact (or nil) as a URL, as it probably isn't stored in the metadata
Returns the associated role for this aspect: :sp, :idp or :all
Is this aspect relevant to the SP role?
Returns the surname of the contact, if present.
Returns the contact type (technical, support, administrative, billing, or other)
Link to this section Types
Specs
Link to this section Functions
Specs
Returns the company name, if present (it probably isn't!)
Contact.company(aspect)
# => "Unseen University"
Specs
Returns the suggested display name of a contact, derived from given name, surname and company.
Contact.displayname(contact)
# => "Ponder Stibbons (Unseen University)"
Specs
Returns the email address as a bare email address (without name, not a URL)
Contact.email(contact)
# => "ponders@unseen.edu"
Specs
Returns the contact's email address as a URL (as it's stored in the metadata, probably)
Contact.email_url(contact)
# => "mailto:ponders@unseen.edu"
Specs
Returns the contact's givenname, if present
Contact.givenname(contact)
# => "Ponder"
Specs
Is this aspect relevant to the IdP role?
Will return true
if the aspect has been derived from an IdP role, or is applicable to all roles.
Contact.idp?(aspect)
# => true
Specs
Returns the email address and name in RFC5322 name-addr format (name address@domain)
Contact.name_addr(contact)
# => "Ponder Stibbons <ponders@unseen.edu>"
Specs
Returns the phone number of the contact, if present.
Contact.phone(contact)
# => "01632960808"
Specs
Returns the phone number of the contact (or nil) as a URL, as it probably isn't stored in the metadata
Contact.phone_url(contact)
# => "tel:01632960808"
Specs
Returns the associated role for this aspect: :sp, :idp or :all
The role type is useful when handling a mixed list of aspects that may be specific to certain roles of an entity.
Contact.role(aspect)
# => :idp
Specs
Is this aspect relevant to the SP role?
Will return true
if the aspect has been derived from an SP role, or is applicable to all roles.
Contact.sp?(aspect)
# => false
Specs
Returns the surname of the contact, if present.
Contact.surname(contact)
# => "Stibbons"
Specs
Returns the contact type (technical, support, administrative, billing, or other)
Contact.type(contact)
# => "administrative"