class Qualtrics::RecipientImportRow

Attributes

recipient[R]

Public Class Methods

fields() click to toggle source
# File lib/qualtrics/recipient_import_row.rb, line 27
def fields
  [
    'FirstName',
    'LastName',
    'Email',
    'EmbeddedData',
    'ExternalData',
    'Unsubscribed',
    'Language'
  ]
end
new(recipient) click to toggle source
# File lib/qualtrics/recipient_import_row.rb, line 5
def initialize(recipient)
  @recipient = recipient
end

Public Instance Methods

field_map() click to toggle source
# File lib/qualtrics/recipient_import_row.rb, line 15
def field_map
  {
    'FirstName'    => recipient.first_name,
    'LastName'     => recipient.last_name,
    'Email'         => recipient.email,
    'EmbeddedData' => recipient.embedded_data,
    'ExternalData' => recipient.external_data,
    'Unsubscribed'  => recipient.unsubscribed,
    'Language'      => recipient.language
  }
end
to_a() click to toggle source
# File lib/qualtrics/recipient_import_row.rb, line 9
def to_a
  self.class.fields.map do |field|
    field_map[field]
  end
end