creditsafe 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +17 -17
  3. data/.gitignore +4 -3
  4. data/.rspec +1 -1
  5. data/.rubocop.yml +14 -11
  6. data/.ruby-version +1 -1
  7. data/CHANGELOG.md +57 -53
  8. data/Gemfile +5 -5
  9. data/LICENSE.txt +22 -22
  10. data/README.md +175 -175
  11. data/creditsafe.gemspec +34 -35
  12. data/data/creditsafe-live.xml +342 -342
  13. data/data/creditsafe-test.xml +342 -342
  14. data/lib/creditsafe.rb +4 -4
  15. data/lib/creditsafe/client.rb +165 -165
  16. data/lib/creditsafe/constants.rb +49 -49
  17. data/lib/creditsafe/errors.rb +17 -17
  18. data/lib/creditsafe/match_type.rb +115 -115
  19. data/lib/creditsafe/messages.rb +98 -98
  20. data/lib/creditsafe/namespace.rb +20 -20
  21. data/lib/creditsafe/request/company_report.rb +42 -42
  22. data/lib/creditsafe/request/find_company.rb +120 -120
  23. data/lib/creditsafe/version.rb +5 -5
  24. data/spec/creditsafe/client_spec.rb +431 -431
  25. data/spec/creditsafe/messages_spec.rb +76 -76
  26. data/spec/fixtures/company-report-not-found.xml +13 -13
  27. data/spec/fixtures/company-report-request.xml +1 -1
  28. data/spec/fixtures/company-report-successful.xml +582 -582
  29. data/spec/fixtures/error-fault.xml +8 -8
  30. data/spec/fixtures/error-invalid-credentials.html +31 -31
  31. data/spec/fixtures/find-companies-error-no-text.xml +11 -11
  32. data/spec/fixtures/find-companies-error.xml +11 -11
  33. data/spec/fixtures/find-companies-none-found.xml +13 -13
  34. data/spec/fixtures/find-companies-request.xml +1 -1
  35. data/spec/fixtures/find-companies-successful-multi.xml +493 -493
  36. data/spec/fixtures/find-companies-successful.xml +29 -29
  37. data/spec/spec_helper.rb +14 -14
  38. metadata +39 -40
  39. data/Gemfile.lock +0 -129
@@ -1,29 +1,29 @@
1
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
2
- <s:Body>
3
- <FindCompaniesResponse xmlns="http://www.creditsafe.com/globaldata/operations">
4
- <FindCompaniesResult xmlns:q1="http://www.creditsafe.com/globaldata/datatypes">
5
- <q1:Messages>
6
- <q1:Message Type="Information" Code="20103">Service access contract expires on 2015-07-07 00:00 (UTC). Please contact your account manager regarding access extension.</q1:Message>
7
- </q1:Messages>
8
- <q1:Companies>
9
- <q1:Company DateOfLatestAccounts="2014-01-31T00:00:00Z" OnlineReports="true" Monitoring="false" Country="GB" Id="GB003/0/07495895">
10
- <q1:Name>GOCARDLESS LTD</q1:Name>
11
- <q1:Type>Ltd</q1:Type>
12
- <q1:Status>Active</q1:Status>
13
- <q1:RegistrationNumber>07495895</q1:RegistrationNumber>
14
- <q1:Address>
15
- <q1:SimpleValue>338-346, GOSWELL, LONDON</q1:SimpleValue>
16
- <q1:PostalCode>EC1V7LQ</q1:PostalCode>
17
- </q1:Address>
18
- <q1:AvailableReportTypes>
19
- <q1:AvailableReportType>Full</q1:AvailableReportType>
20
- </q1:AvailableReportTypes>
21
- <q1:AvailableLanguages>
22
- <q1:AvailableLanguage>EN</q1:AvailableLanguage>
23
- </q1:AvailableLanguages>
24
- </q1:Company>
25
- </q1:Companies>
26
- </FindCompaniesResult>
27
- </FindCompaniesResponse>
28
- </s:Body>
29
- </s:Envelope>
1
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <s:Body>
3
+ <FindCompaniesResponse xmlns="http://www.creditsafe.com/globaldata/operations">
4
+ <FindCompaniesResult xmlns:q1="http://www.creditsafe.com/globaldata/datatypes">
5
+ <q1:Messages>
6
+ <q1:Message Type="Information" Code="20103">Service access contract expires on 2015-07-07 00:00 (UTC). Please contact your account manager regarding access extension.</q1:Message>
7
+ </q1:Messages>
8
+ <q1:Companies>
9
+ <q1:Company DateOfLatestAccounts="2014-01-31T00:00:00Z" OnlineReports="true" Monitoring="false" Country="GB" Id="GB003/0/07495895">
10
+ <q1:Name>GOCARDLESS LTD</q1:Name>
11
+ <q1:Type>Ltd</q1:Type>
12
+ <q1:Status>Active</q1:Status>
13
+ <q1:RegistrationNumber>07495895</q1:RegistrationNumber>
14
+ <q1:Address>
15
+ <q1:SimpleValue>338-346, GOSWELL, LONDON</q1:SimpleValue>
16
+ <q1:PostalCode>EC1V7LQ</q1:PostalCode>
17
+ </q1:Address>
18
+ <q1:AvailableReportTypes>
19
+ <q1:AvailableReportType>Full</q1:AvailableReportType>
20
+ </q1:AvailableReportTypes>
21
+ <q1:AvailableLanguages>
22
+ <q1:AvailableLanguage>EN</q1:AvailableLanguage>
23
+ </q1:AvailableLanguages>
24
+ </q1:Company>
25
+ </q1:Companies>
26
+ </FindCompaniesResult>
27
+ </FindCompaniesResponse>
28
+ </s:Body>
29
+ </s:Envelope>
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- require "webmock/rspec"
4
- require "nokogiri"
5
- require "rspec/its"
6
- require "compare-xml"
7
-
8
- def load_fixture(name)
9
- File.read(File.join(File.dirname(__FILE__), "fixtures", name))
10
- end
11
-
12
- def load_xml_fixture(name)
13
- Nokogiri::XML(File.open(File.join(File.dirname(__FILE__), "fixtures", name)))
14
- end
1
+ # frozen_string_literal: true
2
+
3
+ require "webmock/rspec"
4
+ require "nokogiri"
5
+ require "rspec/its"
6
+ require "compare-xml"
7
+
8
+ def load_fixture(name)
9
+ File.read(File.join(File.dirname(__FILE__), "fixtures", name))
10
+ end
11
+
12
+ def load_xml_fixture(name)
13
+ Nokogiri::XML(File.open(File.join(File.dirname(__FILE__), "fixtures", name)))
14
+ end
metadata CHANGED
@@ -1,197 +1,197 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: creditsafe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: '5.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: excon
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.45'
33
+ version: '0.71'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.45'
40
+ version: '0.71'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: savon
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.8'
47
+ version: '2.12'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.8'
54
+ version: '2.12'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: compare-xml
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.3'
61
+ version: '0.66'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.3'
68
+ version: '0.66'
69
69
  - !ruby/object:Gem::Dependency
70
- name: compare-xml
70
+ name: gc_ruboconfig
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.5'
75
+ version: 2.3.14
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.5'
82
+ version: 2.3.14
83
83
  - !ruby/object:Gem::Dependency
84
- name: gc_ruboconfig
84
+ name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '2.3'
89
+ version: 0.12.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '2.3'
96
+ version: 0.12.2
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.11'
103
+ version: '3.8'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.11'
110
+ version: '3.8'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rspec
112
+ name: rspec-its
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.1'
117
+ version: '1.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.1'
124
+ version: '1.3'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec-its
126
+ name: rspec_junit_formatter
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.2'
131
+ version: 0.4.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.2'
138
+ version: 0.4.1
139
139
  - !ruby/object:Gem::Dependency
140
- name: rspec_junit_formatter
140
+ name: rubocop
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.3'
145
+ version: 0.61.1
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.3'
152
+ version: 0.61.1
153
153
  - !ruby/object:Gem::Dependency
154
- name: rubocop
154
+ name: rubocop-rspec
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0.52'
159
+ version: '1.35'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0.52'
166
+ version: '1.35'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: timecop
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0.8'
173
+ version: 0.9.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0.8'
180
+ version: 0.9.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: webmock
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '3.3'
187
+ version: 3.7.2
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '3.3'
194
+ version: 3.7.2
195
195
  description:
196
196
  email:
197
197
  - engineering@gocardless.com
@@ -206,7 +206,6 @@ files:
206
206
  - ".ruby-version"
207
207
  - CHANGELOG.md
208
208
  - Gemfile
209
- - Gemfile.lock
210
209
  - LICENSE.txt
211
210
  - README.md
212
211
  - creditsafe.gemspec
@@ -256,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
255
  version: '0'
257
256
  requirements: []
258
257
  rubyforge_project:
259
- rubygems_version: 2.7.8
258
+ rubygems_version: 2.7.6.2
260
259
  signing_key:
261
260
  specification_version: 4
262
261
  summary: Ruby client for the Creditsafe SOAP API
@@ -1,129 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- creditsafe (0.6.2)
5
- activesupport (>= 4.2.0)
6
- excon (~> 0.45)
7
- savon (~> 2.8)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activesupport (5.2.2)
13
- concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- addressable (2.5.2)
18
- public_suffix (>= 2.0.2, < 4.0)
19
- akami (1.3.1)
20
- gyoku (>= 0.4.0)
21
- nokogiri
22
- ast (2.4.0)
23
- builder (3.2.3)
24
- coderay (1.1.2)
25
- compare-xml (0.66)
26
- nokogiri (~> 1.8)
27
- concurrent-ruby (1.1.3)
28
- crack (0.4.3)
29
- safe_yaml (~> 1.0.0)
30
- diff-lcs (1.3)
31
- excon (0.62.0)
32
- gc_ruboconfig (2.3.14)
33
- rubocop (>= 0.57, < 0.62)
34
- rubocop-rspec (~> 1.25)
35
- gyoku (1.3.1)
36
- builder (>= 2.1.2)
37
- hashdiff (0.3.7)
38
- httpi (2.4.4)
39
- rack
40
- socksify
41
- i18n (1.1.1)
42
- concurrent-ruby (~> 1.0)
43
- jaro_winkler (1.5.1)
44
- method_source (0.9.2)
45
- mini_portile2 (2.3.0)
46
- minitest (5.11.3)
47
- nokogiri (1.8.5)
48
- mini_portile2 (~> 2.3.0)
49
- nori (2.6.0)
50
- parallel (1.12.1)
51
- parser (2.5.3.0)
52
- ast (~> 2.4.0)
53
- powerpack (0.1.2)
54
- pry (0.12.2)
55
- coderay (~> 1.1.0)
56
- method_source (~> 0.9.0)
57
- public_suffix (3.0.3)
58
- rack (2.0.6)
59
- rainbow (3.0.0)
60
- rspec (3.8.0)
61
- rspec-core (~> 3.8.0)
62
- rspec-expectations (~> 3.8.0)
63
- rspec-mocks (~> 3.8.0)
64
- rspec-core (3.8.0)
65
- rspec-support (~> 3.8.0)
66
- rspec-expectations (3.8.0)
67
- diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.8.0)
69
- rspec-its (1.2.0)
70
- rspec-core (>= 3.0.0)
71
- rspec-expectations (>= 3.0.0)
72
- rspec-mocks (3.8.0)
73
- diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.8.0)
75
- rspec-support (3.8.0)
76
- rspec_junit_formatter (0.4.1)
77
- rspec-core (>= 2, < 4, != 2.12.0)
78
- rubocop (0.60.0)
79
- jaro_winkler (~> 1.5.1)
80
- parallel (~> 1.10)
81
- parser (>= 2.5, != 2.5.1.1)
82
- powerpack (~> 0.1)
83
- rainbow (>= 2.2.2, < 4.0)
84
- ruby-progressbar (~> 1.7)
85
- unicode-display_width (~> 1.4.0)
86
- rubocop-rspec (1.30.1)
87
- rubocop (>= 0.60.0)
88
- ruby-progressbar (1.10.0)
89
- safe_yaml (1.0.4)
90
- savon (2.12.0)
91
- akami (~> 1.2)
92
- builder (>= 2.1.2)
93
- gyoku (~> 1.2)
94
- httpi (~> 2.3)
95
- nokogiri (>= 1.8.1)
96
- nori (~> 2.4)
97
- wasabi (~> 3.4)
98
- socksify (1.7.1)
99
- thread_safe (0.3.6)
100
- timecop (0.9.1)
101
- tzinfo (1.2.5)
102
- thread_safe (~> 0.1)
103
- unicode-display_width (1.4.1)
104
- wasabi (3.5.0)
105
- httpi (~> 2.0)
106
- nokogiri (>= 1.4.2)
107
- webmock (3.5.1)
108
- addressable (>= 2.3.6)
109
- crack (>= 0.3.2)
110
- hashdiff
111
-
112
- PLATFORMS
113
- ruby
114
-
115
- DEPENDENCIES
116
- bundler (~> 1.3)
117
- compare-xml (~> 0.5)
118
- creditsafe!
119
- gc_ruboconfig (~> 2.3)
120
- pry (~> 0.11)
121
- rspec (~> 3.1)
122
- rspec-its (~> 1.2)
123
- rspec_junit_formatter (~> 0.3)
124
- rubocop (~> 0.52)
125
- timecop (~> 0.8)
126
- webmock (~> 3.3)
127
-
128
- BUNDLED WITH
129
- 1.16.6