module OiApi::LookupTables
Constants
- CATEGORIES
- DATA_FIELDS
Public Class Methods
category_ids()
click to toggle source
# File lib/oi_api/lookup_tables.rb, line 40 def self.category_ids CATEGORIES.values end
category_names()
click to toggle source
# File lib/oi_api/lookup_tables.rb, line 36 def self.category_names CATEGORIES.keys end
data_field_oi_name(field_name)
click to toggle source
# File lib/oi_api/lookup_tables.rb, line 65 def self.data_field_oi_name(field_name) DATA_FIELDS[field_name][:oi_name] end
data_fields()
click to toggle source
returns an array of hashes used when posting to OiApi
to create a new data transfer. The resulting structure looks like: [
{ email: '#{EM}' }, { first_name: '#{FN}' }, { last_name: '#{LN}' }, { zip: '#{PO}' }, { gender: '#{G}' }, ...
]
This tells OiApi
what attribute names to use when posting contacts back to our endpoint
# File lib/oi_api/lookup_tables.rb, line 59 def self.data_fields DATA_FIELDS.map do |data_point| { data_point[0] => data_point[1][:field_value] } end end