GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch scrutinizer-fixes (60c229)
by Thijs
02:43
created

Connector::vatViesProxyCheckVat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace WebservicesNl\Platform\Webservices;
4
5
use WebservicesNl\Common\Exception\Server\Data\NotFoundException;
6
use WebservicesNl\Connector\AbstractConnector;
7
8
/**
9
 * Class WebservicesConnector.
10
 *
11
 * Proxy for calling everything Webservices regardless of the underlying protocol.
12
 * All webservice related functions are mapped here. Note that for BC reasons old deprecated functions are listed here
13
 * just as well. When possible please use the latest version.
14
 *
15
 * @link https://webview.webservices.nl/documentation
16
 * @codeCoverageIgnore This is a silly proxy class
17
 */
18
class Connector extends AbstractConnector
19
{
20
    const PLATFORM_NAME = 'webservices';
21
22
    /**
23
     * Set host restrictions for the account.
24
     *
25
     * @param int    $accountId    ID of the account, use 0 for the current user's account
26
     * @param string $restrictions A string with host restrictions separated by semi colons (;)
27
     *
28
     * @return \StdClass
29
     */
30
    public function accountEditHostRestrictions($accountId, $restrictions)
31
    {
32
        return $this->getAdapter()->call(
33
            'accountEditHostRestrictions',
34
            ['accountid' => $accountId, 'restrictions' => $restrictions]
35
        );
36
    }
37
38
    /**
39
     * Edit the properties (<AccountV2>) of an account.
40
     * This method allows <Group::Account admins> to edit their account profile.
41
     *
42
     * @param int    $accountId        Account ID of the account to edit, use 0 for the current user's account
43
     * @param string $address          Address of the company using this account.
44
     * @param string $contactName      Name of the contact person responsible for this account.
45
     * @param string $contactEmail     Email address of the contact person responsible for this account.
46
     * @param string $telephone        Telephone number of the contact person responsible for this account.
47
     * @param string $fax              Fax number of the contact person responsible for this account.
48
     * @param string $description      Description of the account to its users.
49
     * @param float  $balanceThreshold Balance threshold to alert account, use 0 to disable.
50
     *
51
     * @return \StdClass
52
     */
53
    public function accountEditV2(
54
        $accountId,
55
        $address,
56
        $contactName,
57
        $contactEmail,
58
        $telephone,
59
        $fax,
60
        $description,
61
        $balanceThreshold
62
    ) {
63
        return $this->getAdapter()->call(
64
            'accountEditV2',
65
            [
66
                'accountid'        => $accountId,
67
                 'address'          => $address,
68
                 'contactname'      => $contactName,
69
                 'contactemail'     => $contactEmail,
70
                 'telephone'        => $telephone,
71
                 'fax'              => $fax,
72
                 'description'      => $description,
73
                 'balancethreshold' => (float)$balanceThreshold,
74
            ]
75
        );
76
    }
77
78
    /**
79
     * Get the id of an account created with a token from <accountGetCreationToken>.
80
     * Depending on the outcome of the account registration the following is returned:
81
     * - A value greater than 0 - The customer has successfully registered an account. The returned value is the
82
     *                            accountId.
83
     * - A value of 0           - The customer has not yet finished the account registration process. It may be that
84
     *                            Webservices.nl is awaiting confirmation of a payment performed by the customer.
85
     *                            You should *not* retrieve a new account registration token, or direct the customer to
86
     *                            the account registration page again. This could result in the customer registering
87
     *                            and paying for an account that is never used. Instead, try calling
88
     *                            <accountGetCreationStatus> again later.
89
     * - A 'Server.Data.NotFound' error - This error indicates that the registration process was unsuccesful.
90
     *                            See <Error Handling::Error codes>. You may start the registration process over by
91
     *                            calling <accountGetCreationToken>.
92
     *
93
     * @param string $token A token retrieved using <accountGetCreationToken>.
94
     *
95
     * @throws NotFoundException
96
     * @return int accountId The account id, which is 0 when the account registration has not finished yet
97
     */
98
    public function accountGetCreationStatus($token)
99
    {
100
        return $this->getAdapter()->call('accountGetCreationStatus', ['token' => $token]);
101
    }
102
103
    /**
104
     * Retrieve a token with which a new account may be registered via the <Webview Interface> by one of your customers.
105
     * The newly created account will be associated with your account. Tokens are only valid for a limited amount of
106
     * time. Use <accountGetCreationStatus> to get the id of the account created using the token. If a customer arrives
107
     * at this URL the <accountGetCreationStatus> should be called to check if account creation was successful.
108
     *
109
     * @param string $returnUrl the URL to which the customer is redirected after registering a Webservices.nl account
110
     *
111
     * @return string AccountCreationToken
112
     */
113
    public function accountGetCreationToken($returnUrl)
114
    {
115
        return $this->getAdapter()->call('accountGetCreationToken', ['return_url' => $returnUrl]);
116
    }
117
118
    /**
119
     * Retrieve a token that can be used order account balance via the <Webview Interface>.
120
     *
121
     * @param int    $accountId id of the account for which balance will be ordered
122
     * @param string $returnUrl the URL to which the customer is redirected after finishing the order process
123
     *
124
     * @return string
125
     */
126
    public function accountGetOrderToken($accountId, $returnUrl)
127
    {
128
        return $this->getAdapter()->call(
129
            'accountGetOrderToken',
130
            ['accountid' => $accountId, 'return_url' => $returnUrl]
131
        );
132
    }
133
134
    /**
135
     * List all users in this account. This method is only available to <Group::Account admins>.
136
     *
137
     * @param int $accountId ID of the account to list, use 0 for the current user's account
138
     * @param int $page      Page to retrieve, pages start counting at 1
139
     *
140
     * @return \StdClass <Patterns::{Type}PagedResult> of <UserV2> entries.
141
     */
142
    public function accountUserListV2($accountId, $page)
143
    {
144
        return $this->getAdapter()->call('accountUserListV2', ['accountid' => (int)$accountId, 'page' => $page]);
145
    }
146
147
    /**
148
     * Search for users of an account using a search phrase.
149
     * This method is only available to <Group::Account admins>.
150
     *
151
     * @param int    $accountId ID of the account to list, use 0 for the current user's account
152
     * @param string $phrase    Phrase to search for in user profiles
153
     * @param int    $page      Page to retrieve, pages start counting at 1
154
     *
155
     * @return \stdClass UserV2 entries.
156
     */
157
    public function accountUserSearchV2($accountId, $phrase, $page)
158
    {
159
        return $this->getAdapter()->call(
160
            'accountUserSearchV2',
161
            ['accountid' => $accountId, 'phrase' => $phrase, 'page' => $page]
162
        );
163
    }
164
165
    /**
166
     * Returns the accounts balance.
167
     *
168
     * @param int $accountId ID of the account to view the balance of, use 0 for the current account
169
     *
170
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewBalance
171
     * @return int
172
     */
173
    public function accountViewBalance($accountId = 0)
174
    {
175
        return $this->getAdapter()->call('accountViewBalance', ['accountid' => $accountId]);
176
    }
177
178
    /**
179
     * View host restrictions for the account.
180
     *
181
     * @param int $accountId ID of the account, use 0 for the current user's account
182
     *
183
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewHostRestrictions
184
     * @return string containing all restrictions, separated by semicolons
185
     */
186
    public function accountViewHostRestrictions($accountId)
187
    {
188
        return $this->getAdapter()->call('accountViewHostRestrictions', ['accountid' => $accountId]);
189
    }
190
191
    /**
192
     * View the profile of an account.
193
     *
194
     * @param int $accountId Account ID of the account to move use 0 for the account
195
     *
196
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewV2
197
     * @return \StdClass
198
     */
199
    public function accountViewV2($accountId)
200
    {
201
        return $this->getAdapter()->call('accountViewV2', ['accountid' => (int)$accountId]);
202
    }
203
204
    /**
205
     * Returns a list of all neighborhood codes in the city.
206
     *
207
     * @param string $name    Name or identifier of the city
208
     * @param bool   $postbus indicating whether Postbus neighborhood codes should be included in the result
209
     * @param int    $page    Page to retrieve, pages start counting at 1
210
     *
211
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressCityListNeighborhoods
212
     * @return \StdClass <Patterns::{Type}PagedResult>
213
     */
214
    public function addressCityListNeighborhoods($name, $postbus, $page)
215
    {
216
        return $this->getAdapter()->call(
217
            'addressCityListNeighborhoods',
218
            ['name' => $name, 'postbus' => (bool)$postbus, 'page' => $page]
219
        );
220
    }
221
222
    /**
223
     * Search for all cities that match a phrase.
224
     * Cities are also matched if input matches a commonly used alternative city name. Exact matches on the official
225
     * name are listed first, the rest of the results are sorted alphabetically. This method differs from
226
     * addressCitySearch by returning <CityV2> entries instead of <City> entries, thus giving more information about a
227
     * city.
228
     *
229
     * @param string $name Phrase to search cities for, or the numeric identifier for the city.
230
     * @param int    $page Page to retrieve, pages start counting at 1
231
     *
232
     * @link http://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressCitySearchV2
233
     * @return \StdClass <Patterns::{Type}PagedResult> of <CityV2> entries.
234
     */
235
    public function addressCitySearchV2($name, $page)
236
    {
237
        return $this->getAdapter()->call('addressCitySearchV2', ['name' => $name, 'page' => $page]);
238
    }
239
240
    /**
241
     * List all cities in specific municipalities.
242
     *
243
     * @param string $name search municipalities for, or the numeric identifier for the municipality
244
     * @param int    $page Page to retrieve, pages start counting at 1
245
     *
246
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressDistrictListCities
247
     * @return \StdClass <Patterns::{Type}PagedResult>
248
     */
249
    public function addressDistrictListCities($name, $page)
250
    {
251
        return $this->getAdapter()->call('addressDistrictListCities', ['name' => $name, 'page' => $page]);
252
    }
253
254
    /**
255
     * Search for all municipalities that match a phrase.
256
     *
257
     * @param string $name Phrase to search municipalities for, or the numeric identifier for the municipality.
258
     * @param string $page Page to retrieve, pages start counting at 1
259
     *
260
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressDistrictSearch
261
     * @return \StdClass <Patterns::{Type}PagedResult> of <District> entries.
262
     */
263
    public function addressDistrictSearch($name, $page)
264
    {
265
        return $this->getAdapter()->call('addressDistrictSearch', ['name' => $name, 'page' => $page]);
266
    }
267
268
    /**
269
     * Search for addresses in the <Perceel> format, using a single search phrase.
270
     * The phrase can be a partial address. To search using separate fields for each address part, use
271
     * <addressPerceelFullParameterSearchV2>.
272
     *
273
     * @param string $province          Phrase used to select the province of the address, see <Perceel>.provincienaam
274
     * @param string $district          Phrase used to select the municipality of the address
275
     * @param string $city              Phrase used to select the city of the address
276
     * @param string $street            Phrase used to select the street of the address
277
     * @param int    $houseNo           Number used to select the house number of the address
278
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
279
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
280
     *                                  numbers of the postcode.
281
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
282
     *                                  letters of the postcode. See <Perceel>.lettercombinatie
283
     * @param string $addressType       Phrase used to select the addresstype of the address
284
     * @param int    $page              Page to retrieve, pages start counting at 1
285
     *
286
     * @deprecated please use addressPerceelFullParameterSearchV2
287
     * @link       https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressPerceelFullParameterSearch
288
     * @return \StdClass
289
     */
290 View Code Duplication
    public function addressPerceelFullParameterSearch(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
291
        $province,
292
        $district,
293
        $city,
294
        $street,
295
        $houseNo,
296
        $houseNoAddition,
297
        $nbCode,
298
        $letterCombination,
299
        $addressType,
300
        $page
301
    ) {
302
        return $this->getAdapter()->call(
303
            'addressPerceelFullParameterSearch',
304
            [
305
                'province'          => $province,
306
                'district'          => $district,
307
                'city'              => $city,
308
                'street'            => $street,
309
                'houseNo'           => $houseNo,
310
                'houseNoAddition'   => $houseNoAddition,
311
                'nbcode'            => $nbCode,
312
                'lettercombination' => $letterCombination,
313
                'addresstype'       => $addressType,
314
                'page'              => $page,
315
            ]
316
        );
317
    }
318
319
    /**
320
     * Search for addresses in the <Perceel> format, using different search phrases for each address part.
321
     * PO box matches:
322
     * See <Perceel> for information on how PO box matches are returned.
323
     *
324
     * @param string $province          Phrase used to select the province of the address, see <Perceel>.provincienaam
325
     * @param string $district          Phrase used to select the municipality of the address
326
     * @param string $city              Phrase used to select the city of the address
327
     * @param string $street            Phrase used to select the street of the address
328
     * @param int    $houseNo           Number used to select the house number of the address
329
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
330
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
331
     *                                  numbers of the postcode.
332
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
333
     *                                  letters of the postcode. See <Perceel>.lettercombinatie
334
     * @param string $addresstype       Phrase used to select the addresstype of the address
335
     * @param int    $page              Page to retrieve, pages start counting at 1
336
     *
337
     * @return \StdClass <PerceelSearchPartsPagedResult>.
338
     */
339 View Code Duplication
    public function addressPerceelFullParameterSearchV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
340
        $province,
341
        $district,
342
        $city,
343
        $street,
344
        $houseNo,
345
        $houseNoAddition,
346
        $nbCode,
347
        $letterCombination,
348
        $addresstype,
349
        $page
350
    ) {
351
        return $this->getAdapter()->call(
352
            'addressPerceelFullParameterSearchV2',
353
            [
354
                'province'          => $province,
355
                'district'          => $district,
356
                'city'              => $city,
357
                'street'            => $street,
358
                'houseNo'           => $houseNo,
359
                'houseNoAddition'   => $houseNoAddition,
360
                'nbcode'            => $nbCode,
361
                'lettercombination' => $letterCombination,
362
                'addresstype'       => $addresstype,
363
                'page'              => $page,
364
            ]
365
        );
366
    }
367
368
    /**
369
     * Search for addresses in the <Perceel> format, using different search phrases for each address part.
370
     *
371
     * @param string $province        Phrase used to select the province of the address, see <Perceel>.provincienaam
372
     * @param string $district        Phrase used to select the municipality of the address
373
     * @param string $city            Phrase used to select the city of the address
374
     * @param string $street          Phrase used to select the street of the address
375
     * @param int    $houseNo         Number used to select the house number of the address
376
     * @param string $houseNoAddition Phrase used to select the house number addition of the address
377
     * @param int    $page
378
     *
379
     * @deprecated please use addressPerceelFullParameterSearchV2
380
     * @return \StdClass
381
     */
382 View Code Duplication
    public function addressPerceelParameterSearch(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
383
        $province,
384
        $district,
385
        $city,
386
        $street,
387
        $houseNo,
388
        $houseNoAddition,
389
        $page
390
    ) {
391
        return $this->getAdapter()->call(
392
            'addressPerceelParameterSearch',
393
            [
394
                'province'        => $province,
395
                'district'        => $district,
396
                'city'            => $city,
397
                'street'          => $street,
398
                'houseNo'         => $houseNo,
399
                'houseNoAddition' => $houseNoAddition,
400
                'page'            => $page,
401
            ]
402
        );
403
    }
404
405
    /**
406
     * Search for addresses in the <Perceel> format, using a single search phrase.
407
     * The phrase can be a partial address.
408
     * Supported phrases:
409
     * postcode, house number - 1188 VP, 202bis
410
     * postcode - 1188 VP
411
     * neighborhood code - 1188
412
     * city, address - Amstelveen, Amsteldijk Zuid 202bis
413
     * address, city - Amsteldijk Zuid 202bis, Amstelveen
414
     * city, street - Amstelveen, Amsteldijk Zuid
415
     * address - Amsteldijk Zuid 202bis.
416
     *
417
     * @param string $address Address phrase to search for in addresses
418
     * @param int    $page    Page to retrieve, pages start counting at 1
419
     *
420
     * @return \StdClass <PerceelSearchPartsPagedResult>
421
     */
422
    public function addressPerceelPhraseSearch($address, $page)
423
    {
424
        return $this->getAdapter()->call('addressPerceelPhraseSearch', ['address' => $address, 'page' => $page]);
425
    }
426
427
    /**
428
     * List all provinces.
429
     *
430
     * @param int $page
431
     *
432
     * @return \StdClass
433
     */
434
    public function addressProvinceList($page)
435
    {
436
        return $this->getAdapter()->call('addressProvinceList', ['page' => $page]);
437
    }
438
439
    /**
440
     * List all municipalities in a specific provinces.
441
     *
442
     * @param string $name Name or code of the province to list the municipalities from
443
     * @param int    $page Page to retrieve, pages start counting at 1
444
     *
445
     * @return \StdClass of <District> entries.
446
     */
447
    public function addressProvinceListDistricts($name, $page)
448
    {
449
        return $this->getAdapter()->call('addressProvinceListDistricts', ['name' => $name, 'page' => $page]);
450
    }
451
452
    /**
453
     * Returns a list of all neighborhood codes in the province.
454
     *
455
     * @param string $name    Name or code of the province
456
     * @param bool   $postbus Boolean indicating whether Postbus neighborhood codes should be included in the result
457
     * @param int    $page    Page to retrieve, pages start counting at 1
458
     *
459
     * @return \StdClass <Patterns::{Type}PagedResult> of <Neighborhood> entries.
460
     */
461
    public function addressProvinceListNeighborhoods($name, $postbus, $page)
462
    {
463
        return $this->getAdapter()->call(
464
            'addressProvinceListNeighborhoods',
465
            ['name' => $name, 'postbus' => $postbus, 'page' => $page]
466
        );
467
    }
468
469
    /**
470
     * Search for all provinces that match a phrase.
471
     *
472
     * @param string $name Phrase to search for in the province names, or the province code.
473
     * @param int    $page Page to retrieve, pages start counting at 1
474
     *
475
     * @return \StdClass <Patterns::{Type}PagedResult> of <Province> entries.
476
     */
477
    public function addressProvinceSearch($name, $page)
478
    {
479
        return $this->getAdapter()->call('addressProvinceSearch', ['name' => $name, 'page' => $page]);
480
    }
481
482
    /**
483
     * Search for a specific address.
484
     * Where the address contains the street, house number and house number addition concatenated. This is useful if the
485
     * house number is not stored separate from the street name.
486
     * A number of <RangeAddress> entries is returned. The street names in the result may not exactly match the street
487
     * in the request. To account for different writing styles and spelling errors, streets which match approximately
488
     * are also returned. E.g. "Calverstraat, Amsterdam" will return an address for the "Kalverstraat". The results are
489
     * ordered on how well they match, with the best matches first.
490
     * If the given house number does not exist in the postcode range, the house number field is left empty. In this
491
     * case, the <RangeAddress> contains a <PCReeks> which matches the street, but it contains no house number or house
492
     * number addition. For example, searching for "Dam 44, Amsterdam" returns the <PCReeks> for the Dam, but the result
493
     * omits the house number since there is no house number 44 on the Dam.
494
     *
495
     * @param string $address  Street, house number and house number addition of the searched address. Required
496
     * @param string $postcode Postcode in 1234AA format. Optional.
497
     * @param string $city     Phrase used to select the city of the address, see <PCReeks>.plaatsnaam. Optional.
498
     * @param int    $page     Page to retrieve, pages start counting at 1
499
     *
500
     * @return \StdClass PagedResult of <RangeAddress> entries.
501
     */
502
    public function addressReeksAddressSearch($address, $postcode, $city, $page)
503
    {
504
        return $this->getAdapter()->call(
505
            'addressReeksAddressSearch',
506
            ['address' => $address, 'postcode' => $postcode, 'city' => $city, 'page' => $page]
507
        );
508
    }
509
510
    /**
511
     * Search for addresses in the <PCReeks> format, using different search phrases for each address part.
512
     *
513
     * @param string $province          Phrase to search for in province name, or code of the province. See
514
     *                                  <PCReeks>.provincienaam and <PCReeks>.provinciecode
515
     * @param string $district          Phrase used to select the municipality of the address, see
516
     *                                  <PCReeks>. gemeentenaam
517
     * @param string $city              Phrase used to select the city of the address, see <PCReeks>.plaatsnaam
518
     * @param string $street            Phrase used to select the street of the address, see <PCReeks>.straatnaam
519
     * @param string $houseNo           Number used to select the house number of the address, see <PCReeks>.huisnr_van
520
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
521
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
522
     *                                  numbers of the postcode. See <PCReeks>.wijkcode
523
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
524
     *                                  letters of the postcode. See <PCReeks>.lettercombinatie
525
     * @param int    $addressType       Phrase used to select the addresstype of the address, see
526
     *                                  <PCReeks>.reeksindicatie
527
     * @param int    $page              Page to retrieve, pages start counting at 1
528
     *
529
     * @return \StdClass PCReeksSearchPartsPagedResult
530
     */
531 View Code Duplication
    public function addressReeksFullParameterSearch(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
532
        $province,
533
        $district,
534
        $city,
535
        $street,
536
        $houseNo,
537
        $houseNoAddition,
538
        $nbCode,
539
        $letterCombination,
540
        $addressType,
541
        $page
542
    ) {
543
        return $this->getAdapter()->call(
544
            'addressReeksFullParameterSearch',
545
            [
546
                'province'          => $province,
547
                'district'          => $district,
548
                'city'              => $city,
549
                'street'            => $street,
550
                'houseNo'           => $houseNo,
551
                'houseNoAddition'   => $houseNoAddition,
552
                'nbcode'            => $nbCode,
553
                'lettercombination' => $letterCombination,
554
                'addresstype'       => $addressType,
555
                'page'              => $page,
556
            ]
557
        );
558
    }
559
560
    /**
561
     * Search for addresses in the <PCReeks> format, using different search phrases for each address part.
562
     * Notice: <addressReeksFullParameterSearch> allows more parameters to search.
563
     *
564
     * @param string $province        Phrase to search for in province name, or code of the province. See
565
     *                                <PCReeks>.provincienaam and <PCReeks>.provinciecode
566
     * @param string $district        Phrase used to select the municipality of the address, see <PCReeks>.gemeentenaam
567
     * @param string $city            Phrase used to select the city of the address, see <PCReeks>.plaatsnaam
568
     * @param string $street          Phrase used to select the street of the address, see <PCReeks>.straatnaam
569
     * @param int    $houseNo         Number used to select the house number of the address, see <PCReeks>.huisnr_van
570
     * @param string $houseNoAddition Phrase used to select the house number addition of the address
571
     * @param int    $page            Page to retrieve, pages start counting at 1
572
     *
573
     * @return \StdClass PCReeksSearchPartsPagedResult
574
     */
575 View Code Duplication
    public function addressReeksParameterSearch($province, $district, $city, $street, $houseNo, $houseNoAddition, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
576
    {
577
        return $this->getAdapter()->call(
578
            'addressReeksParameterSearch',
579
            [
580
                'province'        => $province,
581
                'district'        => $district,
582
                'city'            => $city,
583
                'street'          => $street,
584
                'houseNo'         => $houseNo,
585
                'houseNoAddition' => $houseNoAddition,
586
                'page'            => $page,
587
            ]
588
        );
589
    }
590
591
    /**
592
     * Determine if a specific address exists using the unique '1234AA12' postcode + house number format.
593
     * It returns either the address in <PCReeks> format, or an error if no matching address exists. If you want to
594
     * validate an address not using this unique identifier,
595
     * use <addressReeksAddressSearch> or <addressReeksFullParameterSearch>.
596
     *
597
     * @param string $address - Address to validate using the unique '1234AA12' postcode + house number format.
598
     *
599
     * @throws NotFoundException
600
     * @return \StdClass <PCReeks>
601
     */
602
    public function addressReeksPostcodeSearch($address)
603
    {
604
        return $this->getAdapter()->call('addressReeksPostcodeSearch', ['address' => $address]);
605
    }
606
607
    /**
608
     * Lookup the telephone area codes related to a given neighborhood code.
609
     *
610
     * @param string $neighborhoodCode neighborhood code to lookup
611
     * @param int    $page             Page to retrieve, pages start counting at 1
612
     *
613
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html
614
     * @return \StdClass <Patterns::{Type}PagedResult> of <AreaCode>
615
     */
616
    public function areaCodeLookup($neighborhoodCode, $page)
617
    {
618
        return $this->getAdapter()->call('areaCodeLookup', ['neighborhoodcode' => $neighborhoodCode, 'page' => $page]);
619
    }
620
621
    /**
622
     * Lookup the telephone area code related to a given postcode.
623
     *
624
     * @param string $postcode postcode to lookup
625
     *
626
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html#Areacode.areaCodePostcodeLookup
627
     * @return \StdClass <Patterns::{Type}Array> of <AreaCode>
628
     */
629
    public function areaCodePostcodeLookup($postcode)
630
    {
631
        return $this->getAdapter()->call('areaCodePostcodeLookup', ['postcode' => $postcode]);
632
    }
633
634
    /**
635
     * Lookup the neighborhood codes related to a given telephone area code.
636
     *
637
     * @param string $areaCode Telephone areacode to lookup
638
     * @param int    $page     Page to retrieve
639
     *
640
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html#Areacode.areaCodeToNeighborhoodcode
641
     * @return \StdClass A <Patterns::{Type}PagedResult> of <Neighborhood> entries
642
     */
643
    public function areaCodeToNeighborhoodcode($areaCode, $page)
644
    {
645
        return $this->getAdapter()->call('areaCodeToNeighborhoodcode', ['areacode' => $areaCode, 'page' => $page]);
646
    }
647
648
    /**
649
     * Retrieve a Bovag member using a Bovag identifier.
650
     *
651
     * @param string $bovagId The identifier used by Bovag to identify a member
652
     *
653
     * @link https://webview.webservices.nl/documentation/files/service_bovag-php.html#Bovag.bovagGetMemberByBovagId
654
     * @return \StdClass <BovagMember>
655
     */
656
    public function bovagGetMemberByBovagId($bovagId)
657
    {
658
        return $this->getAdapter()->call('bovagGetMemberByBovagId', ['bovag_id' => $bovagId]);
659
    }
660
661
    /**
662
     * Retrieve a Bovag member using a DutchBusiness reference.
663
     *
664
     * @param string $dossierNumber       Chamber of Commerce number
665
     * @param string $establishmentNumber Establishment number
666
     *
667
     * @link https://webview.webservices.nl/documentation/files/service_bovag-php.html#Bovag.bovagGetMemberByDutchBusiness
668
     * @return \StdClass <BovagMember>
669
     */
670
    public function bovagGetMemberByDutchBusiness($dossierNumber, $establishmentNumber)
671
    {
672
        return $this->getAdapter()->call(
673
            'bovagGetMemberByDutchBusiness',
674
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
675
        );
676
    }
677
678
    /**
679
     * Retrieve Auto disk price information.
680
     * Autodisk data is available for yellow license plates younger than 2004. Coverage for older plates is very
681
     * limited.
682
     *
683
     * @param string $licensePlate Dutch license plate (kenteken)
684
     *
685
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carATDPrice
686
     * @return \StdClass A <CarATDPrices>
687
     */
688
    public function carATDPrice($licensePlate)
689
    {
690
        return $this->getAdapter()->call('carATDPrice', ['license_plate' => $licensePlate]);
691
    }
692
693
    /**
694
     * Check the validity of a license plate and check code ('meldcode') combination.
695
     * This method differs from <carVWEMeldcodeCheck> in that it also returns whether a car is active.
696
     *
697
     * @param string $licensePlate Dutch license plate (kenteken)
698
     * @param string $code         code (meldcode), 4 digits
699
     *
700
     * @returns \StdClass <CarCheckCode>.
701
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarCheckCode
702
     */
703
    public function carRDWCarCheckCode($licensePlate, $code)
704
    {
705
        return $this->getAdapter()->call(
706
            'carRDWCarCheckCode',
707
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
708
        );
709
    }
710
711
    /**
712
     * Retrieves data of a car with a Dutch license plate, including a list of types matched (when available.)
713
     * This method differs from <carRDWCarDataV2> in that it also returns the CO2 emission.
714
     *
715
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retrieve
716
     *
717
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataV3
718
     * @return \StdClass <Car>
719
     */
720
    public function carRDWCarData($licensePlate)
721
    {
722
        return $this->getAdapter()->call('carRDWCarData', ['license_plate' => (string)$licensePlate]);
723
    }
724
725
    /**
726
     * Retrieves data of a car with a Dutch license plate.
727
     * In addition to the information returned by carRDWCarData data on BPM and power is returned.
728
     *
729
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retreive
730
     *
731
     * @link       https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataBP
732
     * @deprecated please use carRDWCarDataBPV2
733
     * @return \StdClass <Car>
734
     */
735
    public function carRDWCarDataBP($licensePlate)
736
    {
737
        return $this->getAdapter()->call('carRDWCarDataBP', ['license_plate' => (string)$licensePlate]);
738
    }
739
740
    /**
741
     * Retrieves data of a car with a Dutch license plate.
742
     * In addition to the information returned by <carRDWCarData> data on BPM and power is returned.
743
     *
744
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retreive
745
     *
746
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataBPV2
747
     * @return \StdClass <CarBPV2>
748
     */
749
    public function carRDWCarDataBPV2($licensePlate)
750
    {
751
        return $this->getAdapter()->call('carRDWCarDataBPV2', ['license_plate' => (string)$licensePlate]);
752
    }
753
754
    /**
755
     * Retrieves data of a car with a Dutch license plate and check code ('meldcode').
756
     * The car data contains the European Approval Mark according to the 2007/46/EG standard. When the code is set it
757
     * also checks the validity of a license plate and check code ('meldcode') combination.
758
     *
759
     * @param string $licensePlate
760
     * @param string $code
761
     *
762
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataExtended
763
     * @return \StdClass <CarExtended>
764
     */
765
    public function carRDWCarDataExtended($licensePlate, $code)
766
    {
767
        return $this->getAdapter()->call(
768
            'carRDWCarDataExtended',
769
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
770
        );
771
    }
772
773
    /**
774
     * Retrieves data of a car, including information about extra options.
775
     *
776
     * @param string $carId
777
     *
778
     * @see Use <carRDWCarDataV3> to find a car_id
779
     * @return \StdClass <CarOptions>
780
     */
781
    public function carRDWCarDataOptions($carId)
782
    {
783
        return $this->getAdapter()->call('carRDWCarDataOptions', ['car_id' => (string)$carId]);
784
    }
785
786
    /**
787
     * Retrieves car data, including the fiscal price, directly from RDW.
788
     * The fiscal price is the catalogue price of the vehicle, used by the tax department to calculate the tax for the
789
     * private use of a leased car. Data on the fiscal price, power, environmental impact, status and all information
790
     * returned by <carRDWCarDataV3>.
791
     *
792
     * @param string $licensePlate
793
     *
794
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataPrice
795
     * @return \StdClass <CarRDWCarDataPrice>
796
     */
797
    public function carRDWCarDataPrice($licensePlate)
798
    {
799
        return $this->getAdapter()->call('carRDWCarDataPrice', ['license_plate' => (string)$licensePlate]);
800
    }
801
802
    /**
803
     * Retrieves data of a car with a Dutch license plate, including a list of types matched if more information is
804
     * available. This method differs from <carRDWCarDataV2> in that it also returns the CO2 emission.
805
     *
806
     * @param string $licensePlate - Dutch license plate (kenteken) of the car to retrieve
807
     *
808
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataV3
809
     * @return \StdClass <CarDataV3Result>.
810
     */
811
    public function carRDWCarDataV3($licensePlate)
812
    {
813
        return $this->getAdapter()->call('carRDWCarDataV3', ['license_plate' => (string)$licensePlate]);
814
    }
815
816
    /**
817
     * Retrieve extended information for a car.
818
     * This function returns more information than <carRDWCarData> or <carRDWCarDataBP>. Please note that when using a
819
     * test account an older and less complete dataset is used.
820
     *
821
     * @param string $licensePlate Dutch license plate (kenteken)
822
     *
823
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEBasicTypeData
824
     * @return \StdClass <CarVWEBasicTypeData>
825
     */
826
    public function carVWEBasicTypeData($licensePlate)
827
    {
828
        return $this->getAdapter()->call('carVWEBasicTypeData', ['license_plate' => (string)$licensePlate]);
829
    }
830
831
    /**
832
     * Retrieve possible brands for a specific kind of car.
833
     * Please note that when using a test account an older and less complete data set is used.
834
     * $kindId:
835
     *  1 - passenger car, yellow license plate
836
     *  2 - delivery trucks, company cars, up to 3.5 tons
837
     *  3 - delivery trucks, company cars, up to 10 tons
838
     *  4 - off-road four wheel drives
839
     *  5 - motorcycles
840
     *  6 - moped
841
     *  8 - bus.
842
     *
843
     * @param int $productionYear Search for brands which produced cars in this year, or one year before or after. If
844
     *                            0, brands of all years are returned.
845
     * @param int $kindId         Identifier of the kind of car to retrieve the brands for.
846
     * @param int $page           Page to retrieve, pages start counting at 1
847
     *
848
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEBrand> entries
849
     */
850
    public function carVWEListBrands($productionYear, $kindId, $page)
851
    {
852
        return $this->getAdapter()->call(
853
            'carVWEListBrands',
854
            ['production_year' => (int)$productionYear, 'kind_id' => (int)$kindId, 'page' => (int)$page]
855
        );
856
    }
857
858
    /**
859
     * Retrieve possible models for a specific brand of car.
860
     *
861
     * @param int $productionYear Search for models which were produced in this year, or one year before or after. If
862
     *                            0, models of all years are returned.
863
     * @param int $kindId         Identifier of the kind of car to retrieve the models for
864
     * @param int $brandId        Brand identifier, as returned by <carVWEListBrands>.
865
     * @param int $page           Page to retrieve, pages start counting at 1
866
     *
867
     * @see carVWEList for kindId Options
868
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEModel> entries
869
     */
870
    public function carVWEListModels($productionYear, $kindId, $brandId, $page)
871
    {
872
        return $this->getAdapter()->call(
873
            'carVWEListModels',
874
            [
875
                'production_year' => (int)$productionYear,
876
                'kind_id'         => (int)$kindId,
877
                'brand_id'        => (int)$brandId,
878
                'page'            => (int)$page,
879
            ]
880
        );
881
    }
882
883
    /**
884
     * Retrieve possible versions for a specific model of car.
885
     * Please note that when using a test account an older and less complete dataset is used.
886
     *
887
     * @param int $productionYear Search for versions which were produced in this year, or one year before or after.
888
     *                            If 0, versions of all years are returned.
889
     * @param int $kindId         Identifier of the kind of car to retrieve the versions for.
890
     *                            1 - passenger car, yellow license plate
891
     *                            2 - delivery trucks, company cars, up to 3.5 tons
892
     *                            3 - delivery trucks, company cars, up to 10 tons
893
     *                            4 - off-road four wheel drives
894
     *                            5 - motorcycles
895
     *                            6 - moped
896
     *                            8 - bus
897
     * @param int $brandId        Body style identifier. Optional.
898
     * @param int $modelId        Model identifier, as returned by <carVWEListModels>.
899
     * @param int $fuelTypeId     Fuel type identifier. Optional
900
     * @param int $bodyStyleId    Body style identifier. Optional.
901
     *                            02 - 2/4-drs sedan (2/4 deurs sedan)
902
     *                            03 - 3/5-drs (3/5 deurs hatchback)
903
     *                            04 - Coupé
904
     *                            05 - 2-drs (2 deurs cabrio)
905
     *                            06 - Hardtop
906
     *                            07 - 3/5-drs (3/5 deurs softtop)
907
     *                            08 - 2-drs (2 deurs targa)
908
     *                            09 - 5-drs (5 deurs liftback)
909
     *                            10 - 3/4/5-drs (combi 3/4/5 deurs)
910
     *                            14 - afg. pers. auto (afgeleid van personenauto, voertuig met grijs kenteken)
911
     *                            15 - bedrijfsauto (bestel/bedrijfsauto)
912
     *                            16 - pers. vervoer (bus, personenvervoer)
913
     *                            17 - open laadbak (pick-up truck)
914
     *                            18 - Chassis+Cabine
915
     *                            19 - Kaal Chassis
916
     *                            20 - MPV
917
     *                            21 - SportUtilityVeh (SUV)
918
     * @param int $doors          Number of doors, If the design is 2/4-drs or 3/5-drs, this parameter can distinguish
919
     *                            between the two models. Typical values: 2, 3, 4, 5. Optional.
920
     * @param int $gearId         Type of gearbox. Optional.
921
     *                            01 - manual transmission
922
     *                            02 - automatic transmission
923
     *                            03 - manual, 4 speed
924
     *                            04 - manual, 5 speed
925
     *                            05 - manual, 6 speed
926
     *                            06 - manual, 7 speed
927
     *                            13 - Semi-automatic
928
     * @param int $page           Page to retrieve, pages start counting at 1
929
     *
930
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEListVersions
931
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEVersion> entries
932
     */
933
    public function carVWEListVersions(
934
        $productionYear,
935
        $kindId,
936
        $brandId,
937
        $modelId,
938
        $fuelTypeId,
939
        $bodyStyleId,
940
        $doors,
941
        $gearId,
942
        $page
943
    ) {
944
        return $this->getAdapter()->call(
945
            'carVWEListVersions',
946
            [
947
                'production_year' => (int)$productionYear,
948
                'kind_id'         => (int)$kindId,
949
                'brand_id'        => (int)$brandId,
950
                'model_id'        => (int)$modelId,
951
                'fuel_type_id'    => (int)$fuelTypeId,
952
                'body_style_id'   => (int)$bodyStyleId,
953
                'doors'           => (int)$doors,
954
                'gear_id'         => (int)$gearId,
955
                'page'            => (int)$page,
956
            ]
957
        );
958
    }
959
960
    /**
961
     * Check the validity of a license plate and check code ('meldcode') combination.
962
     * This method differs from <carVWEMeldcodeCheck> in that it also returns whether a car is active.
963
     *
964
     * @param string $licensePlate Dutch license plate (kenteken)
965
     * @param int    $code         code (meldcode), 4 digits
966
     *
967
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarCheckCode
968
     * @return \StdClass <CarCheckCode>
969
     */
970
    public function carVWEMeldcodeCheck($licensePlate, $code)
971
    {
972
        return $this->getAdapter()->call(
973
            'carVWEMeldcodeCheck',
974
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
975
        );
976
    }
977
978
    /**
979
     * Retrieve options of a car.
980
     * The atlCode can be obtained using <carVWEListBrands>, <carVWEListModels> and <carVWEListVersions> consecutively
981
     * or by using <carVWEBasicTypeData> when it concerns a specific car (requires license plate).
982
     *
983
     * @param string $licensePlate The license plate of a car
984
     * @param int    $atlCode      Code identifying the version of the car
985
     *
986
     * @see  carVWEBasicTypeData
987
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEOptions
988
     * @return \StdClass <CarVWEOptions>
989
     */
990
    public function carVWEOptions($licensePlate, $atlCode)
991
    {
992
        return $this->getAdapter()->call(
993
            'carVWEOptions',
994
            ['license_plate' => (string)$licensePlate, 'atl_code' => (int)$atlCode]
995
        );
996
    }
997
998
    /**
999
     * Retrieve photos of a car using it's unique atlCode.
1000
     *
1001
     * @param int $atlCode Code identifying the version of the car. atlCode can be obtained using <carVWEBasicTypeData>,
1002
     *
1003
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEPhotos
1004
     * @return \StdClass <CarVWEPhoto>
1005
     */
1006
    public function carVWEPhotos($atlCode)
1007
    {
1008
        return $this->getAdapter()->call('carVWEPhotos', ['atl_code' => (int)$atlCode]);
1009
    }
1010
1011
    /**
1012
     * Retrieve extended information for a specific version of a car.
1013
     * Please note that when using a test account an older and less complete dataset is used.
1014
     *
1015
     * @param string $licensePlate Dutch license plate (kenteken)
1016
     * @param int    $atlCode      Code identifying the version of the car. The ATL code can be obtained using
1017
     *                             <carVWEBasicTypeData>.
1018
     *
1019
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEVersionPrice
1020
     * @return \StdClass <CarVWEVersionPrice>
1021
     */
1022
    public function carVWEVersionPrice($licensePlate, $atlCode)
1023
    {
1024
        return $this->getAdapter()->call(
1025
            'carVWEVersionPrice',
1026
            ['license_plate' => (string)$licensePlate, 'atl_code' => (int)$atlCode]
1027
        );
1028
    }
1029
1030
    /**
1031
     * Retrieve extended information for a specific version of a car.
1032
     *
1033
     * @param int $productionYear Get information for the model produced in this year. This affects the <CarVWEPrices>
1034
     *                            in the result
1035
     * @param int $atlCode        Code identifying the version of the car
1036
     *
1037
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEVersionYearData
1038
     * @return \StdClass <CarVWEVersionYearData>
1039
     */
1040
    public function carVWEVersionYearData($productionYear, $atlCode)
1041
    {
1042
        return $this->getAdapter()->call(
1043
            'carVWEVersionYearData',
1044
            ['production_year' => $productionYear, 'atl_code' => $atlCode]
1045
        );
1046
    }
1047
1048
    /**
1049
     * Create a testUser.
1050
     *
1051
     * @param string $application
1052
     * @param string $email
1053
     * @param string $companyName
1054
     * @param string $contactName
1055
     * @param string $telephone
1056
     *
1057
     * @return \StdClass <User>
1058
     */
1059
    public function createTestUser($application, $email, $companyName, $contactName, $telephone)
1060
    {
1061
        return $this->getAdapter()->call(
1062
            'createTestUser',
1063
            [
1064
                'application' => $application,
1065
                'email'       => $email,
1066
                'companyname' => $companyName,
1067
                'contactname' => $contactName,
1068
                'telephone'   => $telephone,
1069
            ]
1070
        );
1071
    }
1072
1073
    /**
1074
     * Retrieve a detailed company report.
1075
     *
1076
     * @param int    $companyId companyID, as returned by <creditsafeSearch>. Due to legal reasons all report requests
1077
     *                          of German companies (DE) must be accompanied with a reason code. To specify a report
1078
     *                          request reason code, append one of the following codes onto the company_id (without
1079
     *                          quotes):
1080
     *                          '|1' -- Credit inquiry
1081
     *                          '|2' -- Business Relationship
1082
     *                          '|3' -- Solvency Check
1083
     *                          '|4' -- Claim
1084
     *                          '|5' -- Contract
1085
     *                          '|6' -- Commercial Credit Insurance
1086
     * @param string $language  ISO 639-1 notation language that the report should be returned in, for example: "EN".
1087
     * @param string $document  Specify to retrieve an extra document with an excerpt of the data. Currently unused.
1088
     *                          Possible values: [empty string] -- Return no extra document.
1089
     *
1090
     * @return \StdClass <CreditsafeCompanyReportFull>
1091
     */
1092
    public function creditsafeGetReportFull($companyId, $language, $document)
1093
    {
1094
        return $this->getAdapter()->call(
1095
            'creditsafeGetReportFull',
1096
            ['company_id' => (int)$companyId, 'language' => (string)$language, 'document' => (string)$document]
1097
        );
1098
    }
1099
1100
    /**
1101
     * Search for a company.
1102
     * The parameters which can be used differ per country.
1103
     *
1104
     * @param string $country            The country to search in, An ISO 3166-1 alpha-2 country code, optional
1105
     * @param string $id                 Search a single company, using the Creditsafe company identifier, optional
1106
     * @param string $registrationNumber Search using a company registration number, optional
1107
     * @param string $status             Search using a company status. See <Country parameters> for allowed values
1108
     *                                   per country, optional
1109
     * @param string $officeType         Search using a company office type. See <Country parameters> for allowed
1110
     *                                   values per country, optional
1111
     * @param string $name               Search using a company name, optional
1112
     * @param string $nameMatchType      How to match the text in the *name* parameter, the default match and
1113
     *                                   possibles types are given in <Country parameters> for each country, optional
1114
     * @param string $address            Search using a company's complete address, optional
1115
     * @param string $addressMatchType   How to match the text in the *address* parameter, the default match type
1116
     *                                   and possibles types are given in <Country parameters> for each country,
1117
     *                                   optional
1118
     * @param string $street             Company's address street, optional
1119
     * @param string $houseNumber        Company's address house number, optional
1120
     * @param string $city               Company's address city, optional
1121
     * @param string $postalCode         Company's address postal code, optional
1122
     * @param string $province           Company's address province, optional
1123
     * @param string $phoneNumber        Company's phone number, optional
1124
     * @param int    $page               Page of search results to retrieve
1125
     *
1126
     * @return \StdClass <Patterns::{Type}PagedResult> of <CreditsafeCompany> entries.
1127
     */
1128
    public function creditsafeSearch(
1129
        $country,
1130
        $id,
1131
        $registrationNumber,
1132
        $status,
1133
        $officeType,
1134
        $name,
1135
        $nameMatchType,
1136
        $address,
1137
        $addressMatchType,
1138
        $street,
1139
        $houseNumber,
1140
        $city,
1141
        $postalCode,
1142
        $province,
1143
        $phoneNumber,
1144
        $page
1145
    ) {
1146
        return $this->getAdapter()->call(
1147
            'creditsafeSearch',
1148
            [
1149
                'country'             => $country,
1150
                'id'                  => $id,
1151
                'registration_number' => $registrationNumber,
1152
                'status'              => $status,
1153
                'office_type'         => $officeType,
1154
                'name'                => $name,
1155
                'name_match_type'     => $nameMatchType,
1156
                'address'             => $address,
1157
                'address_match_type'  => $addressMatchType,
1158
                'street'              => $street,
1159
                'house_number'        => $houseNumber,
1160
                'city'                => $city,
1161
                'postal_code'         => $postalCode,
1162
                'province'            => $province,
1163
                'phone_number'        => $phoneNumber,
1164
                'page'                => $page,
1165
            ]
1166
        );
1167
    }
1168
1169
    /**
1170
     * Perform a Dun & Bradstreet Business Verification on a business.
1171
     * Returns information on location, situation, size and financial status on the business. The field companyIdType
1172
     * indicates the type of this field.
1173
     * Several types of company identifiers are used within this service. Methods that retrieve company data all types
1174
     * of identifiers: DUNS number, D&B key, and regional business number. All company references returned by search
1175
     * methods are identified using D&B keys.
1176
     *
1177
     * @param string $companyId     Identifier for the business.
1178
     * @param string $companyIdType Type of company identifier
1179
     *
1180
     * @link   https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbBusinessVerification
1181
     * @return \StdClass <DNBBusinessVerification>
1182
     */
1183
    public function dnbBusinessVerification($companyId, $companyIdType)
1184
    {
1185
        return $this->getAdapter()->call(
1186
            'dnbBusinessVerification',
1187
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1188
        );
1189
    }
1190
1191
    /**
1192
     * Retrieve extensive management Dun & Bradstreet Business information
1193
     * See <Dun & Bradstreet::Company identifiers>.
1194
     *
1195
     * @param string $companyId     Identifier for the business.
1196
     * @param string $companyIdType Type of company identifier
1197
     *
1198
     * @link   https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbEnterpriseManagement
1199
     * @return \StdClass <DNBBusinessVerification>
1200
     */
1201
    public function dnbEnterpriseManagement($companyId, $companyIdType)
1202
    {
1203
        return $this->getAdapter()->call(
1204
            'dnbEnterpriseManagement',
1205
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1206
        );
1207
    }
1208
1209
    /**
1210
     * Retrieve a Dun & Bradstreet Business Verification for a business.
1211
     * See <Dun & Bradstreet::Company identifiers>.
1212
     *
1213
     * @param string $companyId     Identifier for the business
1214
     * @param string $companyIdType Type of company identifier
1215
     *
1216
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbGetReference
1217
     * @return \StdClass <DNBBusinessVerification>
1218
     */
1219
    public function dnbGetReference($companyId, $companyIdType)
1220
    {
1221
        return $this->getAdapter()->call(
1222
            'dnbGetReference',
1223
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1224
        );
1225
    }
1226
1227
    /**
1228
     * Do a Dun & Bradstreet Business Quick Check on a business.
1229
     * See <Dun & Bradstreet::Company identifiers>.
1230
     *
1231
     * @param string $companyId     Identifier for the business
1232
     * @param string $companyIdType Type of company identifier
1233
     *                              Possible values:
1234
     *                              duns    - DUNS number
1235
     *                              dnb_key - D&B business key
1236
     *                              nl|us|.. - 2 character ISO 3166-1 country code. Use this if the companyId is a
1237
     *                              regional business number. For the Netherlands (NL) it can either be an 8-digit
1238
     *                              Chamber of Commerce Number (KvK-nummer), a 12-digit Establishment Number
1239
     *                              (Vestigingsnummer), or a 9-digit RSIN Number
1240
     *
1241
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbQuickCheck
1242
     * @return \StdClass <DNBQuickCheck>
1243
     */
1244
    public function dnbQuickCheck($companyId, $companyIdType)
1245
    {
1246
        return $this->getAdapter()->call(
1247
            'dnbQuickCheck',
1248
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1249
        );
1250
    }
1251
1252
    /**
1253
     * Search for a business on name and location.
1254
     * This method returns basic information and a DNB business key for each business. Business can be searched on name
1255
     * with optional address parameters. Searching on address can be done using the postcode, or the city and at least
1256
     * one other address field.
1257
     * See <Dun & Bradstreet::Company identifiers>.
1258
     *
1259
     * @param string $name            Trade name of the business, required.
1260
     * @param string $streetName      Street the business is located at, optional.
1261
     * @param string $houseNo         House number of the business, optional.
1262
     * @param string $houseNoAddition House number addition, optional.
1263
     * @param string $postcode        Postcode of the business, optional.
1264
     * @param string $cityName        City where the business is located, optional.
1265
     * @param string $country         The 2 character ISO 3166-1 code for the country where the business is located.
1266
     *                                Required
1267
     * @param int    $page            Page to retrieve, pages start counting at 1.
1268
     *
1269
     * @deprecated use <dnbSearchReferenceV2> instead
1270
     * @return \StdClass <DNBBusinessVerification>
1271
     */
1272 View Code Duplication
    public function dnbSearchReference(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1273
        $name,
1274
        $streetName,
1275
        $houseNo,
1276
        $houseNoAddition,
1277
        $postcode,
1278
        $cityName,
1279
        $country,
1280
        $page
1281
    ) {
1282
        return $this->getAdapter()->call(
1283
            'dnbSearchReference',
1284
            [
1285
                'name'            => $name,
1286
                'streetname'      => $streetName,
1287
                'houseno'         => $houseNo,
1288
                'housenoaddition' => $houseNoAddition,
1289
                'postcode'        => $postcode,
1290
                'cityname'        => $cityName,
1291
                'country'         => $country,
1292
                'page'            => $page,
1293
            ]
1294
        );
1295
    }
1296
1297
    /**
1298
     * Search for a business on name and location.
1299
     * This method returns basic information and a DNB business key for each business. Business can be searched on name
1300
     * with optional address parameters. Searching on address can be done using the postcode, or the city and at least
1301
     * one other address field.
1302
     *
1303
     * @param string $name            Trade name of the business, required.
1304
     * @param string $streetName      Street the business is located at, optional
1305
     * @param string $houseNo         House number of the business, optional
1306
     * @param string $houseNoAddition House number addition, optional
1307
     * @param string $postcode        Postcode of the business, optional
1308
     * @param string $cityName        City where the business is located, optional
1309
     * @param string $region          Depending on the country, this may be a state, province, or other large
1310
     *                                geographical area.
1311
     * @param string $country         For searches in the United States (US) and Canada (CA) this parameter is required.
1312
     *                                State abbreviations, such as NY for New York, must be used
1313
     *                                for the US.
1314
     * @param int    $page
1315
     *
1316
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbSearchReferenceV2
1317
     * @return \StdClass <Patterns::{Type}PagedResult> of <DNBBusinessReferenceV2> entries
1318
     */
1319 View Code Duplication
    public function dnbSearchReferenceV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1320
        $name,
1321
        $streetName,
1322
        $houseNo,
1323
        $houseNoAddition,
1324
        $postcode,
1325
        $cityName,
1326
        $region,
1327
        $country,
1328
        $page
1329
    ) {
1330
        return $this->getAdapter()->call(
1331
            'dnbSearchReferenceV2',
1332
            [
1333
                'name'            => $name,
1334
                'streetname'      => $streetName,
1335
                'houseno'         => $houseNo,
1336
                'housenoaddition' => $houseNoAddition,
1337
                'postcode'        => $postcode,
1338
                'cityname'        => $cityName,
1339
                'region'          => $region,
1340
                'country'         => $country,
1341
                'page'            => $page,
1342
            ]
1343
        );
1344
    }
1345
1346
    /**
1347
     * Retrieve basic WorldBase business information.
1348
     * See <Dun & Bradstreet::Company identifiers>.
1349
     *
1350
     * @param string $companyId     Identifier for the business.
1351
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1352
     *
1353
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketing
1354
     * @return \StdClass <DNBMarketing>
1355
     */
1356
    public function dnbWorldbaseMarketing($companyId, $companyIdType)
1357
    {
1358
        return $this->getAdapter()->call(
1359
            'dnbWorldbaseMarketing',
1360
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1361
        );
1362
    }
1363
1364
    /**
1365
     * Retrieve detailed WorldBase business information.
1366
     *
1367
     * @param string $companyId     Identifier for the business.
1368
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1369
     *
1370
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketingPlus
1371
     * @return \StdClass <DNBMarketingPlusResult>
1372
     */
1373
    public function dnbWorldbaseMarketingPlus($companyId, $companyIdType)
1374
    {
1375
        return $this->getAdapter()->call(
1376
            'dnbWorldbaseMarketingPlus',
1377
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1378
        );
1379
    }
1380
1381
    /**
1382
     * Detailed WorldBase information, including information on a business' family tree.
1383
     *
1384
     * @param string $companyId     Identifier for the business.
1385
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1386
     *
1387
     * @link  https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketingPlusLinkage
1388
     * @return \StdClass <DNBMarketingPlusLinkageResult>
1389
     */
1390
    public function dnbWorldbaseMarketingPlusLinkage($companyId, $companyIdType)
1391
    {
1392
        return $this->getAdapter()->call(
1393
            'dnbWorldbaseMarketingPlusLinkage',
1394
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1395
        );
1396
    }
1397
1398
    /**
1399
     * Lookup the driving distance in meters between two neighborhood codes for both the fastest and shortest route.
1400
     *
1401
     * @param string $nbCodefrom neighborhood code at start of route
1402
     * @param string $nbCodeto   destination neighborhoodcode
1403
     *
1404
     * @link https://webview.webservices.nl/documentation/files/service_driveinfo-php.html#Driveinfo.driveInfoDistanceLookup
1405
     * @return \StdClass <DriveInfo>
1406
     */
1407
    public function driveInfoDistanceLookup($nbCodefrom, $nbCodeto)
1408
    {
1409
        return $this->getAdapter()->call(
1410
            'driveInfoDistanceLookup',
1411
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
1412
        );
1413
    }
1414
1415
    /**
1416
     * Lookup the driving time in minutes between two neighborhood codes for both the fastest and shortest route.
1417
     *
1418
     * @param string $nbCodefrom neighborhood code at start of route
1419
     * @param string $nbCodeto   destination neighborhoodcode
1420
     *
1421
     * @link https://webview.webservices.nl/documentation/files/service_driveinfo-php.html#Driveinfo.driveInfoTimeLookup
1422
     * @return \StdClass <DriveInfo>
1423
     */
1424
    public function driveInfoTimeLookup($nbCodefrom, $nbCodeto)
1425
    {
1426
        return $this->getAdapter()->call(
1427
            'driveInfoTimeLookup',
1428
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
1429
        );
1430
    }
1431
1432
    /**
1433
     * Determine if a specific address exists using the unique '1234AA12'
1434
     * postcode + house number format. If returns either the full address in <DutchAddressPostcodeRange> format,
1435
     * or an error if no matching address exists.
1436
     *
1437
     * @param string $address Address to validate, in the unique '1234AA12' postcode house number format.
1438
     *
1439
     * @return \StdClass <DutchAddressPostcodeRange>
1440
     */
1441
    public function dutchAddressRangePostcodeSearch($address)
1442
    {
1443
        return $this->getAdapter()->call('dutchAddressRangePostcodeSearch', ['address' => $address]);
1444
    }
1445
1446
    /**
1447
     * Retrieve data on a business establishment.
1448
     * When only the dossier number parameter is specified, the main establishment of the business will be returned.
1449
     * Specify the establishment_number in order to retrieve another establishment. You can find dossier and
1450
     * establishment numbers using <dutchBusinessSearchParameters> or <dutchBusinessSearchDossierNumber>. If logging of
1451
     * data is enabled for the user, the requested dossier is logged. This enables the user to receive updates to the
1452
     * dossier in the future. See <Dutch Business update service methods>.
1453
     *
1454
     * @param int      $dossierNumber       The Chamber of Commerce number
1455
     * @param int|null $establishmentNumber The Establishment number
1456
     *
1457
     * @link https://webview.webservices.nl/documentation/files/service_dutchaddress-php.html#Dutch_Address.dutchAddressRangePostcodeSearch
1458
     * @return \stdClass <DutchBusinessDossier>
1459
     */
1460
    public function dutchBusinessGetDossier($dossierNumber, $establishmentNumber = null)
1461
    {
1462
        return $this->getAdapter()->call(
1463
            'dutchBusinessGetDossier',
1464
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
1465
        );
1466
    }
1467
1468
    /**
1469
     *  Get a list of logged updates for a specific business dossier.
1470
     *
1471
     * @param string      $dossierNumber   Chamber of Commerce number.
1472
     * @param string      $periodStartDate Period start date, in Y-m-d format
1473
     * @param string|null $periodEndDate   Period end date, in Y-m-d format. The max period is one year. [optional]
1474
     *
1475
     * @return \StdClass <DutchBusinessDossierHistory>
1476
     */
1477
    public function dutchBusinessGetDossierHistory($dossierNumber, $periodStartDate, $periodEndDate = null)
1478
    {
1479
        return $this->getAdapter()->call(
1480
            'dutchBusinessGetDossierHistory',
1481
            [
1482
                'dossier_number'    => $dossierNumber,
1483
                'period_start_date' => $periodStartDate,
1484
                'period_end_date'   => $periodEndDate]
1485
        );
1486
    }
1487
1488
    /**
1489
     * Get an extract document in PDF, containing the available Chamber of Commerce data for a business.
1490
     * The document is generated using the business' `Online inzage uittreksel`.
1491
     *
1492
     * @param string $dossierNumber Chamber of Commerce number
1493
     * @param bool   $allowCaching  determines whether a cached document may be returned.
1494
     *
1495
     * @see <DutchBusinessExtractDocumentData>
1496
     * @return \StdClass <DutchBusinessExtractDocument>
1497
     */
1498
    public function dutchBusinessGetExtractDocument($dossierNumber, $allowCaching)
1499
    {
1500
        return $this->getAdapter()->call(
1501
            'dutchBusinessGetExtractDocument',
1502
            ['dossier_number' => (string)$dossierNumber, 'allow_caching' => (bool)$allowCaching]
1503
        );
1504
    }
1505
1506
    /**
1507
     * Get the data from an extract document containing the available Chamber of Commerce data for a business.
1508
     * The document is generated using the business' `Online inzage uittreksel`.
1509
     *
1510
     * @param string $dossierNumber Chamber of Commerce number
1511
     * @param bool   $allowCaching  Determines whether a cached document may be returned
1512
     *
1513
     * @link       https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractDocumentData
1514
     * @deprecated please use <DutchBusinessExtractDocumentV2>
1515
     * @return \StdClass <DutchBusinessExtractDocument>
1516
     */
1517
    public function dutchBusinessGetExtractDocumentData($dossierNumber, $allowCaching)
1518
    {
1519
        return $this->getAdapter()->call(
1520
            'dutchBusinessGetExtractDocumentData',
1521
            ['dossier_number' => $dossierNumber, 'allow_caching' => $allowCaching]
1522
        );
1523
    }
1524
1525
    /**
1526
     * Get the extract data and document for a business dossier.
1527
     *
1528
     * @param string $dossierNumber Chamber of Commerce number
1529
     *
1530
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractDocumentDataV2
1531
     * @return \StdClass <DutchBusinessExtractDocumentV2>
1532
     */
1533
    public function dutchBusinessGetExtractDocumentDataV2($dossierNumber)
1534
    {
1535
        return $this->getAdapter()->call('dutchBusinessGetExtractDocumentDataV2', ['dossier_number' => $dossierNumber]);
1536
    }
1537
1538
    /**
1539
     * Get a list of historical business-extract references for the given company or organisation.
1540
     * Each business-extract reference in the history contains a summary of the changes relative to the previous
1541
     * business-extract reference in the history. The business-extract history also contains an forecast that indicates
1542
     * whether changes have occured between the latest business-extract document and the current state or the
1543
     * organisation. When changes are detected the most recent document in the history probably does not represent the
1544
     * current state of the organisation. A real-time document can be retrieved using
1545
     * <dutchBusinessGetExtractDocumentData> or <dutchBusinessGetExtractDocument>.
1546
     *
1547
     * @param string $dossierNumber   Chamber of Commerce number
1548
     * @param string $periodStartDate The start date of the period of historic documents.
1549
     * @param string $periodEndDate   The end date of the set period, can differ max one year from start date.
1550
     *                                [optional][default:today]
1551
     *
1552
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistory
1553
     * @return \StdClass <DutchBusinessExtractHistory>
1554
     */
1555
    public function dutchBusinessGetExtractHistory($dossierNumber, $periodStartDate, $periodEndDate)
1556
    {
1557
        return $this->getAdapter()->call(
1558
            'dutchBusinessGetExtractHistory',
1559
            [
1560
                'dossier_number'    => $dossierNumber,
1561
                'period_start_date' => $periodStartDate,
1562
                'period_end_date'   => $periodEndDate,
1563
            ]
1564
        );
1565
    }
1566
1567
    /**
1568
     * Get a list of historical business-extract references for the given company or organisation.
1569
     * Collected by Webservices.nl that contain changes compared to their previous retrieved extract.
1570
     *
1571
     * @param string $dossierNumber   Chamber of Commerce number.
1572
     * @param string $periodStartDate The start date of the period of historic documents.
1573
     * @param string $periodEndDate   The end date of the set period. [optional][default:today]
1574
     *
1575
     * @return \StdClass <DutchBusinessExtractHistory>
1576
     */
1577
    public function dutchBusinessGetExtractHistoryChanged($dossierNumber, $periodStartDate, $periodEndDate)
1578
    {
1579
        return $this->getAdapter()->call(
1580
            'dutchBusinessGetExtractHistoryChanged',
1581
            [
1582
                'dossier_number'    => $dossierNumber,
1583
                'period_start_date' => $periodStartDate,
1584
                'period_end_date'   => $periodEndDate,
1585
            ]
1586
        );
1587
    }
1588
1589
    /**
1590
     * Retrieve a historical business-extract using a business-extract identifier.
1591
     * Business-extract identifiers can be found using <dutchBusinessGetExtractHistory>.
1592
     *
1593
     * @param string $extractId Business-extract identifier
1594
     *
1595
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistoryChanged
1596
     * @return \StdClass <DutchBusinessExtractDocumentData>.
1597
     */
1598
    public function dutchBusinessGetExtractHistoryDocumentData($extractId)
1599
    {
1600
        return $this->getAdapter()->call('dutchBusinessGetExtractHistoryDocumentData', ['extract_id' => $extractId]);
1601
    }
1602
1603
    /**
1604
     * Retrieve a historical business-extract using a business-extract identifier.
1605
     * Business-extract identifiers can be found using <dutchBusinessGetExtractHistory>.
1606
     *
1607
     * @param string $extractId Business-extract identifier
1608
     *
1609
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistoryDocumentDataV2
1610
     * @return \StdClass <DutchBusinessExtractDocumentDataV2>
1611
     */
1612
    public function dutchBusinessGetExtractHistoryDocumentDataV2($extractId)
1613
    {
1614
        return $this->getAdapter()->call('dutchBusinessGetExtractHistoryDocumentDataV2', ['extract_id' => $extractId]);
1615
    }
1616
1617
    /**
1618
     * Get the legal extract data and document for a business dossier.
1619
     *
1620
     * @param string $dossierNumber Chamber of Commerce number
1621
     *
1622
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetLegalExtractDocumentDataV2
1623
     * @return \StdClass <DutchBusinessExtractDocumentDataV2>
1624
     */
1625
    public function dutchBusinessGetLegalExtractDocumentDataV2($dossierNumber)
1626
    {
1627
        return $this->getAdapter()->call(
1628
            'dutchBusinessGetLegalExtractDocumentDataV2',
1629
            ['dossier_number' => $dossierNumber]
1630
        );
1631
    }
1632
1633
    /**
1634
     * Get the business positions/functionaries for a business.
1635
     *
1636
     * @param string $dossierNumber The Chamber of Commerce number
1637
     *
1638
     * @return \StdClass <DutchBusinessPositions> entry
1639
     */
1640
    public function dutchBusinessGetPositions($dossierNumber)
1641
    {
1642
        return $this->getAdapter()->call('dutchBusinessGetPositions', ['dossier_number' => $dossierNumber]);
1643
    }
1644
1645
    /**
1646
     * Look up a SBI ('Standaard Bedrijfs Indeling 2008') code.
1647
     * Returns the section and its description and all levels of SBI codes and their description, according to the
1648
     * 17-04-2014 version.
1649
     *
1650
     * @param string $sbiCode  a number between 2 and 6 characters.
1651
     * @param string $language the language of the resulted sbi code descriptions nl (default) || en (English)
1652
     *
1653
     * @return \StdClass <DutchBusinessSBICodeInfo>
1654
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetSBIDescription
1655
     */
1656
    public function dutchBusinessGetSBIDescription($sbiCode, $language)
1657
    {
1658
        return $this->getAdapter()->call(
1659
            'dutchBusinessGetSBIDescription',
1660
            ['sbi_code' => $sbiCode, 'language' => $language]
1661
        );
1662
    }
1663
1664
    /**
1665
     * @param string $dossierNumber The Chamber of Commerce number
1666
     *
1667
     * @return \StdClass <DutchBusinessVatNumber>
1668
     */
1669
    public function dutchBusinessGetVatNumber($dossierNumber)
1670
    {
1671
        return $this->getAdapter()->call('dutchBusinessGetVatNumber', ['dossier_number' => $dossierNumber]);
1672
    }
1673
1674
    /**
1675
     * Find business establishments for a dossier number.
1676
     * Found dossiers are ordered by relevance, ensuring the establishments that match the search parameters best are
1677
     * listed at the top of the result list. When the dossier_number is omitted, the search behaves similar to the
1678
     * <dutchBusinessSearchParametersV2> method.
1679
     *
1680
     * @param string $dossierNumber       Dossier number for the business
1681
     * @param string $tradeName           Name under which the organisation engages in commercial activity
1682
     * @param string $city                City
1683
     * @param string $street              Street
1684
     * @param string $postcode            postalCode
1685
     * @param int    $houseNumber         house number
1686
     * @param string $houseNumberAddition optional addition
1687
     * @param string $telephoneNumber     telephone number
1688
     * @param string $domainName          Domain name or email. When an email address is given, the domain part of that
1689
     *                                    address is used
1690
     * @param bool   $strictSearch
1691
     * @param int    $page
1692
     *
1693
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearch
1694
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessEstablishmentReference>
1695
     */
1696
    public function dutchBusinessSearch(
1697
        $dossierNumber,
1698
        $tradeName,
1699
        $city,
1700
        $street,
1701
        $postcode,
1702
        $houseNumber,
1703
        $houseNumberAddition,
1704
        $telephoneNumber,
1705
        $domainName,
1706
        $strictSearch,
1707
        $page
1708
    ) {
1709
        return $this->getAdapter()->call(
1710
            'dutchBusinessSearch',
1711
            [
1712
                'dossier_number'        => $dossierNumber,
1713
                'trade_name'            => $tradeName,
1714
                'city'                  => $city,
1715
                'street'                => $street,
1716
                'postcode'              => $postcode,
1717
                'house_number'          => $houseNumber,
1718
                'house_number_addition' => $houseNumberAddition,
1719
                'telephone_number'      => $telephoneNumber,
1720
                'domain_name'           => $domainName,
1721
                'strict_search'         => $strictSearch,
1722
                'page'                  => $page,
1723
            ]
1724
        );
1725
    }
1726
1727
    /**
1728
     * Search for business establishments using a known identifier.
1729
     * Any combination of parameters may be specified. Only businesses matching all parameters will be returned.
1730
     *
1731
     * @param string $dossierNumber       The Chamber of Commerce number
1732
     * @param string $establishmentNumber The Establishment number
1733
     * @param string $rsinNumber          The RSIN (`Rechtspersonen Samenwerkingsverbanden Informatie Nummer`) number
1734
     * @param int    $page                Page to retrieve, pages start counting at 1
1735
     *
1736
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1737
     */
1738 View Code Duplication
    public function dutchBusinessSearchDossierNumber($dossierNumber, $establishmentNumber, $rsinNumber, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1739
    {
1740
        return $this->getAdapter()->call(
1741
            'dutchBusinessSearchDossierNumber',
1742
            [
1743
                'dossier_number'       => $dossierNumber,
1744
                'establishment_number' => $establishmentNumber,
1745
                'rsin_number'          => $rsinNumber,
1746
                'page'                 => $page,
1747
            ]
1748
        );
1749
    }
1750
1751
    /**
1752
     * Search for business establishments using a known identifier.
1753
     * Any combination of parameters may be specified. Only businesses matching all parameters will be returned.
1754
     *
1755
     * @param string $dossierNumber       The Chamber of Commerce number
1756
     * @param string $establishmentNumber The Establishment number
1757
     * @param string $rsinNumber          The RSIN (`Rechtspersonen Samenwerkingsverbanden Informatie Nummer`) number
1758
     * @param int    $page                Page to retrieve, pages start counting at 1
1759
     *
1760
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearchEstablishments
1761
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessEstablishmentReference>
1762
     */
1763 View Code Duplication
    public function dutchBusinessSearchEstablishments($dossierNumber, $establishmentNumber, $rsinNumber, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1764
    {
1765
        return $this->getAdapter()->call(
1766
            'dutchBusinessSearchEstablishments',
1767
            [
1768
                'dossier_number'       => $dossierNumber,
1769
                'establishment_number' => $establishmentNumber,
1770
                'rsin_number'          => $rsinNumber,
1771
                'page'                 => $page,
1772
            ]
1773
        );
1774
    }
1775
1776
    /**
1777
     * @param string $tradeName           Name under which the organisation engages in commercial activity
1778
     * @param string $city                City
1779
     * @param string $street              Street
1780
     * @param string $postcode            PostalCode
1781
     * @param int    $houseNumber         House number
1782
     * @param string $houseNumberAddition House number addition
1783
     * @param string $telephoneNumber     Telephone number
1784
     * @param bool   $domainName          Domain name or email address, when an email address is given the domain part
1785
     *                                    of that address is used
1786
     * @param string $strictSearch
1787
     * @param int    $page                Page to retrieve, pages start counting at 1
1788
     *
1789
     * @deprecated see dutchBusinessSearchParametersV2 this version working
1790
     * @return \StdClass
1791
     */
1792
    public function dutchBusinessSearchParameters(
1793
        $tradeName,
1794
        $city,
1795
        $street,
1796
        $postcode,
1797
        $houseNumber,
1798
        $houseNumberAddition,
1799
        $telephoneNumber,
1800
        $domainName,
1801
        $strictSearch,
1802
        $page
1803
    ) {
1804
        return $this->getAdapter()->call(
1805
            'dutchBusinessSearchParameters',
1806
            [
1807
                'trade_name'            => $tradeName,
1808
                'city'                  => $city,
1809
                'street'                => $street,
1810
                'postcode'              => $postcode,
1811
                'house_number'          => $houseNumber,
1812
                'house_number_addition' => $houseNumberAddition,
1813
                'telephone_number'      => $telephoneNumber,
1814
                'domain_name'           => $domainName,
1815
                'strict_search'         => $strictSearch,
1816
                'page'                  => $page,
1817
            ]
1818
        );
1819
    }
1820
1821
    /**
1822
     * Find business establishments using a variety of parameters.
1823
     * Found dossiers are ordered by relevance, ensuring the dossiers that match the search parameters best are listed
1824
     * at the top of the result list. This method differs from <dutchBusinessSearchParameters> by returning an
1825
     * indication called "match_type" that defines what type of business name was matched upon
1826
     * (see <Tradename match types>).
1827
     * Using the search parameters:
1828
     * - tradeName will be used to search all business names for the dossiers, which include the trade name, legal name
1829
     *   and alternative trade names.
1830
     * - address matched against both the correspondence and establishment addresses of the business.
1831
     * - postbox addresses can be found by specifying 'Postbus' as street, and specifying the postbus number in
1832
     *   the houseNumber parameter.
1833
     *
1834
     * @param string $tradeName
1835
     * @param string $city
1836
     * @param string $street
1837
     * @param string $postcode
1838
     * @param int    $houseNumber
1839
     * @param string $houseNumberAddition
1840
     * @param string $telephoneNumber
1841
     * @param string $domainName
1842
     * @param bool   $strictSearch
1843
     * @param int    $page
1844
     *
1845
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReferenceV2>
1846
     */
1847
    public function dutchBusinessSearchParametersV2(
1848
        $tradeName,
1849
        $city,
1850
        $street,
1851
        $postcode,
1852
        $houseNumber,
1853
        $houseNumberAddition,
1854
        $telephoneNumber,
1855
        $domainName,
1856
        $strictSearch,
1857
        $page
1858
    ) {
1859
        return $this->getAdapter()->call(
1860
            'dutchBusinessSearchParametersV2',
1861
            [
1862
                'trade_name'            => $tradeName,
1863
                'city'                  => $city,
1864
                'street'                => $street,
1865
                'postcode'              => $postcode,
1866
                'house_number'          => $houseNumber,
1867
                'house_number_addition' => $houseNumberAddition,
1868
                'telephone_number'      => $telephoneNumber,
1869
                'domain_name'           => $domainName,
1870
                'strict_search'         => $strictSearch,
1871
                'page'                  => $page,
1872
            ]
1873
        );
1874
    }
1875
1876
    /**
1877
     * Find business establishments based on postcode and house number.
1878
     * This method can return more matches than <dutchBusinessSearchParameters>.
1879
     *
1880
     * @param string $postcode
1881
     * @param string $houseNumber         House number
1882
     * @param string $houseNumberAddition House number addition
1883
     * @param int    $page                Page to retrieve, pages start counting at 1
1884
     *
1885
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1886
     */
1887 View Code Duplication
    public function dutchBusinessSearchPostcode($postcode, $houseNumber, $houseNumberAddition, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1888
    {
1889
        return $this->getAdapter()->call(
1890
            'dutchBusinessSearchPostcode',
1891
            [
1892
                'postcode'              => $postcode,
1893
                'house_number'          => $houseNumber,
1894
                'house_number_addition' => $houseNumberAddition,
1895
                'page'                  => $page,
1896
            ]
1897
        );
1898
    }
1899
1900
    /**
1901
     * Search for businesses matching all of the given criteria.
1902
     * Either of these criteria can be left empty or 0. In that case, the criterium is not used. At least one of the
1903
     * criteria parameters must be supplied. At most 100 items may be supplied for the array parameters.
1904
     *
1905
     * @param array  $city               Array of cities. Businesses match if they are located in either of these
1906
     *                                   cities, thus if the establishment address is in one of these cities.
1907
     * @param array  $postcode           Array of postcodes or parts of postcodes. Bussinesses match if they are
1908
     *                                   located in either of these postcodes, or their postcode start with any of the
1909
     *                                   given partial postcodes. Thus, if the establishment address matches with one
1910
     *                                   of the given postcodes. For example, the partial postcode "10" matches most of
1911
     *                                   Amsterdam. Note that it would make little sense to supply both city and
1912
     *                                   postcode.
1913
     * @param array  $sbi                Array of SBI codes or partial SBI codes. Businesses match if they have either
1914
     *                                   of the given SBI codes, or their SBI code starts with the partial SBI code.
1915
     * @param bool   $primarySbiOnly     Match primary SBI only. A business may have up to three SBI codes assigned. If
1916
     *                                   primary_sbi_only is true, businesses only match if their main SBI code matches
1917
     *                                   with one of the codes in the 'sbi' field. If primary_sbi_only is false,
1918
     *                                   businesses are matched if either of the three SBI codes match the 'sbi' field.
1919
     * @param array  $legalForm          Array of integer legal form codes. Bussiness match if they have either of
1920
     *                                   these legalforms. A list of legal form codes can be found in the documentation
1921
     *                                   of <DutchBusinessDossier>.
1922
     * @param int    $employeesMin       Minimum number of employees working at the business
1923
     * @param int    $employeesMax       Maximum number of employees working at the business
1924
     * @param string $economicallyActive Indicates whether the businesses should be economically active
1925
     * @param string $financialStatus    Indicates the financial status of the businesses.
1926
     * @param string $changedSince       Date in yyyy-mm-dd format. Businesses match if the information about them
1927
     *                                   changed on or after this date.
1928
     * @param string $newSince           Date in yyyy-mm-dd format. Only businesses which were added on or after this
1929
     *                                   date are returned. Note that this does not mean that the company was founded
1930
     *                                   after this date. Companies may be founded and only later be added to the
1931
     *                                   DutchBusiness database.
1932
     * @param int    $page               Page to retrieve, pages start counting at 1
1933
     *
1934
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearchSelection
1935
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1936
     */
1937 View Code Duplication
    public function dutchBusinessSearchSelection(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1938
        $city,
1939
        $postcode,
1940
        $sbi,
1941
        $primarySbiOnly,
1942
        $legalForm,
1943
        $employeesMin,
1944
        $employeesMax,
1945
        $economicallyActive,
1946
        $financialStatus,
1947
        $changedSince,
1948
        $newSince,
1949
        $page
1950
    ) {
1951
        return $this->getAdapter()->call(
1952
            'dutchBusinessSearchSelection',
1953
            [
1954
                'city'                => $city,
1955
                'postcode'            => $postcode,
1956
                'sbi'                 => $sbi,
1957
                'primary_sbi_only'    => $primarySbiOnly,
1958
                'legal_form'          => $legalForm,
1959
                'employees_min'       => $employeesMin,
1960
                'employees_max'       => $employeesMax,
1961
                'economically_active' => $economicallyActive,
1962
                'financial_status'    => $financialStatus,
1963
                'changed_since'       => $changedSince,
1964
                'new_since'           => $newSince,
1965
                'page'                => $page,
1966
            ]
1967
        );
1968
    }
1969
1970
    /**
1971
     * Add a dossier to the list of dossiers for which the user wants to receive updates.
1972
     * (the user whose credentials are used to make the call) After adding the dossier any future updates to the
1973
     * dossier
1974
     * can be retrieved using <dutchBusinessUpdateGetDossiers>. Before adding the dossier, call
1975
     * <dutchBusinessUpdateCheckDossier> to make sure you have the latest dossier version.
1976
     *  You do not need to call this method if you have retrieved a dossier using <dutchBusinessGetDossier>, in which
1977
     *  case it has been added automatically.
1978
     *
1979
     * @param string $dossierNumber       Chamber of Commerce number
1980
     * @param string $establishmentNumber Establishment number
1981
     *
1982
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateAddDossier
1983
     * @return \StdClass
1984
     */
1985
    public function dutchBusinessUpdateAddDossier($dossierNumber, $establishmentNumber)
1986
    {
1987
        return $this->getAdapter()->call(
1988
            'dutchBusinessUpdateAddDossier',
1989
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
1990
        );
1991
    }
1992
1993
    /**
1994
     * Retrieve information on the last change to a business establishment.
1995
     * This method can be used to check for updates on specific dossiers, regardless of whether requested dossiers are
1996
     * logged for the user. A <DutchBusinessUpdateReference> is returned for the most recent update, if any. The
1997
     * <DutchBusinessUpdateReference> contains the date of the latest update to the dossier, as well as the types of
1998
     * updates performed on that date. A fault message is returned if there have never been updates to the dossier. The
1999
     * same fault is returned if the dossier does not exist (or never existed).
2000
     *
2001
     * @param string $dossierNumber       Chamber of Commerce number
2002
     * @param string $establishmentNumber Establishment number
2003
     * @param array  $updateTypes         The types of updates to consider. See <Update types> for a list of types.
2004
     *                                    If the type 'Test' is specified, a <DutchBusinessUpdateReference> is returned
2005
     *                                    with DateLastUpdate set to today, its Update types will contain all the types
2006
     *                                    specified in the request.
2007
     *
2008
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateCheckDossier
2009
     * @return \StdClass <DutchBusinessUpdateReference>
2010
     */
2011
    public function dutchBusinessUpdateCheckDossier($dossierNumber, $establishmentNumber, $updateTypes)
2012
    {
2013
        return $this->getAdapter()->call(
2014
            'dutchBusinessUpdateCheckDossier',
2015
            [
2016
                'dossier_number'       => $dossierNumber,
2017
                'establishment_number' => $establishmentNumber,
2018
                'update_types'         => $updateTypes,
2019
            ]
2020
        );
2021
    }
2022
2023
    /**
2024
     * Retrieve dossier numbers for all dossiers changed since the given date.
2025
     * This method returns a <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference> entries, for all dossiers
2026
     * which were updated since the given changed_since date, and where the update was one of the given
2027
     * update_types. This method can be called periodically to obtain a list of recently updated dossiers. This
2028
     * list can then be checked against the list of locally stored dossiers, to determine which dossiers that
2029
     * the user has stored are changed and may be updated.
2030
     *
2031
     * @param string $changedSince Date in YYYY-MM-DD format. All dossiers changed on or after this date are returned.
2032
     *                             This date may not be more than 40 days ago.
2033
     * @param array  $updateTypes  The types of updates to consider. See <Update types> for a list of types. This
2034
     *                             method supports the update type 'New' to retrieve dossiers which have been
2035
     *                             registered
2036
     *                             with the DutchBusiness since the changed_since date.
2037
     * @param int    $page         Page to retrieve, pages start counting at 1
2038
     *
2039
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateGetChangedDossiers
2040
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference>
2041
     */
2042
    public function dutchBusinessUpdateGetChangedDossiers($changedSince, $updateTypes, $page)
2043
    {
2044
        return $this->getAdapter()->call(
2045
            'dutchBusinessUpdateGetChangedDossiers',
2046
            ['changed_since' => $changedSince, 'update_types' => $updateTypes, 'page' => $page]
2047
        );
2048
    }
2049
2050
    /**
2051
     * Returns a list of all dossiers that have been updated since they were last retrieved by the user.
2052
     * (the user whose credentials are used to make the call). If a dossier is returned that is no longer of interest
2053
     * or has the update type 'Removed', calling <dutchBusinessUpdateRemoveDossier> prevents it from occurring in this
2054
     * method's output. If a dossier from the output list is retrieved using <dutchBusinessGetDossier>, a second call
2055
     * to <dutchBusinessUpdateGetDossiers> will not contain the dossier anymore. Every <DutchBusinessUpdateReference>
2056
     * describes a dossier, when it was last updated and what types of updates have occurred since the dossier was last
2057
     * retrieved by the user.
2058
     *
2059
     * @param array $updateTypes A list specifying the types of updates that should be returned. See <Update types> for
2060
     *                           a list of types. If the type 'Test' is specified, an example
2061
     *                           <DutchBusinessUpdateReference> is returned with DateLastUpdate set to today, it's
2062
     *                           update types will contain all the types specified in the request.
2063
     * @param int   $page        The page of results
2064
     *
2065
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateGetDossiers
2066
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference> entries.
2067
     */
2068
    public function dutchBusinessUpdateGetDossiers($updateTypes, $page)
2069
    {
2070
        return $this->getAdapter()->call(
2071
            'dutchBusinessUpdateGetDossiers',
2072
            ['update_types' => $updateTypes, 'page' => $page]
2073
        );
2074
    }
2075
2076
    /**
2077
     * Remove a dossier from the list of dossiers for which the user.
2078
     * (the user whose credentials are used to make the call) wants to receive updates.
2079
     *
2080
     * @param string $dossierNumber       Chamber of Commerce number
2081
     * @param string $establishmentNumber Establishment number
2082
     *
2083
     * @return \StdClass
2084
     */
2085
    public function dutchBusinessUpdateRemoveDossier($dossierNumber, $establishmentNumber)
2086
    {
2087
        return $this->getAdapter()->call(
2088
            'dutchBusinessUpdateRemoveDossier',
2089
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
2090
        );
2091
    }
2092
2093
    /**
2094
     * Retrieve information about the current market value of a vehicle.
2095
     *
2096
     * @param string $licensePlate The dutch license plate
2097
     *
2098
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetMarketValue
2099
     * @return \StdClass <DutchVehicleMarketValue>
2100
     */
2101
    public function dutchVehicleGetMarketValue($licensePlate)
2102
    {
2103
        return $this->getAdapter()->call('dutchVehicleGetMarketValue', ['license_plate' => $licensePlate]);
2104
    }
2105
2106
    /**
2107
     * Retrieve information about the ownership of a vehicle.
2108
     *
2109
     * @param string $licensePlate The dutch license plate
2110
     *
2111
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetOwnerHistory
2112
     * @return \StdClass <DutchVehicleOwnerHistory>
2113
     */
2114
    public function dutchVehicleGetOwnerHistory($licensePlate)
2115
    {
2116
        return $this->getAdapter()->call('dutchVehicleGetOwnerHistory', ['license_plate' => $licensePlate]);
2117
    }
2118
2119
    /**
2120
     * Retrieve information about a vehicle purchase/catalog price.
2121
     * This method returns (recalculated) purchase and vehicle reference information, useful to establish the insurance
2122
     * amount.
2123
     *
2124
     * @param string $licensePlate The dutch license plate
2125
     *
2126
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetPurchaseReference
2127
     * @return \StdClass
2128
     */
2129
    public function dutchVehicleGetPurchaseReference($licensePlate)
2130
    {
2131
        return $this->getAdapter()->call('dutchVehicleGetPurchaseReference', ['license_plate' => $licensePlate]);
2132
    }
2133
2134
    /**
2135
     * @param string $licensePlate The dutch license plate
2136
     *
2137
     * @return \StdClass
2138
     */
2139
    public function dutchVehicleGetVehicle($licensePlate)
2140
    {
2141
        return $this->getAdapter()->call('dutchVehicleGetVehicle', ['license_plate' => $licensePlate]);
2142
    }
2143
2144
    /**
2145
     * Provides a credit score for a person identified by a set of parameters.
2146
     *
2147
     * @param string $lastName      The last name of the person
2148
     * @param string $initials      The initials
2149
     * @param string $surnamePrefix The surname prefix, like 'van' or 'de', optional
2150
     * @param string $gender        Gender of the person. `M` or `F`
2151
     * @param string $birthDate     Birth date in the format yyyy-mm-dd
2152
     * @param string $street        Street part of the address
2153
     * @param string $houseNumber   House number, optionally including a house number addition
2154
     * @param string $postcode      Dutch postcode in the format 1234AB
2155
     * @param string $phoneNumber   Home phone number, only numeric characters (e.g. 0201234567), may be empty.
2156
     *
2157
     * @link https://webview.webservices.nl/documentation/files/service_edr-php.html#EDR.edrGetScore
2158
     * @return \StdClass <EDRScore>
2159
     */
2160 View Code Duplication
    public function edrGetScore(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2161
        $lastName,
2162
        $initials,
2163
        $surnamePrefix,
2164
        $gender,
2165
        $birthDate,
2166
        $street,
2167
        $houseNumber,
2168
        $postcode,
2169
        $phoneNumber
2170
    ) {
2171
        return $this->getAdapter()->call(
2172
            'edrGetScore',
2173
            [
2174
                'last_name'      => $lastName,
2175
                'initials'       => $initials,
2176
                'surname_prefix' => $surnamePrefix,
2177
                'gender'         => $gender,
2178
                'birth_date'     => $birthDate,
2179
                'street'         => $street,
2180
                'house_number'   => $houseNumber,
2181
                'postcode'       => $postcode,
2182
                'phone_number'   => $phoneNumber,
2183
            ]
2184
        );
2185
    }
2186
2187
    /**
2188
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2189
     * You may either specify an address using postcode and house number, or using city, street and house number.
2190
     * Either postcode or city is required. When the city and street parameters are specified the city name and street
2191
     * name that were matched are returned in the result. If a house number is specified its location is interpolated
2192
     * using coordinates of the address range it belongs to. Accuracy may vary depending on the actual distribution of
2193
     * addresses in the range. For the most accurate house number coordinates, use
2194
     * <Kadaster::kadasterAddressCoordinates>.
2195
     *
2196
     * @param string $postcode Address postcode
2197
     * @param string $city     Address city
2198
     * @param string $street   Address street
2199
     * @param int    $houseNo  Address house number
2200
     *
2201
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationAddressCoordinatesLatLon
2202
     * @return \StdClass <LatLonCoordinatesMatch>
2203
     */
2204 View Code Duplication
    public function geoLocationAddressCoordinatesLatLon($postcode, $city, $street, $houseNo)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2205
    {
2206
        return $this->getAdapter()->call(
2207
            'geoLocationAddressCoordinatesLatLon',
2208
            [
2209
                'postcode' => $postcode,
2210
                'city'     => $city,
2211
                'street'   => $street,
2212
                'houseno'  => $houseNo,
2213
            ]
2214
        );
2215
    }
2216
2217
    /**
2218
     * Returns the coordinates of the given address in the RD system.
2219
     * You may either specify an address using postcode and house number, or using city, street and house number.
2220
     * Either postcode or city is required. When the city and street parameters are specified the city name and street
2221
     * name that were matched are returned in the result. If a house number is specified its location is interpolated
2222
     * using coordinates of the address range it belongs to. Accuracy may vary depending on the actual distribution of
2223
     * addresses in the range. For the most accurate house number coordinates, use
2224
     * <Kadaster::kadasterAddressCoordinates>.
2225
     *
2226
     * @param string $postcode Address postcode
2227
     * @param string $city     Address city
2228
     * @param string $street   Address street
2229
     * @param int    $houseNo  Address house number
2230
     *
2231
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationAddressCoordinatesRD
2232
     * @return \StdClass <RDCoordinatesMatch>
2233
     */
2234 View Code Duplication
    public function geoLocationAddressCoordinatesRD($postcode, $city, $street, $houseNo)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2235
    {
2236
        return $this->getAdapter()->call(
2237
            'geoLocationAddressCoordinatesRD',
2238
            ['postcode' => $postcode, 'city' => $city, 'street' => $street, 'houseno' => $houseNo]
2239
        );
2240
    }
2241
2242
    /**
2243
     * Returns a given neighborhood code list sorted in order of increasing distance from a given neighborhood.
2244
     *
2245
     * @param string $nbCodefrom Neighborhoodcode to sort the list on
2246
     * @param array  $nbCodes    Array of neighborhood codes to sort using increasing distance to nbcodefrom
2247
     *
2248
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedNeighborhoodCodes
2249
     * @return \stdClass <Patterns::{Type}Array> of <SortedPostcode>
2250
     */
2251
    public function geoLocationDistanceSortedNeighborhoodCodes($nbCodefrom, $nbCodes)
2252
    {
2253
        return $this->getAdapter()->call(
2254
            'geoLocationDistanceSortedNeighborhoodCodes',
2255
            ['nbcodefrom' => $nbCodefrom, 'nbcodes' => $nbCodes]
2256
        );
2257
    }
2258
2259
    /**
2260
     * Returns a list of neighborhood codes sorted in order of increasing distance from a given neighborhood.
2261
     * within a given radius (in meters).
2262
     *
2263
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedNeighborhoodCodesRadius
2264
     *
2265
     * @param string $nbCodefrom Neighborhoodcode at the center of the radius
2266
     * @param int    $radius     Radius from nbcodefrom to search in, in meters
2267
     * @param int    $page       Page to retrieve, pages start counting at 1
2268
     *
2269
     * @return \StdClass <Patterns::{Type}PagedResult> of <SortedPostcode>
2270
     */
2271
    public function geoLocationDistanceSortedNeighborhoodCodesRadius($nbCodefrom, $radius, $page)
2272
    {
2273
        return $this->getAdapter()->call(
2274
            'geoLocationDistanceSortedNeighborhoodCodesRadius',
2275
            ['nbcodefrom' => $nbCodefrom, 'radius' => $radius, 'page' => $page]
2276
        );
2277
    }
2278
2279
    /**
2280
     * Returns a list of postcodes sorted in order of increasing distance from a given postcode, within a given radius.
2281
     * If the radius is larger than 1500 meters, the result will be based on neighborhood codes.
2282
     *
2283
     * @param string $postcodeFrom Postcode at the center of the radius
2284
     * @param int    $radius       Radius from postcodefrom to search in, in meters
2285
     * @param int    $page         Page to retrieve, pages start counting at 1
2286
     *
2287
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedPostcodesRadius
2288
     * @return \StdCLass <Patterns::{Type}PagedResult> of <SortedPostcode>
2289
     */
2290
    public function geoLocationDistanceSortedPostcodesRadius($postcodeFrom, $radius, $page)
2291
    {
2292
        return $this->getAdapter()->call(
2293
            'geoLocationDistanceSortedPostcodesRadius',
2294
            ['postcodefrom' => $postcodeFrom, 'radius' => $radius, 'page' => $page]
2295
        );
2296
    }
2297
2298
    /**
2299
     * Returns the distance in meters (in a direct line) between two latitude/longitude coordinates. Computed by using
2300
     * the Haversine formula, which is accurate as long as the locations are not antipodal (at the other side of the
2301
     * Earth).
2302
     *
2303
     * @param float $latitudeCoord1  Latitude of the first location
2304
     * @param float $longitudeCoord1 Longitude of the first location
2305
     * @param float $latitudeCoord2  Latitude of the second location
2306
     * @param float $longitudeCoord2 Longitude of the second location
2307
     * @param bool  $inRadians       Indicate if input is in radians (otherwise they are interpreted as degrees)
2308
     *
2309
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationHaversineDistance
2310
     * @return int
2311
     */
2312
    public function geoLocationHaversineDistance(
2313
        $latitudeCoord1,
2314
        $longitudeCoord1,
2315
        $latitudeCoord2,
2316
        $longitudeCoord2,
2317
        $inRadians
2318
    ) {
2319
        return $this->getAdapter()->call(
2320
            'geoLocationHaversineDistance',
2321
            [
2322
                'latitude_coord_1'  => $latitudeCoord1,
2323
                'longitude_coord_1' => $longitudeCoord1,
2324
                'latitude_coord_2'  => $latitudeCoord2,
2325
                'longitude_coord_2' => $longitudeCoord2,
2326
                'in_radians'        => $inRadians]
2327
        );
2328
    }
2329
2330
    /**
2331
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2332
     * Most countries are supported by this function. Accuracy of the result may vary between countries. Since the
2333
     * street and city have to contain the complete name and since this method acts with international data, we
2334
     * recommend to use <geoLocationInternationalPostcodeCoordinatesLatLon> if you know the postcode, since working
2335
     * with
2336
     * postcodes is less error prone.
2337
     *
2338
     * @param string $street   Complete street name. Street name may not be abbreviated, but may be empty.
2339
     * @param int    $houseNo  House Number
2340
     * @param string $city     Complete city name. City name may not be abbreviated, but may be empty.
2341
     * @param string $province Province, state, district (depends on country, may not be abbreviated). Ignored if not
2342
     *                         exactly matched.
2343
     * @param string $country  Country of the address. Country can be specified by using ISO3 country codes
2344
     *                         (recommended). Complete country names may not always work
2345
     * @param string $language Language used for input and preferred language for the output.
2346
     *
2347
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalAddressCoordinatesLatLon
2348
     * @return \StdClass <LatLonCoordinatesInternationalAddress>
2349
     */
2350
    public function geoLocationInternationalAddressCoordinatesLatLon(
2351
        $street,
2352
        $houseNo,
2353
        $city,
2354
        $province,
2355
        $country,
2356
        $language
2357
    ) {
2358
        return $this->getAdapter()->call(
2359
            'geoLocationInternationalAddressCoordinatesLatLon',
2360
            [
2361
                'street'   => $street,
2362
                'houseno'  => $houseNo,
2363
                'city'     => $city,
2364
                'province' => $province,
2365
                'country'  => $country,
2366
                'language' => $language,
2367
            ]
2368
        );
2369
    }
2370
2371
    /**
2372
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2373
     * Most countries are supported by this function. Accuracy of the result may vary between countries.
2374
     *
2375
     * @param string $country    Country of the address. Country can be specified by using ISO3 country codes
2376
     *                           (recommended). Complete country names may not always work.
2377
     * @param string $postalCode Postalcode
2378
     * @param int    $houseNo    House number
2379
     * @param string $street     Complete street name. Street name may not be abbreviated, but may be empty.
2380
     * @param string $city       Complete city name. City name may not be abbreviated, but may be empty.
2381
     * @param string $province   Province, state, district (depends on country, may not be abbreviated). Ignored if not
2382
     *                           exactly matched.
2383
     * @param float  $matchRate  The minimum match level the returned search-results range [0-100]
2384
     * @param string $language   Language used for input and preferred language for the output. Depending on the amount
2385
     *                           of available data and the precision of the result, the output might not match the
2386
     *                           language requested.
2387
     *
2388
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalAddressCoordinatesLatLonV2
2389
     * @return \StdClass <LatLonCoordinatesInternationalAddress>
2390
     */
2391
    public function geoLocationInternationalAddressCoordinatesLatLonV2(
2392
        $country,
2393
        $postalCode,
2394
        $houseNo,
2395
        $street,
2396
        $city,
2397
        $province,
2398
        $matchRate,
2399
        $language
2400
    ) {
2401
        return $this->getAdapter()->call(
2402
            'geoLocationInternationalAddressCoordinatesLatLonV2',
2403
            [
2404
                'country'    => $country,
2405
                'postalcode' => $postalCode,
2406
                'houseno'    => $houseNo,
2407
                'street'     => $street,
2408
                'city'       => $city,
2409
                'province'   => $province,
2410
                'matchrate'  => $matchRate,
2411
                'language'   => $language,
2412
            ]
2413
        );
2414
    }
2415
2416
    /**
2417
     * Returns the address and geoLocation info closest to the specified latitude/longitude coordinate.
2418
     *
2419
     * @param float $latitude  Latitude of the location
2420
     * @param float $longitude Longitude of the location
2421
     *
2422
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalLatLonToAddress
2423
     * @return \StdClass <GeoLocationInternationalAddress>
2424
     */
2425
    public function geoLocationInternationalLatLonToAddress($latitude, $longitude)
2426
    {
2427
        return $this->getAdapter()->call(
2428
            'geoLocationInternationalLatLonToAddress',
2429
            ['latitude' => $latitude, 'longitude' => $longitude]
2430
        );
2431
    }
2432
2433
    /**
2434
     * Returns the coordinates of the given postcode in degrees of latitude/longitude.
2435
     * Most countries are supported by this function. Accuracy of the result may vary between countries.
2436
     *
2437
     * @param string $postcode Postcode to find the location of (postcode format varies depending on the country
2438
     *                         specified)
2439
     * @param string $country  Country of the address. Country can be specified by using ISO3 country codes
2440
     *                         (recommended). Complete country names may not always work.
2441
     *
2442
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalPostcodeCoordinatesLatLon
2443
     * @return \StdClass LatLonCoordinates>
2444
     */
2445
    public function geoLocationInternationalPostcodeCoordinatesLatLon($postcode, $country)
2446
    {
2447
        return $this->getAdapter()->call(
2448
            'geoLocationInternationalPostcodeCoordinatesLatLon',
2449
            ['postcode' => $postcode, 'country' => $country]
2450
        );
2451
    }
2452
2453
    /**
2454
     * Return the address and geoLocation info closest to the specified latitude/longitude coordinate in the NL.
2455
     * This method differs from geoLocationLatLonToAddress in that it is more precise: it uses data with
2456
     * house number precision, instead of house number range precision. This means that a specific house number is
2457
     * returned instead of a range, and that the returned address is typically closer to the coordinate than with
2458
     * geoLocationLatLonToAddress. Note that this method may return a different street than geoLocationLatLonToAddress.
2459
     *
2460
     * @param float $latitude  Latitude of the location
2461
     * @param float $longitude Longitude of the location
2462
     *
2463
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToAddressV2
2464
     * @return \StdClass <GeoLocationAddressV2>
2465
     */
2466
    public function geoLocationLatLonToAddressV2($latitude, $longitude)
2467
    {
2468
        return $this->getAdapter()->call(
2469
            'geoLocationLatLonToAddressV2',
2470
            ['latitude' => $latitude, 'longitude' => $longitude]
2471
        );
2472
    }
2473
2474
    /**
2475
     * Returns the postcode of the address closest to the specified latitude/longitude coordinate in the Netherlands.
2476
     *
2477
     * @param string $latitude  Latitude of the postcode
2478
     * @param string $longitude Longitude of the postcode
2479
     *
2480
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToPostcode
2481
     * @return \StdClass <GeoLocationAddress>
2482
     */
2483
    public function geoLocationLatLonToPostcode($latitude, $longitude)
2484
    {
2485
        return $this->getAdapter()->call(
2486
            'geoLocationLatLonToPostcode',
2487
            ['latitude' => $latitude, 'longitude' => $longitude]
2488
        );
2489
    }
2490
2491
    /**
2492
     * Convert a latitude/longitude coordinate to a RD ('Rijksdriehoeksmeting') coordinate.
2493
     *
2494
     * @param string $latitude  Latitude of the postcode
2495
     * @param string $longitude Longitude of the postcode
2496
     *
2497
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToRD
2498
     * @return \StdClass <RDCoordinates>
2499
     */
2500
    public function geoLocationLatLonToRD($latitude, $longitude)
2501
    {
2502
        return $this->getAdapter()->call(
2503
            'geoLocationLatLonToRD',
2504
            ['latitude' => $latitude, 'longitude' => $longitude]
2505
        );
2506
    }
2507
2508
    /**
2509
     * Returns the coordinates in the latitude/longitude system of the neighborhood, given the neighborhood code.
2510
     *
2511
     * @param string $nbCode Neighborhoodcode to find the location of
2512
     *
2513
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodCoordinatesLatLon
2514
     * @return \StdClass <LatLonCoordinates>
2515
     */
2516
    public function geoLocationNeighborhoodCoordinatesLatLon($nbCode)
2517
    {
2518
        return $this->getAdapter()->call('geoLocationNeighborhoodCoordinatesLatLon', ['nbcode' => (string)$nbCode]);
2519
    }
2520
2521
    /**
2522
     * Returns the coordinates in the RD system of the neighborhood given the neighborhood code.
2523
     *
2524
     * @param string $nbCode Neighborhoodcode to find the location of
2525
     *
2526
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodCoordinatesRD
2527
     * @return \StdClass <RDCoordinates>
2528
     */
2529
    public function geoLocationNeighborhoodCoordinatesRD($nbCode)
2530
    {
2531
        return $this->getAdapter()->call('geoLocationNeighborhoodCoordinatesRD', ['nbcode' => (string)$nbCode]);
2532
    }
2533
2534
    /**
2535
     * Returns estimated distance in meters (in a direct line) between two neighborhoods, given the neighborhood codes.
2536
     *
2537
     * @param string $nbCodefrom Neighborhood code of the first neighborhood
2538
     * @param string $nbCodeto   Neighborhood code of the second neighborhood
2539
     *
2540
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodDistance
2541
     * @return int distance in meters
2542
     */
2543
    public function geoLocationNeighborhoodDistance($nbCodefrom, $nbCodeto)
2544
    {
2545
        return $this->getAdapter()->call(
2546
            'geoLocationNeighborhoodDistance',
2547
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
2548
        );
2549
    }
2550
2551
    /**
2552
     * Returns the coordinates of the given postcode in degrees of latitude/longitude.
2553
     *
2554
     * @param string $postcode Postcode to find the location of
2555
     *
2556
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeCoordinatesLatLon
2557
     * @return \StdClass <LatLonCoordinates>
2558
     */
2559
    public function geoLocationPostcodeCoordinatesLatLon($postcode)
2560
    {
2561
        return $this->getAdapter()->call('geoLocationPostcodeCoordinatesLatLon', ['postcode' => $postcode]);
2562
    }
2563
2564
    /**
2565
     * Returns the coordinates of the given postcode in the RD system.
2566
     *
2567
     * @param string $postcode Postcode to find the location of
2568
     *
2569
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeCoordinatesRD
2570
     * @return \StdClass <RDCoordinates>
2571
     */
2572
    public function geoLocationPostcodeCoordinatesRD($postcode)
2573
    {
2574
        return $this->getAdapter()->call('geoLocationPostcodeCoordinatesRD', ['postcode' => $postcode]);
2575
    }
2576
2577
    /**
2578
     * Returns the estimated distance in meters (in a direct line) between two postcodes.
2579
     *
2580
     * @param string $postcodeFrom First postcode
2581
     * @param string $postcodeTo   Second postcode
2582
     *
2583
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeDistance
2584
     * @return int distance in meters
2585
     */
2586
    public function geoLocationPostcodeDistance($postcodeFrom, $postcodeTo)
2587
    {
2588
        return $this->getAdapter()->call(
2589
            'geoLocationPostcodeDistance',
2590
            ['postcodefrom' => $postcodeFrom, 'postcodeto' => $postcodeTo]
2591
        );
2592
    }
2593
2594
    /**
2595
     * Returns the address and geoLocation info closest to the specified Rijksdriehoeksmeting X/Y coordinate in NL.
2596
     * This method differs from geoLocationLatLonToAddress in that it is more precise. it uses data with house number
2597
     * precision, instead of house number range precision. This means that a specific house number is returned instead
2598
     * of a range, and that the returned address is typically closer to the coordinate than with
2599
     * geoLocationRDToAddress.
2600
     * Note that this method may return a different street than geoLocationRDToAddress.
2601
     *
2602
     * @param int $x rd X of the location
2603
     * @param int $y rd Y of the location
2604
     *
2605
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationRDToAddressV2
2606
     * @return \StdClass <GeoLocationAddressV2>
2607
     */
2608
    public function geoLocationRDToAddressV2($x, $y)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $x. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $y. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
2609
    {
2610
        return $this->getAdapter()->call('geoLocationRDToAddressV2', ['x' => $x, 'y' => $y]);
2611
    }
2612
2613
    /**
2614
     * Convert a latitude/longitude coordinate to a RD ('Rijksdriehoeksmeting') coordinate.
2615
     *
2616
     * @param int $x part of the RD coordinate
2617
     * @param int $y part of the RD coordinate
2618
     *
2619
     * @link  https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToRD
2620
     * @return \StdClass <RDCoordinates>
2621
     */
2622
    public function geoLocationRDToLatLon($x, $y)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $x. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $y. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
2623
    {
2624
        return $this->getAdapter()->call('geoLocationRDToLatLon', ['x' => $x, 'y' => $y]);
2625
    }
2626
2627
    /**
2628
     * Returns the postcode of the address closest to  Rijksdriehoeksmeting coordinate in the Netherlands
2629
     *
2630
     * @param int $x part of the RD coordinate
2631
     * @param int $y part of the RD coordinate
2632
     *
2633
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationRDToPostcode
2634
     * @return \StdClass postcode
2635
     */
2636
    public function geoLocationRDToPostcode($x, $y)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $x. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $y. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
2637
    {
2638
        return $this->getAdapter()->call('geoLocationRDToPostcode', ['x' => $x, 'y' => $y]);
2639
    }
2640
2641
    /**
2642
     * Retrieve top-parent, parent and sibling companies of a company registered in the Netherlands.
2643
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2644
     * the alarm/calamity.
2645
     *
2646
     * @param int $graydonCompanyId 9 Digit Graydon company identification number
2647
     *
2648
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditCompanyLiaisons
2649
     * @return \StdClass <GraydonCreditReportCompanyLiaisons>.
2650
     */
2651
    public function graydonCreditCompanyLiaisons($graydonCompanyId)
2652
    {
2653
        return $this->getAdapter()->call(
2654
            'graydonCreditCompanyLiaisons',
2655
            ['graydon_company_id' => (int)$graydonCompanyId]
2656
        );
2657
    }
2658
2659
    /**
2660
     * Retrieve a Graydon credit report of a company registered in the Netherlands.
2661
     *
2662
     * @param int    $graydonCompanyId 9 Digit Graydon company identification number.
2663
     * @param string $document         Specify to retrieve an extra document with an excerpt of the data. Currently
2664
     *                                 unused. Possible values:
2665
     *                                 [empty string] -- Return no extra document.
2666
     *
2667
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditGetReport
2668
     * @return \StdClass <GraydonCreditReport>
2669
     */
2670
    public function graydonCreditGetReport($graydonCompanyId, $document)
2671
    {
2672
        return $this->getAdapter()->call(
2673
            'graydonCreditGetReport',
2674
            ['graydon_company_id' => $graydonCompanyId, 'document' => $document]
2675
        );
2676
    }
2677
2678
    /**
2679
     *  Retrieve information on the management positions in a company registered in the Netherlands.
2680
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2681
     * the alarm/calamity.
2682
     *
2683
     * @param int $graydonCompanyId 9 Digit Graydon company identification number. See <Company Test Identifiers> for a
2684
     *                              list of free test reports.
2685
     *
2686
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditManagement
2687
     * @return \StdClass <GraydonCreditReportManagement>
2688
     */
2689
    public function graydonCreditManagement($graydonCompanyId)
2690
    {
2691
        return $this->getAdapter()->call('graydonCreditManagement', ['graydon_company_id' => $graydonCompanyId]);
2692
    }
2693
2694
    /**
2695
     * Retrieve a Graydon pd ratings and credit flag of a company registered in the Netherlands.
2696
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2697
     * the alarm/calamity.
2698
     *
2699
     * @param int $graydonCompanyId 9 Digit Graydon company identification number.
2700
     *
2701
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditQuickscan
2702
     * @return \StdClass <GraydonCreditReportQuickscan>
2703
     */
2704
    public function graydonCreditQuickscan($graydonCompanyId)
2705
    {
2706
        return $this->getAdapter()->call('graydonCreditQuickscan', ['graydon_company_id' => $graydonCompanyId]);
2707
    }
2708
2709
    /**
2710
     * Retrieve various Graydon credit ratings of a company registered in the Netherlands.
2711
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2712
     * the alarm/calamity.
2713
     *
2714
     * @param int $graydonCompanyId 9 Digit Graydon company identification number. See <Company Test Identifiers> for a
2715
     *                              list of free test reports
2716
     *
2717
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditRatings
2718
     * @return \StdClass <GraydonCreditReportRatings>
2719
     */
2720
    public function graydonCreditRatings($graydonCompanyId)
2721
    {
2722
        return $this->getAdapter()->call('graydonCreditRatings', ['graydon_company_id' => $graydonCompanyId]);
2723
    }
2724
2725
    /**
2726
     * Search international Graydon credit report databases for a company using an identifier.
2727
     *
2728
     * @param string $companyId     Company identification
2729
     * @param string $companyIdType Identification type. Supported:
2730
     *                              graydon - 9 digit Graydon company id
2731
     *                              kvk     - 8 digit Dutch Chamber of Commerce (KvK) dossier number, without the sub
2732
     *                              dossier number
2733
     * @param string $countryIso2   Country where the company is registered, country name, ISO 3166 alpha 2 code.
2734
     *                              Supported countries:  nl -- The Netherlands
2735
     *
2736
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchIdentification
2737
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2738
     */
2739
    public function graydonCreditSearchIdentification($companyId, $companyIdType, $countryIso2)
2740
    {
2741
        return $this->getAdapter()->call(
2742
            'graydonCreditSearchIdentification',
2743
            [
2744
                'company_id'      => $companyId,
2745
                'company_id_type' => $companyIdType,
2746
                'country_iso2'    => $countryIso2,
2747
            ]
2748
        );
2749
    }
2750
2751
    /**
2752
     * Search the international Graydon credit report database for a company by its name.
2753
     *
2754
     * @param string $companyName Required. Company name, trade name or business name.
2755
     * @param string $residence   Name of the city or region
2756
     * @param string $countryIso2 Country where the company is registered, country name, ISO 3166 alpha 2 code.
2757
     *                            Supported countries: nl -- The Netherlands
2758
     *
2759
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchName
2760
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2761
     */
2762
    public function graydonCreditSearchName($companyName, $residence, $countryIso2)
2763
    {
2764
        return $this->getAdapter()->call(
2765
            'graydonCreditSearchName',
2766
            ['company_name' => $companyName, 'residence' => $residence, 'country_iso2' => $countryIso2]
2767
        );
2768
    }
2769
2770
    /**
2771
     * Search international Graydon credit report database for a company using its postcode.
2772
     *
2773
     * @param string $postcode    Postcode
2774
     * @param int    $houseNo     House number of the address. Requires input of postcode parameter.
2775
     * @param string $telephoneNo Telephone number
2776
     * @param string $countryIso2 Country where the company is registered, country name, ISO 3166 alpha 2 code.
2777
     *                            Supported countries: nl -- The Netherlands
2778
     *
2779
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchPostcode
2780
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2781
     */
2782
    public function graydonCreditSearchPostcode($postcode, $houseNo, $telephoneNo, $countryIso2)
2783
    {
2784
        return $this->getAdapter()->call(
2785
            'graydonCreditSearchPostcode',
2786
            [
2787
                'postcode'     => $postcode,
2788
                'house_no'     => $houseNo,
2789
                'telephone_no' => $telephoneNo,
2790
                'country_iso2' => $countryIso2,
2791
            ]
2792
        );
2793
    }
2794
2795
    /**
2796
     * Retrieve the BTW (VAT) number of a company registered in the Netherlands.
2797
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2798
     * the alarm/calamity.
2799
     *
2800
     * @param int $graydonCompanyId 9 Digit Graydon company identification number.
2801
     *                              See <Company Test Identifiers> for a list of free test reports
2802
     *
2803
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditVatNumber
2804
     * @return \StdClass <GraydonCreditReportVatNumber>
2805
     */
2806
    public function graydonCreditVatNumber($graydonCompanyId)
2807
    {
2808
        return $this->getAdapter()->call('graydonCreditVatNumber', ['graydon_company_id' => $graydonCompanyId]);
2809
    }
2810
2811
    /**
2812
     * This method expects an address that is already more or less complete.
2813
     * Checks for the correctness of the specified address, completing it if possible. If suggestions can be generated
2814
     * they will be returned as well. Returns address suggestions related to the address information given. Suggestions
2815
     * are ranked based on a matching percentage. Per field status indications are also returned for every suggestion.
2816
     * Any parameter may be left empty, apart from the country parameter.
2817
     *
2818
     * @param string $organization  Name of the company or organisation at the address
2819
     * @param string $building      Building or sub-building name
2820
     * @param string $street        Street search phrase
2821
     * @param string $houseNr       House number search phrase
2822
     * @param string $poBox         PO box search phrase
2823
     * @param string $locality      District or municipality search phrase
2824
     * @param string $postcode      Postalcode search phrase
2825
     * @param string $province      Province search phrase
2826
     * @param string $country       Country of the address, required. Accepts ISO3 country codes.
2827
     * @param string $language      Language in which the results are returned, see <Preferred Language>.
2828
     * @param string $countryFormat The format in which the country is returned, see <Country Format>.
2829
     *
2830
     * @link https://webview.webservices.nl/documentation/files/service_internationaladdress-php.html#International_Address.internationalAddressSearchInteractive
2831
     * @return \StdClass <InternationalAddressSearchV2Result>
2832
     */
2833 View Code Duplication
    public function internationalAddressSearchInteractive(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2834
        $organization,
2835
        $building,
2836
        $street,
2837
        $houseNr,
2838
        $poBox,
2839
        $locality,
2840
        $postcode,
2841
        $province,
2842
        $country,
2843
        $language,
2844
        $countryFormat
2845
    ) {
2846
        return $this->getAdapter()->call(
2847
            'internationalAddressSearchInteractive',
2848
            [
2849
                'organization'   => $organization,
2850
                'building'       => $building,
2851
                'street'         => $street,
2852
                'housenr'        => $houseNr,
2853
                'pobox'          => $poBox,
2854
                'locality'       => $locality,
2855
                'postcode'       => $postcode,
2856
                'province'       => $province,
2857
                'country'        => $country,
2858
                'language'       => $language,
2859
                'country_format' => $countryFormat,
2860
            ]
2861
        );
2862
    }
2863
2864
    /**
2865
     * This method is suited to handle data entry where only partial address information is provided.
2866
     * Based on the partial information a list of up to 20 addresses is suggested, saving significant key strokes when
2867
     * entering address data. Returns address suggestions related to the address information given. Suggestions are
2868
     * ranked based on a matching percentage. Per field status indications are also returned for every suggestion. Any
2869
     * parameter may be left empty, apart from the country parameter.
2870
     *
2871
     * @param string $organization  Name of the company or organisation at the address
2872
     * @param string $building      Building or sub building name
2873
     * @param string $street        Street search phrase
2874
     * @param string $houseNr       House number search phrase
2875
     * @param string $poBox         PO box search phrase
2876
     * @param string $locality      District or municipality search phrase
2877
     * @param string $postcode      Postalcode search phrase
2878
     * @param string $province      Province search phrase
2879
     * @param string $country       Country of the address, required. Accepts ISO3 country codes.
2880
     * @param string $language      Language in which the results are returned, see <Preferred Language>.
2881
     * @param string $countryFormat The format in which the country is returned, see <Country Format>.
2882
     *
2883
     * @link https://webview.webservices.nl/documentation/files/service_internationaladdress-php.html#International_Address.internationalAddressSearchV2
2884
     * @return \StdClass <InternationalAddressSearchV2Result>
2885
     */
2886 View Code Duplication
    public function internationalAddressSearchV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2887
        $organization,
2888
        $building,
2889
        $street,
2890
        $houseNr,
2891
        $poBox,
2892
        $locality,
2893
        $postcode,
2894
        $province,
2895
        $country,
2896
        $language,
2897
        $countryFormat
2898
    ) {
2899
        return $this->getAdapter()->call(
2900
            'internationalAddressSearchV2',
2901
            [
2902
                'organization'   => $organization,
2903
                'building'       => $building,
2904
                'street'         => $street,
2905
                'housenr'        => $houseNr,
2906
                'pobox'          => $poBox,
2907
                'locality'       => $locality,
2908
                'postcode'       => $postcode,
2909
                'province'       => $province,
2910
                'country'        => $country,
2911
                'language'       => $language,
2912
                'country_format' => $countryFormat,
2913
            ]
2914
        );
2915
    }
2916
2917
    /**
2918
     * Returns the coordinates of the given address in both the RD system and the latitude/longitude system.
2919
     * The lat/lon coordinates are derived from the RD coordinates. The address may be specified by giving the
2920
     * postcode, house number & house number addition or by giving the cityname, streetname, house number & house
2921
     * number addition.
2922
     *
2923
     * @param string $postcode        Address postcode
2924
     * @param string $city            Address city
2925
     * @param string $street          Address street
2926
     * @param int    $houseNo         Address house number
2927
     * @param string $houseNoAddition Address house number addition
2928
     *
2929
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterAddressCoordinates
2930
     * @return \StdClass <KadasterCoordinates>
2931
     */
2932
    public function kadasterAddressCoordinates($postcode, $city, $street, $houseNo, $houseNoAddition)
2933
    {
2934
        return $this->getAdapter()->call(
2935
            'kadasterAddressCoordinates',
2936
            [
2937
                'postcode'        => $postcode,
2938
                'city'            => $city,
2939
                'street'          => $street,
2940
                'houseno'         => $houseNo,
2941
                'housenoaddition' => $houseNoAddition,
2942
            ]
2943
        );
2944
    }
2945
2946
2947
    /**
2948
     * Find a 'bron document', a document which is the basis for an ascription.
2949
     * See <Example documents> for an example document.
2950
     *
2951
     * @param string $aanduidingSoortRegister Identifies the type of register in which the document was registered.
2952
     *                                        Supported values:
2953
     *                                        3 -- Register of mortgage documents (dutch: hypotheekakte)
2954
     *                                        4 -- Register of transport documents (dutch: transportakte)
2955
     * @param string $deel                    Identifier for a group of documents within a register of a Kadaster.
2956
     * @param string $nummer                  Alphanumeric number used to identify a document. Note that a number does
2957
     *                                        not relate to a single revision of the document, numbers may be reused if
2958
     *                                        a change is issued on time.
2959
     * @param string $reeks                   Identifier for the (former) establishment of the Kadaster where the Stuk
2960
     *                                        was originally registered. This parameter is required for requests where
2961
     *                                        deel is less than 50000, and may be left empty if deel is 50000 or
2962
     *                                        higher. Use <kadasterValueListGetRanges> to get a full list of possible
2963
     *                                        "reeks" values.
2964
     * @param string $format                  Filetype of the result. The result will always be encoded in base 64. If
2965
     *                                        an image format is requested a conversion is performed on our servers,
2966
     *                                        which might cause the response to be delayed for large documents. We
2967
     *                                        recommend using a longer timeout setting for such requests. Supported
2968
     *                                        formats:
2969
     *                                        pdf -- Only a PDF document will be returned.
2970
     *                                        png_16 -- A PDF file, and one PNG image for every page will be returned.
2971
     *                                        Each image is approximately 132 by 187 pixels.
2972
     *                                        png_144 -- A PDF file, and one PNG image for every page will be returned.
2973
     *                                        Each image is approximately 132 by 187 pixels.
2974
     *                                        gif_144 -- A PDF file, and one GIF image for every page will be returned.
2975
     *                                        Each image is approximately 1190 by 1684 pixels.
2976
     *
2977
     * @return \StdClass <KadasterBronDocument>
2978
     */
2979
    public function kadasterBronDocument($aanduidingSoortRegister, $deel, $nummer, $reeks, $format)
2980
    {
2981
        return $this->getAdapter()->call(
2982
            'kadasterBronDocument',
2983
            [
2984
                'aanduiding_soort_register' => $aanduidingSoortRegister,
2985
                'deel'                      => $deel,
2986
                'nummer'                    => $nummer,
2987
                'reeks'                     => $reeks,
2988
                'format'                    => $format,
2989
            ]
2990
        );
2991
    }
2992
2993
    /**
2994
     * Find a 'Eigendomsbericht' by parcel details.
2995
     * Returns the result in a file of the specified format. If the input matches more than one parcel, a list of the
2996
     * parcels found is returned instead. Sectie, perceelnummer and the code or name of the municipality are required.
2997
     *
2998
     * @param string $gemeenteCode  Municipality code
2999
     * @param string $gemeenteNaam  Municipality name. See <kadasterValueListGetMunicipalities> for possible values.
3000
     * @param string $sectie        Section code
3001
     * @param string $perceelnummer Parcel number
3002
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3003
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3004
     *                              'A', 'D', or empty.
3005
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3006
     * @param string $format        Filetype of the result. The result will always be encoded in base 64. If an image
3007
     *                              format is requested a conversion is performed on our servers, which might cause the
3008
     *                              response to be delayed for large documents. We recommend using a longer timeout
3009
     *                              setting for such requests. Supported formats: pdf - Only a PDF document will be
3010
     *                              returned. png_16 - A PDF file, and one PNG image for every page will be returned.
3011
     *                              Each image is approximately 132 by 187 pixels. png_144 - A PDF file, and one PNG
3012
     *                              image for every page will be returned. Each image is approximately 1190 by 1684
3013
     *                              pixels. gif_144 - A PDF file, and one GIF image for every page will be returned.
3014
     *                              Each image is approximately 1190 by 1684 pixels.
3015
     *
3016
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtDocumentPerceel
3017
     * @return \StdClass <BerichtObjectDocumentResultaat>
3018
     */
3019 View Code Duplication
    public function kadasterEigendomsBerichtDocumentPerceel(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3020
        $gemeenteCode,
3021
        $gemeenteNaam,
3022
        $sectie,
3023
        $perceelnummer,
3024
        $relatieCode,
3025
        $volgnummer,
3026
        $format
3027
    ) {
3028
        return $this->getAdapter()->call(
3029
            'kadasterEigendomsBerichtDocumentPerceel',
3030
            [
3031
                'gemeentecode'  => $gemeenteCode,
3032
                'gemeentenaam'  => $gemeenteNaam,
3033
                'sectie'        => $sectie,
3034
                'perceelnummer' => $perceelnummer,
3035
                'relatiecode'   => $relatieCode,
3036
                'volgnummer'    => $volgnummer,
3037
                'format'        => $format,
3038
            ]
3039
        );
3040
    }
3041
3042
    /**
3043
     * Find a 'Eigendomsbericht' by postcode and house number.
3044
     * Returns the result in a file of the specified format. If the input matches more than one parcel, a list of the
3045
     * parcels found is returned instead. If an image format is requested a conversion is performed on our servers,
3046
     * which might cause the response to be delayed for large documents. Please use a higher timeout setting.
3047
     *
3048
     * @param string $postcode             Address postcode
3049
     * @param int    $huisNummer           Address house number
3050
     * @param string $huisNummerToevoeging Address house number addition
3051
     * @param string $format               File type of the result. The result will always be encoded in base 64.
3052
     *                                     Supported formats:
3053
     *                                     pdf    - Only a PDF document will be returned.
3054
     *                                     png_16 - A PDF file, and one PNG image for every page will be returned.
3055
     *                                     Each image is approximately 132 by 187 pixels.
3056
     *                                     png_144 - A PDF file, and one PNG image for every page will be returned.
3057
     *                                     Each image is approximately 1190 by 1684 pixels.
3058
     *                                     gif_144 - A PDF file, and one GIF image for every page will be returned.
3059
     *                                     Each image is approximately 1190 by 1684 pixels.
3060
     *
3061
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtDocumentPostcode
3062
     * @return \StdClass <BerichtObjectDocumentResultaat>
3063
     */
3064 View Code Duplication
    public function kadasterEigendomsBerichtDocumentPostcode($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3065
    {
3066
        return $this->getAdapter()->call(
3067
            'kadasterEigendomsBerichtDocumentPostcode',
3068
            [
3069
                'postcode'              => $postcode,
3070
                'huisnummer'            => $huisNummer,
3071
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3072
                'format'                => $format,
3073
            ]
3074
        );
3075
    }
3076
3077
3078
    /**
3079
     * Find a 'Eigendomsbericht' by parcel details.
3080
     * Returns the result as a <BerichtObjectResultaat>. In addition to the structured result, a file in the PDF format
3081
     * is returned. If the input matches more than one parcel, a list of the parcels found is returned instead. Sectie,
3082
     * perceelnummer and the code or name of the municipality are required.
3083
     *
3084
     * @param string $gemeenteCode  Municipality code
3085
     * @param string $gemeenteNaam  Municipality name
3086
     * @param string $sectie        Section code
3087
     * @param string $perceelnummer Parcel number
3088
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3089
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3090
     *                              'A', 'D', or empty.
3091
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3092
     *
3093
     * @link       https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPerceel
3094
     * @deprecated please use <kadasterEigendomsBerichtPerceelV2> instead
3095
     * @return \StdClass <BerichtObjectResultaat>
3096
     */
3097 View Code Duplication
    public function kadasterEigendomsBerichtPerceel(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3098
        $gemeenteCode,
3099
        $gemeenteNaam,
3100
        $sectie,
3101
        $perceelnummer,
3102
        $relatieCode,
3103
        $volgnummer
3104
    ) {
3105
        return $this->getAdapter()->call(
3106
            'kadasterEigendomsBerichtPerceel',
3107
            [
3108
                'gemeentecode'  => $gemeenteCode,
3109
                'gemeentenaam'  => $gemeenteNaam,
3110
                'sectie'        => $sectie,
3111
                'perceelnummer' => $perceelnummer,
3112
                'relatiecode'   => $relatieCode,
3113
                'volgnummer'    => $volgnummer,
3114
            ]
3115
        );
3116
    }
3117
3118
    /**
3119
     * Find a 'Eigendomsbericht' by parcel details.
3120
     * Returns the result as a <BerichtObjectResultaatV2>. In addition to the structured result, a file in the PDF
3121
     * format is returned. If the input matches more than one parcel, a list of the parcels found is returned instead.
3122
     * Sectie, perceelnummer and the code or name of the municipality are required.
3123
     *
3124
     * @param string $gemeenteCode  Municipality code
3125
     * @param string $gemeenteNaam  Municipality name. See <kadasterValueListGetMunicipalities> for possible values.
3126
     * @param string $sectie        Section code
3127
     * @param string $perceelnummer Parcel number
3128
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3129
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3130
     *                              'A', 'D', or empty.
3131
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3132
     *
3133
     * @link  https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPerceelV2
3134
     * @return \StdClass <BerichtObjectResultaatV2>
3135
     */
3136 View Code Duplication
    public function kadasterEigendomsBerichtPerceelV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3137
        $gemeenteCode,
3138
        $gemeenteNaam,
3139
        $sectie,
3140
        $perceelnummer,
3141
        $relatieCode,
3142
        $volgnummer
3143
    ) {
3144
        return $this->getAdapter()->call(
3145
            'kadasterEigendomsBerichtPerceelV2',
3146
            [
3147
                'gemeentecode'  => $gemeenteCode,
3148
                'gemeentenaam'  => $gemeenteNaam,
3149
                'sectie'        => $sectie,
3150
                'perceelnummer' => $perceelnummer,
3151
                'relatiecode'   => $relatieCode,
3152
                'volgnummer'    => $volgnummer,
3153
            ]
3154
        );
3155
    }
3156
3157
    /**
3158
     * Find a 'Eigendomsbericht' by postcode and house number.
3159
     * Returns the result as a <BerichtObjectResultaat>. In addition to the structured result, a file in the PDF format
3160
     * is returned. If the input matches more than one parcel, a list of the parcels found is returned instead.
3161
     *
3162
     * @param string $postcode             Address postcode
3163
     * @param int    $huisNummer           Address house number
3164
     * @param string $huisNummerToevoeging Address house number addition
3165
     *
3166
     * @link       https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPostcode
3167
     * @deprecated please use kadasterEigendomsBerichtPostcodeV2
3168
     * @return \StdClass <BerichtObjectResultaat>
3169
     */
3170
    public function kadasterEigendomsBerichtPostcode($postcode, $huisNummer, $huisNummerToevoeging)
3171
    {
3172
        return $this->getAdapter()->call(
3173
            'kadasterEigendomsBerichtPostcode',
3174
            [
3175
                'postcode'              => $postcode,
3176
                'huisnummer'            => $huisNummer,
3177
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3178
            ]
3179
        );
3180
    }
3181
3182
    /**
3183
     * Find a 'Eigendomsbericht' by postcode and house number.
3184
     * In addition to the structured result, a file in the PDF format is returned. If the input matches more than one
3185
     * parcel, a list of the parcels found is returned instead.
3186
     *
3187
     * @param string $postcode             Address postcode
3188
     * @param int    $huisNummer           Address house number
3189
     * @param string $huisNummerToevoeging Address house number addition
3190
     *
3191
     * @link  https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPostcodeV2
3192
     * @return \StdClass <BerichtObjectResultaatV2>
3193
     */
3194
    public function kadasterEigendomsBerichtPostcodeV2($postcode, $huisNummer, $huisNummerToevoeging)
3195
    {
3196
        return $this->getAdapter()->call(
3197
            'kadasterEigendomsBerichtPostcodeV2',
3198
            [
3199
                'postcode'              => $postcode,
3200
                'huisnummer'            => $huisNummer,
3201
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3202
            ]
3203
        );
3204
    }
3205
3206
    /**
3207
     * Find a 'Hypothecair bericht' by parcel details.
3208
     * If one parcel is found, the "hypothecairbericht" field of the <kadasterHypothecairBerichtResultaat> contains
3209
     * information about that specific parcel. If more parcels match, the "overzicht" field contains information about
3210
     * all the parcels the requested parcel has been divided in, or transferred into. The result will always be encoded
3211
     * in base 64. If an image format is requested a conversion is performed on our servers, which might cause the
3212
     * response to be delayed for large documents. We recommend using a longer timeout setting for such requests.
3213
     *
3214
     * @param string $gemeenteCode  Municipality code
3215
     * @param string $gemeenteNaam  Municipality name
3216
     * @param string $sectie        Section code
3217
     * @param string $perceelnummer Parcel number
3218
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3219
     *                              relatiecode is specified, volgnummer should be specified as well.
3220
     *                              Allowed values: 'A', 'D', or empty.
3221
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3222
     * @param string $format        File type of the result. Supported formats:
3223
     *                              none- No document will be returned.
3224
     *                              pdf - Only a PDF document will be returned.
3225
     *                              png_16 - A PDF file, and one PNG image for every page will be returned.
3226
     *                              Each image is approximately 132 by 187 pixels.
3227
     *                              png_144 - A PDF file, and one PNG image for every page will be returned.
3228
     *                              Each image is approximately 1190 by 1684 pixels.
3229
     *                              gif_144 -- A PDF file, and one GIF image for every page will be returned.
3230
     *                              Each image is approximately 1190 by 1684 pixels.
3231
     *
3232
     * @deprecated please use <kadasterHypothecairBerichtPerceelV3>
3233
     * @return \StdClass <kadasterHypothecairBerichtResultaat>
3234
     */
3235 View Code Duplication
    public function kadasterHypothecairBerichtPerceel(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3236
        $gemeenteCode,
3237
        $gemeenteNaam,
3238
        $sectie,
3239
        $perceelnummer,
3240
        $relatieCode,
3241
        $volgnummer,
3242
        $format
3243
    ) {
3244
        return $this->getAdapter()->call(
3245
            'kadasterHypothecairBerichtPerceel',
3246
            [
3247
                'gemeentecode'  => $gemeenteCode,
3248
                'gemeentenaam'  => $gemeenteNaam,
3249
                'sectie'        => $sectie,
3250
                'perceelnummer' => $perceelnummer,
3251
                'relatiecode'   => $relatieCode,
3252
                'volgnummer'    => $volgnummer,
3253
                'format'        => $format,
3254
            ]
3255
        );
3256
    }
3257
3258
    /**
3259
     * @param $gemeenteCode
3260
     * @param $gemeenteNaam
3261
     * @param $sectie
3262
     * @param $perceelnummer
3263
     * @param $relatieCode
3264
     * @param $volgnummer
3265
     * @param $format
3266
     *
3267
     * @return \StdClass
3268
     */
3269 View Code Duplication
    public function kadasterHypothecairBerichtPerceelV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3270
        $gemeenteCode,
3271
        $gemeenteNaam,
3272
        $sectie,
3273
        $perceelnummer,
3274
        $relatieCode,
3275
        $volgnummer,
3276
        $format
3277
    ) {
3278
        return $this->getAdapter()->call(
3279
            'kadasterHypothecairBerichtPerceelV2',
3280
            [
3281
                'gemeentecode'  => $gemeenteCode,
3282
                'gemeentenaam'  => $gemeenteNaam,
3283
                'sectie'        => $sectie,
3284
                'perceelnummer' => $perceelnummer,
3285
                'relatiecode'   => $relatieCode,
3286
                'volgnummer'    => $volgnummer,
3287
                'format'        => $format,
3288
            ]
3289
        );
3290
    }
3291
3292
    /**
3293
     * @param $gemeenteCode
3294
     * @param $gemeenteNaam
3295
     * @param $sectie
3296
     * @param $perceelnummer
3297
     * @param $relatieCode
3298
     * @param $volgnummer
3299
     * @param $format
3300
     *
3301
     * @return \StdClass
3302
     */
3303 View Code Duplication
    public function kadasterHypothecairBerichtPerceelV3(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3304
        $gemeenteCode,
3305
        $gemeenteNaam,
3306
        $sectie,
3307
        $perceelnummer,
3308
        $relatieCode,
3309
        $volgnummer,
3310
        $format
3311
    ) {
3312
        return $this->getAdapter()->call(
3313
            'kadasterHypothecairBerichtPerceelV3',
3314
            [
3315
                'gemeentecode'  => $gemeenteCode,
3316
                'gemeentenaam'  => $gemeenteNaam,
3317
                'sectie'        => $sectie,
3318
                'perceelnummer' => $perceelnummer,
3319
                'relatiecode'   => $relatieCode,
3320
                'volgnummer'    => $volgnummer,
3321
                'format'        => $format,
3322
            ]
3323
        );
3324
    }
3325
3326
    /**
3327
     * @param $postcode
3328
     * @param $huisNummer
3329
     * @param $huisNummerToevoeging
3330
     * @param $format
3331
     *
3332
     * @return \StdClass
3333
     */
3334 View Code Duplication
    public function kadasterHypothecairBerichtPostcode($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3335
    {
3336
        return $this->getAdapter()->call(
3337
            'kadasterHypothecairBerichtPostcode',
3338
            [
3339
                'postcode'              => $postcode,
3340
                'huisnummer'            => $huisNummer,
3341
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3342
                'format'                => $format,
3343
            ]
3344
        );
3345
    }
3346
3347
    /**
3348
     * @param $postcode
3349
     * @param $huisNummer
3350
     * @param $huisNummerToevoeging
3351
     * @param $format
3352
     *
3353
     * @return \StdClass
3354
     */
3355 View Code Duplication
    public function kadasterHypothecairBerichtPostcodeV2($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3356
    {
3357
        return $this->getAdapter()->call(
3358
            'kadasterHypothecairBerichtPostcodeV2',
3359
            [
3360
                'postcode'              => $postcode,
3361
                'huisnummer'            => $huisNummer,
3362
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3363
                'format'                => $format,
3364
            ]
3365
        );
3366
    }
3367
3368
    /**
3369
     * @param $postcode
3370
     * @param $huisNummer
3371
     * @param $huisNummerToevoeging
3372
     * @param $format
3373
     *
3374
     * @return \StdClass
3375
     */
3376 View Code Duplication
    public function kadasterHypothecairBerichtPostcodeV3($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3377
    {
3378
        return $this->getAdapter()->call(
3379
            'kadasterHypothecairBerichtPostcodeV3',
3380
            [
3381
                'postcode'              => $postcode,
3382
                'huisnummer'            => $huisNummer,
3383
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3384
                'format'                => $format,
3385
            ]
3386
        );
3387
    }
3388
3389
    /**
3390
     * @param $gemeenteCode
3391
     * @param $gemeenteNaam
3392
     * @param $sectie
3393
     * @param $perceelnummer
3394
     * @param $relatieCode
3395
     * @param $volgnummer
3396
     * @param $format
3397
     * @param $schaal
3398
     *
3399
     * @return \StdClass
3400
     */
3401 View Code Duplication
    public function kadasterKadastraleKaartPerceel(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3402
        $gemeenteCode,
3403
        $gemeenteNaam,
3404
        $sectie,
3405
        $perceelnummer,
3406
        $relatieCode,
3407
        $volgnummer,
3408
        $format,
3409
        $schaal
3410
    ) {
3411
        return $this->getAdapter()->call(
3412
            'kadasterKadastraleKaartPerceel',
3413
            [
3414
                'gemeentecode'  => $gemeenteCode,
3415
                'gemeentenaam'  => $gemeenteNaam,
3416
                'sectie'        => $sectie,
3417
                'perceelnummer' => $perceelnummer,
3418
                'relatiecode'   => $relatieCode,
3419
                'volgnummer'    => $volgnummer,
3420
                'format'        => $format,
3421
                'schaal'        => $schaal,
3422
            ]
3423
        );
3424
    }
3425
3426
    /**
3427
     * @param $gemeenteCode
3428
     * @param $gemeenteNaam
3429
     * @param $sectie
3430
     * @param $perceelnummer
3431
     * @param $relatieCode
3432
     * @param $volgnummer
3433
     * @param $format
3434
     * @param $schaal
3435
     *
3436
     * @return \StdClass
3437
     */
3438 View Code Duplication
    public function kadasterKadastraleKaartPerceelV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3439
        $gemeenteCode,
3440
        $gemeenteNaam,
3441
        $sectie,
3442
        $perceelnummer,
3443
        $relatieCode,
3444
        $volgnummer,
3445
        $format,
3446
        $schaal
3447
    ) {
3448
        return $this->getAdapter()->call(
3449
            'kadasterKadastraleKaartPerceelV2',
3450
            [
3451
                'gemeentecode'  => $gemeenteCode,
3452
                'gemeentenaam'  => $gemeenteNaam,
3453
                'sectie'        => $sectie,
3454
                'perceelnummer' => $perceelnummer,
3455
                'relatiecode'   => $relatieCode,
3456
                'volgnummer'    => $volgnummer,
3457
                'format'        => $format,
3458
                'schaal'        => $schaal,
3459
            ]
3460
        );
3461
    }
3462
3463
    /**
3464
     * @param $postcode
3465
     * @param $huisNummer
3466
     * @param $huisNummerToevoeging
3467
     * @param $format
3468
     * @param $schaal
3469
     *
3470
     * @return \StdClass
3471
     */
3472 View Code Duplication
    public function kadasterKadastraleKaartPostcode($postcode, $huisNummer, $huisNummerToevoeging, $format, $schaal)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3473
    {
3474
        return $this->getAdapter()->call(
3475
            'kadasterKadastraleKaartPostcode',
3476
            [
3477
                'postcode'              => $postcode,
3478
                'huisnummer'            => $huisNummer,
3479
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3480
                'format'                => $format,
3481
                'schaal'                => $schaal,
3482
            ]
3483
        );
3484
    }
3485
3486
    /**
3487
     * @param $postcode
3488
     * @param $huisNummer
3489
     * @param $huisNummerToevoeging
3490
     * @param $format
3491
     * @param $schaal
3492
     *
3493
     * @return \StdClass
3494
     */
3495 View Code Duplication
    public function kadasterKadastraleKaartPostcodeV2($postcode, $huisNummer, $huisNummerToevoeging, $format, $schaal)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3496
    {
3497
        return $this->getAdapter()->call(
3498
            'kadasterKadastraleKaartPostcodeV2',
3499
            [
3500
                'postcode'              => $postcode,
3501
                'huisnummer'            => $huisNummer,
3502
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3503
                'format'                => $format,
3504
                'schaal'                => $schaal,
3505
            ]
3506
        );
3507
    }
3508
3509
    /**
3510
     * @param $postcode
3511
     * @param $huisNummer
3512
     *
3513
     * @return \StdClass
3514
     */
3515
    public function kadasterKoopsommenOverzicht($postcode, $huisNummer)
3516
    {
3517
        return $this->getAdapter()->call(
3518
            'kadasterKoopsommenOverzicht',
3519
            [
3520
                'postcode'   => $postcode,
3521
                'huisnummer' => $huisNummer,
3522
            ]
3523
        );
3524
    }
3525
3526
    /**
3527
     * @param $postcode
3528
     * @param $huisNummer
3529
     * @param $format
3530
     *
3531
     * @return \StdClass
3532
     */
3533
    public function kadasterKoopsommenOverzichtV2($postcode, $huisNummer, $format)
3534
    {
3535
        return $this->getAdapter()->call(
3536
            'kadasterKoopsommenOverzichtV2',
3537
            [
3538
                'postcode'   => $postcode,
3539
                'huisnummer' => $huisNummer,
3540
                'format'     => $format,
3541
            ]
3542
        );
3543
    }
3544
3545
    /**
3546
     * @param $gemeenteCode
3547
     * @param $gemeenteNaam
3548
     * @param $sectie
3549
     * @param $perceelnummer
3550
     * @param $relatieCode
3551
     * @param $volgnummer
3552
     * @param $format
3553
     *
3554
     * @return \StdClass
3555
     */
3556 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPerceel(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3557
        $gemeenteCode,
3558
        $gemeenteNaam,
3559
        $sectie,
3560
        $perceelnummer,
3561
        $relatieCode,
3562
        $volgnummer,
3563
        $format
3564
    ) {
3565
        return $this->getAdapter()->call(
3566
            'kadasterUittrekselKadastraleKaartPerceel',
3567
            [
3568
                'gemeentecode'  => $gemeenteCode,
3569
                'gemeentenaam'  => $gemeenteNaam,
3570
                'sectie'        => $sectie,
3571
                'perceelnummer' => $perceelnummer,
3572
                'relatiecode'   => $relatieCode,
3573
                'volgnummer'    => $volgnummer,
3574
                'format'        => $format,
3575
            ]
3576
        );
3577
    }
3578
3579
    /**
3580
     * @param $gemeenteCode
3581
     * @param $gemeenteNaam
3582
     * @param $sectie
3583
     * @param $perceelnummer
3584
     * @param $relatieCode
3585
     * @param $volgnummer
3586
     * @param $format
3587
     *
3588
     * @return \StdClass
3589
     */
3590 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPerceelV2(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3591
        $gemeenteCode,
3592
        $gemeenteNaam,
3593
        $sectie,
3594
        $perceelnummer,
3595
        $relatieCode,
3596
        $volgnummer,
3597
        $format
3598
    ) {
3599
        return $this->getAdapter()->call(
3600
            'kadasterUittrekselKadastraleKaartPerceelV2',
3601
            [
3602
                'gemeentecode'  => $gemeenteCode,
3603
                'gemeentenaam'  => $gemeenteNaam,
3604
                'sectie'        => $sectie,
3605
                'perceelnummer' => $perceelnummer,
3606
                'relatiecode'   => $relatieCode,
3607
                'volgnummer'    => $volgnummer,
3608
                'format'        => $format,
3609
            ]
3610
        );
3611
    }
3612
3613
    /**
3614
     * @param $gemeenteCode
3615
     * @param $gemeenteNaam
3616
     * @param $sectie
3617
     * @param $perceelnummer
3618
     * @param $relatieCode
3619
     * @param $volgnummer
3620
     * @param $format
3621
     *
3622
     * @return \StdClass
3623
     */
3624 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPerceelV3(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3625
        $gemeenteCode,
3626
        $gemeenteNaam,
3627
        $sectie,
3628
        $perceelnummer,
3629
        $relatieCode,
3630
        $volgnummer,
3631
        $format
3632
    ) {
3633
        return $this->getAdapter()->call(
3634
            'kadasterUittrekselKadastraleKaartPerceelV3',
3635
            [
3636
                'gemeentecode'  => $gemeenteCode,
3637
                'gemeentenaam'  => $gemeenteNaam,
3638
                'sectie'        => $sectie,
3639
                'perceelnummer' => $perceelnummer,
3640
                'relatiecode'   => $relatieCode,
3641
                'volgnummer'    => $volgnummer,
3642
                'format'        => $format,
3643
            ]
3644
        );
3645
    }
3646
3647
    /**
3648
     * @param $postcode
3649
     * @param $huisNummer
3650
     * @param $huisNummerToevoeging
3651
     * @param $format
3652
     *
3653
     * @return \StdClass
3654
     */
3655 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPostcode($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3656
    {
3657
        return $this->getAdapter()->call(
3658
            'kadasterUittrekselKadastraleKaartPostcode',
3659
            [
3660
                'postcode'              => $postcode,
3661
                'huisnummer'            => $huisNummer,
3662
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3663
                'format'                => $format,
3664
            ]
3665
        );
3666
    }
3667
3668
    /**
3669
     * @param $postcode
3670
     * @param $huisNummer
3671
     * @param $huisNummerToevoeging
3672
     * @param $format
3673
     *
3674
     * @return \StdClass
3675
     */
3676 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPostcodeV2($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3677
    {
3678
        return $this->getAdapter()->call(
3679
            'kadasterUittrekselKadastraleKaartPostcodeV2',
3680
            [
3681
                'postcode'              => $postcode,
3682
                'huisnummer'            => $huisNummer,
3683
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3684
                'format'                => $format,
3685
            ]
3686
        );
3687
    }
3688
3689
    /**
3690
     * @param $postcode
3691
     * @param $huisNummer
3692
     * @param $huisNummerToevoeging
3693
     * @param $format
3694
     *
3695
     * @return \StdClass
3696
     */
3697 View Code Duplication
    public function kadasterUittrekselKadastraleKaartPostcodeV3($postcode, $huisNummer, $huisNummerToevoeging, $format)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3698
    {
3699
        return $this->getAdapter()->call(
3700
            'kadasterUittrekselKadastraleKaartPostcodeV3',
3701
            [
3702
                'postcode'              => $postcode,
3703
                'huisnummer'            => $huisNummer,
3704
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3705
                'format'                => $format,
3706
            ]
3707
        );
3708
    }
3709
3710
    /**
3711
     * @return \StdClass
3712
     */
3713
    public function kadasterValueListGetMunicipalities()
3714
    {
3715
        return $this->getAdapter()->call('kadasterValueListGetMunicipalities', []);
3716
    }
3717
3718
    /**
3719
     * @return \StdClass
3720
     */
3721
    public function kadasterValueListGetRanges()
3722
    {
3723
        return $this->getAdapter()->call('kadasterValueListGetRanges', []);
3724
    }
3725
3726
    /**
3727
     * @param $dossierNumber
3728
     * @param $establishmentNumber
3729
     *
3730
     * @return \StdClass
3731
     */
3732
    public function kvkGetDossier($dossierNumber, $establishmentNumber)
3733
    {
3734
        return $this->getAdapter()->call(
3735
            'kvkGetDossier',
3736
            [
3737
                'dossier_number'       => $dossierNumber,
3738
                'establishment_number' => $establishmentNumber,
3739
            ]
3740
        );
3741
    }
3742
3743
    /**
3744
     * @param $dossierNumber
3745
     * @param $allowCaching
3746
     *
3747
     * @return \StdClass
3748
     */
3749
    public function kvkGetExtractDocument($dossierNumber, $allowCaching)
3750
    {
3751
        return $this->getAdapter()->call(
3752
            'kvkGetExtractDocument',
3753
            ['dossier_number' => $dossierNumber, 'allow_caching' => $allowCaching]
3754
        );
3755
    }
3756
3757
    /**
3758
     * @param $dossierNumber
3759
     * @param $establishmentNumber
3760
     * @param $rsinNumber
3761
     * @param $page
3762
     *
3763
     * @return \StdClass
3764
     */
3765 View Code Duplication
    public function kvkSearchDossierNumber($dossierNumber, $establishmentNumber, $rsinNumber, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3766
    {
3767
        return $this->getAdapter()->call(
3768
            'kvkSearchDossierNumber',
3769
            [
3770
                'dossier_number'       => $dossierNumber,
3771
                'establishment_number' => $establishmentNumber,
3772
                'rsin_number'          => $rsinNumber,
3773
                'page'                 => $page,
3774
            ]
3775
        );
3776
    }
3777
3778
    /**
3779
     * @param $tradeName
3780
     * @param $city
3781
     * @param $street
3782
     * @param $postcode
3783
     * @param $houseNumber
3784
     * @param $houseNumberAddition
3785
     * @param $telephoneNumber
3786
     * @param $domainName
3787
     * @param $strictSearch
3788
     * @param $page
3789
     *
3790
     * @return \StdClass
3791
     */
3792
    public function kvkSearchParameters(
3793
        $tradeName,
3794
        $city,
3795
        $street,
3796
        $postcode,
3797
        $houseNumber,
3798
        $houseNumberAddition,
3799
        $telephoneNumber,
3800
        $domainName,
3801
        $strictSearch,
3802
        $page
3803
    ) {
3804
        return $this->getAdapter()->call(
3805
            'kvkSearchParameters',
3806
            [
3807
                'trade_name'            => $tradeName,
3808
                'city'                  => $city,
3809
                'street'                => $street,
3810
                'postcode'              => $postcode,
3811
                'house_number'          => $houseNumber,
3812
                'house_number_addition' => $houseNumberAddition,
3813
                'telephone_number'      => $telephoneNumber,
3814
                'domain_name'           => $domainName,
3815
                'strict_search'         => $strictSearch,
3816
                'page'                  => $page,
3817
            ]
3818
        );
3819
    }
3820
3821
    /**
3822
     * @param $postcode
3823
     * @param $houseNumber
3824
     * @param $houseNumberAddition
3825
     * @param $page
3826
     *
3827
     * @return \StdClass
3828
     */
3829 View Code Duplication
    public function kvkSearchPostcode($postcode, $houseNumber, $houseNumberAddition, $page)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3830
    {
3831
        return $this->getAdapter()->call(
3832
            'kvkSearchPostcode',
3833
            [
3834
                'postcode'              => $postcode,
3835
                'house_number'          => $houseNumber,
3836
                'house_number_addition' => $houseNumberAddition,
3837
                'page'                  => $page,
3838
            ]
3839
        );
3840
    }
3841
3842
    /**
3843
     * @param $city
3844
     * @param $postcode
3845
     * @param $sbi
3846
     * @param $primarySbiOnly
3847
     * @param $legalForm
3848
     * @param $employeesMin
3849
     * @param $employeesMax
3850
     * @param $economicallyActive
3851
     * @param $financialStatus
3852
     * @param $changedSince
3853
     * @param $newSince
3854
     * @param $page
3855
     *
3856
     * @return \StdClass
3857
     */
3858 View Code Duplication
    public function kvkSearchSelection(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3859
        $city,
3860
        $postcode,
3861
        $sbi,
3862
        $primarySbiOnly,
3863
        $legalForm,
3864
        $employeesMin,
3865
        $employeesMax,
3866
        $economicallyActive,
3867
        $financialStatus,
3868
        $changedSince,
3869
        $newSince,
3870
        $page
3871
    ) {
3872
        return $this->getAdapter()->call(
3873
            'kvkSearchSelection',
3874
            [
3875
                'city'                => $city,
3876
                'postcode'            => $postcode,
3877
                'sbi'                 => $sbi,
3878
                'primary_sbi_only'    => $primarySbiOnly,
3879
                'legal_form'          => $legalForm,
3880
                'employees_min'       => $employeesMin,
3881
                'employees_max'       => $employeesMax,
3882
                'economically_active' => $economicallyActive,
3883
                'financial_status'    => $financialStatus,
3884
                'changed_since'       => $changedSince,
3885
                'new_since'           => $newSince,
3886
                'page'                => $page,
3887
            ]
3888
        );
3889
    }
3890
3891
    /**
3892
     * @param $dossierNumber
3893
     * @param $establishmentNumber
3894
     *
3895
     * @return \StdClass
3896
     */
3897
    public function kvkUpdateAddDossier($dossierNumber, $establishmentNumber)
3898
    {
3899
        return $this->getAdapter()->call(
3900
            'kvkUpdateAddDossier',
3901
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
3902
        );
3903
    }
3904
3905
    /**
3906
     * @param $dossierNumber
3907
     * @param $establishmentNumber
3908
     * @param $updateTypes
3909
     *
3910
     * @return \StdClass
3911
     */
3912
    public function kvkUpdateCheckDossier($dossierNumber, $establishmentNumber, $updateTypes)
3913
    {
3914
        return $this->getAdapter()->call(
3915
            'kvkUpdateCheckDossier',
3916
            [
3917
                'dossier_number'       => $dossierNumber,
3918
                'establishment_number' => $establishmentNumber,
3919
                'update_types'         => $updateTypes,
3920
            ]
3921
        );
3922
    }
3923
3924
    /**
3925
     * @param $changedSince
3926
     * @param $updateTypes
3927
     * @param $page
3928
     *
3929
     * @return \StdClass
3930
     */
3931
    public function kvkUpdateGetChangedDossiers($changedSince, $updateTypes, $page)
3932
    {
3933
        return $this->getAdapter()->call(
3934
            'kvkUpdateGetChangedDossiers',
3935
            ['changed_since' => $changedSince, 'update_types' => $updateTypes, 'page' => $page]
3936
        );
3937
    }
3938
3939
    /**
3940
     * @param $updateTypes
3941
     * @param $page
3942
     *
3943
     * @return \StdClass
3944
     */
3945
    public function kvkUpdateGetDossiers($updateTypes, $page)
3946
    {
3947
        return $this->getAdapter()->call('kvkUpdateGetDossiers', ['update_types' => $updateTypes, 'page' => $page]);
3948
    }
3949
3950
    /**
3951
     * @param $dossierNumber
3952
     * @param $establishmentNumber
3953
     *
3954
     * @return \StdClass
3955
     */
3956
    public function kvkUpdateRemoveDossier($dossierNumber, $establishmentNumber)
3957
    {
3958
        return $this->getAdapter()->call(
3959
            'kvkUpdateRemoveDossier',
3960
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
3961
        );
3962
    }
3963
3964
    /**
3965
     * Login.
3966
     *
3967
     * @param string $username
3968
     * @param string $password
3969
     *
3970
     * @return \StdClass
3971
     */
3972
    public function login($username, $password)
3973
    {
3974
        return $this->getAdapter()->call('login', ['username' => $username, 'password' => $password]);
3975
    }
3976
3977
    /**
3978
     * End the session of the current user.
3979
     */
3980
    public function logout()
3981
    {
3982
        return $this->getAdapter()->call('logout', []);
3983
    }
3984
3985
    /**
3986
     * @param $latitude
3987
     * @param $longitude
3988
     * @param $format
3989
     * @param $width
3990
     * @param $height
3991
     * @param $zoom
3992
     *
3993
     * @return \StdClass
3994
     */
3995
    public function mapViewInternationalLatLon($latitude, $longitude, $format, $width, $height, $zoom)
3996
    {
3997
        return $this->getAdapter()->call(
3998
            'mapViewInternationalLatLon',
3999
            [
4000
                'latitude'  => $latitude,
4001
                'longitude' => $longitude,
4002
                'format'    => $format,
4003
                'width'     => $width,
4004
                'height'    => $height,
4005
                'zoom'      => $zoom,
4006
            ]
4007
        );
4008
    }
4009
4010
    /**
4011
     * @param $centerLat
4012
     * @param $centerLon
4013
     * @param $extraLatLon
4014
     * @param $format
4015
     * @param $width
4016
     * @param $height
4017
     * @param $zoom
4018
     *
4019
     * @return \StdClass
4020
     */
4021
    public function mapViewLatLon($centerLat, $centerLon, $extraLatLon, $format, $width, $height, $zoom)
4022
    {
4023
        return $this->getAdapter()->call(
4024
            'mapViewLatLon',
4025
            [
4026
                'center_lat'   => $centerLat,
4027
                'center_lon'   => $centerLon,
4028
                'extra_latlon' => $extraLatLon,
4029
                'format'       => $format,
4030
                'width'        => $width,
4031
                'height'       => $height,
4032
                'zoom'         => $zoom,
4033
            ]
4034
        );
4035
    }
4036
4037
    /**
4038
     * @param $postcode
4039
     * @param $format
4040
     * @param $width
4041
     * @param $height
4042
     * @param $zoom
4043
     *
4044
     * @return \StdClass
4045
     */
4046
    public function mapViewPostcodeV2($postcode, $format, $width, $height, $zoom)
4047
    {
4048
        return $this->getAdapter()->call(
4049
            'mapViewPostcodeV2',
4050
            [
4051
                'postcode' => $postcode,
4052
                'format'   => $format,
4053
                'width'    => $width,
4054
                'height'   => $height,
4055
                'zoom'     => $zoom,
4056
            ]
4057
        );
4058
    }
4059
4060
    /**
4061
     * Returns a map in PNG or JPG format centered on the xy RD coordinate.
4062
     * The extra_xy parameter can be used to specify additional locations, the map is not centered or zoomed to
4063
     * automatically enclose these locations.
4064
     *
4065
     * @param int    $centerX The RD X component of the coordinate
4066
     * @param int    $centerY The RD Y component of the coordinate
4067
     * @param array  $extraXY Additional RDCoordinates, an <Patterns::{Type}Array> of type <RDCoordinates>
4068
     * @param string $format  Image format, PNG (default) or JPG
4069
     * @param int    $width   Width in pixels, domain [1 - 2048]
4070
     * @param int    $height  Height in pixels, domain [1 - 2048]
4071
     * @param float  $zoom    Scale in meters per pixel. See: <Zoom>
4072
     *
4073
     * @return \StdClass
4074
     */
4075
    public function mapViewRD($centerX, $centerY, $extraXY, $format, $width, $height, $zoom)
4076
    {
4077
        return $this->getAdapter()->call(
4078
            'mapViewRD',
4079
            [
4080
                'center_x' => $centerX,
4081
                'center_y' => $centerY,
4082
                'extra_xy' => $extraXY,
4083
                'format'   => $format,
4084
                'width'    => $width,
4085
                'height'   => $height,
4086
                'zoom'     => $zoom,
4087
            ]
4088
        );
4089
    }
4090
4091
    /**
4092
     * Returns a value estimate for the real estate at the specified address.
4093
     * The required parameters are: postcode, houseno and testing_date. The remaining parameters are retrieved from the
4094
     * Kadaster if available. If those parameters are specified in the request they override any Kadaster data, and will
4095
     * be used in the calculation of the value estimate. If no value estimate can be determined the response will be an
4096
     * error with error code (see <Error Handling::Error codes>) 'Server.Data.NotFound.Nbwo.EstimateUnavailable'.
4097
     * Type of houses:
4098
     * A -- Appartment
4099
     * H -- Corner house (Hoekwoning)
4100
     * K -- Semi detached house (Twee onder een kap)
4101
     * N -- Not a house
4102
     * O -- Unknown type of house
4103
     * T -- Townhouse (Tussingwoning)
4104
     * V -- Detached house (Vrijstaande woning).
4105
     *
4106
     * @param string $postcode             Postalcode
4107
     * @param int    $huisNummer           House number
4108
     * @param string $huisNummerToevoeging House number addition, may be left empty
4109
     * @param string $prijspeilDatum       Date for which the value should be determined, in the format Y-m-d
4110
     * @param string $woningtype           house type, may be empty
4111
     * @param int    $inhoud               Volume in cubic meters, may be empty (0)
4112
     * @param int    $grootte              Surface area of the parcel in square meters, may be empty (0)
4113
     *
4114
     * @return \StdClass
4115
     */
4116
    public function nbwoEstimateValue(
4117
        $postcode,
4118
        $huisNummer,
4119
        $huisNummerToevoeging,
4120
        $prijspeilDatum,
4121
        $woningtype,
4122
        $inhoud,
4123
        $grootte
4124
    ) {
4125
        return $this->getAdapter()->call(
4126
            'nbwoEstimateValue',
4127
            [
4128
                'postcode'              => $postcode,
4129
                'huisnummer'            => $huisNummer,
4130
                'huisnummer_toevoeging' => $huisNummerToevoeging,
4131
                'prijspeil_datum'       => $prijspeilDatum,
4132
                'woningtype'            => $woningtype,
4133
                'inhoud'                => $inhoud,
4134
                'grootte'               => $grootte,
4135
            ]
4136
        );
4137
    }
4138
4139
    /**
4140
     * @param $gender
4141
     * @param $initials
4142
     * @param $prefix
4143
     * @param $lastName
4144
     * @param $birthDate
4145
     * @param $street
4146
     * @param $houseNumber
4147
     * @param $houseNumberAddition
4148
     * @param $postcode
4149
     * @param $city
4150
     *
4151
     * @return \StdClass
4152
     */
4153 View Code Duplication
    public function riskCheckGetRiskPersonCompanyReport(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4154
        $gender,
4155
        $initials,
4156
        $prefix,
4157
        $lastName,
4158
        $birthDate,
4159
        $street,
4160
        $houseNumber,
4161
        $houseNumberAddition,
4162
        $postcode,
4163
        $city
4164
    ) {
4165
        return $this->getAdapter()->call(
4166
            'riskCheckGetRiskPersonCompanyReport',
4167
            [
4168
                'gender'                => $gender,
4169
                'initials'              => $initials,
4170
                'prefix'                => $prefix,
4171
                'last_name'             => $lastName,
4172
                'birth_date'            => $birthDate,
4173
                'street'                => $street,
4174
                'house_number'          => $houseNumber,
4175
                'house_number_addition' => $houseNumberAddition,
4176
                'postcode'              => $postcode,
4177
                'city'                  => $city,
4178
            ]
4179
        );
4180
    }
4181
4182
    /**
4183
     * Returns a score indicating creditworthiness for a Dutch person, address and postcode area.
4184
     * The given parameters are used to search for a person.
4185
     *   The following fields are tried in the order listed, until a matching person is found:
4186
     *   1 - initials, name, postcode, house number
4187
     *   2 - initials, name, birth date
4188
     *   3 - postcode, house number, birth date
4189
     *   4 - account number, birth date
4190
     *   5 - phone number, birth date
4191
     *   6 - mobile number, birth date
4192
     *   7 - email, birth date
4193
     * For instance, if initials, postcode, house number and birth date are specified and a match is found on the
4194
     * fields
4195
     * listed under 1, birth date will be ignored. Scores for address and postcode are determined independent of the
4196
     * person details. Search fields are case-insensitive. Non-ASCII characters are mapped to the corresponding
4197
     * character without diacritical mark (e.g. an accented e is mapped to an 'e').
4198
     *
4199
     * @param string $gender              Gender of the person. M or F, may be empty.
4200
     * @param string $initials            The initials, mandatory.
4201
     * @param string $prefix              The surname prefix, like "van" or "de", may be empty.
4202
     * @param string $lastName            The last name of the person, mandatory.
4203
     * @param string $birthDate           Birth date in the format yyyy-mm-dd, may be empty.
4204
     * @param string $street              Street part of the address, may be empty.
4205
     * @param int    $houseNumber         House number, mandatory.
4206
     * @param string $houseNumberAddition Extension part of the house number, may be empty.
4207
     * @param string $postcode            Dutch postcode in the format 1234AB, mandatory.
4208
     * @param string $city                City, may be empty.
4209
     * @param string $accountNumber       Bank account number, only numeric characters, may be empty.
4210
     * @param string $phoneNumber         Home phone number, only numeric characters (e.g. 0201234567), may be empty
4211
     * @param string $mobileNumber        Mobile phone number, only numeric characters (e.g. 0612345678), may be empty
4212
     * @param string $email               Email address, may be empty.
4213
     * @param string $testingDate         Date for which the credit score should be determined, format Y-m-d, mandatory.
4214
     *
4215
     * @return \StdClass
4216
     */
4217
    public function riskCheckPerson(
4218
        $gender,
4219
        $initials,
4220
        $prefix,
4221
        $lastName,
4222
        $birthDate,
4223
        $street,
4224
        $houseNumber,
4225
        $houseNumberAddition,
4226
        $postcode,
4227
        $city,
4228
        $accountNumber,
4229
        $phoneNumber,
4230
        $mobileNumber,
4231
        $email,
4232
        $testingDate
4233
    ) {
4234
        return $this->getAdapter()->call(
4235
            'riskCheckPerson',
4236
            [
4237
                'gender'                => $gender,
4238
                'initials'              => $initials,
4239
                'prefix'                => $prefix,
4240
                'last_name'             => $lastName,
4241
                'birth_date'            => $birthDate,
4242
                'street'                => $street,
4243
                'house_number'          => $houseNumber,
4244
                'house_number_addition' => $houseNumberAddition,
4245
                'postcode'              => $postcode,
4246
                'city'                  => $city,
4247
                'account_number'        => $accountNumber,
4248
                'phone_number'          => $phoneNumber,
4249
                'mobile_number'         => $mobileNumber,
4250
                'email'                 => $email,
4251
                'testing_date'          => $testingDate,
4252
            ]
4253
        );
4254
    }
4255
4256
    /**
4257
     * Returns a description of the fastest route between two dutch postcodes.
4258
     * For every part of the route the drivetime in seconds and drivedistance in meters are given as well. The
4259
     * description is available in dutch and english, depending on the english parameter toggle.
4260
     *
4261
     * @param string $postcodeFrom Postcode at the start of the route
4262
     * @param string $postcodeTo   Postcode at the end of the route
4263
     * @param bool   $english      Whether to returns the description in english (true) or Dutch (false)
4264
     *
4265
     * @return \StdClass
4266
     */
4267
    public function routePlannerDescription($postcodeFrom, $postcodeTo, $english)
4268
    {
4269
        return $this->getAdapter()->call(
4270
            'routePlannerDescription',
4271
            [
4272
                'postcodefrom' => $postcodeFrom,
4273
                'postcodeto'   => $postcodeTo,
4274
                'english'      => $english,
4275
            ]
4276
        );
4277
    }
4278
4279
    /**
4280
     * Returns a description of the route calculated between two addresses.
4281
     * For every part of the route the drive time and drive distance are given. The description is available in several
4282
     * languages controlled by the language parameter. The fastest, most economic or shortest route can be calculated.
4283
     *
4284
     * @param string $routeType    Type of route to calculate, 'fastest', 'shortest' or 'economic'
4285
     * @param string $toPostalCode Start address postal code
4286
     * @param string $fromHouseNo  Start address house number
4287
     * @param string $fromStreet   Start address street
4288
     * @param string $fromCity     Start address city
4289
     * @param string $fromCountry  Start country (ISO3, ISO2 or Full-Text)
4290
     * @param string $toPostalcode Destination address postal code
4291
     * @param string $toHouseNo    Destination address house-number
4292
     * @param string $toStreet     Destination address street
4293
     * @param string $toCity       Destination address city
4294
     * @param string $toCountry    Destination country (ISO3, ISO2 or Full-Text)
4295
     * @param string $language     'danish', 'dutch', 'english', 'french', 'german' or 'italian'
4296
     *
4297
     * @return \StdClass
4298
     */
4299
    public function routePlannerDescriptionAddress(
4300
        $routeType,
4301
        $toPostalCode,
4302
        $fromHouseNo,
4303
        $fromStreet,
4304
        $fromCity,
4305
        $fromCountry,
4306
        $toPostalcode,
4307
        $toHouseNo,
4308
        $toStreet,
4309
        $toCity,
4310
        $toCountry,
4311
        $language
4312
    ) {
4313
        return $this->getAdapter()->call(
4314
            'routePlannerDescriptionAddress',
4315
            [
4316
                'routetype'       => $routeType,
4317
                'from_postalcode' => $toPostalCode,
4318
                'from_houseno'    => $fromHouseNo,
4319
                'from_street'     => $fromStreet,
4320
                'from_city'       => $fromCity,
4321
                'from_country'    => $fromCountry,
4322
                'to_postalcode'   => $toPostalcode,
4323
                'to_houseno'      => $toHouseNo,
4324
                'to_street'       => $toStreet,
4325
                'to_city'         => $toCity,
4326
                'to_country'      => $toCountry,
4327
                'language'        => $language,
4328
            ]
4329
        );
4330
    }
4331
4332
    /**
4333
     * Returns a description of the route between two dutch postcodes, including the RD coordinates along the route.
4334
     * For every part of the route the drive time in seconds and drive distance in meters are given as well.
4335
     * The route type can be shortest, economic or fastest. By default the fastest route will be calculated.
4336
     * The description is available in dutch and english, depending on the english parameter toggle.
4337
     *
4338
     * @param string $postcodeFrom Postcode at the start of the route
4339
     * @param string $postcodeTo   Postcode at the end of the route
4340
     * @param string $routeType    Type of route to calculate: 'fastest', 'shortest' or 'economic'
4341
     * @param bool   $english      Whether to returns the description in english (true) or dutch (false)
4342
     *
4343
     * @return \StdClass <RouteDescriptionCoordinatesRD> entry.
4344
     */
4345
    public function routePlannerDescriptionCoordinatesRD($postcodeFrom, $postcodeTo, $routeType, $english)
4346
    {
4347
        return $this->getAdapter()->call(
4348
            'routePlannerDescriptionCoordinatesRD',
4349
            [
4350
                'postcodefrom' => $postcodeFrom,
4351
                'postcodeto'   => $postcodeTo,
4352
                'routetype'    => $routeType,
4353
                'english'      => $english,
4354
            ]
4355
        );
4356
    }
4357
4358
    /**
4359
     * Returns a description of the route calculated between two dutch addresses.
4360
     * For every part of the route the drive time and drive distance are given as well. The description is available in
4361
     * several languages depending on the language parameter. The fastest, most economic or shortest route can be
4362
     * calculated.
4363
     *
4364
     * @param string $routeType      Type of route to calculate, 'fastest', 'shortest' or 'economic'
4365
     * @param string $fromPostalCode Start address postal code
4366
     * @param string $fromHousNo     Start address house number
4367
     * @param string $fromStreet     Start address street
4368
     * @param string $fromCity       Start address city
4369
     * @param string $toPostalCode   Destination address postal code
4370
     * @param string $toHousNo       Destination address house-number
4371
     * @param string $toStreet       Destination address street
4372
     * @param string $toCity         Destination address city
4373
     * @param string $language       Language description: 'danish', 'dutch', 'english', 'french', 'german' or 'italian'
4374
     *
4375
     * @return \StdClass <Patterns::{Type}Array> of <RoutePart> entries
4376
     */
4377 View Code Duplication
    public function routePlannerDescriptionDutchAddress(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4378
        $routeType,
4379
        $fromPostalCode,
4380
        $fromHousNo,
4381
        $fromStreet,
4382
        $fromCity,
4383
        $toPostalCode,
4384
        $toHousNo,
4385
        $toStreet,
4386
        $toCity,
4387
        $language
4388
    ) {
4389
        return $this->getAdapter()->call(
4390
            'routePlannerDescriptionDutchAddress',
4391
            [
4392
                'routetype'       => $routeType,
4393
                'from_postalcode' => $fromPostalCode,
4394
                'from_housno'     => $fromHousNo,
4395
                'from_street'     => $fromStreet,
4396
                'from_city'       => $fromCity,
4397
                'to_postalcode'   => $toPostalCode,
4398
                'to_housno'       => $toHousNo,
4399
                'to_street'       => $toStreet,
4400
                'to_city'         => $toCity,
4401
                'language'        => $language,
4402
            ]
4403
        );
4404
    }
4405
4406
    /**
4407
     * @param $postcodeFrom
4408
     * @param $postcodeTo
4409
     * @param $english
4410
     *
4411
     * @return \StdClass
4412
     */
4413
    public function routePlannerDescriptionShortest($postcodeFrom, $postcodeTo, $english)
4414
    {
4415
        return $this->getAdapter()->call(
4416
            'routePlannerDescriptionShortest',
4417
            ['postcodefrom' => $postcodeFrom, 'postcodeto' => $postcodeTo, 'english' => $english]
4418
        );
4419
    }
4420
4421
    /**
4422
     * Returns a description of the route between two latitude/longitude coordinates in Europe.
4423
     * For every part of the route the drive time and drive distance are given as well. The description is available in
4424
     * several languages depending on the language parameter. The fastest, economic or shortest route is calculated.
4425
     *
4426
     * @param float  $latitudeFrom  Latitude of the start of the route
4427
     * @param float  $longitudeFrom Longitude of the start of the route
4428
     * @param float  $latitudeTo    Latitude of the end of the route
4429
     * @param float  $longitudeTo   Longitude of the end of the route
4430
     * @param float  $routeType     Type of route to calculate: 'fastest', 'shortest' or 'economic'
4431
     * @param string $language      'danish', 'dutch', 'english', 'french', 'german', 'italian' or 'swedish'
4432
     *
4433
     * @return \StdClass <Patterns::{Type}Array> of <RoutePart> entries.
4434
     */
4435
    public function routePlannerEUDescription(
4436
        $latitudeFrom,
4437
        $longitudeFrom,
4438
        $latitudeTo,
4439
        $longitudeTo,
4440
        $routeType,
4441
        $language
4442
    ) {
4443
        return $this->getAdapter()->call(
4444
            'routePlannerEUDescription',
4445
            [
4446
                'latitudefrom'  => (float)$latitudeFrom,
4447
                'longitudefrom' => (float)$longitudeFrom,
4448
                'latitudeto'    => (float)$latitudeTo,
4449
                'longitudeto'   => (float)$longitudeTo,
4450
                'routetype'     => (float)$routeType,
4451
                'language'      => $language,
4452
            ]
4453
        );
4454
    }
4455
4456
    /**
4457
     * @param $latitudeFrom
4458
     * @param $longitudeFrom
4459
     * @param $latitudeTo
4460
     * @param $longitudeTo
4461
     * @param $routeType
4462
     * @param $language
4463
     *
4464
     * @return \StdClass
4465
     */
4466 View Code Duplication
    public function routePlannerEUDescriptionCoordinatesLatLon(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4467
        $latitudeFrom,
4468
        $longitudeFrom,
4469
        $latitudeTo,
4470
        $longitudeTo,
4471
        $routeType,
4472
        $language
4473
    ) {
4474
        return $this->getAdapter()->call(
4475
            'routePlannerEUDescriptionCoordinatesLatLon',
4476
            [
4477
                'latitudefrom'  => $latitudeFrom,
4478
                'longitudefrom' => $longitudeFrom,
4479
                'latitudeto'    => $latitudeTo,
4480
                'longitudeto'   => $longitudeTo,
4481
                'routetype'     => $routeType,
4482
                'language'      => $language,
4483
            ]
4484
        );
4485
    }
4486
4487
    /**
4488
     * @param $latitudeFrom
4489
     * @param $longitudeFrom
4490
     * @param $latitudeTo
4491
     * @param $longitudeTo
4492
     * @param $routeType
4493
     *
4494
     * @return \StdClass
4495
     */
4496 View Code Duplication
    public function routePlannerEUInformation(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4497
        $latitudeFrom,
4498
        $longitudeFrom,
4499
        $latitudeTo,
4500
        $longitudeTo,
4501
        $routeType
4502
    ) {
4503
        return $this->getAdapter()->call(
4504
            'routePlannerEUInformation',
4505
            [
4506
                'latitudefrom'  => $latitudeFrom,
4507
                'longitudefrom' => $longitudeFrom,
4508
                'latitudeto'    => $latitudeTo,
4509
                'longitudeto'   => $longitudeTo,
4510
                'routetype'     => $routeType,
4511
            ]
4512
        );
4513
    }
4514
4515
    /**
4516
     * @param $latitudeFrom
4517
     * @param $longitudeFrom
4518
     * @param $latitudeTo
4519
     * @param $longitudeTo
4520
     * @param $routeType
4521
     * @param $language
4522
     * @param $format
4523
     * @param $width
4524
     * @param $height
4525
     * @param $view
4526
     *
4527
     * @return \StdClass
4528
     */
4529
    public function routePlannerEUMap(
4530
        $latitudeFrom,
4531
        $longitudeFrom,
4532
        $latitudeTo,
4533
        $longitudeTo,
4534
        $routeType,
4535
        $language,
4536
        $format,
4537
        $width,
4538
        $height,
4539
        $view
4540
    ) {
4541
        return $this->getAdapter()->call(
4542
            'routePlannerEUMap',
4543
            [
4544
                'latitudefrom'  => $latitudeFrom,
4545
                'longitudefrom' => $longitudeFrom,
4546
                'latitudeto'    => $latitudeTo,
4547
                'longitudeto'   => $longitudeTo,
4548
                'routetype'     => $routeType,
4549
                'language'      => $language,
4550
                'format'        => $format,
4551
                'width'         => $width,
4552
                'height'        => $height,
4553
                'view'          => $view,
4554
            ]
4555
        );
4556
    }
4557
4558
    /**
4559
     * @param $startPostcode
4560
     * @param $startHouseNumber
4561
     * @param $startHouseNumberAddition
4562
     * @param $startStreet
4563
     * @param $startCity
4564
     * @param $startCountry
4565
     * @param $destinationPostcode
4566
     * @param $destinationHouseNumber
4567
     * @param $destinationHouseNumberAddition
4568
     * @param $destinationStreet
4569
     * @param $destinationCity
4570
     * @param $destinationCountry
4571
     * @param $routeType
4572
     * @param $language
4573
     *
4574
     * @return \StdClass
4575
     */
4576
    public function routePlannerGetRoute(
4577
        $startPostcode,
4578
        $startHouseNumber,
4579
        $startHouseNumberAddition,
4580
        $startStreet,
4581
        $startCity,
4582
        $startCountry,
4583
        $destinationPostcode,
4584
        $destinationHouseNumber,
4585
        $destinationHouseNumberAddition,
4586
        $destinationStreet,
4587
        $destinationCity,
4588
        $destinationCountry,
4589
        $routeType,
4590
        $language
4591
    ) {
4592
        return $this->getAdapter()->call(
4593
            'routePlannerGetRoute',
4594
            [
4595
                'start_postcode'                    => $startPostcode,
4596
                'start_house_number'                => $startHouseNumber,
4597
                'start_house_number_addition'       => $startHouseNumberAddition,
4598
                'start_street'                      => $startStreet,
4599
                'start_city'                        => $startCity,
4600
                'start_country'                     => $startCountry,
4601
                'destination_postcode'              => $destinationPostcode,
4602
                'destination_house_number'          => $destinationHouseNumber,
4603
                'destination_house_number_addition' => $destinationHouseNumberAddition,
4604
                'destination_street'                => $destinationStreet,
4605
                'destination_city'                  => $destinationCity,
4606
                'destination_country'               => $destinationCountry,
4607
                'route_type'                        => $routeType,
4608
                'language'                          => $language,
4609
            ]
4610
        );
4611
    }
4612
4613
    /**
4614
     * @param $postcodeFrom
4615
     * @param $postcodeTo
4616
     * @param $routeType
4617
     *
4618
     * @return \StdClass
4619
     */
4620
    public function routePlannerInformation($postcodeFrom, $postcodeTo, $routeType)
4621
    {
4622
        return $this->getAdapter()->call(
4623
            'routePlannerInformation',
4624
            [
4625
                'postcodefrom' => $postcodeFrom,
4626
                'postcodeto'   => $postcodeTo,
4627
                'routetype'    => $routeType,
4628
            ]
4629
        );
4630
    }
4631
4632
    /**
4633
     * @param $routeType
4634
     * @param $fromPostalCode
4635
     * @param $fromHouseNo
4636
     * @param $fromStreet
4637
     * @param $fromCity
4638
     * @param $fromCountry
4639
     * @param $toPostalCode
4640
     * @param $toHouseNo
4641
     * @param $toStreet
4642
     * @param $toCity
4643
     * @param $toCountry
4644
     *
4645
     * @return \StdClass
4646
     */
4647 View Code Duplication
    public function routePlannerInformationAddress(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4648
        $routeType,
4649
        $fromPostalCode,
4650
        $fromHouseNo,
4651
        $fromStreet,
4652
        $fromCity,
4653
        $fromCountry,
4654
        $toPostalCode,
4655
        $toHouseNo,
4656
        $toStreet,
4657
        $toCity,
4658
        $toCountry
4659
    ) {
4660
        return $this->getAdapter()->call(
4661
            'routePlannerInformationAddress',
4662
            [
4663
                'routetype'       => $routeType,
4664
                'from_postalcode' => $fromPostalCode,
4665
                'from_houseno'    => $fromHouseNo,
4666
                'from_street'     => $fromStreet,
4667
                'from_city'       => $fromCity,
4668
                'from_country'    => $fromCountry,
4669
                'to_postalcode'   => $toPostalCode,
4670
                'to_houseno'      => $toHouseNo,
4671
                'to_street'       => $toStreet,
4672
                'to_city'         => $toCity,
4673
                'to_country'      => $toCountry,
4674
            ]
4675
        );
4676
    }
4677
4678
    /**
4679
     * @param $routeType
4680
     * @param $toPostalCode
4681
     * @param $fromHousNo
4682
     * @param $fromStreet
4683
     * @param $fromCity
4684
     * @param $toPostalcode
4685
     * @param $toHousNo
4686
     * @param $toStreet
4687
     * @param $toCity
4688
     *
4689
     * @return \StdClass
4690
     */
4691 View Code Duplication
    public function routePlannerInformationDutchAddress(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4692
        $routeType,
4693
        $toPostalCode,
4694
        $fromHousNo,
4695
        $fromStreet,
4696
        $fromCity,
4697
        $toPostalcode,
4698
        $toHousNo,
4699
        $toStreet,
4700
        $toCity
4701
    ) {
4702
        return $this->getAdapter()->call(
4703
            'routePlannerInformationDutchAddress',
4704
            [
4705
                'routetype'       => $routeType,
4706
                'from_postalcode' => $toPostalCode,
4707
                'from_housno'     => $fromHousNo,
4708
                'from_street'     => $fromStreet,
4709
                'from_city'       => $fromCity,
4710
                'to_postalcode'   => $toPostalcode,
4711
                'to_housno'       => $toHousNo,
4712
                'to_street'       => $toStreet,
4713
                'to_city'         => $toCity,
4714
            ]
4715
        );
4716
    }
4717
4718
    /**
4719
     * @param $xfrom
4720
     * @param $yfrom
4721
     * @param $xto
4722
     * @param $yto
4723
     * @param $routeType
4724
     * @param $english
4725
     *
4726
     * @return \StdClass
4727
     */
4728 View Code Duplication
    public function routePlannerRDDescription($xfrom, $yfrom, $xto, $yto, $routeType, $english)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4729
    {
4730
        return $this->getAdapter()->call(
4731
            'routePlannerRDDescription',
4732
            [
4733
                'xfrom'     => $xfrom,
4734
                'yfrom'     => $yfrom,
4735
                'xto'       => $xto,
4736
                'yto'       => $yto,
4737
                'routetype' => $routeType,
4738
                'english'   => $english,
4739
            ]
4740
        );
4741
    }
4742
4743
    /**
4744
     * @param $xfrom
4745
     * @param $yfrom
4746
     * @param $xto
4747
     * @param $yto
4748
     * @param $routeType
4749
     * @param $english
4750
     *
4751
     * @return \StdClass
4752
     */
4753 View Code Duplication
    public function routePlannerRDDescriptionCoordinatesRD($xfrom, $yfrom, $xto, $yto, $routeType, $english)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4754
    {
4755
        return $this->getAdapter()->call(
4756
            'routePlannerRDDescriptionCoordinatesRD',
4757
            [
4758
                'xfrom'     => $xfrom,
4759
                'yfrom'     => $yfrom,
4760
                'xto'       => $xto,
4761
                'yto'       => $yto,
4762
                'routetype' => $routeType,
4763
                'english'   => $english,
4764
            ]
4765
        );
4766
    }
4767
4768
    /**
4769
     * @param $xfrom
4770
     * @param $yfrom
4771
     * @param $xto
4772
     * @param $yto
4773
     * @param $routeType
4774
     *
4775
     * @return \StdClass
4776
     */
4777 View Code Duplication
    public function routePlannerRDInformation($xfrom, $yfrom, $xto, $yto, $routeType)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4778
    {
4779
        return $this->getAdapter()->call(
4780
            'routePlannerRDInformation',
4781
            [
4782
                'xfrom'     => $xfrom,
4783
                'yfrom'     => $yfrom,
4784
                'xto'       => $xto,
4785
                'yto'       => $yto,
4786
                'routetype' => $routeType,
4787
            ]
4788
        );
4789
    }
4790
4791
    /**
4792
     * @param $bban
4793
     * @param $countryIso
4794
     *
4795
     * @return \StdClass
4796
     */
4797
    public function sepaConvertBasicBankAccountNumber($bban, $countryIso)
4798
    {
4799
        return $this->getAdapter()->call(
4800
            'sepaConvertBasicBankAccountNumber',
4801
            ['bban' => $bban, 'country_iso' => $countryIso]
4802
        );
4803
    }
4804
4805
    /**
4806
     * @param $iban
4807
     *
4808
     * @return \StdClass
4809
     */
4810
    public function sepaValidateInternationalBankAccountNumberFormat($iban)
4811
    {
4812
        return $this->getAdapter()->call('sepaValidateInternationalBankAccountNumberFormat', ['iban' => $iban]);
4813
    }
4814
4815
    /**
4816
     * Add a user to a group. A user can use <userListAssignableGroups> to view the groups that can be assigned.
4817
     *
4818
     * @param int $userId      User ID of the user to add to the group, use 0 for the current user
4819
     * @param int $userGroupId User Group ID of the group to add the user to
4820
     *
4821
     * @return \StdClass
4822
     */
4823
    public function userAddGroup($userId, $userGroupId)
4824
    {
4825
        return $this->getAdapter()->call('userAddGroup', ['userid' => $userId, 'usergroupid' => $userGroupId]);
4826
    }
4827
4828
    /**
4829
     * @param int    $userId
4830
     * @param string $oldPassword
4831
     * @param string $newPassword
4832
     *
4833
     * @return \StdClass
4834
     */
4835
    public function userChangePassword($userId, $oldPassword, $newPassword)
4836
    {
4837
        return $this->getAdapter()->call(
4838
            'userChangePassword',
4839
            [
4840
                'userid'       => $userId,
4841
                'old_password' => $oldPassword,
4842
                'new_password' => $newPassword,
4843
            ]
4844
        );
4845
    }
4846
4847
    /**
4848
     * Create a user, assign it to groups and send it an activation mail.
4849
     * Together with the activation email, this is the only time the password is plainly visible.
4850
     *
4851
     * @param int    $accountId    Account ID to assign this user to
4852
     * @param string $nickname     Nickname to use for this user, leave empty to to create a random nickname. All users
4853
     *                             get a prefix set by <Account::Username prefix>
4854
     * @param string $password     Password to use for authentication, leave empty for a strong random password.
4855
     * @param array  $userGroups   array of usergroup IDs to assign this user to. See <userListAssignableGroups> for
4856
     *                             list
4857
     * @param string $email        Registration email address, used for activation
4858
     * @param string $companyName  Name of the company using this user, if any
4859
     * @param string $address      Address of the company using this user, if any
4860
     * @param string $contactName  Name of the contact person responsible for this user
4861
     * @param string $contactEmail This field is not used and is ignored by the method.
4862
     * @param string $telephone    Telephone number of the contact person responsible for this user
4863
     * @param string $fax          Fax number of the contact person responsible for this user.
4864
     * @param string $clientCode   Deprecated, should contain an empty string
4865
     * @param string $comments     Comments on the user, can only be seen and edited by <Group::Account admins>
4866
     *
4867
     * @link http://webview.webservices.nl/documentation/files/service_accounting-class-php.html#Accounting.userCreateV2
4868
     * @return \StdClass
4869
     */
4870
    public function userCreateV2(
4871
        $accountId,
4872
        $nickname,
4873
        $password,
4874
        $userGroups,
4875
        $email,
4876
        $companyName,
4877
        $address,
4878
        $contactName,
4879
        $contactEmail,
4880
        $telephone,
4881
        $fax,
4882
        $clientCode,
4883
        $comments
4884
    ) {
4885
        return $this->getAdapter()->call(
4886
            'userCreateV2',
4887
            [
4888
                'accountid'    => $accountId,
4889
                'nickname'     => $nickname,
4890
                'password'     => $password,
4891
                'usergroups'   => $userGroups,
4892
                'email'        => $email,
4893
                'companyname'  => $companyName,
4894
                'address'      => $address,
4895
                'contactname'  => $contactName,
4896
                'contactemail' => $contactEmail,
4897
                'telephone'    => $telephone,
4898
                'fax'          => $fax,
4899
                'clientcode'   => $clientCode,
4900
                'comments'     => $comments,
4901
            ]
4902
        );
4903
    }
4904
4905
    /**
4906
     * Change the user's balance.
4907
     *
4908
     * @param int $userId  ID of the user to edit the balance of, use 0 for the current user
4909
     * @param int $balance Amount of balance to add to (or remove from, if negative) the user
4910
     *
4911
     * @return \StdClass
4912
     */
4913
    public function userEditBalance($userId, $balance)
4914
    {
4915
        return $this->getAdapter()->call('userEditBalance', ['userid' => $userId, 'balance' => $balance]);
4916
    }
4917
4918
    /**
4919
     * Edit the complete profile of a user.
4920
     * This method is only available to <Group::Account admins>. <Group::Account users> can use <userEditV2>
4921
     * to change some part of the profile.
4922
     *
4923
     * @param int    $userId                 User ID of the user to edit, use 0 for the current user
4924
     * @param string $nickname               Nickname to use for this user. All users get a prefix set by
4925
     *                                       <Account::Username prefix>.
4926
     * @param string $password               new password for this user. To keep the current password pass the empty
4927
     *                                       string.
4928
     * @param string $email                  Registration email address, used for activation.
4929
     * @param string $companyName            Name of the company using this user, if any.
4930
     * @param string $address                Address of the company using this user, if any
4931
     * @param string $contactName            Name of the contact person responsible for this user
4932
     * @param string $contactEmail           Telephone number of the contact person responsible for this user
4933
     * @param string $telephone              Telephone number of the contact person responsible for this user
4934
     * @param string $fax                    Fax number of the contact person responsible for this user.
4935
     * @param string $clientCode             Deprecated, shoud contain an empty string
4936
     * @param string $comments               Comments on the user, can only be seen and edited by <Group::Account
4937
     *                                       admins>.
4938
     * @param int    $accountId              accountID to assign user to, use 0 for current account. Only usable by
4939
     *                                       <Group::Admins>
4940
     * @param int    $balanceThreshold       Balance threshold to alert user, 0 to disable.
4941
     * @param string $notificationRecipients Recipients of balance alert notification:
4942
     *                                       'accountcontact' = contact account contact, 'user' = contact user,
4943
     *                                       'accountcontact_and_user' = both
4944
     *
4945
     * @return \StdClass
4946
     */
4947
    public function userEditExtendedV2(
4948
        $userId,
4949
        $nickname,
4950
        $password,
4951
        $email,
4952
        $companyName,
4953
        $address,
4954
        $contactName,
4955
        $contactEmail,
4956
        $telephone,
4957
        $fax,
4958
        $clientCode,
4959
        $comments,
4960
        $accountId,
4961
        $balanceThreshold,
4962
        $notificationRecipients
4963
    ) {
4964
        return $this->getAdapter()->call('userEditExtendedV2', [
4965
            $userId,
4966
            $nickname,
4967
            $password,
4968
            $email,
4969
            $companyName,
4970
            $address,
4971
            $contactName,
4972
            $contactEmail,
4973
            $telephone,
4974
            $fax,
4975
            $clientCode,
4976
            $comments,
4977
            $accountId,
4978
            $balanceThreshold,
4979
            $notificationRecipients,
4980
        ]);
4981
    }
4982
4983
    /**
4984
     * Set host restrictions for the user.
4985
     *
4986
     * @param int    $userId
4987
     * @param string $restrictions string with host restrictions separated by semi colons (;)
4988
     *
4989
     * @return \stdClass
4990
     */
4991
    public function userEditHostRestrictions($userId, $restrictions)
4992
    {
4993
        return $this->getAdapter()->call(
4994
            'userEditHostRestrictions',
4995
            ['userid' => $userId, 'restrictions' => $restrictions]
4996
        );
4997
    }
4998
4999
    /**
5000
     * List all groups that the current user can assign to the target user.
5001
     * This list contains both assigned and unassigned groups.
5002
     *
5003
     * @param int $userId User ID of the user to target, use 0 for the current user
5004
     * @param int $page   Page to retrieve, pages start counting at 1
5005
     *
5006
     * @return \StdClass
5007
     */
5008
    public function userListAssignableGroups($userId, $page)
5009
    {
5010
        return $this->getAdapter()->call('userListAssignableGroups', ['userid' => $userId, 'page' => $page]);
5011
    }
5012
5013
    /**
5014
     * Send a notification email to a user with a new password. This method is part of the <User::Creation> process.
5015
     *
5016
     * @param int    $userId   User ID of the user to notify, use 0 for the current user
5017
     * @param string $password Password to use for authentication, leave empty for a strong random password.
5018
     *
5019
     * @return \StdClass
5020
     */
5021
    public function userNotify($userId, $password)
5022
    {
5023
        return $this->getAdapter()->call('userNotify', ['userid' => $userId, 'password' => $password]);
5024
    }
5025
5026
    /**
5027
     * @param int $userId
5028
     *
5029
     * @return \StdClass
5030
     */
5031
    public function userRemove($userId)
5032
    {
5033
        return $this->getAdapter()->call('userRemove', ['userid' => $userId]);
5034
    }
5035
5036
    /**
5037
     * Remove a user from a group. A user can use <userViewV2> to view the groups that are currently assigned to user.
5038
     *
5039
     * @param int $userId      - User ID of the user to remove from the group, use 0 for the current user
5040
     * @param int $userGroupId - User Group ID of the group to remove the user from
5041
     *
5042
     * @return \StdClass
5043
     */
5044
    public function userRemoveGroup($userId, $userGroupId)
5045
    {
5046
        return $this->getAdapter()->call('userRemoveGroup', ['userid' => $userId, 'usergroupid' => $userGroupId]);
5047
    }
5048
5049
    /**
5050
     * Lists all the current valid <User::Sessions> of a <User>.
5051
     *
5052
     * @param int $userId User ID of the user to view, use 0 for the current user
5053
     * @param int $page   Page to retrieve, pages start counting at 1
5054
     *
5055
     * @return \StdClass <Patterns::{Type}PagedResult> of <Session> entries
5056
     */
5057
    public function userSessionList($userId, $page)
5058
    {
5059
        return $this->getAdapter()->call('userSessionList', ['userid' => $userId, 'page' => $page]);
5060
    }
5061
5062
    /**
5063
     * Remove all or one <User::Session> of a <User>.
5064
     *
5065
     * @param int $userId  ID of the user to view, use 0 for the current user
5066
     * @param int $reactId Session ID to remove, use 0 to remove all sessions
5067
     *
5068
     * @return \StdClass
5069
     */
5070
    public function userSessionRemove($userId, $reactId)
5071
    {
5072
        return $this->getAdapter()->call('userSessionRemove', ['userid' => $userId, 'reactid' => $reactId]);
5073
    }
5074
5075
    /**
5076
     * Returns the users balance.
5077
     * If the user is in the 'autoassign' user group, he is not restricted by his balance. In that case, he can still do
5078
     * method calls even though his balance amount is zero. If the user is not in the 'autoassign' user group, the user
5079
     * can spend his own balance amount, but not more.
5080
     *
5081
     * @param int $userId ID of the user to view the balance of, use 0 for the current user
5082
     *
5083
     * @return int
5084
     */
5085
    public function userViewBalance($userId)
5086
    {
5087
        return $this->getAdapter()->call('userViewBalance', ['userid' => $userId]);
5088
    }
5089
5090
    /**
5091
     * View host restrictions for the user.
5092
     *
5093
     * @param int $userId User ID of the user, use 0 for the current user
5094
     *
5095
     * @return string String containing all restrictions, separated by  semi colons
5096
     */
5097
    public function userViewHostRestrictions($userId)
5098
    {
5099
        return $this->getAdapter()->call('userViewHostRestrictions', ['userid' => $userId]);
5100
    }
5101
5102
    /**
5103
     * View the profile of a user.
5104
     *
5105
     * @param int $userId Id of the user to view, use 0 for the current user
5106
     *
5107
     * @return array
5108
     */
5109
    public function userViewV2($userId = 0)
5110
    {
5111
        return $this->getAdapter()->call('userViewV2', ['userid' => $userId]);
5112
    }
5113
5114
    /**
5115
     * @param $vatNumber
5116
     *
5117
     * @return \StdClass
5118
     */
5119
    public function vatValidate($vatNumber)
5120
    {
5121
        return $this->getAdapter()->call('vatValidate', ['vat_number' => $vatNumber]);
5122
    }
5123
5124
    /**
5125
     * @param $vatNumber
5126
     *
5127
     * @return \StdClass
5128
     */
5129
    public function vatViesProxyCheckVat($vatNumber)
5130
    {
5131
        return $this->getAdapter()->call('vatViesProxyCheckVat', ['vat_number' => $vatNumber]);
5132
    }
5133
}
5134