creditsafe 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +10 -10
- data/LICENSE.txt +1 -1
- data/README.md +70 -4
- data/data/creditsafe-live.xml +342 -1
- data/data/creditsafe-test.xml +342 -0
- data/lib/creditsafe/client.rb +15 -3
- data/lib/creditsafe/request/find_company.rb +35 -15
- data/lib/creditsafe/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 563fddd54824c02af29e53feb2363d7d727a56b5
|
4
|
+
data.tar.gz: 91d896b3049f05021d46dd053958a4f13f0fdb1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c25e9c9607708e08767a1c76a0df85af71dc00c059992c015639a7e4e11e41cb1019fe31cc0bd68e7ddd4c5ea4db65dc9e85227d3821760c4a70d46af9da5520
|
7
|
+
data.tar.gz: cfa40a02a6f38fab8781ceed3d879afab0d27042686bc719c29e56c4d90937887c59d50d562d733965f5f075cd296eb23a1019d81f962db1fe6f5b105035dcf6
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v0.3.2, 27 February 2017
|
2
|
+
|
3
|
+
- Adds support for using Creditsafe's test environment, specified when instantiating the
|
4
|
+
client, as well as customising the log level used by the Savon SOAP client
|
5
|
+
- Adds support for finding companies in Germany by name, as well as company number
|
6
|
+
|
1
7
|
## v0.3.1, 6 January 2017
|
2
8
|
|
3
9
|
- Suppress password when inspecting client
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
creditsafe (0.3.
|
4
|
+
creditsafe (0.3.2)
|
5
5
|
activesupport (>= 4.2.0)
|
6
6
|
excon (~> 0.45)
|
7
7
|
savon (~> 2.8)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (5.0.
|
12
|
+
activesupport (5.0.1)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (~> 0.7)
|
15
15
|
minitest (~> 5.1)
|
@@ -19,16 +19,16 @@ GEM
|
|
19
19
|
gyoku (>= 0.4.0)
|
20
20
|
nokogiri
|
21
21
|
ast (2.3.0)
|
22
|
-
builder (3.2.
|
22
|
+
builder (3.2.3)
|
23
23
|
byebug (9.0.5)
|
24
24
|
coderay (1.1.1)
|
25
25
|
compare-xml (0.62)
|
26
26
|
nokogiri (~> 1.6)
|
27
|
-
concurrent-ruby (1.0.
|
27
|
+
concurrent-ruby (1.0.5)
|
28
28
|
crack (0.4.3)
|
29
29
|
safe_yaml (~> 1.0.0)
|
30
30
|
diff-lcs (1.2.5)
|
31
|
-
excon (0.
|
31
|
+
excon (0.55.0)
|
32
32
|
ffi (1.9.14)
|
33
33
|
formatador (0.2.5)
|
34
34
|
guard (2.14.0)
|
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
httpi (2.4.2)
|
55
55
|
rack
|
56
56
|
socksify
|
57
|
-
i18n (0.
|
57
|
+
i18n (0.8.1)
|
58
58
|
listen (3.1.5)
|
59
59
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
60
60
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
lumberjack (1.0.10)
|
63
63
|
method_source (0.8.2)
|
64
64
|
mini_portile2 (2.1.0)
|
65
|
-
minitest (5.
|
65
|
+
minitest (5.10.1)
|
66
66
|
nenv (0.3.0)
|
67
67
|
nokogiri (1.6.8)
|
68
68
|
mini_portile2 (~> 2.1.0)
|
@@ -122,9 +122,9 @@ GEM
|
|
122
122
|
wasabi (~> 3.4)
|
123
123
|
shellany (0.0.1)
|
124
124
|
slop (3.6.0)
|
125
|
-
socksify (1.7.
|
125
|
+
socksify (1.7.1)
|
126
126
|
thor (0.19.1)
|
127
|
-
thread_safe (0.3.
|
127
|
+
thread_safe (0.3.6)
|
128
128
|
timecop (0.8.1)
|
129
129
|
tzinfo (1.2.2)
|
130
130
|
thread_safe (~> 0.1)
|
@@ -155,4 +155,4 @@ DEPENDENCIES
|
|
155
155
|
webmock (~> 1.20)
|
156
156
|
|
157
157
|
BUNDLED WITH
|
158
|
-
1.
|
158
|
+
1.13.7
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -3,17 +3,17 @@
|
|
3
3
|
*Build status: [![Circle CI](https://circleci.com/gh/gocardless/creditsafe-ruby.svg?style=svg&circle-token=3f6e9b24fcc6a57abac110c59395b36032f156a5)](https://circleci.com/gh/gocardless/creditsafe-ruby)*
|
4
4
|
|
5
5
|
A ruby library for interacting with the
|
6
|
-
[
|
6
|
+
[Creditsafe](http://www.creditsafeuk.com/) API.
|
7
7
|
|
8
8
|
Currently, it only partially implements the API to support finding companies by
|
9
|
-
registration number and retrieving company online reports.
|
9
|
+
registration number (and name in Germany), and retrieving company online reports.
|
10
10
|
|
11
11
|
# Installation
|
12
12
|
|
13
13
|
Install the gem from RubyGems.org by adding the following to your `Gemfile`:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
gem 'creditsafe', '~> 0.3.
|
16
|
+
gem 'creditsafe', '~> 0.3.2'
|
17
17
|
```
|
18
18
|
|
19
19
|
Just run `bundle install` to install the gem and its dependencies.
|
@@ -24,6 +24,9 @@ Initialise the client with your `username` and `password`.
|
|
24
24
|
|
25
25
|
```ruby
|
26
26
|
client = Creditsafe::Client.new(username: "foo", password: "bar")
|
27
|
+
|
28
|
+
# optionally with environment (live is default) and or log level
|
29
|
+
client = Creditsafe::Client.new(username: "foo", password: "bar", environment: :test, log_level: :debug)
|
27
30
|
```
|
28
31
|
|
29
32
|
### Company Search
|
@@ -51,6 +54,69 @@ client.find_company(country_code: "GB", registration_number: "07495895")
|
|
51
54
|
}
|
52
55
|
```
|
53
56
|
|
57
|
+
In Germany you can also perform a name search. For this you need to provide a country code and a company name.
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
client.find_company(country_code: "DE", company_name: "zalando")
|
61
|
+
=> [
|
62
|
+
{
|
63
|
+
"name": "Zalando Logistics Süd SE & Co. KG",
|
64
|
+
"type": "NonLtd",
|
65
|
+
"status": "Active",
|
66
|
+
"address": {
|
67
|
+
"street": "Tamara-Danz-Str. 1",
|
68
|
+
"city": "Berlin",
|
69
|
+
"postal_code": "10243"
|
70
|
+
},
|
71
|
+
"available_report_types": {
|
72
|
+
"available_report_type": [
|
73
|
+
"Full",
|
74
|
+
"Basic"
|
75
|
+
]
|
76
|
+
},
|
77
|
+
"available_languages": {
|
78
|
+
"available_language": [
|
79
|
+
"EN",
|
80
|
+
"DE"
|
81
|
+
]
|
82
|
+
},
|
83
|
+
"@online_reports": "true",
|
84
|
+
"@monitoring": "true",
|
85
|
+
"@country": "DE",
|
86
|
+
"@id": "DE001/1/DE20316785",
|
87
|
+
"@safe_number": "DE20316785"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"name": "Zalando Outlet Store Berlin",
|
91
|
+
"type": "NonLtd",
|
92
|
+
"status": "Active",
|
93
|
+
"address": {
|
94
|
+
"street": "Köpenicker Str. 20",
|
95
|
+
"city": "Berlin",
|
96
|
+
"postal_code": "10997"
|
97
|
+
},
|
98
|
+
"available_report_types": {
|
99
|
+
"available_report_type": [
|
100
|
+
"Full",
|
101
|
+
"Basic"
|
102
|
+
]
|
103
|
+
},
|
104
|
+
"available_languages": {
|
105
|
+
"available_language": [
|
106
|
+
"EN",
|
107
|
+
"DE"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
"@online_reports": "true",
|
111
|
+
"@monitoring": "true",
|
112
|
+
"@country": "DE",
|
113
|
+
"@id": "DE001/1/DE16031795",
|
114
|
+
"@safe_number": "DE16031795"
|
115
|
+
},
|
116
|
+
...
|
117
|
+
]
|
118
|
+
```
|
119
|
+
|
54
120
|
### Company Report
|
55
121
|
|
56
122
|
To download all the information available in an online company report, you will
|
@@ -58,7 +124,7 @@ need the company's creditsafe identifier (obtainable using
|
|
58
124
|
[find_company](#find_company) above.
|
59
125
|
|
60
126
|
```ruby
|
61
|
-
client.company_report(
|
127
|
+
client.company_report("GB003/0/07495895")
|
62
128
|
=> {
|
63
129
|
...
|
64
130
|
}
|
data/data/creditsafe-live.xml
CHANGED
@@ -1 +1,342 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="MainServiceBasic" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:i1="http://www.creditsafe.com/globaldata/operations/administration" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:i0="http://www.creditsafe.com/globaldata/operations" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><wsp:Policy wsu:Id="BasicHttpBinding_GlobalDataService_policy"><wsp:ExactlyOne><wsp:All><sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><wsp:Policy><sp:TransportToken><wsp:Policy><sp:HttpsToken RequireClientCertificate="false"/></wsp:Policy></sp:TransportToken><sp:AlgorithmSuite><wsp:Policy><sp:Basic256/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict/></wsp:Policy></sp:Layout></wsp:Policy></sp:TransportBinding></wsp:All></wsp:ExactlyOne></wsp:Policy><wsp:Policy wsu:Id="BasicHttpBinding_DataInputService_policy"><wsp:ExactlyOne><wsp:All><sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><wsp:Policy><sp:TransportToken><wsp:Policy><sp:HttpsToken RequireClientCertificate="false"/></wsp:Policy></sp:TransportToken><sp:AlgorithmSuite><wsp:Policy><sp:Basic256/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict/></wsp:Policy></sp:Layout></wsp:Policy></sp:TransportBinding></wsp:All></wsp:ExactlyOne></wsp:Policy><wsdl:import namespace="http://www.creditsafe.com/globaldata/operations" location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl0"/><wsdl:import namespace="http://www.creditsafe.com/globaldata/operations/administration" location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl1"/><wsdl:types/><wsdl:binding name="BasicHttpBinding_GlobalDataService" type="i0:GlobalDataService"><wsp:PolicyReference URI="#BasicHttpBinding_GlobalDataService_policy"/><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="GetPortfolios"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolios" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ListMonitoredCompanies"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ListMonitoredCompanies" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="CreatePortfolio"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/CreatePortfolio" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="RemovePortfolios"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemovePortfolios" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetPortfolioSettings"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolioSettings" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="SetPortfolioSettings"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetPortfolioSettings" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="AddCompaniesToPortfolios"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/AddCompaniesToPortfolios" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ImportCompaniesToPortfolio"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ImportCompaniesToPortfolio" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="RemoveCompaniesFromPortfolios"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemoveCompaniesFromPortfolios" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ChangeCompaniesReferenceStrings"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ChangeCompaniesReferenceStrings" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetSupportedChangeEvents"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetSupportedChangeEvents" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetMonitoringRules"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetMonitoringRules" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="SetMonitoringRules"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetMonitoringRules" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="SetDefaultChangesCheckPeriod"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetDefaultChangesCheckPeriod" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="RetrieveCompanyOnlineReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RetrieveCompanyOnlineReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="TryRetrieveCompanyOnlineReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/TryRetrieveCompanyOnlineReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="OrderCompanyOfflineReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/OrderCompanyOfflineReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetReportboxContents"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxContents" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetReportboxReports"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxReports" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="RemoveReportboxReports"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RemoveReportboxReports" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetCountries"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetCountries" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetPossibleSearchCriteria"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetPossibleSearchCriteria" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="FindCompanies"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/FindCompanies" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetReportCustomDataSchema"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetReportCustomDataSchema" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="BasicHttpBinding_DataInputService" type="i1:DataInputService"><wsp:PolicyReference URI="#BasicHttpBinding_DataInputService_policy"/><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="DeliverOfflineCompanyReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/DeliverOfflineCompanyReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="MarkFailedOfflineOrder"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/MarkFailedOfflineOrder" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ListOfflineOrders"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListOfflineOrders" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ListRealisedOrders"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListRealisedOrders" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetStoredReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/GetStoredReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="UpdateStoredReport"><soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/UpdateStoredReport" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="MainServiceBasic"><wsdl:port name="BasicHttpBinding_GlobalDataService" binding="tns:BasicHttpBinding_GlobalDataService"><soap:address location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc"/></wsdl:port><wsdl:port name="BasicHttpBinding_DataInputService" binding="tns:BasicHttpBinding_DataInputService"><soap:address location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/dataInput"/></wsdl:port></wsdl:service></wsdl:definitions>
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<wsdl:definitions name="MainServiceBasic" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:i1="http://www.creditsafe.com/globaldata/operations/administration" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:i0="http://www.creditsafe.com/globaldata/operations" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
|
3
|
+
<wsp:Policy wsu:Id="BasicHttpBinding_GlobalDataService_policy">
|
4
|
+
<wsp:ExactlyOne>
|
5
|
+
<wsp:All>
|
6
|
+
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
|
7
|
+
<wsp:Policy>
|
8
|
+
<sp:TransportToken>
|
9
|
+
<wsp:Policy>
|
10
|
+
<sp:HttpsToken RequireClientCertificate="false" />
|
11
|
+
</wsp:Policy>
|
12
|
+
</sp:TransportToken>
|
13
|
+
<sp:AlgorithmSuite>
|
14
|
+
<wsp:Policy>
|
15
|
+
<sp:Basic256 />
|
16
|
+
</wsp:Policy>
|
17
|
+
</sp:AlgorithmSuite>
|
18
|
+
<sp:Layout>
|
19
|
+
<wsp:Policy>
|
20
|
+
<sp:Strict />
|
21
|
+
</wsp:Policy>
|
22
|
+
</sp:Layout>
|
23
|
+
</wsp:Policy>
|
24
|
+
</sp:TransportBinding>
|
25
|
+
</wsp:All>
|
26
|
+
</wsp:ExactlyOne>
|
27
|
+
</wsp:Policy>
|
28
|
+
<wsp:Policy wsu:Id="BasicHttpBinding_DataInputService_policy">
|
29
|
+
<wsp:ExactlyOne>
|
30
|
+
<wsp:All>
|
31
|
+
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
|
32
|
+
<wsp:Policy>
|
33
|
+
<sp:TransportToken>
|
34
|
+
<wsp:Policy>
|
35
|
+
<sp:HttpsToken RequireClientCertificate="false" />
|
36
|
+
</wsp:Policy>
|
37
|
+
</sp:TransportToken>
|
38
|
+
<sp:AlgorithmSuite>
|
39
|
+
<wsp:Policy>
|
40
|
+
<sp:Basic256 />
|
41
|
+
</wsp:Policy>
|
42
|
+
</sp:AlgorithmSuite>
|
43
|
+
<sp:Layout>
|
44
|
+
<wsp:Policy>
|
45
|
+
<sp:Strict />
|
46
|
+
</wsp:Policy>
|
47
|
+
</sp:Layout>
|
48
|
+
</wsp:Policy>
|
49
|
+
</sp:TransportBinding>
|
50
|
+
</wsp:All>
|
51
|
+
</wsp:ExactlyOne>
|
52
|
+
</wsp:Policy>
|
53
|
+
<wsdl:import namespace="http://www.creditsafe.com/globaldata/operations" location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl0" />
|
54
|
+
<wsdl:import namespace="http://www.creditsafe.com/globaldata/operations/administration" location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl1" />
|
55
|
+
<wsdl:types />
|
56
|
+
<wsdl:binding name="BasicHttpBinding_GlobalDataService" type="i0:GlobalDataService">
|
57
|
+
<wsp:PolicyReference URI="#BasicHttpBinding_GlobalDataService_policy" />
|
58
|
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
59
|
+
<wsdl:operation name="GetPortfolios">
|
60
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolios" style="document" />
|
61
|
+
<wsdl:input>
|
62
|
+
<soap:body use="literal" />
|
63
|
+
</wsdl:input>
|
64
|
+
<wsdl:output>
|
65
|
+
<soap:body use="literal" />
|
66
|
+
</wsdl:output>
|
67
|
+
</wsdl:operation>
|
68
|
+
<wsdl:operation name="ListMonitoredCompanies">
|
69
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ListMonitoredCompanies" style="document" />
|
70
|
+
<wsdl:input>
|
71
|
+
<soap:body use="literal" />
|
72
|
+
</wsdl:input>
|
73
|
+
<wsdl:output>
|
74
|
+
<soap:body use="literal" />
|
75
|
+
</wsdl:output>
|
76
|
+
</wsdl:operation>
|
77
|
+
<wsdl:operation name="CreatePortfolio">
|
78
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/CreatePortfolio" style="document" />
|
79
|
+
<wsdl:input>
|
80
|
+
<soap:body use="literal" />
|
81
|
+
</wsdl:input>
|
82
|
+
<wsdl:output>
|
83
|
+
<soap:body use="literal" />
|
84
|
+
</wsdl:output>
|
85
|
+
</wsdl:operation>
|
86
|
+
<wsdl:operation name="RemovePortfolios">
|
87
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemovePortfolios" style="document" />
|
88
|
+
<wsdl:input>
|
89
|
+
<soap:body use="literal" />
|
90
|
+
</wsdl:input>
|
91
|
+
<wsdl:output>
|
92
|
+
<soap:body use="literal" />
|
93
|
+
</wsdl:output>
|
94
|
+
</wsdl:operation>
|
95
|
+
<wsdl:operation name="GetPortfolioSettings">
|
96
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolioSettings" style="document" />
|
97
|
+
<wsdl:input>
|
98
|
+
<soap:body use="literal" />
|
99
|
+
</wsdl:input>
|
100
|
+
<wsdl:output>
|
101
|
+
<soap:body use="literal" />
|
102
|
+
</wsdl:output>
|
103
|
+
</wsdl:operation>
|
104
|
+
<wsdl:operation name="SetPortfolioSettings">
|
105
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetPortfolioSettings" style="document" />
|
106
|
+
<wsdl:input>
|
107
|
+
<soap:body use="literal" />
|
108
|
+
</wsdl:input>
|
109
|
+
<wsdl:output>
|
110
|
+
<soap:body use="literal" />
|
111
|
+
</wsdl:output>
|
112
|
+
</wsdl:operation>
|
113
|
+
<wsdl:operation name="AddCompaniesToPortfolios">
|
114
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/AddCompaniesToPortfolios" style="document" />
|
115
|
+
<wsdl:input>
|
116
|
+
<soap:body use="literal" />
|
117
|
+
</wsdl:input>
|
118
|
+
<wsdl:output>
|
119
|
+
<soap:body use="literal" />
|
120
|
+
</wsdl:output>
|
121
|
+
</wsdl:operation>
|
122
|
+
<wsdl:operation name="ImportCompaniesToPortfolio">
|
123
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ImportCompaniesToPortfolio" style="document" />
|
124
|
+
<wsdl:input>
|
125
|
+
<soap:body use="literal" />
|
126
|
+
</wsdl:input>
|
127
|
+
<wsdl:output>
|
128
|
+
<soap:body use="literal" />
|
129
|
+
</wsdl:output>
|
130
|
+
</wsdl:operation>
|
131
|
+
<wsdl:operation name="RemoveCompaniesFromPortfolios">
|
132
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemoveCompaniesFromPortfolios" style="document" />
|
133
|
+
<wsdl:input>
|
134
|
+
<soap:body use="literal" />
|
135
|
+
</wsdl:input>
|
136
|
+
<wsdl:output>
|
137
|
+
<soap:body use="literal" />
|
138
|
+
</wsdl:output>
|
139
|
+
</wsdl:operation>
|
140
|
+
<wsdl:operation name="ChangeCompaniesReferenceStrings">
|
141
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ChangeCompaniesReferenceStrings" style="document" />
|
142
|
+
<wsdl:input>
|
143
|
+
<soap:body use="literal" />
|
144
|
+
</wsdl:input>
|
145
|
+
<wsdl:output>
|
146
|
+
<soap:body use="literal" />
|
147
|
+
</wsdl:output>
|
148
|
+
</wsdl:operation>
|
149
|
+
<wsdl:operation name="GetSupportedChangeEvents">
|
150
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetSupportedChangeEvents" style="document" />
|
151
|
+
<wsdl:input>
|
152
|
+
<soap:body use="literal" />
|
153
|
+
</wsdl:input>
|
154
|
+
<wsdl:output>
|
155
|
+
<soap:body use="literal" />
|
156
|
+
</wsdl:output>
|
157
|
+
</wsdl:operation>
|
158
|
+
<wsdl:operation name="GetMonitoringRules">
|
159
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetMonitoringRules" style="document" />
|
160
|
+
<wsdl:input>
|
161
|
+
<soap:body use="literal" />
|
162
|
+
</wsdl:input>
|
163
|
+
<wsdl:output>
|
164
|
+
<soap:body use="literal" />
|
165
|
+
</wsdl:output>
|
166
|
+
</wsdl:operation>
|
167
|
+
<wsdl:operation name="SetMonitoringRules">
|
168
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetMonitoringRules" style="document" />
|
169
|
+
<wsdl:input>
|
170
|
+
<soap:body use="literal" />
|
171
|
+
</wsdl:input>
|
172
|
+
<wsdl:output>
|
173
|
+
<soap:body use="literal" />
|
174
|
+
</wsdl:output>
|
175
|
+
</wsdl:operation>
|
176
|
+
<wsdl:operation name="SetDefaultChangesCheckPeriod">
|
177
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetDefaultChangesCheckPeriod" style="document" />
|
178
|
+
<wsdl:input>
|
179
|
+
<soap:body use="literal" />
|
180
|
+
</wsdl:input>
|
181
|
+
<wsdl:output>
|
182
|
+
<soap:body use="literal" />
|
183
|
+
</wsdl:output>
|
184
|
+
</wsdl:operation>
|
185
|
+
<wsdl:operation name="RetrieveCompanyOnlineReport">
|
186
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RetrieveCompanyOnlineReport" style="document" />
|
187
|
+
<wsdl:input>
|
188
|
+
<soap:body use="literal" />
|
189
|
+
</wsdl:input>
|
190
|
+
<wsdl:output>
|
191
|
+
<soap:body use="literal" />
|
192
|
+
</wsdl:output>
|
193
|
+
</wsdl:operation>
|
194
|
+
<wsdl:operation name="TryRetrieveCompanyOnlineReport">
|
195
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/TryRetrieveCompanyOnlineReport" style="document" />
|
196
|
+
<wsdl:input>
|
197
|
+
<soap:body use="literal" />
|
198
|
+
</wsdl:input>
|
199
|
+
<wsdl:output>
|
200
|
+
<soap:body use="literal" />
|
201
|
+
</wsdl:output>
|
202
|
+
</wsdl:operation>
|
203
|
+
<wsdl:operation name="OrderCompanyOfflineReport">
|
204
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/OrderCompanyOfflineReport" style="document" />
|
205
|
+
<wsdl:input>
|
206
|
+
<soap:body use="literal" />
|
207
|
+
</wsdl:input>
|
208
|
+
<wsdl:output>
|
209
|
+
<soap:body use="literal" />
|
210
|
+
</wsdl:output>
|
211
|
+
</wsdl:operation>
|
212
|
+
<wsdl:operation name="GetReportboxContents">
|
213
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxContents" style="document" />
|
214
|
+
<wsdl:input>
|
215
|
+
<soap:body use="literal" />
|
216
|
+
</wsdl:input>
|
217
|
+
<wsdl:output>
|
218
|
+
<soap:body use="literal" />
|
219
|
+
</wsdl:output>
|
220
|
+
</wsdl:operation>
|
221
|
+
<wsdl:operation name="GetReportboxReports">
|
222
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxReports" style="document" />
|
223
|
+
<wsdl:input>
|
224
|
+
<soap:body use="literal" />
|
225
|
+
</wsdl:input>
|
226
|
+
<wsdl:output>
|
227
|
+
<soap:body use="literal" />
|
228
|
+
</wsdl:output>
|
229
|
+
</wsdl:operation>
|
230
|
+
<wsdl:operation name="RemoveReportboxReports">
|
231
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RemoveReportboxReports" style="document" />
|
232
|
+
<wsdl:input>
|
233
|
+
<soap:body use="literal" />
|
234
|
+
</wsdl:input>
|
235
|
+
<wsdl:output>
|
236
|
+
<soap:body use="literal" />
|
237
|
+
</wsdl:output>
|
238
|
+
</wsdl:operation>
|
239
|
+
<wsdl:operation name="GetCountries">
|
240
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetCountries" style="document" />
|
241
|
+
<wsdl:input>
|
242
|
+
<soap:body use="literal" />
|
243
|
+
</wsdl:input>
|
244
|
+
<wsdl:output>
|
245
|
+
<soap:body use="literal" />
|
246
|
+
</wsdl:output>
|
247
|
+
</wsdl:operation>
|
248
|
+
<wsdl:operation name="GetPossibleSearchCriteria">
|
249
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetPossibleSearchCriteria" style="document" />
|
250
|
+
<wsdl:input>
|
251
|
+
<soap:body use="literal" />
|
252
|
+
</wsdl:input>
|
253
|
+
<wsdl:output>
|
254
|
+
<soap:body use="literal" />
|
255
|
+
</wsdl:output>
|
256
|
+
</wsdl:operation>
|
257
|
+
<wsdl:operation name="FindCompanies">
|
258
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/FindCompanies" style="document" />
|
259
|
+
<wsdl:input>
|
260
|
+
<soap:body use="literal" />
|
261
|
+
</wsdl:input>
|
262
|
+
<wsdl:output>
|
263
|
+
<soap:body use="literal" />
|
264
|
+
</wsdl:output>
|
265
|
+
</wsdl:operation>
|
266
|
+
<wsdl:operation name="GetReportCustomDataSchema">
|
267
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetReportCustomDataSchema" style="document" />
|
268
|
+
<wsdl:input>
|
269
|
+
<soap:body use="literal" />
|
270
|
+
</wsdl:input>
|
271
|
+
<wsdl:output>
|
272
|
+
<soap:body use="literal" />
|
273
|
+
</wsdl:output>
|
274
|
+
</wsdl:operation>
|
275
|
+
</wsdl:binding>
|
276
|
+
<wsdl:binding name="BasicHttpBinding_DataInputService" type="i1:DataInputService">
|
277
|
+
<wsp:PolicyReference URI="#BasicHttpBinding_DataInputService_policy" />
|
278
|
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
279
|
+
<wsdl:operation name="DeliverOfflineCompanyReport">
|
280
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/DeliverOfflineCompanyReport" style="document" />
|
281
|
+
<wsdl:input>
|
282
|
+
<soap:body use="literal" />
|
283
|
+
</wsdl:input>
|
284
|
+
<wsdl:output>
|
285
|
+
<soap:body use="literal" />
|
286
|
+
</wsdl:output>
|
287
|
+
</wsdl:operation>
|
288
|
+
<wsdl:operation name="MarkFailedOfflineOrder">
|
289
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/MarkFailedOfflineOrder" style="document" />
|
290
|
+
<wsdl:input>
|
291
|
+
<soap:body use="literal" />
|
292
|
+
</wsdl:input>
|
293
|
+
<wsdl:output>
|
294
|
+
<soap:body use="literal" />
|
295
|
+
</wsdl:output>
|
296
|
+
</wsdl:operation>
|
297
|
+
<wsdl:operation name="ListOfflineOrders">
|
298
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListOfflineOrders" style="document" />
|
299
|
+
<wsdl:input>
|
300
|
+
<soap:body use="literal" />
|
301
|
+
</wsdl:input>
|
302
|
+
<wsdl:output>
|
303
|
+
<soap:body use="literal" />
|
304
|
+
</wsdl:output>
|
305
|
+
</wsdl:operation>
|
306
|
+
<wsdl:operation name="ListRealisedOrders">
|
307
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListRealisedOrders" style="document" />
|
308
|
+
<wsdl:input>
|
309
|
+
<soap:body use="literal" />
|
310
|
+
</wsdl:input>
|
311
|
+
<wsdl:output>
|
312
|
+
<soap:body use="literal" />
|
313
|
+
</wsdl:output>
|
314
|
+
</wsdl:operation>
|
315
|
+
<wsdl:operation name="GetStoredReport">
|
316
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/GetStoredReport" style="document" />
|
317
|
+
<wsdl:input>
|
318
|
+
<soap:body use="literal" />
|
319
|
+
</wsdl:input>
|
320
|
+
<wsdl:output>
|
321
|
+
<soap:body use="literal" />
|
322
|
+
</wsdl:output>
|
323
|
+
</wsdl:operation>
|
324
|
+
<wsdl:operation name="UpdateStoredReport">
|
325
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/UpdateStoredReport" style="document" />
|
326
|
+
<wsdl:input>
|
327
|
+
<soap:body use="literal" />
|
328
|
+
</wsdl:input>
|
329
|
+
<wsdl:output>
|
330
|
+
<soap:body use="literal" />
|
331
|
+
</wsdl:output>
|
332
|
+
</wsdl:operation>
|
333
|
+
</wsdl:binding>
|
334
|
+
<wsdl:service name="MainServiceBasic">
|
335
|
+
<wsdl:port name="BasicHttpBinding_GlobalDataService" binding="tns:BasicHttpBinding_GlobalDataService">
|
336
|
+
<soap:address location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc" />
|
337
|
+
</wsdl:port>
|
338
|
+
<wsdl:port name="BasicHttpBinding_DataInputService" binding="tns:BasicHttpBinding_DataInputService">
|
339
|
+
<soap:address location="https://webservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/dataInput" />
|
340
|
+
</wsdl:port>
|
341
|
+
</wsdl:service>
|
342
|
+
</wsdl:definitions>
|
@@ -0,0 +1,342 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<wsdl:definitions name="MainServiceBasic" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:i1="http://www.creditsafe.com/globaldata/operations/administration" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:i0="http://www.creditsafe.com/globaldata/operations" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
|
3
|
+
<wsp:Policy wsu:Id="BasicHttpBinding_GlobalDataService_policy">
|
4
|
+
<wsp:ExactlyOne>
|
5
|
+
<wsp:All>
|
6
|
+
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
|
7
|
+
<wsp:Policy>
|
8
|
+
<sp:TransportToken>
|
9
|
+
<wsp:Policy>
|
10
|
+
<sp:HttpsToken RequireClientCertificate="false" />
|
11
|
+
</wsp:Policy>
|
12
|
+
</sp:TransportToken>
|
13
|
+
<sp:AlgorithmSuite>
|
14
|
+
<wsp:Policy>
|
15
|
+
<sp:Basic256 />
|
16
|
+
</wsp:Policy>
|
17
|
+
</sp:AlgorithmSuite>
|
18
|
+
<sp:Layout>
|
19
|
+
<wsp:Policy>
|
20
|
+
<sp:Strict />
|
21
|
+
</wsp:Policy>
|
22
|
+
</sp:Layout>
|
23
|
+
</wsp:Policy>
|
24
|
+
</sp:TransportBinding>
|
25
|
+
</wsp:All>
|
26
|
+
</wsp:ExactlyOne>
|
27
|
+
</wsp:Policy>
|
28
|
+
<wsp:Policy wsu:Id="BasicHttpBinding_DataInputService_policy">
|
29
|
+
<wsp:ExactlyOne>
|
30
|
+
<wsp:All>
|
31
|
+
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
|
32
|
+
<wsp:Policy>
|
33
|
+
<sp:TransportToken>
|
34
|
+
<wsp:Policy>
|
35
|
+
<sp:HttpsToken RequireClientCertificate="false" />
|
36
|
+
</wsp:Policy>
|
37
|
+
</sp:TransportToken>
|
38
|
+
<sp:AlgorithmSuite>
|
39
|
+
<wsp:Policy>
|
40
|
+
<sp:Basic256 />
|
41
|
+
</wsp:Policy>
|
42
|
+
</sp:AlgorithmSuite>
|
43
|
+
<sp:Layout>
|
44
|
+
<wsp:Policy>
|
45
|
+
<sp:Strict />
|
46
|
+
</wsp:Policy>
|
47
|
+
</sp:Layout>
|
48
|
+
</wsp:Policy>
|
49
|
+
</sp:TransportBinding>
|
50
|
+
</wsp:All>
|
51
|
+
</wsp:ExactlyOne>
|
52
|
+
</wsp:Policy>
|
53
|
+
<wsdl:import namespace="http://www.creditsafe.com/globaldata/operations" location="https://testwebservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl0" />
|
54
|
+
<wsdl:import namespace="http://www.creditsafe.com/globaldata/operations/administration" location="https://testwebservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl=wsdl1" />
|
55
|
+
<wsdl:types />
|
56
|
+
<wsdl:binding name="BasicHttpBinding_GlobalDataService" type="i0:GlobalDataService">
|
57
|
+
<wsp:PolicyReference URI="#BasicHttpBinding_GlobalDataService_policy" />
|
58
|
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
59
|
+
<wsdl:operation name="GetPortfolios">
|
60
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolios" style="document" />
|
61
|
+
<wsdl:input>
|
62
|
+
<soap:body use="literal" />
|
63
|
+
</wsdl:input>
|
64
|
+
<wsdl:output>
|
65
|
+
<soap:body use="literal" />
|
66
|
+
</wsdl:output>
|
67
|
+
</wsdl:operation>
|
68
|
+
<wsdl:operation name="ListMonitoredCompanies">
|
69
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ListMonitoredCompanies" style="document" />
|
70
|
+
<wsdl:input>
|
71
|
+
<soap:body use="literal" />
|
72
|
+
</wsdl:input>
|
73
|
+
<wsdl:output>
|
74
|
+
<soap:body use="literal" />
|
75
|
+
</wsdl:output>
|
76
|
+
</wsdl:operation>
|
77
|
+
<wsdl:operation name="CreatePortfolio">
|
78
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/CreatePortfolio" style="document" />
|
79
|
+
<wsdl:input>
|
80
|
+
<soap:body use="literal" />
|
81
|
+
</wsdl:input>
|
82
|
+
<wsdl:output>
|
83
|
+
<soap:body use="literal" />
|
84
|
+
</wsdl:output>
|
85
|
+
</wsdl:operation>
|
86
|
+
<wsdl:operation name="RemovePortfolios">
|
87
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemovePortfolios" style="document" />
|
88
|
+
<wsdl:input>
|
89
|
+
<soap:body use="literal" />
|
90
|
+
</wsdl:input>
|
91
|
+
<wsdl:output>
|
92
|
+
<soap:body use="literal" />
|
93
|
+
</wsdl:output>
|
94
|
+
</wsdl:operation>
|
95
|
+
<wsdl:operation name="GetPortfolioSettings">
|
96
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetPortfolioSettings" style="document" />
|
97
|
+
<wsdl:input>
|
98
|
+
<soap:body use="literal" />
|
99
|
+
</wsdl:input>
|
100
|
+
<wsdl:output>
|
101
|
+
<soap:body use="literal" />
|
102
|
+
</wsdl:output>
|
103
|
+
</wsdl:operation>
|
104
|
+
<wsdl:operation name="SetPortfolioSettings">
|
105
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetPortfolioSettings" style="document" />
|
106
|
+
<wsdl:input>
|
107
|
+
<soap:body use="literal" />
|
108
|
+
</wsdl:input>
|
109
|
+
<wsdl:output>
|
110
|
+
<soap:body use="literal" />
|
111
|
+
</wsdl:output>
|
112
|
+
</wsdl:operation>
|
113
|
+
<wsdl:operation name="AddCompaniesToPortfolios">
|
114
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/AddCompaniesToPortfolios" style="document" />
|
115
|
+
<wsdl:input>
|
116
|
+
<soap:body use="literal" />
|
117
|
+
</wsdl:input>
|
118
|
+
<wsdl:output>
|
119
|
+
<soap:body use="literal" />
|
120
|
+
</wsdl:output>
|
121
|
+
</wsdl:operation>
|
122
|
+
<wsdl:operation name="ImportCompaniesToPortfolio">
|
123
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ImportCompaniesToPortfolio" style="document" />
|
124
|
+
<wsdl:input>
|
125
|
+
<soap:body use="literal" />
|
126
|
+
</wsdl:input>
|
127
|
+
<wsdl:output>
|
128
|
+
<soap:body use="literal" />
|
129
|
+
</wsdl:output>
|
130
|
+
</wsdl:operation>
|
131
|
+
<wsdl:operation name="RemoveCompaniesFromPortfolios">
|
132
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/RemoveCompaniesFromPortfolios" style="document" />
|
133
|
+
<wsdl:input>
|
134
|
+
<soap:body use="literal" />
|
135
|
+
</wsdl:input>
|
136
|
+
<wsdl:output>
|
137
|
+
<soap:body use="literal" />
|
138
|
+
</wsdl:output>
|
139
|
+
</wsdl:operation>
|
140
|
+
<wsdl:operation name="ChangeCompaniesReferenceStrings">
|
141
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/ChangeCompaniesReferenceStrings" style="document" />
|
142
|
+
<wsdl:input>
|
143
|
+
<soap:body use="literal" />
|
144
|
+
</wsdl:input>
|
145
|
+
<wsdl:output>
|
146
|
+
<soap:body use="literal" />
|
147
|
+
</wsdl:output>
|
148
|
+
</wsdl:operation>
|
149
|
+
<wsdl:operation name="GetSupportedChangeEvents">
|
150
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetSupportedChangeEvents" style="document" />
|
151
|
+
<wsdl:input>
|
152
|
+
<soap:body use="literal" />
|
153
|
+
</wsdl:input>
|
154
|
+
<wsdl:output>
|
155
|
+
<soap:body use="literal" />
|
156
|
+
</wsdl:output>
|
157
|
+
</wsdl:operation>
|
158
|
+
<wsdl:operation name="GetMonitoringRules">
|
159
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/GetMonitoringRules" style="document" />
|
160
|
+
<wsdl:input>
|
161
|
+
<soap:body use="literal" />
|
162
|
+
</wsdl:input>
|
163
|
+
<wsdl:output>
|
164
|
+
<soap:body use="literal" />
|
165
|
+
</wsdl:output>
|
166
|
+
</wsdl:operation>
|
167
|
+
<wsdl:operation name="SetMonitoringRules">
|
168
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetMonitoringRules" style="document" />
|
169
|
+
<wsdl:input>
|
170
|
+
<soap:body use="literal" />
|
171
|
+
</wsdl:input>
|
172
|
+
<wsdl:output>
|
173
|
+
<soap:body use="literal" />
|
174
|
+
</wsdl:output>
|
175
|
+
</wsdl:operation>
|
176
|
+
<wsdl:operation name="SetDefaultChangesCheckPeriod">
|
177
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyMonitoringService/SetDefaultChangesCheckPeriod" style="document" />
|
178
|
+
<wsdl:input>
|
179
|
+
<soap:body use="literal" />
|
180
|
+
</wsdl:input>
|
181
|
+
<wsdl:output>
|
182
|
+
<soap:body use="literal" />
|
183
|
+
</wsdl:output>
|
184
|
+
</wsdl:operation>
|
185
|
+
<wsdl:operation name="RetrieveCompanyOnlineReport">
|
186
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RetrieveCompanyOnlineReport" style="document" />
|
187
|
+
<wsdl:input>
|
188
|
+
<soap:body use="literal" />
|
189
|
+
</wsdl:input>
|
190
|
+
<wsdl:output>
|
191
|
+
<soap:body use="literal" />
|
192
|
+
</wsdl:output>
|
193
|
+
</wsdl:operation>
|
194
|
+
<wsdl:operation name="TryRetrieveCompanyOnlineReport">
|
195
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/TryRetrieveCompanyOnlineReport" style="document" />
|
196
|
+
<wsdl:input>
|
197
|
+
<soap:body use="literal" />
|
198
|
+
</wsdl:input>
|
199
|
+
<wsdl:output>
|
200
|
+
<soap:body use="literal" />
|
201
|
+
</wsdl:output>
|
202
|
+
</wsdl:operation>
|
203
|
+
<wsdl:operation name="OrderCompanyOfflineReport">
|
204
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/OrderCompanyOfflineReport" style="document" />
|
205
|
+
<wsdl:input>
|
206
|
+
<soap:body use="literal" />
|
207
|
+
</wsdl:input>
|
208
|
+
<wsdl:output>
|
209
|
+
<soap:body use="literal" />
|
210
|
+
</wsdl:output>
|
211
|
+
</wsdl:operation>
|
212
|
+
<wsdl:operation name="GetReportboxContents">
|
213
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxContents" style="document" />
|
214
|
+
<wsdl:input>
|
215
|
+
<soap:body use="literal" />
|
216
|
+
</wsdl:input>
|
217
|
+
<wsdl:output>
|
218
|
+
<soap:body use="literal" />
|
219
|
+
</wsdl:output>
|
220
|
+
</wsdl:operation>
|
221
|
+
<wsdl:operation name="GetReportboxReports">
|
222
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/GetReportboxReports" style="document" />
|
223
|
+
<wsdl:input>
|
224
|
+
<soap:body use="literal" />
|
225
|
+
</wsdl:input>
|
226
|
+
<wsdl:output>
|
227
|
+
<soap:body use="literal" />
|
228
|
+
</wsdl:output>
|
229
|
+
</wsdl:operation>
|
230
|
+
<wsdl:operation name="RemoveReportboxReports">
|
231
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/CompanyDataAccessService/RemoveReportboxReports" style="document" />
|
232
|
+
<wsdl:input>
|
233
|
+
<soap:body use="literal" />
|
234
|
+
</wsdl:input>
|
235
|
+
<wsdl:output>
|
236
|
+
<soap:body use="literal" />
|
237
|
+
</wsdl:output>
|
238
|
+
</wsdl:operation>
|
239
|
+
<wsdl:operation name="GetCountries">
|
240
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetCountries" style="document" />
|
241
|
+
<wsdl:input>
|
242
|
+
<soap:body use="literal" />
|
243
|
+
</wsdl:input>
|
244
|
+
<wsdl:output>
|
245
|
+
<soap:body use="literal" />
|
246
|
+
</wsdl:output>
|
247
|
+
</wsdl:operation>
|
248
|
+
<wsdl:operation name="GetPossibleSearchCriteria">
|
249
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetPossibleSearchCriteria" style="document" />
|
250
|
+
<wsdl:input>
|
251
|
+
<soap:body use="literal" />
|
252
|
+
</wsdl:input>
|
253
|
+
<wsdl:output>
|
254
|
+
<soap:body use="literal" />
|
255
|
+
</wsdl:output>
|
256
|
+
</wsdl:operation>
|
257
|
+
<wsdl:operation name="FindCompanies">
|
258
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/FindCompanies" style="document" />
|
259
|
+
<wsdl:input>
|
260
|
+
<soap:body use="literal" />
|
261
|
+
</wsdl:input>
|
262
|
+
<wsdl:output>
|
263
|
+
<soap:body use="literal" />
|
264
|
+
</wsdl:output>
|
265
|
+
</wsdl:operation>
|
266
|
+
<wsdl:operation name="GetReportCustomDataSchema">
|
267
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/DataBrowsingService/GetReportCustomDataSchema" style="document" />
|
268
|
+
<wsdl:input>
|
269
|
+
<soap:body use="literal" />
|
270
|
+
</wsdl:input>
|
271
|
+
<wsdl:output>
|
272
|
+
<soap:body use="literal" />
|
273
|
+
</wsdl:output>
|
274
|
+
</wsdl:operation>
|
275
|
+
</wsdl:binding>
|
276
|
+
<wsdl:binding name="BasicHttpBinding_DataInputService" type="i1:DataInputService">
|
277
|
+
<wsp:PolicyReference URI="#BasicHttpBinding_DataInputService_policy" />
|
278
|
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
279
|
+
<wsdl:operation name="DeliverOfflineCompanyReport">
|
280
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/DeliverOfflineCompanyReport" style="document" />
|
281
|
+
<wsdl:input>
|
282
|
+
<soap:body use="literal" />
|
283
|
+
</wsdl:input>
|
284
|
+
<wsdl:output>
|
285
|
+
<soap:body use="literal" />
|
286
|
+
</wsdl:output>
|
287
|
+
</wsdl:operation>
|
288
|
+
<wsdl:operation name="MarkFailedOfflineOrder">
|
289
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/MarkFailedOfflineOrder" style="document" />
|
290
|
+
<wsdl:input>
|
291
|
+
<soap:body use="literal" />
|
292
|
+
</wsdl:input>
|
293
|
+
<wsdl:output>
|
294
|
+
<soap:body use="literal" />
|
295
|
+
</wsdl:output>
|
296
|
+
</wsdl:operation>
|
297
|
+
<wsdl:operation name="ListOfflineOrders">
|
298
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListOfflineOrders" style="document" />
|
299
|
+
<wsdl:input>
|
300
|
+
<soap:body use="literal" />
|
301
|
+
</wsdl:input>
|
302
|
+
<wsdl:output>
|
303
|
+
<soap:body use="literal" />
|
304
|
+
</wsdl:output>
|
305
|
+
</wsdl:operation>
|
306
|
+
<wsdl:operation name="ListRealisedOrders">
|
307
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/ListRealisedOrders" style="document" />
|
308
|
+
<wsdl:input>
|
309
|
+
<soap:body use="literal" />
|
310
|
+
</wsdl:input>
|
311
|
+
<wsdl:output>
|
312
|
+
<soap:body use="literal" />
|
313
|
+
</wsdl:output>
|
314
|
+
</wsdl:operation>
|
315
|
+
<wsdl:operation name="GetStoredReport">
|
316
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/GetStoredReport" style="document" />
|
317
|
+
<wsdl:input>
|
318
|
+
<soap:body use="literal" />
|
319
|
+
</wsdl:input>
|
320
|
+
<wsdl:output>
|
321
|
+
<soap:body use="literal" />
|
322
|
+
</wsdl:output>
|
323
|
+
</wsdl:operation>
|
324
|
+
<wsdl:operation name="UpdateStoredReport">
|
325
|
+
<soap:operation soapAction="http://www.creditsafe.com/globaldata/operations/administration/DataInputService/UpdateStoredReport" style="document" />
|
326
|
+
<wsdl:input>
|
327
|
+
<soap:body use="literal" />
|
328
|
+
</wsdl:input>
|
329
|
+
<wsdl:output>
|
330
|
+
<soap:body use="literal" />
|
331
|
+
</wsdl:output>
|
332
|
+
</wsdl:operation>
|
333
|
+
</wsdl:binding>
|
334
|
+
<wsdl:service name="MainServiceBasic">
|
335
|
+
<wsdl:port name="BasicHttpBinding_GlobalDataService" binding="tns:BasicHttpBinding_GlobalDataService">
|
336
|
+
<soap:address location="https://testwebservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc" />
|
337
|
+
</wsdl:port>
|
338
|
+
<wsdl:port name="BasicHttpBinding_DataInputService" binding="tns:BasicHttpBinding_DataInputService">
|
339
|
+
<soap:address location="https://testwebservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/dataInput" />
|
340
|
+
</wsdl:port>
|
341
|
+
</wsdl:service>
|
342
|
+
</wsdl:definitions>
|
data/lib/creditsafe/client.rb
CHANGED
@@ -14,10 +14,19 @@ require 'active_support/notifications'
|
|
14
14
|
|
15
15
|
module Creditsafe
|
16
16
|
class Client
|
17
|
-
|
17
|
+
ENVIRONMENTS = %i(live test).freeze
|
18
|
+
|
19
|
+
def initialize(username: nil, password: nil, savon_opts: {},
|
20
|
+
environment: :live, log_level: :warn)
|
18
21
|
raise ArgumentError, "Username must be provided" if username.nil?
|
19
22
|
raise ArgumentError, "Password must be provided" if password.nil?
|
20
23
|
|
24
|
+
unless ENVIRONMENTS.include?(environment.to_sym)
|
25
|
+
raise ArgumentError, "Environment needs to be one of #{ENVIRONMENTS.join('/')}"
|
26
|
+
end
|
27
|
+
|
28
|
+
@environment = environment.to_s
|
29
|
+
@log_level = log_level
|
21
30
|
@username = username
|
22
31
|
@password = password
|
23
32
|
@savon_opts = savon_opts
|
@@ -122,14 +131,17 @@ module Creditsafe
|
|
122
131
|
wsdl: wsdl_path,
|
123
132
|
headers: auth_header,
|
124
133
|
convert_request_keys_to: :none,
|
125
|
-
adapter: :excon
|
134
|
+
adapter: :excon,
|
135
|
+
log: true,
|
136
|
+
log_level: @log_level,
|
137
|
+
pretty_print_xml: true
|
126
138
|
}
|
127
139
|
Savon.client(options.merge(@savon_opts))
|
128
140
|
end
|
129
141
|
|
130
142
|
def wsdl_path
|
131
143
|
root_dir = File.join(File.dirname(__FILE__), '..', '..')
|
132
|
-
File.join(root_dir, 'data', "creditsafe
|
144
|
+
File.join(root_dir, 'data', "creditsafe-#{@environment}.xml")
|
133
145
|
end
|
134
146
|
end
|
135
147
|
end
|
@@ -7,23 +7,37 @@ module Creditsafe
|
|
7
7
|
class FindCompany
|
8
8
|
def initialize(search_criteria)
|
9
9
|
check_search_criteria(search_criteria)
|
10
|
-
|
11
10
|
@country_code = search_criteria[:country_code]
|
12
11
|
@registration_number = search_criteria[:registration_number]
|
12
|
+
@company_name = search_criteria[:company_name]
|
13
13
|
@city = search_criteria[:city]
|
14
14
|
end
|
15
15
|
|
16
16
|
def message
|
17
|
-
search_criteria = {
|
18
|
-
"#{Creditsafe::Namespace::DAT}:RegistrationNumber" =>
|
19
|
-
registration_number
|
20
|
-
}
|
17
|
+
search_criteria = {}
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
search_criteria["#{Creditsafe::Namespace::DAT}:Name"] = {
|
20
|
+
'@MatchType' => 'MatchBlock',
|
21
|
+
:content! => company_name
|
22
|
+
} unless company_name.nil?
|
23
|
+
|
24
|
+
unless registration_number.nil?
|
25
|
+
search_criteria["#{Creditsafe::Namespace::DAT}:RegistrationNumber"] =
|
26
|
+
registration_number
|
25
27
|
end
|
26
28
|
|
29
|
+
search_criteria["#{Creditsafe::Namespace::DAT}:Address"] = {
|
30
|
+
"#{Creditsafe::Namespace::DAT}:City" => city
|
31
|
+
} unless city.nil?
|
32
|
+
|
33
|
+
build_message(search_criteria)
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
attr_reader :country_code, :registration_number, :city, :company_name
|
39
|
+
|
40
|
+
def build_message(search_criteria)
|
27
41
|
{
|
28
42
|
"#{Creditsafe::Namespace::OPER}:countries" => {
|
29
43
|
"#{Creditsafe::Namespace::CRED}:CountryCode" => country_code
|
@@ -32,24 +46,30 @@ module Creditsafe
|
|
32
46
|
}
|
33
47
|
end
|
34
48
|
|
35
|
-
|
36
|
-
|
37
|
-
attr_reader :country_code, :registration_number, :city
|
38
|
-
|
49
|
+
# rubocop:disable Style/CyclomaticComplexity, Metrics/AbcSize
|
39
50
|
def check_search_criteria(search_criteria)
|
40
51
|
if search_criteria[:country_code].nil?
|
41
52
|
raise ArgumentError, "country_code is a required search criteria"
|
42
53
|
end
|
43
54
|
|
44
|
-
if search_criteria[:
|
45
|
-
raise ArgumentError,
|
46
|
-
|
55
|
+
if search_criteria[:country_code] != 'DE' && !search_criteria[:company_name].nil?
|
56
|
+
raise ArgumentError, "company name search is only possible for German searches"
|
57
|
+
end
|
58
|
+
|
59
|
+
unless only_registration_number_or_company_name_provided?(search_criteria)
|
60
|
+
raise ArgumentError, "registration_number or company_name (not both) are " \
|
61
|
+
"required search criteria"
|
47
62
|
end
|
48
63
|
|
49
64
|
if search_criteria[:city] && search_criteria[:country_code] != 'DE'
|
50
65
|
raise ArgumentError, "city is only supported for German searches"
|
51
66
|
end
|
52
67
|
end
|
68
|
+
# rubocop:enable Style/CyclomaticComplexity, Metrics/AbcSize
|
69
|
+
|
70
|
+
def only_registration_number_or_company_name_provided?(search_criteria)
|
71
|
+
search_criteria[:registration_number].nil? ^ search_criteria[:company_name].nil?
|
72
|
+
end
|
53
73
|
end
|
54
74
|
end
|
55
75
|
end
|
data/lib/creditsafe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creditsafe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- circle.yml
|
200
200
|
- creditsafe.gemspec
|
201
201
|
- data/creditsafe-live.xml
|
202
|
+
- data/creditsafe-test.xml
|
202
203
|
- lib/creditsafe.rb
|
203
204
|
- lib/creditsafe/client.rb
|
204
205
|
- lib/creditsafe/errors.rb
|
@@ -240,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
241
|
version: '0'
|
241
242
|
requirements: []
|
242
243
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.6.8
|
244
245
|
signing_key:
|
245
246
|
specification_version: 4
|
246
247
|
summary: Ruby client for the Creditsafe SOAP API
|