Class: Nylas::NeuralSignatureContact
- Inherits:
-
Object
- Object
- Nylas::NeuralSignatureContact
- Includes:
- Model::Attributable
- Defined in:
- lib/nylas/neural_signature_contact.rb
Overview
Structure to represent the Neural API's Signature Extraction Contact object
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#to_contact_object ⇒ Object
Creates a Nylas contact object compatible with the contact endpoints.
Methods included from Model::Attributable
#attributes, included, #initialize, #to_h
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
14 15 16 |
# File 'lib/nylas/neural_signature_contact.rb', line 14 def api @api end |
Instance Method Details
#to_contact_object ⇒ Object
Creates a Nylas contact object compatible with the contact endpoints. Please note if multiple names or multiple job titles were parsed only the first set are used.
19 20 21 22 23 |
# File 'lib/nylas/neural_signature_contact.rb', line 19 def to_contact_object contact = merge_multiple_hashes([convert_names, convert_emails, convert_phone_numbers, convert_links]) contact[:job_title] = job_titles[0] unless job_titles.nil? Contact.new(**contact.merge(api: api)) end |