oi-api-ruby 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1094fa30f14e4b926e704176430e89a48aadcd7
4
- data.tar.gz: 5387b08c7d62d1c79cb8f1ad5ef8b9386bdad9e4
3
+ metadata.gz: c36e45af3dc1c759f8202bb2fab596df90caa1ae
4
+ data.tar.gz: 55b735339c5b9b1f4eb8f15e5fa529ddf618f82a
5
5
  SHA512:
6
- metadata.gz: 5fe4276fc9dd95669e6989f55738d59df2840ee7d349d9e674b4f63038d266672cf6ff7f670c2f05e9ad0bfce09a3e8894086c89dc181207db68f5521fc16bc1
7
- data.tar.gz: 78a78bdb819ab55831814c293624dd11181b490da8ab750ae22ae0bcb685a5a707629c5b71584bf752b692ad957a7b5d23a13dd9c3b100a2e0916376fa2b5425
6
+ metadata.gz: 43249fdf390923b6709e5cde614639c0798ce7dff813ec976d53e8c3fd12ee2db519f501634ac6ddffff9b6ca5a2979f23b47b91f280b7dedc9070fe53e378cc
7
+ data.tar.gz: a535828d97a0efa736460ac269e480c3cd8569e7b9cbdaffa3d1644ff562639dc6195d474f03e954dd533c0e035eb48c41af5f9993903b327331927a76072d90
@@ -19,18 +19,18 @@ module OiApi
19
19
  }
20
20
 
21
21
  DATA_FIELDS = {
22
- first_name: { value: 'FN', field_value: '#{FN}', description: 'First Name' },
23
- last_name: { value: 'LN', field_value: '#{LN}', description: 'Last Name' },
24
- email: { value: 'EM', field_value: '#{EM}', description: 'Email' },
25
- street_address: { value: 'AD1', field_value: '#{AD1}', description: 'Street Address' },
26
- city: { value: 'CI', field_value: '#{CI}', description: 'City' },
27
- state: { value: 'ST', field_value: '#{ST}', description: 'State' },
28
- postal_code: { value: 'PO', field_value: '#{PO}', description: 'Postal Code' },
29
- country: { value: 'CO', field_value: '#{CO}', description: 'Country' },
30
- home_phone: { value: 'HP', field_value: '#{HP}', description: 'Home Phone Number' },
31
- mobile_phone: { value: 'MP', field_value: '#{MP}', description: 'Mobile Phone Number' },
32
- gender: { value: 'G', field_value: '#{G}', description: 'Gender' },
33
- date_of_birth: { value: 'DOB', field_value: '#{DOB}', description: 'Date of Birth' }
22
+ first_name: { oi_name: 'FN', field_value: '#{FN}', description: 'First Name' },
23
+ last_name: { oi_name: 'LN', field_value: '#{LN}', description: 'Last Name' },
24
+ email: { oi_name: 'EM', field_value: '#{EM}', description: 'Email' },
25
+ street_address: { oi_name: 'AD1', field_value: '#{AD1}', description: 'Street Address' },
26
+ city: { oi_name: 'CI', field_value: '#{CI}', description: 'City' },
27
+ state: { oi_name: 'ST', field_value: '#{ST}', description: 'State' },
28
+ postal_code: { oi_name: 'PO', field_value: '#{PO}', description: 'Postal Code' },
29
+ country: { oi_name: 'CO', field_value: '#{CO}', description: 'Country' },
30
+ home_phone: { oi_name: 'HP', field_value: '#{HP}', description: 'Home Phone Number' },
31
+ mobile_phone: { oi_name: 'MP', field_value: '#{MP}', description: 'Mobile Phone Number' },
32
+ gender: { oi_name: 'G', field_value: '#{G}', description: 'Gender' },
33
+ date_of_birth: { oi_name: 'DOB', field_value: '#{DOB}', description: 'Date of Birth' }
34
34
  }
35
35
 
36
36
  def self.category_names
@@ -57,11 +57,15 @@ module OiApi
57
57
  # contacts back to our endpoint
58
58
  #
59
59
  def self.data_fields
60
- OiApi::LookupTables::DATA_FIELDS.map do |data_point|
60
+ DATA_FIELDS.map do |data_point|
61
61
  { data_point[0] => data_point[1][:field_value] }
62
62
  end
63
63
  end
64
64
 
65
+ def self.data_field_oi_name(field_name)
66
+ DATA_FIELDS[field_name][:oi_name]
67
+ end
68
+
65
69
  end
66
70
 
67
71
  end
@@ -1,3 +1,3 @@
1
1
  module OiApi
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
@@ -21,6 +21,10 @@ RSpec.describe OiApi::LookupTables do
21
21
  ])
22
22
  end
23
23
 
24
+ it 'returns the OI name for a given data point' do
25
+ expect(OiApi::LookupTables.data_field_oi_name(:first_name)).to eql('FN')
26
+ end
27
+
24
28
  end
25
29
 
26
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oi-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrod Spillers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler