creditsafe 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +66 -17
  3. data/.github/dependabot.yml +17 -0
  4. data/.gitignore +4 -2
  5. data/.rspec +1 -1
  6. data/.rubocop.yml +18 -11
  7. data/.ruby-version +1 -1
  8. data/CHANGELOG.md +64 -45
  9. data/Gemfile +5 -5
  10. data/LICENSE.txt +22 -22
  11. data/README.md +175 -175
  12. data/creditsafe.gemspec +35 -35
  13. data/data/creditsafe-live.xml +342 -342
  14. data/data/creditsafe-test.xml +342 -342
  15. data/lib/creditsafe/client.rb +165 -158
  16. data/lib/creditsafe/{constants.rb → country.rb} +49 -49
  17. data/lib/creditsafe/errors.rb +23 -16
  18. data/lib/creditsafe/match_type.rb +115 -115
  19. data/lib/creditsafe/messages.rb +98 -97
  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 +118 -120
  23. data/lib/creditsafe/version.rb +5 -5
  24. data/lib/creditsafe.rb +4 -4
  25. data/spec/creditsafe/client_spec.rb +431 -423
  26. data/spec/creditsafe/messages_spec.rb +76 -76
  27. data/spec/fixtures/company-report-not-found.xml +13 -13
  28. data/spec/fixtures/company-report-request.xml +1 -1
  29. data/spec/fixtures/company-report-successful.xml +582 -582
  30. data/spec/fixtures/error-fault.xml +8 -8
  31. data/spec/fixtures/error-invalid-credentials.html +31 -31
  32. data/spec/fixtures/find-companies-error-no-text.xml +11 -11
  33. data/spec/fixtures/find-companies-error.xml +11 -11
  34. data/spec/fixtures/find-companies-none-found.xml +13 -13
  35. data/spec/fixtures/find-companies-request.xml +1 -1
  36. data/spec/fixtures/find-companies-successful-multi.xml +493 -493
  37. data/spec/fixtures/find-companies-successful.xml +29 -29
  38. data/spec/spec_helper.rb +14 -14
  39. metadata +46 -46
  40. data/Gemfile.lock +0 -129
@@ -1,8 +1,8 @@
1
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
2
- <s:Body>
3
- <s:Fault>
4
- <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
5
- <faultstring xml:lang="en-GB">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.</faultstring>
6
- </s:Fault>
7
- </s:Body>
8
- </s:Envelope>
1
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <s:Body>
3
+ <s:Fault>
4
+ <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
5
+ <faultstring xml:lang="en-GB">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.</faultstring>
6
+ </s:Fault>
7
+ </s:Body>
8
+ </s:Envelope>
@@ -1,31 +1,31 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
5
- <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
6
- <style type="text/css">
7
- <!--body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
8
- fieldset{padding:0 15px 10px 15px;}
9
- h1{font-size:2.4em;margin:0;color:#FFF;}
10
- h2{font-size:1.7em;margin:0;color:#CC0000;}
11
- h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
12
- #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
13
- background-color:#555555;}
14
- #content{margin:0 0 0 2%;position:relative;}
15
- .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}-->
16
- </style>
17
- </head>
18
- <body>
19
- <div id="header">
20
- <h1>Server Error</h1>
21
- </div>
22
- <div id="content">
23
- <div class="content-container">
24
- <fieldset>
25
- <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
26
- <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
27
- </fieldset>
28
- </div>
29
- </div>
30
- </body>
31
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
5
+ <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
6
+ <style type="text/css">
7
+ <!--body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
8
+ fieldset{padding:0 15px 10px 15px;}
9
+ h1{font-size:2.4em;margin:0;color:#FFF;}
10
+ h2{font-size:1.7em;margin:0;color:#CC0000;}
11
+ h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
12
+ #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
13
+ background-color:#555555;}
14
+ #content{margin:0 0 0 2%;position:relative;}
15
+ .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}-->
16
+ </style>
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <h1>Server Error</h1>
21
+ </div>
22
+ <div id="content">
23
+ <div class="content-container">
24
+ <fieldset>
25
+ <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
26
+ <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
27
+ </fieldset>
28
+ </div>
29
+ </div>
30
+ </body>
31
+ </html>
@@ -1,11 +1,11 @@
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="Error" Code="30102" />
7
- </q1:Messages>
8
- </FindCompaniesResult>
9
- </FindCompaniesResponse>
10
- </s:Body>
11
- </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="Error" Code="30102" />
7
+ </q1:Messages>
8
+ </FindCompaniesResult>
9
+ </FindCompaniesResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -1,11 +1,11 @@
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="Error" Code="30102">Invalid countries list specified.</q1:Message>
7
- </q1:Messages>
8
- </FindCompaniesResult>
9
- </FindCompaniesResponse>
10
- </s:Body>
11
- </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="Error" Code="30102">Invalid countries list specified.</q1:Message>
7
+ </q1:Messages>
8
+ </FindCompaniesResult>
9
+ </FindCompaniesResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -1,13 +1,13 @@
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:Message Type="Information" Code="10101">There are no results matching specified criteria.</q1:Message>
8
- </q1:Messages>
9
- <q1:Companies/>
10
- </FindCompaniesResult>
11
- </FindCompaniesResponse>
12
- </s:Body>
13
- </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:Message Type="Information" Code="10101">There are no results matching specified criteria.</q1:Message>
8
+ </q1:Messages>
9
+ <q1:Companies/>
10
+ </FindCompaniesResult>
11
+ </FindCompaniesResponse>
12
+ </s:Body>
13
+ </s:Envelope>
@@ -1 +1 @@
1
- <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oper="http://www.creditsafe.com/globaldata/operations" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="http://www.creditsafe.com/globaldata/datatypes" xmlns:cred="http://schemas.datacontract.org/2004/07/Creditsafe.GlobalData"><soapenv:Body><oper:FindCompanies><oper:countries><cred:CountryCode>GB</cred:CountryCode></oper:countries><oper:searchCriteria><dat:RegistrationNumber>RN123</dat:RegistrationNumber></oper:searchCriteria></oper:FindCompanies></soapenv:Body></soapenv:Envelope>
1
+ <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oper="http://www.creditsafe.com/globaldata/operations" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="http://www.creditsafe.com/globaldata/datatypes" xmlns:cred="http://schemas.datacontract.org/2004/07/Creditsafe.GlobalData"><soapenv:Body><oper:FindCompanies><oper:countries><cred:CountryCode>GB</cred:CountryCode></oper:countries><oper:searchCriteria><dat:RegistrationNumber>RN123</dat:RegistrationNumber></oper:searchCriteria></oper:FindCompanies></soapenv:Body></soapenv:Envelope>