ofac_sdn 0.1.3 → 0.1.4

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: 9c31fb3d0a29b46df3e7de5eba3138ede3f7067f
4
- data.tar.gz: 133833269510a2d491442872383ef879a997b5b5
3
+ metadata.gz: 7ff48de7b6d356ef11df6367b274cbc17d04a33e
4
+ data.tar.gz: 5693da28ec320acd7f3794c3114618990078b617
5
5
  SHA512:
6
- metadata.gz: 9e075572a721e827f26e5590065903a348be224b94e34ae91140a0291936bbf0168ca69c02f24b54ff09e8f9bae54c3ea1c7bd406c4e1f5675f6193a104f4394
7
- data.tar.gz: 466ad0b7858a560944e983a0dd3878b64e1fc9f3a986fc8d597bbeb273078c0b93ea1f3bed2066fe1df535a8640f48310e5c5ba02a6a36746031f2d37e3802bf
6
+ metadata.gz: bfc83a791a238ac143ed0658bcf1bb59d686262832f9c92657c8c81199046febb2d71788c2f2f53989894d40334765be49439255ad741de270ef36441e860bcf
7
+ data.tar.gz: 2456e38244b3d04a7c01b5c7dac10cb90226bc17b341d4d8a3f0802932cb2a685fa4238911c00b4086c2045eb057d321c728f9134af891bc3fe8307dbc8a88ce
data/README.md CHANGED
@@ -40,6 +40,62 @@ count = OfacSdn::Read.record_count
40
40
 
41
41
  * The SDN list is frequently updated. There is no predetermined timetable, but rather names are added or removed as necessary and appropriate.
42
42
 
43
+ ## Sample Conversion
44
+ ### Input: sdn.xml
45
+
46
+ ```
47
+ <sdnList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/sdnList.xsd">
48
+ <publshInformation>
49
+ <Publish_Date>04/30/2018</Publish_Date>
50
+ <Record_Count>6305</Record_Count>
51
+ </publshInformation>
52
+ <sdnEntry>
53
+ <uid>36</uid>
54
+ <lastName>AEROCARIBBEAN AIRLINES</lastName>
55
+ <sdnType>Entity</sdnType>
56
+ <programList>
57
+ <program>CUBA</program>
58
+ </programList>
59
+ <akaList>
60
+ <aka>
61
+ <uid>12</uid>
62
+ <type>a.k.a.</type>
63
+ <category>strong</category>
64
+ <lastName>AERO-CARIBBEAN</lastName>
65
+ </aka>
66
+ </akaList>
67
+ <addressList>
68
+ <address>
69
+ <uid>25</uid>
70
+ <city>Havana</city>
71
+ <country>Cuba</country>
72
+ </address>
73
+ </addressList>
74
+ </sdnEntry>
75
+ </sdnList>
76
+ ```
77
+
78
+ ### Output: sdn_hash
79
+
80
+ <pre>
81
+ {
82
+ sdnEntry: [
83
+ {<b>id: 36</b>, lastName: "AEROCARIBBEAN AIRLINES", sdnType: "Entity"}
84
+ ],
85
+ programList: [
86
+ {program: "CUBA", <b>sdn_id: 36</b>}
87
+ ],
88
+ akaList: [
89
+ {id: 12, <b>sdn_id: 36</b>, type: "a.k.a.", category: "strong", lastName: "AERO-CARIBBEAN"}
90
+ ],
91
+ addressList: [
92
+ {id: 25, <b>sdn_id: 36</b>, city: "Havana", country: "Cuba"}
93
+ ]
94
+ }
95
+ </pre>
96
+
97
+ *Note: Associations for the `sdn_entry` are done for you. `id: 36` shows up as `sdn_id: 36` on all related lists.*
98
+
43
99
  ## Development
44
100
 
45
101
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/ofac_sdn.rb CHANGED
@@ -7,7 +7,7 @@ require 'ofac_sdn/version'
7
7
  require 'ofac_sdn/xsd'
8
8
 
9
9
  module OfacSdn
10
- # OfacSdn::Read.new creates the SDN Hash document
10
+ # OfacSdn::Read.call creates the SDN Ruby Hash
11
11
  class Read
12
12
  class << self
13
13
  def call
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OfacSdn
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofac_sdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryam Noguera
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-29 00:00:00.000000000 Z
11
+ date: 2018-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler