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.
Test Setup Failed
Push — master ( fe4962...3aa77f )
by Thijs
04:04
created

Connector::accountUserListV2()   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 2
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
            ['accountid'        => $accountId,
66
             'address'          => $address,
67
             'contactname'      => $contactName,
68
             'contactemail'     => $contactEmail,
69
             'telephone'        => $telephone,
70
             'fax'              => $fax,
71
             'description'      => $description,
72
             'balancethreshold' => (float)$balanceThreshold,
73
            ]
74
        );
75
    }
76
77
    /**
78
     * Get the id of an account created with a token from <accountGetCreationToken>.
79
     * Depending on the outcome of the account registration the following is returned:
80
     * - A value greater than 0 - The customer has successfully registered an account. The returned value is the
81
     *                            accountId.
82
     * - A value of 0           - The customer has not yet finished the account registration process. It may be that
83
     *                            Webservices.nl is awaiting confirmation of a payment performed by the customer.
84
     *                            You should *not* retrieve a new account registration token, or direct the customer to
85
     *                            the account registration page again. This could result in the customer registering
86
     *                            and paying for an account that is never used. Instead, try calling
87
     *                            <accountGetCreationStatus> again later.
88
     * - A 'Server.Data.NotFound' error - This error indicates that the registration process was unsuccesful.
89
     *                            See <Error Handling::Error codes>. You may start the registration process over by
90
     *                            calling <accountGetCreationToken>.
91
     *
92
     * @param string $token A token retrieved using <accountGetCreationToken>.
93
     *
94
     * @throws NotFoundException
95
     * @return int accountId The account id, which is 0 when the account registration has not finished yet
96
     */
97
    public function accountGetCreationStatus($token)
98
    {
99
        return $this->getAdapter()->call('accountGetCreationStatus', ['token' => $token]);
100
    }
101
102
    /**
103
     * Retrieve a token with which a new account may be registered via the <Webview Interface> by one of your customers.
104
     * The newly created account will be associated with your account. Tokens are only valid for a limited amount of
105
     * time. Use <accountGetCreationStatus> to get the id of the account created using the token. If a customer arrives
106
     * at this URL the <accountGetCreationStatus> should be called to check if account creation was successful.
107
     *
108
     * @param string $returnUrl the URL to which the customer is redirected after registering a Webservices.nl account
109
     *
110
     * @return string AccountCreationToken
111
     */
112
    public function accountGetCreationToken($returnUrl)
113
    {
114
        return $this->getAdapter()->call('accountGetCreationToken', ['return_url' => $returnUrl]);
115
    }
116
117
    /**
118
     * Retrieve a token that can be used order account balance via the <Webview Interface>.
119
     *
120
     * @param int    $accountId id of the account for which balance will be ordered
121
     * @param string $returnUrl the URL to which the customer is redirected after finishing the order process
122
     *
123
     * @return string
124
     */
125
    public function accountGetOrderToken($accountId, $returnUrl)
126
    {
127
        return $this->getAdapter()->call(
128
            'accountGetOrderToken',
129
            ['accountid' => $accountId, 'return_url' => $returnUrl]
130
        );
131
    }
132
133
    /**
134
     * List all users in this account. This method is only available to <Group::Account admins>.
135
     *
136
     * @param int $accountId ID of the account to list, use 0 for the current user's account
137
     * @param int $page      Page to retrieve, pages start counting at 1
138
     *
139
     * @return \StdClass <Patterns::{Type}PagedResult> of <UserV2> entries.
140
     */
141
    public function accountUserListV2($accountId, $page)
142
    {
143
        return $this->getAdapter()->call('accountUserListV2', ['accountid' => (int)$accountId, 'page' => $page]);
144
    }
145
146
    /**
147
     * Search for users of an account using a search phrase.
148
     * This method is only available to <Group::Account admins>.
149
     *
150
     * @param int    $accountId ID of the account to list, use 0 for the current user's account
151
     * @param string $phrase    Phrase to search for in user profiles
152
     * @param int    $page      Page to retrieve, pages start counting at 1
153
     *
154
     * @return \stdClass UserV2 entries.
155
     */
156
    public function accountUserSearchV2($accountId, $phrase, $page)
157
    {
158
        return $this->getAdapter()->call(
159
            'accountUserSearchV2',
160
            ['accountid' => $accountId, 'phrase' => $phrase, 'page' => $page]
161
        );
162
    }
163
164
    /**
165
     * Returns the accounts balance.
166
     *
167
     * @param int $accountId ID of the account to view the balance of, use 0 for the current account
168
     *
169
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewBalance
170
     * @return int
171
     */
172
    public function accountViewBalance($accountId = 0)
173
    {
174
        return $this->getAdapter()->call('accountViewBalance', ['accountid' => $accountId]);
175
    }
176
177
    /**
178
     * View host restrictions for the account.
179
     *
180
     * @param int $accountId ID of the account, use 0 for the current user's account
181
     *
182
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewHostRestrictions
183
     * @return string containing all restrictions, separated by semicolons
184
     */
185
    public function accountViewHostRestrictions($accountId)
186
    {
187
        return $this->getAdapter()->call('accountViewHostRestrictions', ['accountid' => $accountId]);
188
    }
189
190
    /**
191
     * View the profile of an account.
192
     *
193
     * @param int $accountId Account ID of the account to move use 0 for the account
194
     *
195
     * @link https://webview.webservices.nl/documentation/files/service_accounting-php.html#Accounting.accountViewV2
196
     * @return \StdClass
197
     */
198
    public function accountViewV2($accountId)
199
    {
200
        return $this->getAdapter()->call('accountViewV2', ['accountid' => (int)$accountId]);
201
    }
202
203
    /**
204
     * Returns a list of all neighborhood codes in the city.
205
     *
206
     * @param string $name    Name or identifier of the city
207
     * @param bool   $postbus indicating whether Postbus neighborhood codes should be included in the result
208
     * @param int    $page    Page to retrieve, pages start counting at 1
209
     *
210
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressCityListNeighborhoods
211
     * @return \StdClass <Patterns::{Type}PagedResult>
212
     */
213
    public function addressCityListNeighborhoods($name, $postbus, $page)
214
    {
215
        return $this->getAdapter()->call(
216
            'addressCityListNeighborhoods',
217
            ['name' => $name, 'postbus' => (bool)$postbus, 'page' => $page]
218
        );
219
    }
220
221
    /**
222
     * Search for all cities that match a phrase.
223
     * Cities are also matched if input matches a commonly used alternative city name. Exact matches on the official
224
     * name are listed first, the rest of the results are sorted alphabetically. This method differs from
225
     * addressCitySearch by returning <CityV2> entries instead of <City> entries, thus giving more information about a
226
     * city.
227
     *
228
     * @param string $name Phrase to search cities for, or the numeric identifier for the city.
229
     * @param int    $page Page to retrieve, pages start counting at 1
230
     *
231
     * @link http://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressCitySearchV2
232
     * @return \StdClass <Patterns::{Type}PagedResult> of <CityV2> entries.
233
     */
234
    public function addressCitySearchV2($name, $page)
235
    {
236
        return $this->getAdapter()->call('addressCitySearchV2', ['name' => $name, 'page' => $page]);
237
    }
238
239
    /**
240
     * List all cities in specific municipalities.
241
     *
242
     * @param string $name search municipalities for, or the numeric identifier for the municipality
243
     * @param int    $page Page to retrieve, pages start counting at 1
244
     *
245
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressDistrictListCities
246
     * @return \StdClass <Patterns::{Type}PagedResult>
247
     */
248
    public function addressDistrictListCities($name, $page)
249
    {
250
        return $this->getAdapter()->call('addressDistrictListCities', ['name' => $name, 'page' => $page]);
251
    }
252
253
    /**
254
     * Search for all municipalities that match a phrase.
255
     *
256
     * @param string $name Phrase to search municipalities for, or the numeric identifier for the municipality.
257
     * @param string $page Page to retrieve, pages start counting at 1
258
     *
259
     * @link https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressDistrictSearch
260
     * @return \StdClass <Patterns::{Type}PagedResult> of <District> entries.
261
     */
262
    public function addressDistrictSearch($name, $page)
263
    {
264
        return $this->getAdapter()->call('addressDistrictSearch', ['name' => $name, 'page' => $page]);
265
    }
266
267
    /**
268
     * Search for addresses in the <Perceel> format, using a single search phrase.
269
     * The phrase can be a partial address. To search using separate fields for each address part, use
270
     * <addressPerceelFullParameterSearchV2>.
271
     *
272
     * @param string $province          Phrase used to select the province of the address, see <Perceel>.provincienaam
273
     * @param string $district          Phrase used to select the municipality of the address
274
     * @param string $city              Phrase used to select the city of the address
275
     * @param string $street            Phrase used to select the street of the address
276
     * @param int    $houseNo           Number used to select the house number of the address
277
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
278
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
279
     *                                  numbers of the postcode.
280
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
281
     *                                  letters of the postcode. See <Perceel>.lettercombinatie
282
     * @param string $addressType       Phrase used to select the addresstype of the address
283
     * @param int    $page              Page to retrieve, pages start counting at 1
284
     *
285
     * @deprecated please use addressPerceelFullParameterSearchV2
286
     * @link       https://webview.webservices.nl/documentation/files/service_address-php.html#Address.addressPerceelFullParameterSearch
287
     * @return \StdClass
288
     */
289 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...
290
        $province,
291
        $district,
292
        $city,
293
        $street,
294
        $houseNo,
295
        $houseNoAddition,
296
        $nbCode,
297
        $letterCombination,
298
        $addressType,
299
        $page
300
    ) {
301
        return $this->getAdapter()->call(
302
            'addressPerceelFullParameterSearch',
303
            [
304
                'province'          => $province,
305
                'district'          => $district,
306
                'city'              => $city,
307
                'street'            => $street,
308
                'houseNo'           => $houseNo,
309
                'houseNoAddition'   => $houseNoAddition,
310
                'nbcode'            => $nbCode,
311
                'lettercombination' => $letterCombination,
312
                'addresstype'       => $addressType,
313
                'page'              => $page,
314
            ]
315
        );
316
    }
317
318
    /**
319
     * Search for addresses in the <Perceel> format, using different search phrases for each address part.
320
     * PO box matches:
321
     * See <Perceel> for information on how PO box matches are returned.
322
     *
323
     * @param string $province          Phrase used to select the province of the address, see <Perceel>.provincienaam
324
     * @param string $district          Phrase used to select the municipality of the address
325
     * @param string $city              Phrase used to select the city of the address
326
     * @param string $street            Phrase used to select the street of the address
327
     * @param int    $houseNo           Number used to select the house number of the address
328
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
329
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
330
     *                                  numbers of the postcode.
331
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
332
     *                                  letters of the postcode. See <Perceel>.lettercombinatie
333
     * @param string $addresstype       Phrase used to select the addresstype of the address
334
     * @param int    $page              Page to retrieve, pages start counting at 1
335
     *
336
     * @return \StdClass <PerceelSearchPartsPagedResult>.
337
     */
338 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...
339
        $province,
340
        $district,
341
        $city,
342
        $street,
343
        $houseNo,
344
        $houseNoAddition,
345
        $nbCode,
346
        $letterCombination,
347
        $addresstype,
348
        $page
349
    ) {
350
        return $this->getAdapter()->call(
351
            'addressPerceelFullParameterSearchV2',
352
            [
353
                'province'          => $province,
354
                'district'          => $district,
355
                'city'              => $city,
356
                'street'            => $street,
357
                'houseNo'           => $houseNo,
358
                'houseNoAddition'   => $houseNoAddition,
359
                'nbcode'            => $nbCode,
360
                'lettercombination' => $letterCombination,
361
                'addresstype'       => $addresstype,
362
                'page'              => $page,
363
            ]
364
        );
365
    }
366
367
    /**
368
     * Search for addresses in the <Perceel> format, using different search phrases for each address part.
369
     *
370
     * @param string $province        Phrase used to select the province of the address, see <Perceel>.provincienaam
371
     * @param string $district        Phrase used to select the municipality of the address
372
     * @param string $city            Phrase used to select the city of the address
373
     * @param string $street          Phrase used to select the street of the address
374
     * @param int    $houseNo         Number used to select the house number of the address
375
     * @param string $houseNoAddition Phrase used to select the house number addition of the address
376
     * @param int    $page
377
     *
378
     * @deprecated please use addressPerceelFullParameterSearchV2
379
     * @return \StdClass
380
     */
381 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...
382
        $province,
383
        $district,
384
        $city,
385
        $street,
386
        $houseNo,
387
        $houseNoAddition,
388
        $page
389
    ) {
390
        return $this->getAdapter()->call(
391
            'addressPerceelParameterSearch',
392
            [
393
                'province'        => $province,
394
                'district'        => $district,
395
                'city'            => $city,
396
                'street'          => $street,
397
                'houseNo'         => $houseNo,
398
                'houseNoAddition' => $houseNoAddition,
399
                'page'            => $page,
400
            ]
401
        );
402
    }
403
404
    /**
405
     * Search for addresses in the <Perceel> format, using a single search phrase.
406
     * The phrase can be a partial address.
407
     * Supported phrases:
408
     * postcode, house number - 1188 VP, 202bis
409
     * postcode - 1188 VP
410
     * neighborhood code - 1188
411
     * city, address - Amstelveen, Amsteldijk Zuid 202bis
412
     * address, city - Amsteldijk Zuid 202bis, Amstelveen
413
     * city, street - Amstelveen, Amsteldijk Zuid
414
     * address - Amsteldijk Zuid 202bis.
415
     *
416
     * @param string $address Address phrase to search for in addresses
417
     * @param int    $page    Page to retrieve, pages start counting at 1
418
     *
419
     * @return \StdClass <PerceelSearchPartsPagedResult>
420
     */
421
    public function addressPerceelPhraseSearch($address, $page)
422
    {
423
        return $this->getAdapter()->call('addressPerceelPhraseSearch', ['address' => $address, 'page' => $page]);
424
    }
425
426
    /**
427
     * List all provinces.
428
     *
429
     * @param int $page
430
     *
431
     * @return \StdClass
432
     */
433
    public function addressProvinceList($page)
434
    {
435
        return $this->getAdapter()->call('addressProvinceList', ['page' => $page]);
436
    }
437
438
    /**
439
     * List all municipalities in a specific provinces.
440
     *
441
     * @param string $name Name or code of the province to list the municipalities from
442
     * @param int    $page Page to retrieve, pages start counting at 1
443
     *
444
     * @return \StdClass of <District> entries.
445
     */
446
    public function addressProvinceListDistricts($name, $page)
447
    {
448
        return $this->getAdapter()->call('addressProvinceListDistricts', ['name' => $name, 'page' => $page]);
449
    }
450
451
    /**
452
     * Returns a list of all neighborhood codes in the province.
453
     *
454
     * @param string $name    Name or code of the province
455
     * @param bool   $postbus Boolean indicating whether Postbus neighborhood codes should be included in the result
456
     * @param int    $page    Page to retrieve, pages start counting at 1
457
     *
458
     * @return \StdClass <Patterns::{Type}PagedResult> of <Neighborhood> entries.
459
     */
460
    public function addressProvinceListNeighborhoods($name, $postbus, $page)
461
    {
462
        return $this->getAdapter()->call(
463
            'addressProvinceListNeighborhoods',
464
            ['name' => $name, 'postbus' => $postbus, 'page' => $page]
465
        );
466
    }
467
468
    /**
469
     * Search for all provinces that match a phrase.
470
     *
471
     * @param string $name Phrase to search for in the province names, or the province code.
472
     * @param int    $page Page to retrieve, pages start counting at 1
473
     *
474
     * @return \StdClass <Patterns::{Type}PagedResult> of <Province> entries.
475
     */
476
    public function addressProvinceSearch($name, $page)
477
    {
478
        return $this->getAdapter()->call('addressProvinceSearch', ['name' => $name, 'page' => $page]);
479
    }
480
481
    /**
482
     * Search for a specific address.
483
     * Where the address contains the street, house number and house number addition concatenated. This is useful if the
484
     * house number is not stored separate from the street name.
485
     * A number of <RangeAddress> entries is returned. The street names in the result may not exactly match the street
486
     * in the request. To account for different writing styles and spelling errors, streets which match approximately
487
     * are also returned. E.g. "Calverstraat, Amsterdam" will return an address for the "Kalverstraat". The results are
488
     * ordered on how well they match, with the best matches first.
489
     * If the given house number does not exist in the postcode range, the house number field is left empty. In this
490
     * case, the <RangeAddress> contains a <PCReeks> which matches the street, but it contains no house number or house
491
     * number addition. For example, searching for "Dam 44, Amsterdam" returns the <PCReeks> for the Dam, but the result
492
     * omits the house number since there is no house number 44 on the Dam.
493
     *
494
     * @param string $address  Street, house number and house number addition of the searched address. Required
495
     * @param string $postcode Postcode in 1234AA format. Optional.
496
     * @param string $city     Phrase used to select the city of the address, see <PCReeks>.plaatsnaam. Optional.
497
     * @param int    $page     Page to retrieve, pages start counting at 1
498
     *
499
     * @return \StdClass PagedResult of <RangeAddress> entries.
500
     */
501
    public function addressReeksAddressSearch($address, $postcode, $city, $page)
502
    {
503
        return $this->getAdapter()->call(
504
            'addressReeksAddressSearch',
505
            ['address' => $address, 'postcode' => $postcode, 'city' => $city, 'page' => $page]
506
        );
507
    }
508
509
    /**
510
     * Search for addresses in the <PCReeks> format, using different search phrases for each address part.
511
     *
512
     * @param string $province          Phrase to search for in province name, or code of the province. See
513
     *                                  <PCReeks>.provincienaam and <PCReeks>.provinciecode
514
     * @param string $district          Phrase used to select the municipality of the address, see
515
     *                                  <PCReeks>. gemeentenaam
516
     * @param string $city              Phrase used to select the city of the address, see <PCReeks>.plaatsnaam
517
     * @param string $street            Phrase used to select the street of the address, see <PCReeks>.straatnaam
518
     * @param string $houseNo           Number used to select the house number of the address, see <PCReeks>.huisnr_van
519
     * @param string $houseNoAddition   Phrase used to select the house number addition of the address
520
     * @param string $nbCode            Number used to select the neighborhoodcode of the address, the first four
521
     *                                  numbers of the postcode. See <PCReeks>.wijkcode
522
     * @param string $letterCombination Phrase used to select the lettercombination of the address, the last two
523
     *                                  letters of the postcode. See <PCReeks>.lettercombinatie
524
     * @param int    $addressType       Phrase used to select the addresstype of the address, see
525
     *                                  <PCReeks>.reeksindicatie
526
     * @param int    $page              Page to retrieve, pages start counting at 1
527
     *
528
     * @return \StdClass PCReeksSearchPartsPagedResult
529
     */
530 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...
531
        $province,
532
        $district,
533
        $city,
534
        $street,
535
        $houseNo,
536
        $houseNoAddition,
537
        $nbCode,
538
        $letterCombination,
539
        $addressType,
540
        $page
541
    ) {
542
        return $this->getAdapter()->call(
543
            'addressReeksFullParameterSearch',
544
            ['province'          => $province,
545
             'district'          => $district,
546
             'city'              => $city,
547
             'street'            => $street,
548
             'houseNo'           => $houseNo,
549
             'houseNoAddition'   => $houseNoAddition,
550
             'nbcode'            => $nbCode,
551
             'lettercombination' => $letterCombination,
552
             'addresstype'       => $addressType,
553
             'page'              => $page,
554
            ]
555
        );
556
    }
557
558
    /**
559
     * Search for addresses in the <PCReeks> format, using different search phrases for each address part.
560
     * Notice: <addressReeksFullParameterSearch> allows more parameters to search.
561
     *
562
     * @param string $province        Phrase to search for in province name, or code of the province. See
563
     *                                <PCReeks>.provincienaam and <PCReeks>.provinciecode
564
     * @param string $district        Phrase used to select the municipality of the address, see <PCReeks>.gemeentenaam
565
     * @param string $city            Phrase used to select the city of the address, see <PCReeks>.plaatsnaam
566
     * @param string $street          Phrase used to select the street of the address, see <PCReeks>.straatnaam
567
     * @param int    $houseNo         Number used to select the house number of the address, see <PCReeks>.huisnr_van
568
     * @param string $houseNoAddition Phrase used to select the house number addition of the address
569
     * @param int    $page            Page to retrieve, pages start counting at 1
570
     *
571
     * @return \StdClass PCReeksSearchPartsPagedResult
572
     */
573 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...
574
    {
575
        return $this->getAdapter()->call(
576
            'addressReeksParameterSearch',
577
            ['province'        => $province,
578
             'district'        => $district,
579
             'city'            => $city,
580
             'street'          => $street,
581
             'houseNo'         => $houseNo,
582
             'houseNoAddition' => $houseNoAddition,
583
             'page'            => $page]
584
        );
585
    }
586
587
    /**
588
     * Determine if a specific address exists using the unique '1234AA12' postcode + house number format.
589
     * It returns either the address in <PCReeks> format, or an error if no matching address exists. If you want to
590
     * validate an address not using this unique identifier,
591
     * use <addressReeksAddressSearch> or <addressReeksFullParameterSearch>.
592
     *
593
     * @param string $address - Address to validate using the unique '1234AA12' postcode + house number format.
594
     *
595
     * @throws NotFoundException
596
     * @return \StdClass <PCReeks>
597
     */
598
    public function addressReeksPostcodeSearch($address)
599
    {
600
        return $this->getAdapter()->call('addressReeksPostcodeSearch', ['address' => $address]);
601
    }
602
603
    /**
604
     * Lookup the telephone area codes related to a given neighborhood code.
605
     *
606
     * @param string $neighborhoodCode neighborhood code to lookup
607
     * @param int    $page             Page to retrieve, pages start counting at 1
608
     *
609
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html
610
     * @return \StdClass <Patterns::{Type}PagedResult> of <AreaCode>
611
     */
612
    public function areaCodeLookup($neighborhoodCode, $page)
613
    {
614
        return $this->getAdapter()->call('areaCodeLookup', ['neighborhoodcode' => $neighborhoodCode, 'page' => $page]);
615
    }
616
617
    /**
618
     * Lookup the telephone area code related to a given postcode.
619
     *
620
     * @param string $postcode postcode to lookup
621
     *
622
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html#Areacode.areaCodePostcodeLookup
623
     * @return \StdClass <Patterns::{Type}Array> of <AreaCode>
624
     */
625
    public function areaCodePostcodeLookup($postcode)
626
    {
627
        return $this->getAdapter()->call('areaCodePostcodeLookup', ['postcode' => $postcode]);
628
    }
629
630
    /**
631
     * Lookup the neighborhood codes related to a given telephone area code.
632
     *
633
     * @param string $areaCode Telephone areacode to lookup
634
     * @param int    $page     Page to retrieve
635
     *
636
     * @link https://webview.webservices.nl/documentation/files/service_areacode-php.html#Areacode.areaCodeToNeighborhoodcode
637
     * @return \StdClass A <Patterns::{Type}PagedResult> of <Neighborhood> entries
638
     */
639
    public function areaCodeToNeighborhoodcode($areaCode, $page)
640
    {
641
        return $this->getAdapter()->call('areaCodeToNeighborhoodcode', ['areacode' => $areaCode, 'page' => $page]);
642
    }
643
644
    /**
645
     * Retrieve a Bovag member using a Bovag identifier.
646
     *
647
     * @param string $bovagId The identifier used by Bovag to identify a member
648
     *
649
     * @link https://webview.webservices.nl/documentation/files/service_bovag-php.html#Bovag.bovagGetMemberByBovagId
650
     * @return \StdClass <BovagMember>
651
     */
652
    public function bovagGetMemberByBovagId($bovagId)
653
    {
654
        return $this->getAdapter()->call('bovagGetMemberByBovagId', ['bovag_id' => $bovagId]);
655
    }
656
657
    /**
658
     * Retrieve a Bovag member using a DutchBusiness reference.
659
     *
660
     * @param string $dossierNumber       Chamber of Commerce number
661
     * @param string $establishmentNumber Establishment number
662
     *
663
     * @link https://webview.webservices.nl/documentation/files/service_bovag-php.html#Bovag.bovagGetMemberByDutchBusiness
664
     * @return \StdClass <BovagMember>
665
     */
666
    public function bovagGetMemberByDutchBusiness($dossierNumber, $establishmentNumber)
667
    {
668
        return $this->getAdapter()->call(
669
            'bovagGetMemberByDutchBusiness',
670
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
671
        );
672
    }
673
674
    /**
675
     * Retrieve Auto disk price information.
676
     * Autodisk data is available for yellow license plates younger than 2004. Coverage for older plates is very
677
     * limited.
678
     *
679
     * @param string $licensePlate Dutch license plate (kenteken)
680
     *
681
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carATDPrice
682
     * @return \StdClass A <CarATDPrices>
683
     */
684
    public function carATDPrice($licensePlate)
685
    {
686
        return $this->getAdapter()->call('carATDPrice', ['license_plate' => $licensePlate]);
687
    }
688
689
    /**
690
     * Check the validity of a license plate and check code ('meldcode') combination.
691
     * This method differs from <carVWEMeldcodeCheck> in that it also returns whether a car is active.
692
     *
693
     * @param string $licensePlate Dutch license plate (kenteken)
694
     * @param string $code         code (meldcode), 4 digits
695
     *
696
     * @returns \StdClass <CarCheckCode>.
697
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarCheckCode
698
     */
699
    public function carRDWCarCheckCode($licensePlate, $code)
700
    {
701
        return $this->getAdapter()->call(
702
            'carRDWCarCheckCode',
703
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
704
        );
705
    }
706
707
    /**
708
     * Retrieves data of a car with a Dutch license plate, including a list of types matched (when available.)
709
     * This method differs from <carRDWCarDataV2> in that it also returns the CO2 emission.
710
     *
711
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retrieve
712
     *
713
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataV3
714
     * @return \StdClass <Car>
715
     */
716
    public function carRDWCarData($licensePlate)
717
    {
718
        return $this->getAdapter()->call('carRDWCarData', ['license_plate' => (string)$licensePlate]);
719
    }
720
721
    /**
722
     * Retrieves data of a car with a Dutch license plate.
723
     * In addition to the information returned by carRDWCarData data on BPM and power is returned.
724
     *
725
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retreive
726
     *
727
     * @link       https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataBP
728
     * @deprecated please use carRDWCarDataBPV2
729
     * @return \StdClass <Car>
730
     */
731
    public function carRDWCarDataBP($licensePlate)
732
    {
733
        return $this->getAdapter()->call('carRDWCarDataBP', ['license_plate' => (string)$licensePlate]);
734
    }
735
736
    /**
737
     * Retrieves data of a car with a Dutch license plate.
738
     * In addition to the information returned by <carRDWCarData> data on BPM and power is returned.
739
     *
740
     * @param string $licensePlate Dutch license plate (kenteken) of the car to retreive
741
     *
742
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataBPV2
743
     * @return \StdClass <CarBPV2>
744
     */
745
    public function carRDWCarDataBPV2($licensePlate)
746
    {
747
        return $this->getAdapter()->call('carRDWCarDataBPV2', ['license_plate' => (string)$licensePlate]);
748
    }
749
750
    /**
751
     * Retrieves data of a car with a Dutch license plate and check code ('meldcode').
752
     * The car data contains the European Approval Mark according to the 2007/46/EG standard. When the code is set it
753
     * also checks the validity of a license plate and check code ('meldcode') combination.
754
     *
755
     * @param string $licensePlate
756
     * @param string $code
757
     *
758
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataExtended
759
     * @return \StdClass <CarExtended>
760
     */
761
    public function carRDWCarDataExtended($licensePlate, $code)
762
    {
763
        return $this->getAdapter()->call(
764
            'carRDWCarDataExtended',
765
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
766
        );
767
    }
768
769
    /**
770
     * Retrieves data of a car, including information about extra options.
771
     *
772
     * @param string $carId
773
     *
774
     * @see Use <carRDWCarDataV3> to find a car_id
775
     * @return \StdClass <CarOptions>
776
     */
777
    public function carRDWCarDataOptions($carId)
778
    {
779
        return $this->getAdapter()->call('carRDWCarDataOptions', ['car_id' => (string)$carId]);
780
    }
781
782
    /**
783
     * Retrieves car data, including the fiscal price, directly from RDW.
784
     * The fiscal price is the catalogue price of the vehicle, used by the tax department to calculate the tax for the
785
     * private use of a leased car. Data on the fiscal price, power, environmental impact, status and all information
786
     * returned by <carRDWCarDataV3>.
787
     *
788
     * @param string $licensePlate
789
     *
790
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataPrice
791
     * @return \StdClass <CarRDWCarDataPrice>
792
     */
793
    public function carRDWCarDataPrice($licensePlate)
794
    {
795
        return $this->getAdapter()->call('carRDWCarDataPrice', ['license_plate' => (string)$licensePlate]);
796
    }
797
798
    /**
799
     * Retrieves data of a car with a Dutch license plate, including a list of types matched if more information is
800
     * available. This method differs from <carRDWCarDataV2> in that it also returns the CO2 emission.
801
     *
802
     * @param string $licensePlate - Dutch license plate (kenteken) of the car to retrieve
803
     *
804
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarDataV3
805
     * @return \StdClass <CarDataV3Result>.
806
     */
807
    public function carRDWCarDataV3($licensePlate)
808
    {
809
        return $this->getAdapter()->call('carRDWCarDataV3', ['license_plate' => (string)$licensePlate]);
810
    }
811
812
    /**
813
     * Retrieve extended information for a car.
814
     * This function returns more information than <carRDWCarData> or <carRDWCarDataBP>. Please note that when using a
815
     * test account an older and less complete dataset is used.
816
     *
817
     * @param string $licensePlate Dutch license plate (kenteken)
818
     *
819
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEBasicTypeData
820
     * @return \StdClass <CarVWEBasicTypeData>
821
     */
822
    public function carVWEBasicTypeData($licensePlate)
823
    {
824
        return $this->getAdapter()->call('carVWEBasicTypeData', ['license_plate' => (string)$licensePlate]);
825
    }
826
827
    /**
828
     * Retrieve possible brands for a specific kind of car.
829
     * Please note that when using a test account an older and less complete data set is used.
830
     * $kindId:
831
     *  1 - passenger car, yellow license plate
832
     *  2 - delivery trucks, company cars, up to 3.5 tons
833
     *  3 - delivery trucks, company cars, up to 10 tons
834
     *  4 - off-road four wheel drives
835
     *  5 - motorcycles
836
     *  6 - moped
837
     *  8 - bus.
838
     *
839
     * @param int $productionYear Search for brands which produced cars in this year, or one year before or after. If
840
     *                            0, brands of all years are returned.
841
     * @param int $kindId         Identifier of the kind of car to retrieve the brands for.
842
     * @param int $page           Page to retrieve, pages start counting at 1
843
     *
844
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEBrand> entries
845
     */
846
    public function carVWEListBrands($productionYear, $kindId, $page)
847
    {
848
        return $this->getAdapter()->call(
849
            'carVWEListBrands',
850
            ['production_year' => (int)$productionYear, 'kind_id' => (int)$kindId, 'page' => (int)$page]
851
        );
852
    }
853
854
    /**
855
     * Retrieve possible models for a specific brand of car.
856
     *
857
     * @param int $productionYear Search for models which were produced in this year, or one year before or after. If
858
     *                            0, models of all years are returned.
859
     * @param int $kindId         Identifier of the kind of car to retrieve the models for
860
     * @param int $brandId        Brand identifier, as returned by <carVWEListBrands>.
861
     * @param int $page           Page to retrieve, pages start counting at 1
862
     *
863
     * @see carVWEList for kindId Options
864
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEModel> entries
865
     */
866
    public function carVWEListModels($productionYear, $kindId, $brandId, $page)
867
    {
868
        return $this->getAdapter()->call(
869
            'carVWEListModels',
870
            [
871
                'production_year' => (int)$productionYear,
872
                'kind_id'         => (int)$kindId,
873
                'brand_id'        => (int)$brandId,
874
                'page'            => (int)$page,
875
            ]
876
        );
877
    }
878
879
    /**
880
     * Retrieve possible versions for a specific model of car.
881
     * Please note that when using a test account an older and less complete dataset is used.
882
     *
883
     * @param int $productionYear Search for versions which were produced in this year, or one year before or after.
884
     *                            If 0, versions of all years are returned.
885
     * @param int $kindId         Identifier of the kind of car to retrieve the versions for.
886
     *                            1 - passenger car, yellow license plate
887
     *                            2 - delivery trucks, company cars, up to 3.5 tons
888
     *                            3 - delivery trucks, company cars, up to 10 tons
889
     *                            4 - off-road four wheel drives
890
     *                            5 - motorcycles
891
     *                            6 - moped
892
     *                            8 - bus
893
     * @param int $brandId        Body style identifier. Optional.
894
     * @param int $modelId        Model identifier, as returned by <carVWEListModels>.
895
     * @param int $fuelTypeId     Fuel type identifier. Optional
896
     * @param int $bodyStyleId    Body style identifier. Optional.
897
     *                            02 - 2/4-drs sedan (2/4 deurs sedan)
898
     *                            03 - 3/5-drs (3/5 deurs hatchback)
899
     *                            04 - Coupé
900
     *                            05 - 2-drs (2 deurs cabrio)
901
     *                            06 - Hardtop
902
     *                            07 - 3/5-drs (3/5 deurs softtop)
903
     *                            08 - 2-drs (2 deurs targa)
904
     *                            09 - 5-drs (5 deurs liftback)
905
     *                            10 - 3/4/5-drs (combi 3/4/5 deurs)
906
     *                            14 - afg. pers. auto (afgeleid van personenauto, voertuig met grijs kenteken)
907
     *                            15 - bedrijfsauto (bestel/bedrijfsauto)
908
     *                            16 - pers. vervoer (bus, personenvervoer)
909
     *                            17 - open laadbak (pick-up truck)
910
     *                            18 - Chassis+Cabine
911
     *                            19 - Kaal Chassis
912
     *                            20 - MPV
913
     *                            21 - SportUtilityVeh (SUV)
914
     * @param int $doors          Number of doors, If the design is 2/4-drs or 3/5-drs, this parameter can distinguish
915
     *                            between the two models. Typical values: 2, 3, 4, 5. Optional.
916
     * @param int $gearId         Type of gearbox. Optional.
917
     *                            01 - manual transmission
918
     *                            02 - automatic transmission
919
     *                            03 - manual, 4 speed
920
     *                            04 - manual, 5 speed
921
     *                            05 - manual, 6 speed
922
     *                            06 - manual, 7 speed
923
     *                            13 - Semi-automatic
924
     * @param int $page           Page to retrieve, pages start counting at 1
925
     *
926
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEListVersions
927
     * @return \StdClass <Patterns::{Type}PagedResult> of <CarVWEVersion> entries
928
     */
929
    public function carVWEListVersions(
930
        $productionYear,
931
        $kindId,
932
        $brandId,
933
        $modelId,
934
        $fuelTypeId,
935
        $bodyStyleId,
936
        $doors,
937
        $gearId,
938
        $page
939
    ) {
940
        return $this->getAdapter()->call(
941
            'carVWEListVersions',
942
            [
943
                'production_year' => (int)$productionYear,
944
                'kind_id'         => (int)$kindId,
945
                'brand_id'        => (int)$brandId,
946
                'model_id'        => (int)$modelId,
947
                'fuel_type_id'    => (int)$fuelTypeId,
948
                'body_style_id'   => (int)$bodyStyleId,
949
                'doors'           => (int)$doors,
950
                'gear_id'         => (int)$gearId,
951
                'page'            => (int)$page,
952
            ]
953
        );
954
    }
955
956
    /**
957
     * Check the validity of a license plate and check code ('meldcode') combination.
958
     * This method differs from <carVWEMeldcodeCheck> in that it also returns whether a car is active.
959
     *
960
     * @param string $licensePlate Dutch license plate (kenteken)
961
     * @param int    $code         code (meldcode), 4 digits
962
     *
963
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carRDWCarCheckCode
964
     * @return \StdClass <CarCheckCode>
965
     */
966
    public function carVWEMeldcodeCheck($licensePlate, $code)
967
    {
968
        return $this->getAdapter()->call(
969
            'carVWEMeldcodeCheck',
970
            ['license_plate' => (string)$licensePlate, 'code' => (string)$code]
971
        );
972
    }
973
974
    /**
975
     * Retrieve options of a car.
976
     * The atlCode can be obtained using <carVWEListBrands>, <carVWEListModels> and <carVWEListVersions> consecutively
977
     * or by using <carVWEBasicTypeData> when it concerns a specific car (requires license plate).
978
     *
979
     * @param string $licensePlate The license plate of a car
980
     * @param int    $atlCode      Code identifying the version of the car
981
     *
982
     * @see  carVWEBasicTypeData
983
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEOptions
984
     * @return \StdClass <CarVWEOptions>
985
     */
986
    public function carVWEOptions($licensePlate, $atlCode)
987
    {
988
        return $this->getAdapter()->call(
989
            'carVWEOptions',
990
            ['license_plate' => (string)$licensePlate, 'atl_code' => (int)$atlCode]
991
        );
992
    }
993
994
    /**
995
     * Retrieve photos of a car using it's unique atlCode.
996
     *
997
     * @param int $atlCode Code identifying the version of the car. atlCode can be obtained using <carVWEBasicTypeData>,
998
     *
999
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEPhotos
1000
     * @return \StdClass <CarVWEPhoto>
1001
     */
1002
    public function carVWEPhotos($atlCode)
1003
    {
1004
        return $this->getAdapter()->call('carVWEPhotos', ['atl_code' => (int)$atlCode]);
1005
    }
1006
1007
    /**
1008
     * Retrieve extended information for a specific version of a car.
1009
     * Please note that when using a test account an older and less complete dataset is used.
1010
     *
1011
     * @param string $licensePlate Dutch license plate (kenteken)
1012
     * @param int    $atlCode      Code identifying the version of the car. The ATL code can be obtained using
1013
     *                             <carVWEBasicTypeData>.
1014
     *
1015
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEVersionPrice
1016
     * @return \StdClass <CarVWEVersionPrice>
1017
     */
1018
    public function carVWEVersionPrice($licensePlate, $atlCode)
1019
    {
1020
        return $this->getAdapter()->call(
1021
            'carVWEVersionPrice',
1022
            ['license_plate' => (string)$licensePlate, 'atl_code' => (int)$atlCode]
1023
        );
1024
    }
1025
1026
    /**
1027
     * Retrieve extended information for a specific version of a car.
1028
     *
1029
     * @param int $productionYear Get information for the model produced in this year. This affects the <CarVWEPrices>
1030
     *                            in the result
1031
     * @param int $atlCode        Code identifying the version of the car
1032
     *
1033
     * @link https://webview.webservices.nl/documentation/files/service_car-php.html#Car.carVWEVersionYearData
1034
     * @return \StdClass <CarVWEVersionYearData>
1035
     */
1036
    public function carVWEVersionYearData($productionYear, $atlCode)
1037
    {
1038
        return $this->getAdapter()->call(
1039
            'carVWEVersionYearData',
1040
            ['production_year' => $productionYear, 'atl_code' => $atlCode]
1041
        );
1042
    }
1043
1044
    /**
1045
     * Create a testUser.
1046
     *
1047
     * @param string $application
1048
     * @param string $email
1049
     * @param string $companyName
1050
     * @param string $contactName
1051
     * @param string $telephone
1052
     *
1053
     * @return \StdClass <User>
1054
     */
1055
    public function createTestUser($application, $email, $companyName, $contactName, $telephone)
1056
    {
1057
        return $this->getAdapter()->call(
1058
            'createTestUser',
1059
            [
1060
                'application' => $application,
1061
                'email'       => $email,
1062
                'companyname' => $companyName,
1063
                'contactname' => $contactName,
1064
                'telephone'   => $telephone,
1065
            ]
1066
        );
1067
    }
1068
1069
    /**
1070
     * Retrieve a detailed company report.
1071
     *
1072
     * @param int    $companyId companyID, as returned by <creditsafeSearch>. Due to legal reasons all report requests
1073
     *                          of German companies (DE) must be accompanied with a reason code. To specify a report
1074
     *                          request reason code, append one of the following codes onto the company_id (without
1075
     *                          quotes):
1076
     *                          '|1' -- Credit inquiry
1077
     *                          '|2' -- Business Relationship
1078
     *                          '|3' -- Solvency Check
1079
     *                          '|4' -- Claim
1080
     *                          '|5' -- Contract
1081
     *                          '|6' -- Commercial Credit Insurance
1082
     * @param string $language  ISO 639-1 notation language that the report should be returned in, for example: "EN".
1083
     * @param string $document  Specify to retrieve an extra document with an excerpt of the data. Currently unused.
1084
     *                          Possible values: [empty string] -- Return no extra document.
1085
     *
1086
     * @return \StdClass <CreditsafeCompanyReportFull>
1087
     */
1088
    public function creditsafeGetReportFull($companyId, $language, $document)
1089
    {
1090
        return $this->getAdapter()->call(
1091
            'creditsafeGetReportFull',
1092
            ['company_id' => (int)$companyId, 'language' => (string)$language, 'document' => (string)$document]
1093
        );
1094
    }
1095
1096
    /**
1097
     * Search for a company.
1098
     * The parameters which can be used differ per country.
1099
     *
1100
     * @param string $country            The country to search in, An ISO 3166-1 alpha-2 country code, optional
1101
     * @param string $id                 Search a single company, using the Creditsafe company identifier, optional
1102
     * @param string $registrationNumber Search using a company registration number, optional
1103
     * @param string $status             Search using a company status. See <Country parameters> for allowed values
1104
     *                                   per country, optional
1105
     * @param string $officeType         Search using a company office type. See <Country parameters> for allowed
1106
     *                                   values per country, optional
1107
     * @param string $name               Search using a company name, optional
1108
     * @param string $nameMatchType      How to match the text in the *name* parameter, the default match and
1109
     *                                   possibles types are given in <Country parameters> for each country, optional
1110
     * @param string $address            Search using a company's complete address, optional
1111
     * @param string $addressMatchType   How to match the text in the *address* parameter, the default match type
1112
     *                                   and possibles types are given in <Country parameters> for each country,
1113
     *                                   optional
1114
     * @param string $street             Company's address street, optional
1115
     * @param string $houseNumber        Company's address house number, optional
1116
     * @param string $city               Company's address city, optional
1117
     * @param string $postalCode         Company's address postal code, optional
1118
     * @param string $province           Company's address province, optional
1119
     * @param string $phoneNumber        Company's phone number, optional
1120
     * @param int    $page               Page of search results to retrieve
1121
     *
1122
     * @return \StdClass <Patterns::{Type}PagedResult> of <CreditsafeCompany> entries.
1123
     */
1124
    public function creditsafeSearch(
1125
        $country,
1126
        $id,
1127
        $registrationNumber,
1128
        $status,
1129
        $officeType,
1130
        $name,
1131
        $nameMatchType,
1132
        $address,
1133
        $addressMatchType,
1134
        $street,
1135
        $houseNumber,
1136
        $city,
1137
        $postalCode,
1138
        $province,
1139
        $phoneNumber,
1140
        $page
1141
    ) {
1142
        return $this->getAdapter()->call(
1143
            'creditsafeSearch',
1144
            [
1145
                'country'             => $country,
1146
                'id'                  => $id,
1147
                'registration_number' => $registrationNumber,
1148
                'status'              => $status,
1149
                'office_type'         => $officeType,
1150
                'name'                => $name,
1151
                'name_match_type'     => $nameMatchType,
1152
                'address'             => $address,
1153
                'address_match_type'  => $addressMatchType,
1154
                'street'              => $street,
1155
                'house_number'        => $houseNumber,
1156
                'city'                => $city,
1157
                'postal_code'         => $postalCode,
1158
                'province'            => $province,
1159
                'phone_number'        => $phoneNumber,
1160
                'page'                => $page,
1161
            ]
1162
        );
1163
    }
1164
1165
    /**
1166
     * Perform a Dun & Bradstreet Business Verification on a business.
1167
     * Returns information on location, situation, size and financial status on the business. The field companyIdType
1168
     * indicates the type of this field.
1169
     * Several types of company identifiers are used within this service. Methods that retrieve company data all types
1170
     * of identifiers: DUNS number, D&B key, and regional business number. All company references returned by search
1171
     * methods are identified using D&B keys.
1172
     *
1173
     * @param string $companyId     Identifier for the business.
1174
     * @param string $companyIdType Type of company identifier
1175
     *
1176
     * @link   https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbBusinessVerification
1177
     * @return \StdClass <DNBBusinessVerification>
1178
     */
1179
    public function dnbBusinessVerification($companyId, $companyIdType)
1180
    {
1181
        return $this->getAdapter()->call(
1182
            'dnbBusinessVerification',
1183
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1184
        );
1185
    }
1186
1187
    /**
1188
     * Retrieve extensive management Dun & Bradstreet Business information
1189
     * See <Dun & Bradstreet::Company identifiers>.
1190
     *
1191
     * @param string $companyId     Identifier for the business.
1192
     * @param string $companyIdType Type of company identifier
1193
     *
1194
     * @link   https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbEnterpriseManagement
1195
     * @return \StdClass <DNBBusinessVerification>
1196
     */
1197
    public function dnbEnterpriseManagement($companyId, $companyIdType)
1198
    {
1199
        return $this->getAdapter()->call(
1200
            'dnbEnterpriseManagement',
1201
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1202
        );
1203
    }
1204
1205
    /**
1206
     * Retrieve a Dun & Bradstreet Business Verification for a business.
1207
     * See <Dun & Bradstreet::Company identifiers>.
1208
     *
1209
     * @param string $companyId     Identifier for the business
1210
     * @param string $companyIdType Type of company identifier
1211
     *
1212
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbGetReference
1213
     * @return \StdClass <DNBBusinessVerification>
1214
     */
1215
    public function dnbGetReference($companyId, $companyIdType)
1216
    {
1217
        return $this->getAdapter()->call(
1218
            'dnbGetReference',
1219
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1220
        );
1221
    }
1222
1223
    /**
1224
     * Do a Dun & Bradstreet Business Quick Check on a business.
1225
     * See <Dun & Bradstreet::Company identifiers>.
1226
     *
1227
     * @param string $companyId     Identifier for the business
1228
     * @param string $companyIdType Type of company identifier
1229
     *                              Possible values:
1230
     *                              duns    - DUNS number
1231
     *                              dnb_key - D&B business key
1232
     *                              nl|us|.. - 2 character ISO 3166-1 country code. Use this if the companyId is a
1233
     *                              regional business number. For the Netherlands (NL) it can either be an 8-digit
1234
     *                              Chamber of Commerce Number (KvK-nummer), a 12-digit Establishment Number
1235
     *                              (Vestigingsnummer), or a 9-digit RSIN Number
1236
     *
1237
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbQuickCheck
1238
     * @return \StdClass <DNBQuickCheck>
1239
     */
1240
    public function dnbQuickCheck($companyId, $companyIdType)
1241
    {
1242
        return $this->getAdapter()->call(
1243
            'dnbQuickCheck',
1244
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1245
        );
1246
    }
1247
1248
    /**
1249
     * Search for a business on name and location.
1250
     * This method returns basic information and a DNB business key for each business. Business can be searched on name
1251
     * with optional address parameters. Searching on address can be done using the postcode, or the city and at least
1252
     * one other address field.
1253
     * See <Dun & Bradstreet::Company identifiers>.
1254
     *
1255
     * @param string $name            Trade name of the business, required.
1256
     * @param string $streetName      Street the business is located at, optional.
1257
     * @param string $houseNo         House number of the business, optional.
1258
     * @param string $houseNoAddition House number addition, optional.
1259
     * @param string $postcode        Postcode of the business, optional.
1260
     * @param string $cityName        City where the business is located, optional.
1261
     * @param string $country         The 2 character ISO 3166-1 code for the country where the business is located.
1262
     *                                Required
1263
     * @param int    $page            Page to retrieve, pages start counting at 1.
1264
     *
1265
     * @deprecated use <dnbSearchReferenceV2> instead
1266
     * @return \StdClass <DNBBusinessVerification>
1267
     */
1268 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...
1269
        $name,
1270
        $streetName,
1271
        $houseNo,
1272
        $houseNoAddition,
1273
        $postcode,
1274
        $cityName,
1275
        $country,
1276
        $page
1277
    ) {
1278
        return $this->getAdapter()->call(
1279
            'dnbSearchReference',
1280
            [
1281
                'name'            => $name,
1282
                'streetname'      => $streetName,
1283
                'houseno'         => $houseNo,
1284
                'housenoaddition' => $houseNoAddition,
1285
                'postcode'        => $postcode,
1286
                'cityname'        => $cityName,
1287
                'country'         => $country,
1288
                'page'            => $page,
1289
            ]
1290
        );
1291
    }
1292
1293
    /**
1294
     * Search for a business on name and location.
1295
     * This method returns basic information and a DNB business key for each business. Business can be searched on name
1296
     * with optional address parameters. Searching on address can be done using the postcode, or the city and at least
1297
     * one other address field.
1298
     *
1299
     * @param string $name            Trade name of the business, required.
1300
     * @param string $streetName      Street the business is located at, optional
1301
     * @param string $houseNo         House number of the business, optional
1302
     * @param string $houseNoAddition House number addition, optional
1303
     * @param string $postcode        Postcode of the business, optional
1304
     * @param string $cityName        City where the business is located, optional
1305
     * @param string $region          Depending on the country, this may be a state, province, or other large
1306
     *                                geographical area.
1307
     * @param string $country         For searches in the United States (US) and Canada (CA) this parameter is required.
1308
     *                                State abbreviations, such as NY for New York, must be used
1309
     *                                for the US.
1310
     * @param int    $page
1311
     *
1312
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbSearchReferenceV2
1313
     * @return \StdClass <Patterns::{Type}PagedResult> of <DNBBusinessReferenceV2> entries
1314
     */
1315 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...
1316
        $name,
1317
        $streetName,
1318
        $houseNo,
1319
        $houseNoAddition,
1320
        $postcode,
1321
        $cityName,
1322
        $region,
1323
        $country,
1324
        $page
1325
    ) {
1326
        return $this->getAdapter()->call(
1327
            'dnbSearchReferenceV2',
1328
            [
1329
                'name'            => $name,
1330
                'streetname'      => $streetName,
1331
                'houseno'         => $houseNo,
1332
                'housenoaddition' => $houseNoAddition,
1333
                'postcode'        => $postcode,
1334
                'cityname'        => $cityName,
1335
                'region'          => $region,
1336
                'country'         => $country,
1337
                'page'            => $page,
1338
            ]
1339
        );
1340
    }
1341
1342
    /**
1343
     * Retrieve basic WorldBase business information.
1344
     * See <Dun & Bradstreet::Company identifiers>.
1345
     *
1346
     * @param string $companyId     Identifier for the business.
1347
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1348
     *
1349
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketing
1350
     * @return \StdClass <DNBMarketing>
1351
     */
1352
    public function dnbWorldbaseMarketing($companyId, $companyIdType)
1353
    {
1354
        return $this->getAdapter()->call(
1355
            'dnbWorldbaseMarketing',
1356
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1357
        );
1358
    }
1359
1360
    /**
1361
     * Retrieve detailed WorldBase business information.
1362
     *
1363
     * @param string $companyId     Identifier for the business.
1364
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1365
     *
1366
     * @link https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketingPlus
1367
     * @return \StdClass <DNBMarketingPlusResult>
1368
     */
1369
    public function dnbWorldbaseMarketingPlus($companyId, $companyIdType)
1370
    {
1371
        return $this->getAdapter()->call(
1372
            'dnbWorldbaseMarketingPlus',
1373
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1374
        );
1375
    }
1376
1377
    /**
1378
     * Detailed WorldBase information, including information on a business' family tree.
1379
     *
1380
     * @param string $companyId     Identifier for the business.
1381
     * @param string $companyIdType Type of company identifier. see <Dun & Bradstreet::Company identifiers>
1382
     *
1383
     * @link  https://webview.webservices.nl/documentation/files/service_dnb-php.html#DunBradstreet.dnbWorldbaseMarketingPlusLinkage
1384
     * @return \StdClass <DNBMarketingPlusLinkageResult>
1385
     */
1386
    public function dnbWorldbaseMarketingPlusLinkage($companyId, $companyIdType)
1387
    {
1388
        return $this->getAdapter()->call(
1389
            'dnbWorldbaseMarketingPlusLinkage',
1390
            ['company_id' => $companyId, 'company_id_type' => $companyIdType]
1391
        );
1392
    }
1393
1394
    /**
1395
     * Lookup the driving distance in meters between two neighborhood codes for both the fastest and shortest route.
1396
     *
1397
     * @param string $nbCodefrom neighborhood code at start of route
1398
     * @param string $nbCodeto   destination neighborhoodcode
1399
     *
1400
     * @link https://webview.webservices.nl/documentation/files/service_driveinfo-php.html#Driveinfo.driveInfoDistanceLookup
1401
     * @return \StdClass <DriveInfo>
1402
     */
1403
    public function driveInfoDistanceLookup($nbCodefrom, $nbCodeto)
1404
    {
1405
        return $this->getAdapter()->call(
1406
            'driveInfoDistanceLookup',
1407
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
1408
        );
1409
    }
1410
1411
    /**
1412
     * Lookup the driving time in minutes between two neighborhood codes for both the fastest and shortest route.
1413
     *
1414
     * @param string $nbCodefrom neighborhood code at start of route
1415
     * @param string $nbCodeto   destination neighborhoodcode
1416
     *
1417
     * @link https://webview.webservices.nl/documentation/files/service_driveinfo-php.html#Driveinfo.driveInfoTimeLookup
1418
     * @return \StdClass <DriveInfo>
1419
     */
1420
    public function driveInfoTimeLookup($nbCodefrom, $nbCodeto)
1421
    {
1422
        return $this->getAdapter()->call(
1423
            'driveInfoTimeLookup',
1424
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
1425
        );
1426
    }
1427
1428
    /**
1429
     * Determine if a specific address exists using the unique '1234AA12'
1430
     * postcode + house number format. If returns either the full address in <DutchAddressPostcodeRange> format,
1431
     * or an error if no matching address exists.
1432
     *
1433
     * @param string $address Address to validate, in the unique '1234AA12' postcode house number format.
1434
     *
1435
     * @return \StdClass <DutchAddressPostcodeRange>
1436
     */
1437
    public function dutchAddressRangePostcodeSearch($address)
1438
    {
1439
        return $this->getAdapter()->call('dutchAddressRangePostcodeSearch', ['address' => $address]);
1440
    }
1441
1442
    /**
1443
     * Retrieve data on a business establishment.
1444
     * When only the dossier number parameter is specified, the main establishment of the business will be returned.
1445
     * Specify the establishment_number in order to retrieve another establishment. You can find dossier and
1446
     * establishment numbers using <dutchBusinessSearchParameters> or <dutchBusinessSearchDossierNumber>. If logging of
1447
     * data is enabled for the user, the requested dossier is logged. This enables the user to receive updates to the
1448
     * dossier in the future. See <Dutch Business update service methods>.
1449
     *
1450
     * @param int      $dossierNumber       The Chamber of Commerce number
1451
     * @param int|null $establishmentNumber The Establishment number
1452
     *
1453
     * @link https://webview.webservices.nl/documentation/files/service_dutchaddress-php.html#Dutch_Address.dutchAddressRangePostcodeSearch
1454
     * @return \stdClass <DutchBusinessDossier>
1455
     */
1456
    public function dutchBusinessGetDossier($dossierNumber, $establishmentNumber = null)
1457
    {
1458
        return $this->getAdapter()->call(
1459
            'dutchBusinessGetDossier',
1460
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
1461
        );
1462
    }
1463
1464
    /**
1465
     *  Get a list of logged updates for a specific business dossier.
1466
     *
1467
     * @param string      $dossierNumber   Chamber of Commerce number.
1468
     * @param string      $periodStartDate Period start date, in Y-m-d format
1469
     * @param string|null $periodEndDate   Period end date, in Y-m-d format. The max period is one year. [optional]
1470
     *
1471
     * @return \StdClass <DutchBusinessDossierHistory>
1472
     */
1473
    public function dutchBusinessGetDossierHistory($dossierNumber, $periodStartDate, $periodEndDate = null)
1474
    {
1475
        return $this->getAdapter()->call(
1476
            'dutchBusinessGetDossierHistory',
1477
            [
1478
                'dossier_number'    => $dossierNumber,
1479
                'period_start_date' => $periodStartDate,
1480
                'period_end_date'   => $periodEndDate]
1481
        );
1482
    }
1483
1484
    /**
1485
     * Get an extract document in PDF, containing the available Chamber of Commerce data for a business.
1486
     * The document is generated using the business' `Online inzage uittreksel`.
1487
     *
1488
     * @param string $dossierNumber Chamber of Commerce number
1489
     * @param bool   $allowCaching  determines whether a cached document may be returned.
1490
     *
1491
     * @see <DutchBusinessExtractDocumentData>
1492
     * @return \StdClass <DutchBusinessExtractDocument>
1493
     */
1494
    public function dutchBusinessGetExtractDocument($dossierNumber, $allowCaching)
1495
    {
1496
        return $this->getAdapter()->call(
1497
            'dutchBusinessGetExtractDocument',
1498
            ['dossier_number' => (string)$dossierNumber, 'allow_caching' => (bool)$allowCaching]
1499
        );
1500
    }
1501
1502
    /**
1503
     * Get the data from an extract document containing the available Chamber of Commerce data for a business.
1504
     * The document is generated using the business' `Online inzage uittreksel`.
1505
     *
1506
     * @param string $dossierNumber Chamber of Commerce number
1507
     * @param bool   $allowCaching  Determines whether a cached document may be returned
1508
     *
1509
     * @link       https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractDocumentData
1510
     * @deprecated please use <DutchBusinessExtractDocumentV2>
1511
     * @return \StdClass <DutchBusinessExtractDocument>
1512
     */
1513
    public function dutchBusinessGetExtractDocumentData($dossierNumber, $allowCaching)
1514
    {
1515
        return $this->getAdapter()->call(
1516
            'dutchBusinessGetExtractDocumentData',
1517
            ['dossier_number' => $dossierNumber, 'allow_caching' => $allowCaching]
1518
        );
1519
    }
1520
1521
    /**
1522
     * Get the extract data and document for a business dossier.
1523
     *
1524
     * @param string $dossierNumber Chamber of Commerce number
1525
     *
1526
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractDocumentDataV2
1527
     * @return \StdClass <DutchBusinessExtractDocumentV2>
1528
     */
1529
    public function dutchBusinessGetExtractDocumentDataV2($dossierNumber)
1530
    {
1531
        return $this->getAdapter()->call('dutchBusinessGetExtractDocumentDataV2', ['dossier_number' => $dossierNumber]);
1532
    }
1533
1534
    /**
1535
     * Get a list of historical business-extract references for the given company or organisation.
1536
     * Each business-extract reference in the history contains a summary of the changes relative to the previous
1537
     * business-extract reference in the history. The business-extract history also contains an forecast that indicates
1538
     * whether changes have occured between the latest business-extract document and the current state or the
1539
     * organisation. When changes are detected the most recent document in the history probably does not represent the
1540
     * current state of the organisation. A real-time document can be retrieved using
1541
     * <dutchBusinessGetExtractDocumentData> or <dutchBusinessGetExtractDocument>.
1542
     *
1543
     * @param string $dossierNumber   Chamber of Commerce number
1544
     * @param string $periodStartDate The start date of the period of historic documents.
1545
     * @param string $periodEndDate   The end date of the set period, can differ max one year from start date.
1546
     *                                [optional][default:today]
1547
     *
1548
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistory
1549
     * @return \StdClass <DutchBusinessExtractHistory>
1550
     */
1551
    public function dutchBusinessGetExtractHistory($dossierNumber, $periodStartDate, $periodEndDate)
1552
    {
1553
        return $this->getAdapter()->call(
1554
            'dutchBusinessGetExtractHistory',
1555
            [
1556
                'dossier_number'    => $dossierNumber,
1557
                'period_start_date' => $periodStartDate,
1558
                'period_end_date'   => $periodEndDate,
1559
            ]
1560
        );
1561
    }
1562
1563
    /**
1564
     * Get a list of historical business-extract references for the given company or organisation.
1565
     * Collected by Webservices.nl that contain changes compared to their previous retrieved extract.
1566
     *
1567
     * @param string $dossierNumber   Chamber of Commerce number.
1568
     * @param string $periodStartDate The start date of the period of historic documents.
1569
     * @param string $periodEndDate   The end date of the set period. [optional][default:today]
1570
     *
1571
     * @return \StdClass <DutchBusinessExtractHistory>
1572
     */
1573
    public function dutchBusinessGetExtractHistoryChanged($dossierNumber, $periodStartDate, $periodEndDate)
1574
    {
1575
        return $this->getAdapter()->call(
1576
            'dutchBusinessGetExtractHistoryChanged',
1577
            [
1578
                'dossier_number'    => $dossierNumber,
1579
                'period_start_date' => $periodStartDate,
1580
                'period_end_date'   => $periodEndDate,
1581
            ]
1582
        );
1583
    }
1584
1585
    /**
1586
     * Retrieve a historical business-extract using a business-extract identifier.
1587
     * Business-extract identifiers can be found using <dutchBusinessGetExtractHistory>.
1588
     *
1589
     * @param string $extractId Business-extract identifier
1590
     *
1591
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistoryChanged
1592
     * @return \StdClass <DutchBusinessExtractDocumentData>.
1593
     */
1594
    public function dutchBusinessGetExtractHistoryDocumentData($extractId)
1595
    {
1596
        return $this->getAdapter()->call('dutchBusinessGetExtractHistoryDocumentData', ['extract_id' => $extractId]);
1597
    }
1598
1599
    /**
1600
     * Retrieve a historical business-extract using a business-extract identifier.
1601
     * Business-extract identifiers can be found using <dutchBusinessGetExtractHistory>.
1602
     *
1603
     * @param string $extractId Business-extract identifier
1604
     *
1605
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetExtractHistoryDocumentDataV2
1606
     * @return \StdClass <DutchBusinessExtractDocumentDataV2>
1607
     */
1608
    public function dutchBusinessGetExtractHistoryDocumentDataV2($extractId)
1609
    {
1610
        return $this->getAdapter()->call('dutchBusinessGetExtractHistoryDocumentDataV2', ['extract_id' => $extractId]);
1611
    }
1612
1613
    /**
1614
     * Get the legal extract data and document for a business dossier.
1615
     *
1616
     * @param string $dossierNumber Chamber of Commerce number
1617
     *
1618
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetLegalExtractDocumentDataV2
1619
     * @return \StdClass <DutchBusinessExtractDocumentDataV2>
1620
     */
1621
    public function dutchBusinessGetLegalExtractDocumentDataV2($dossierNumber)
1622
    {
1623
        return $this->getAdapter()->call(
1624
            'dutchBusinessGetLegalExtractDocumentDataV2',
1625
            ['dossier_number' => $dossierNumber]
1626
        );
1627
    }
1628
1629
    /**
1630
     * Get the business positions/functionaries for a business.
1631
     *
1632
     * @param string $dossierNumber The Chamber of Commerce number
1633
     *
1634
     * @return \StdClass <DutchBusinessPositions> entry
1635
     */
1636
    public function dutchBusinessGetPositions($dossierNumber)
1637
    {
1638
        return $this->getAdapter()->call('dutchBusinessGetPositions', ['dossier_number' => $dossierNumber]);
1639
    }
1640
1641
    /**
1642
     * Look up a SBI ('Standaard Bedrijfs Indeling 2008') code.
1643
     * Returns the section and its description and all levels of SBI codes and their description, according to the
1644
     * 17-04-2014 version.
1645
     *
1646
     * @param string $sbiCode  a number between 2 and 6 characters.
1647
     * @param string $language the language of the resulted sbi code descriptions nl (default) || en (English)
1648
     *
1649
     * @return \StdClass <DutchBusinessSBICodeInfo>
1650
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessGetSBIDescription
1651
     */
1652
    public function dutchBusinessGetSBIDescription($sbiCode, $language)
1653
    {
1654
        return $this->getAdapter()->call(
1655
            'dutchBusinessGetSBIDescription',
1656
            ['sbi_code' => $sbiCode, 'language' => $language]
1657
        );
1658
    }
1659
1660
    /**
1661
     * @param string $dossierNumber The Chamber of Commerce number
1662
     *
1663
     * @return \StdClass <DutchBusinessVatNumber>
1664
     */
1665
    public function dutchBusinessGetVatNumber($dossierNumber)
1666
    {
1667
        return $this->getAdapter()->call('dutchBusinessGetVatNumber', ['dossier_number' => $dossierNumber]);
1668
    }
1669
1670
    /**
1671
     * Find business establishments for a dossier number.
1672
     * Found dossiers are ordered by relevance, ensuring the establishments that match the search parameters best are
1673
     * listed at the top of the result list. When the dossier_number is omitted, the search behaves similar to the
1674
     * <dutchBusinessSearchParametersV2> method.
1675
     *
1676
     * @param string $dossierNumber       Dossier number for the business
1677
     * @param string $tradeName           Name under which the organisation engages in commercial activity
1678
     * @param string $city                City
1679
     * @param string $street              Street
1680
     * @param string $postcode            postalCode
1681
     * @param int    $houseNumber         house number
1682
     * @param string $houseNumberAddition optional addition
1683
     * @param string $telephoneNumber     telephone number
1684
     * @param string $domainName          Domain name or email. When an email address is given, the domain part of that
1685
     *                                    address is used
1686
     * @param bool   $strictSearch
1687
     * @param int    $page
1688
     *
1689
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearch
1690
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessEstablishmentReference>
1691
     */
1692
    public function dutchBusinessSearch(
1693
        $dossierNumber,
1694
        $tradeName,
1695
        $city,
1696
        $street,
1697
        $postcode,
1698
        $houseNumber,
1699
        $houseNumberAddition,
1700
        $telephoneNumber,
1701
        $domainName,
1702
        $strictSearch,
1703
        $page
1704
    ) {
1705
        return $this->getAdapter()->call(
1706
            'dutchBusinessSearch',
1707
            [
1708
                'dossier_number'        => $dossierNumber,
1709
                'trade_name'            => $tradeName,
1710
                'city'                  => $city,
1711
                'street'                => $street,
1712
                'postcode'              => $postcode,
1713
                'house_number'          => $houseNumber,
1714
                'house_number_addition' => $houseNumberAddition,
1715
                'telephone_number'      => $telephoneNumber,
1716
                'domain_name'           => $domainName,
1717
                'strict_search'         => $strictSearch,
1718
                'page'                  => $page,
1719
            ]
1720
        );
1721
    }
1722
1723
    /**
1724
     * Search for business establishments using a known identifier.
1725
     * Any combination of parameters may be specified. Only businesses matching all parameters will be returned.
1726
     *
1727
     * @param string $dossierNumber       The Chamber of Commerce number
1728
     * @param string $establishmentNumber The Establishment number
1729
     * @param string $rsinNumber          The RSIN (`Rechtspersonen Samenwerkingsverbanden Informatie Nummer`) number
1730
     * @param int    $page                Page to retrieve, pages start counting at 1
1731
     *
1732
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1733
     */
1734 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...
1735
    {
1736
        return $this->getAdapter()->call(
1737
            'dutchBusinessSearchDossierNumber',
1738
            [
1739
                'dossier_number'       => $dossierNumber,
1740
                'establishment_number' => $establishmentNumber,
1741
                'rsin_number'          => $rsinNumber,
1742
                'page'                 => $page,
1743
            ]
1744
        );
1745
    }
1746
1747
    /**
1748
     * Search for business establishments using a known identifier.
1749
     * Any combination of parameters may be specified. Only businesses matching all parameters will be returned.
1750
     *
1751
     * @param string $dossierNumber       The Chamber of Commerce number
1752
     * @param string $establishmentNumber The Establishment number
1753
     * @param string $rsinNumber          The RSIN (`Rechtspersonen Samenwerkingsverbanden Informatie Nummer`) number
1754
     * @param int    $page                Page to retrieve, pages start counting at 1
1755
     *
1756
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearchEstablishments
1757
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessEstablishmentReference>
1758
     */
1759 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...
1760
    {
1761
        return $this->getAdapter()->call(
1762
            'dutchBusinessSearchEstablishments',
1763
            [
1764
                'dossier_number'       => $dossierNumber,
1765
                'establishment_number' => $establishmentNumber,
1766
                'rsin_number'          => $rsinNumber,
1767
                'page'                 => $page,
1768
            ]
1769
        );
1770
    }
1771
1772
    /**
1773
     * @param string $tradeName           Name under which the organisation engages in commercial activity
1774
     * @param string $city                City
1775
     * @param string $street              Street
1776
     * @param string $postcode            PostalCode
1777
     * @param int    $houseNumber         House number
1778
     * @param string $houseNumberAddition House number addition
1779
     * @param string $telephoneNumber     Telephone number
1780
     * @param bool   $domainName          Domain name or email address, when an email address is given the domain part
1781
     *                                    of that address is used
1782
     * @param string $strictSearch
1783
     * @param int    $page                Page to retrieve, pages start counting at 1
1784
     *
1785
     * @deprecated see dutchBusinessSearchParametersV2 this version working
1786
     * @return \StdClass
1787
     */
1788
    public function dutchBusinessSearchParameters(
1789
        $tradeName,
1790
        $city,
1791
        $street,
1792
        $postcode,
1793
        $houseNumber,
1794
        $houseNumberAddition,
1795
        $telephoneNumber,
1796
        $domainName,
1797
        $strictSearch,
1798
        $page
1799
    ) {
1800
        return $this->getAdapter()->call(
1801
            'dutchBusinessSearchParameters',
1802
            [
1803
                'trade_name'            => $tradeName,
1804
                'city'                  => $city,
1805
                'street'                => $street,
1806
                'postcode'              => $postcode,
1807
                'house_number'          => $houseNumber,
1808
                'house_number_addition' => $houseNumberAddition,
1809
                'telephone_number'      => $telephoneNumber,
1810
                'domain_name'           => $domainName,
1811
                'strict_search'         => $strictSearch,
1812
                'page'                  => $page,
1813
            ]
1814
        );
1815
    }
1816
1817
    /**
1818
     * Find business establishments using a variety of parameters.
1819
     * Found dossiers are ordered by relevance, ensuring the dossiers that match the search parameters best are listed
1820
     * at the top of the result list. This method differs from <dutchBusinessSearchParameters> by returning an
1821
     * indication called "match_type" that defines what type of business name was matched upon
1822
     * (see <Tradename match types>).
1823
     * Using the search parameters:
1824
     * - tradeName will be used to search all business names for the dossiers, which include the trade name, legal name
1825
     *   and alternative trade names.
1826
     * - address matched against both the correspondence and establishment addresses of the business.
1827
     * - postbox addresses can be found by specifying 'Postbus' as street, and specifying the postbus number in
1828
     *   the houseNumber parameter.
1829
     *
1830
     * @param string $tradeName
1831
     * @param string $city
1832
     * @param string $street
1833
     * @param string $postcode
1834
     * @param int    $houseNumber
1835
     * @param string $houseNumberAddition
1836
     * @param string $telephoneNumber
1837
     * @param string $domainName
1838
     * @param bool   $strictSearch
1839
     * @param int    $page
1840
     *
1841
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReferenceV2>
1842
     */
1843
    public function dutchBusinessSearchParametersV2(
1844
        $tradeName,
1845
        $city,
1846
        $street,
1847
        $postcode,
1848
        $houseNumber,
1849
        $houseNumberAddition,
1850
        $telephoneNumber,
1851
        $domainName,
1852
        $strictSearch,
1853
        $page
1854
    ) {
1855
        return $this->getAdapter()->call(
1856
            'dutchBusinessSearchParametersV2',
1857
            [
1858
                'trade_name'            => $tradeName,
1859
                'city'                  => $city,
1860
                'street'                => $street,
1861
                'postcode'              => $postcode,
1862
                'house_number'          => $houseNumber,
1863
                'house_number_addition' => $houseNumberAddition,
1864
                'telephone_number'      => $telephoneNumber,
1865
                'domain_name'           => $domainName,
1866
                'strict_search'         => $strictSearch,
1867
                'page'                  => $page,
1868
            ]
1869
        );
1870
    }
1871
1872
    /**
1873
     * Find business establishments based on postcode and house number.
1874
     * This method can return more matches than <dutchBusinessSearchParameters>.
1875
     *
1876
     * @param string $postcode
1877
     * @param string $houseNumber         House number
1878
     * @param string $houseNumberAddition House number addition
1879
     * @param int    $page                Page to retrieve, pages start counting at 1
1880
     *
1881
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1882
     */
1883 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...
1884
    {
1885
        return $this->getAdapter()->call(
1886
            'dutchBusinessSearchPostcode',
1887
            [
1888
                'postcode'              => $postcode,
1889
                'house_number'          => $houseNumber,
1890
                'house_number_addition' => $houseNumberAddition,
1891
                'page'                  => $page,
1892
            ]
1893
        );
1894
    }
1895
1896
    /**
1897
     * Search for businesses matching all of the given criteria.
1898
     * Either of these criteria can be left empty or 0. In that case, the criterium is not used. At least one of the
1899
     * criteria parameters must be supplied. At most 100 items may be supplied for the array parameters.
1900
     *
1901
     * @param array  $city               Array of cities. Businesses match if they are located in either of these
1902
     *                                   cities, thus if the establishment address is in one of these cities.
1903
     * @param array  $postcode           Array of postcodes or parts of postcodes. Bussinesses match if they are
1904
     *                                   located in either of these postcodes, or their postcode start with any of the
1905
     *                                   given partial postcodes. Thus, if the establishment address matches with one
1906
     *                                   of the given postcodes. For example, the partial postcode "10" matches most of
1907
     *                                   Amsterdam. Note that it would make little sense to supply both city and
1908
     *                                   postcode.
1909
     * @param array  $sbi                Array of SBI codes or partial SBI codes. Businesses match if they have either
1910
     *                                   of the given SBI codes, or their SBI code starts with the partial SBI code.
1911
     * @param bool   $primarySbiOnly     Match primary SBI only. A business may have up to three SBI codes assigned. If
1912
     *                                   primary_sbi_only is true, businesses only match if their main SBI code matches
1913
     *                                   with one of the codes in the 'sbi' field. If primary_sbi_only is false,
1914
     *                                   businesses are matched if either of the three SBI codes match the 'sbi' field.
1915
     * @param array  $legalForm          Array of integer legal form codes. Bussiness match if they have either of
1916
     *                                   these legalforms. A list of legal form codes can be found in the documentation
1917
     *                                   of <DutchBusinessDossier>.
1918
     * @param int    $employeesMin       Minimum number of employees working at the business
1919
     * @param int    $employeesMax       Maximum number of employees working at the business
1920
     * @param string $economicallyActive Indicates whether the businesses should be economically active
1921
     * @param string $financialStatus    Indicates the financial status of the businesses.
1922
     * @param string $changedSince       Date in yyyy-mm-dd format. Businesses match if the information about them
1923
     *                                   changed on or after this date.
1924
     * @param string $newSince           Date in yyyy-mm-dd format. Only businesses which were added on or after this
1925
     *                                   date are returned. Note that this does not mean that the company was founded
1926
     *                                   after this date. Companies may be founded and only later be added to the
1927
     *                                   DutchBusiness database.
1928
     * @param int    $page               Page to retrieve, pages start counting at 1
1929
     *
1930
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessSearchSelection
1931
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessReference>
1932
     */
1933 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...
1934
        $city,
1935
        $postcode,
1936
        $sbi,
1937
        $primarySbiOnly,
1938
        $legalForm,
1939
        $employeesMin,
1940
        $employeesMax,
1941
        $economicallyActive,
1942
        $financialStatus,
1943
        $changedSince,
1944
        $newSince,
1945
        $page
1946
    ) {
1947
        return $this->getAdapter()->call(
1948
            'dutchBusinessSearchSelection',
1949
            [
1950
                'city'                => $city,
1951
                'postcode'            => $postcode,
1952
                'sbi'                 => $sbi,
1953
                'primary_sbi_only'    => $primarySbiOnly,
1954
                'legal_form'          => $legalForm,
1955
                'employees_min'       => $employeesMin,
1956
                'employees_max'       => $employeesMax,
1957
                'economically_active' => $economicallyActive,
1958
                'financial_status'    => $financialStatus,
1959
                'changed_since'       => $changedSince,
1960
                'new_since'           => $newSince,
1961
                'page'                => $page,
1962
            ]
1963
        );
1964
    }
1965
1966
    /**
1967
     * Add a dossier to the list of dossiers for which the user wants to receive updates.
1968
     * (the user whose credentials are used to make the call) After adding the dossier any future updates to the
1969
     * dossier
1970
     * can be retrieved using <dutchBusinessUpdateGetDossiers>. Before adding the dossier, call
1971
     * <dutchBusinessUpdateCheckDossier> to make sure you have the latest dossier version.
1972
     *  You do not need to call this method if you have retrieved a dossier using <dutchBusinessGetDossier>, in which
1973
     *  case it has been added automatically.
1974
     *
1975
     * @param string $dossierNumber       Chamber of Commerce number
1976
     * @param string $establishmentNumber Establishment number
1977
     *
1978
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateAddDossier
1979
     * @return \StdClass
1980
     */
1981
    public function dutchBusinessUpdateAddDossier($dossierNumber, $establishmentNumber)
1982
    {
1983
        return $this->getAdapter()->call(
1984
            'dutchBusinessUpdateAddDossier',
1985
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
1986
        );
1987
    }
1988
1989
    /**
1990
     * Retrieve information on the last change to a business establishment.
1991
     * This method can be used to check for updates on specific dossiers, regardless of whether requested dossiers are
1992
     * logged for the user. A <DutchBusinessUpdateReference> is returned for the most recent update, if any. The
1993
     * <DutchBusinessUpdateReference> contains the date of the latest update to the dossier, as well as the types of
1994
     * updates performed on that date. A fault message is returned if there have never been updates to the dossier. The
1995
     * same fault is returned if the dossier does not exist (or never existed).
1996
     *
1997
     * @param string $dossierNumber       Chamber of Commerce number
1998
     * @param string $establishmentNumber Establishment number
1999
     * @param array  $updateTypes         The types of updates to consider. See <Update types> for a list of types.
2000
     *                                    If the type 'Test' is specified, a <DutchBusinessUpdateReference> is returned
2001
     *                                    with DateLastUpdate set to today, its Update types will contain all the types
2002
     *                                    specified in the request.
2003
     *
2004
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateCheckDossier
2005
     * @return \StdClass <DutchBusinessUpdateReference>
2006
     */
2007
    public function dutchBusinessUpdateCheckDossier($dossierNumber, $establishmentNumber, $updateTypes)
2008
    {
2009
        return $this->getAdapter()->call(
2010
            'dutchBusinessUpdateCheckDossier',
2011
            [
2012
                'dossier_number'       => $dossierNumber,
2013
                'establishment_number' => $establishmentNumber,
2014
                'update_types'         => $updateTypes,
2015
            ]
2016
        );
2017
    }
2018
2019
    /**
2020
     * Retrieve dossier numbers for all dossiers changed since the given date.
2021
     * This method returns a <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference> entries, for all dossiers
2022
     * which were updated since the given changed_since date, and where the update was one of the given
2023
     * update_types. This method can be called periodically to obtain a list of recently updated dossiers. This
2024
     * list can then be checked against the list of locally stored dossiers, to determine which dossiers that
2025
     * the user has stored are changed and may be updated.
2026
     *
2027
     * @param string $changedSince Date in YYYY-MM-DD format. All dossiers changed on or after this date are returned.
2028
     *                             This date may not be more than 40 days ago.
2029
     * @param array  $updateTypes  The types of updates to consider. See <Update types> for a list of types. This
2030
     *                             method supports the update type 'New' to retrieve dossiers which have been
2031
     *                             registered
2032
     *                             with the DutchBusiness since the changed_since date.
2033
     * @param int    $page         Page to retrieve, pages start counting at 1
2034
     *
2035
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateGetChangedDossiers
2036
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference>
2037
     */
2038
    public function dutchBusinessUpdateGetChangedDossiers($changedSince, $updateTypes, $page)
2039
    {
2040
        return $this->getAdapter()->call(
2041
            'dutchBusinessUpdateGetChangedDossiers',
2042
            ['changed_since' => $changedSince, 'update_types' => $updateTypes, 'page' => $page]
2043
        );
2044
    }
2045
2046
    /**
2047
     * Returns a list of all dossiers that have been updated since they were last retrieved by the user.
2048
     * (the user whose credentials are used to make the call). If a dossier is returned that is no longer of interest
2049
     * or has the update type 'Removed', calling <dutchBusinessUpdateRemoveDossier> prevents it from occurring in this
2050
     * method's output. If a dossier from the output list is retrieved using <dutchBusinessGetDossier>, a second call
2051
     * to <dutchBusinessUpdateGetDossiers> will not contain the dossier anymore. Every <DutchBusinessUpdateReference>
2052
     * describes a dossier, when it was last updated and what types of updates have occurred since the dossier was last
2053
     * retrieved by the user.
2054
     *
2055
     * @param array $updateTypes A list specifying the types of updates that should be returned. See <Update types> for
2056
     *                           a list of types. If the type 'Test' is specified, an example
2057
     *                           <DutchBusinessUpdateReference> is returned with DateLastUpdate set to today, it's
2058
     *                           update types will contain all the types specified in the request.
2059
     * @param int   $page        The page of results
2060
     *
2061
     * @link https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business.dutchBusinessUpdateGetDossiers
2062
     * @return \StdClass <Patterns::{Type}PagedResult> of <DutchBusinessUpdateReference> entries.
2063
     */
2064
    public function dutchBusinessUpdateGetDossiers($updateTypes, $page)
2065
    {
2066
        return $this->getAdapter()->call(
2067
            'dutchBusinessUpdateGetDossiers',
2068
            ['update_types' => $updateTypes, 'page' => $page]
2069
        );
2070
    }
2071
2072
    /**
2073
     * Remove a dossier from the list of dossiers for which the user.
2074
     * (the user whose credentials are used to make the call) wants to receive updates.
2075
     *
2076
     * @param string $dossierNumber       Chamber of Commerce number
2077
     * @param string $establishmentNumber Establishment number
2078
     *
2079
     * @return \StdClass
2080
     */
2081
    public function dutchBusinessUpdateRemoveDossier($dossierNumber, $establishmentNumber)
2082
    {
2083
        return $this->getAdapter()->call(
2084
            'dutchBusinessUpdateRemoveDossier',
2085
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
2086
        );
2087
    }
2088
2089
    /**
2090
     * Retrieve information about the current market value of a vehicle.
2091
     *
2092
     * @param string $licensePlate The dutch license plate
2093
     *
2094
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetMarketValue
2095
     * @return \StdClass <DutchVehicleMarketValue>
2096
     */
2097
    public function dutchVehicleGetMarketValue($licensePlate)
2098
    {
2099
        return $this->getAdapter()->call('dutchVehicleGetMarketValue', ['license_plate' => $licensePlate]);
2100
    }
2101
2102
    /**
2103
     * Retrieve information about the ownership of a vehicle.
2104
     *
2105
     * @param string $licensePlate The dutch license plate
2106
     *
2107
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetOwnerHistory
2108
     * @return \StdClass <DutchVehicleOwnerHistory>
2109
     */
2110
    public function dutchVehicleGetOwnerHistory($licensePlate)
2111
    {
2112
        return $this->getAdapter()->call('dutchVehicleGetOwnerHistory', ['license_plate' => $licensePlate]);
2113
    }
2114
2115
    /**
2116
     * Retrieve information about a vehicle purchase/catalog price.
2117
     * This method returns (recalculated) purchase and vehicle reference information, useful to establish the insurance
2118
     * amount.
2119
     *
2120
     * @param string $licensePlate The dutch license plate
2121
     *
2122
     * @link https://webview.webservices.nl/documentation/files/service_dutchvehicle-php.html#Dutch_Vehicle.dutchVehicleGetPurchaseReference
2123
     * @return \StdClass
2124
     */
2125
    public function dutchVehicleGetPurchaseReference($licensePlate)
2126
    {
2127
        return $this->getAdapter()->call('dutchVehicleGetPurchaseReference', ['license_plate' => $licensePlate]);
2128
    }
2129
2130
    /**
2131
     * @param string $licensePlate The dutch license plate
2132
     *
2133
     * @return \StdClass
2134
     */
2135
    public function dutchVehicleGetVehicle($licensePlate)
2136
    {
2137
        return $this->getAdapter()->call('dutchVehicleGetVehicle', ['license_plate' => $licensePlate]);
2138
    }
2139
2140
    /**
2141
     * Provides a credit score for a person identified by a set of parameters.
2142
     *
2143
     * @param string $lastName      The last name of the person
2144
     * @param string $initials      The initials
2145
     * @param string $surnamePrefix The surname prefix, like 'van' or 'de', optional
2146
     * @param string $gender        Gender of the person. `M` or `F`
2147
     * @param string $birthDate     Birth date in the format yyyy-mm-dd
2148
     * @param string $street        Street part of the address
2149
     * @param string $houseNumber   House number, optionally including a house number addition
2150
     * @param string $postcode      Dutch postcode in the format 1234AB
2151
     * @param string $phoneNumber   Home phone number, only numeric characters (e.g. 0201234567), may be empty.
2152
     *
2153
     * @link https://webview.webservices.nl/documentation/files/service_edr-php.html#EDR.edrGetScore
2154
     * @return \StdClass <EDRScore>
2155
     */
2156 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...
2157
        $lastName,
2158
        $initials,
2159
        $surnamePrefix,
2160
        $gender,
2161
        $birthDate,
2162
        $street,
2163
        $houseNumber,
2164
        $postcode,
2165
        $phoneNumber
2166
    ) {
2167
        return $this->getAdapter()->call(
2168
            'edrGetScore',
2169
            [
2170
                'last_name'      => $lastName,
2171
                'initials'       => $initials,
2172
                'surname_prefix' => $surnamePrefix,
2173
                'gender'         => $gender,
2174
                'birth_date'     => $birthDate,
2175
                'street'         => $street,
2176
                'house_number'   => $houseNumber,
2177
                'postcode'       => $postcode,
2178
                'phone_number'   => $phoneNumber,
2179
            ]
2180
        );
2181
    }
2182
2183
    /**
2184
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2185
     * You may either specify an address using postcode and house number, or using city, street and house number.
2186
     * Either postcode or city is required. When the city and street parameters are specified the city name and street
2187
     * name that were matched are returned in the result. If a house number is specified its location is interpolated
2188
     * using coordinates of the address range it belongs to. Accuracy may vary depending on the actual distribution of
2189
     * addresses in the range. For the most accurate house number coordinates, use
2190
     * <Kadaster::kadasterAddressCoordinates>.
2191
     *
2192
     * @param string $postcode Address postcode
2193
     * @param string $city     Address city
2194
     * @param string $street   Address street
2195
     * @param int    $houseNo  Address house number
2196
     *
2197
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationAddressCoordinatesLatLon
2198
     * @return \StdClass <LatLonCoordinatesMatch>
2199
     */
2200 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...
2201
    {
2202
        return $this->getAdapter()->call(
2203
            'geoLocationAddressCoordinatesLatLon',
2204
            [
2205
                'postcode' => $postcode,
2206
                'city'     => $city,
2207
                'street'   => $street,
2208
                'houseno'  => $houseNo,
2209
            ]
2210
        );
2211
    }
2212
2213
    /**
2214
     * Returns the coordinates of the given address in the RD system.
2215
     * You may either specify an address using postcode and house number, or using city, street and house number.
2216
     * Either postcode or city is required. When the city and street parameters are specified the city name and street
2217
     * name that were matched are returned in the result. If a house number is specified its location is interpolated
2218
     * using coordinates of the address range it belongs to. Accuracy may vary depending on the actual distribution of
2219
     * addresses in the range. For the most accurate house number coordinates, use
2220
     * <Kadaster::kadasterAddressCoordinates>.
2221
     *
2222
     * @param string $postcode Address postcode
2223
     * @param string $city     Address city
2224
     * @param string $street   Address street
2225
     * @param int    $houseNo  Address house number
2226
     *
2227
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationAddressCoordinatesRD
2228
     * @return \StdClass <RDCoordinatesMatch>
2229
     */
2230 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...
2231
    {
2232
        return $this->getAdapter()->call(
2233
            'geoLocationAddressCoordinatesRD',
2234
            ['postcode' => $postcode, 'city' => $city, 'street' => $street, 'houseno' => $houseNo]
2235
        );
2236
    }
2237
2238
    /**
2239
     * Returns a given neighborhood code list sorted in order of increasing distance from a given neighborhood.
2240
     *
2241
     * @param string $nbCodefrom Neighborhoodcode to sort the list on
2242
     * @param array  $nbCodes    Array of neighborhood codes to sort using increasing distance to nbcodefrom
2243
     *
2244
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedNeighborhoodCodes
2245
     * @return \stdClass <Patterns::{Type}Array> of <SortedPostcode>
2246
     */
2247
    public function geoLocationDistanceSortedNeighborhoodCodes($nbCodefrom, $nbCodes)
2248
    {
2249
        return $this->getAdapter()->call(
2250
            'geoLocationDistanceSortedNeighborhoodCodes',
2251
            ['nbcodefrom' => $nbCodefrom, 'nbcodes' => $nbCodes]
2252
        );
2253
    }
2254
2255
    /**
2256
     * Returns a list of neighborhood codes sorted in order of increasing distance from a given neighborhood.
2257
     * within a given radius (in meters).
2258
     *
2259
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedNeighborhoodCodesRadius
2260
     *
2261
     * @param string $nbCodefrom Neighborhoodcode at the center of the radius
2262
     * @param int    $radius     Radius from nbcodefrom to search in, in meters
2263
     * @param int    $page       Page to retrieve, pages start counting at 1
2264
     *
2265
     * @return \StdClass <Patterns::{Type}PagedResult> of <SortedPostcode>
2266
     */
2267
    public function geoLocationDistanceSortedNeighborhoodCodesRadius($nbCodefrom, $radius, $page)
2268
    {
2269
        return $this->getAdapter()->call(
2270
            'geoLocationDistanceSortedNeighborhoodCodesRadius',
2271
            ['nbcodefrom' => $nbCodefrom, 'radius' => $radius, 'page' => $page]
2272
        );
2273
    }
2274
2275
    /**
2276
     * Returns a list of postcodes sorted in order of increasing distance from a given postcode, within a given radius.
2277
     * If the radius is larger than 1500 meters, the result will be based on neighborhood codes.
2278
     *
2279
     * @param string $postcodeFrom Postcode at the center of the radius
2280
     * @param int    $radius       Radius from postcodefrom to search in, in meters
2281
     * @param int    $page         Page to retrieve, pages start counting at 1
2282
     *
2283
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationDistanceSortedPostcodesRadius
2284
     * @return \StdCLass <Patterns::{Type}PagedResult> of <SortedPostcode>
2285
     */
2286
    public function geoLocationDistanceSortedPostcodesRadius($postcodeFrom, $radius, $page)
2287
    {
2288
        return $this->getAdapter()->call(
2289
            'geoLocationDistanceSortedPostcodesRadius',
2290
            ['postcodefrom' => $postcodeFrom, 'radius' => $radius, 'page' => $page]
2291
        );
2292
    }
2293
2294
    /**
2295
     * Returns the distance in meters (in a direct line) between two latitude/longitude coordinates. Computed by using
2296
     * the Haversine formula, which is accurate as long as the locations are not antipodal (at the other side of the
2297
     * Earth).
2298
     *
2299
     * @param float $latitudeCoord1  Latitude of the first location
2300
     * @param float $longitudeCoord1 Longitude of the first location
2301
     * @param float $latitudeCoord2  Latitude of the second location
2302
     * @param float $longitudeCoord2 Longitude of the second location
2303
     * @param bool  $inRadians       Indicate if input is in radians (otherwise they are interpreted as degrees)
2304
     *
2305
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationHaversineDistance
2306
     * @return int
2307
     */
2308
    public function geoLocationHaversineDistance(
2309
        $latitudeCoord1,
2310
        $longitudeCoord1,
2311
        $latitudeCoord2,
2312
        $longitudeCoord2,
2313
        $inRadians
2314
    ) {
2315
        return $this->getAdapter()->call(
2316
            'geoLocationHaversineDistance',
2317
            [
2318
                'latitude_coord_1'  => $latitudeCoord1,
2319
                'longitude_coord_1' => $longitudeCoord1,
2320
                'latitude_coord_2'  => $latitudeCoord2,
2321
                'longitude_coord_2' => $longitudeCoord2,
2322
                'in_radians'        => $inRadians]
2323
        );
2324
    }
2325
2326
    /**
2327
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2328
     * Most countries are supported by this function. Accuracy of the result may vary between countries. Since the
2329
     * street and city have to contain the complete name and since this method acts with international data, we
2330
     * recommend to use <geoLocationInternationalPostcodeCoordinatesLatLon> if you know the postcode, since working
2331
     * with
2332
     * postcodes is less error prone.
2333
     *
2334
     * @param string $street   Complete street name. Street name may not be abbreviated, but may be empty.
2335
     * @param int    $houseNo  House Number
2336
     * @param string $city     Complete city name. City name may not be abbreviated, but may be empty.
2337
     * @param string $province Province, state, district (depends on country, may not be abbreviated). Ignored if not
2338
     *                         exactly matched.
2339
     * @param string $country  Country of the address. Country can be specified by using ISO3 country codes
2340
     *                         (recommended). Complete country names may not always work
2341
     * @param string $language Language used for input and preferred language for the output.
2342
     *
2343
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalAddressCoordinatesLatLon
2344
     * @return \StdClass <LatLonCoordinatesInternationalAddress>
2345
     */
2346
    public function geoLocationInternationalAddressCoordinatesLatLon(
2347
        $street,
2348
        $houseNo,
2349
        $city,
2350
        $province,
2351
        $country,
2352
        $language
2353
    ) {
2354
        return $this->getAdapter()->call(
2355
            'geoLocationInternationalAddressCoordinatesLatLon',
2356
            [
2357
                'street'   => $street,
2358
                'houseno'  => $houseNo,
2359
                'city'     => $city,
2360
                'province' => $province,
2361
                'country'  => $country,
2362
                'language' => $language,
2363
            ]
2364
        );
2365
    }
2366
2367
    /**
2368
     * Returns the coordinates of the given address in degrees of latitude/longitude.
2369
     * Most countries are supported by this function. Accuracy of the result may vary between countries.
2370
     *
2371
     * @param string $country    Country of the address. Country can be specified by using ISO3 country codes
2372
     *                           (recommended). Complete country names may not always work.
2373
     * @param string $postalCode Postalcode
2374
     * @param int    $houseNo    House number
2375
     * @param string $street     Complete street name. Street name may not be abbreviated, but may be empty.
2376
     * @param string $city       Complete city name. City name may not be abbreviated, but may be empty.
2377
     * @param string $province   Province, state, district (depends on country, may not be abbreviated). Ignored if not
2378
     *                           exactly matched.
2379
     * @param float  $matchRate  The minimum match level the returned search-results range [0-100]
2380
     * @param string $language   Language used for input and preferred language for the output. Depending on the amount
2381
     *                           of available data and the precision of the result, the output might not match the
2382
     *                           language requested.
2383
     *
2384
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalAddressCoordinatesLatLonV2
2385
     * @return \StdClass <LatLonCoordinatesInternationalAddress>
2386
     */
2387
    public function geoLocationInternationalAddressCoordinatesLatLonV2(
2388
        $country,
2389
        $postalCode,
2390
        $houseNo,
2391
        $street,
2392
        $city,
2393
        $province,
2394
        $matchRate,
2395
        $language
2396
    ) {
2397
        return $this->getAdapter()->call(
2398
            'geoLocationInternationalAddressCoordinatesLatLonV2',
2399
            [
2400
                'country'    => $country,
2401
                'postalcode' => $postalCode,
2402
                'houseno'    => $houseNo,
2403
                'street'     => $street,
2404
                'city'       => $city,
2405
                'province'   => $province,
2406
                'matchrate'  => $matchRate,
2407
                'language'   => $language,
2408
            ]
2409
        );
2410
    }
2411
2412
    /**
2413
     * Returns the address and geoLocation info closest to the specified latitude/longitude coordinate.
2414
     *
2415
     * @param float $latitude  Latitude of the location
2416
     * @param float $longitude Longitude of the location
2417
     *
2418
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalLatLonToAddress
2419
     * @return \StdClass <GeoLocationInternationalAddress>
2420
     */
2421
    public function geoLocationInternationalLatLonToAddress($latitude, $longitude)
2422
    {
2423
        return $this->getAdapter()->call(
2424
            'geoLocationInternationalLatLonToAddress',
2425
            ['latitude' => $latitude, 'longitude' => $longitude]
2426
        );
2427
    }
2428
2429
    /**
2430
     * Returns the coordinates of the given postcode in degrees of latitude/longitude.
2431
     * Most countries are supported by this function. Accuracy of the result may vary between countries.
2432
     *
2433
     * @param string $postcode Postcode to find the location of (postcode format varies depending on the country
2434
     *                         specified)
2435
     * @param string $country  Country of the address. Country can be specified by using ISO3 country codes
2436
     *                         (recommended). Complete country names may not always work.
2437
     *
2438
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationInternationalPostcodeCoordinatesLatLon
2439
     * @return \StdClass LatLonCoordinates>
2440
     */
2441
    public function geoLocationInternationalPostcodeCoordinatesLatLon($postcode, $country)
2442
    {
2443
        return $this->getAdapter()->call(
2444
            'geoLocationInternationalPostcodeCoordinatesLatLon',
2445
            ['postcode' => $postcode, 'country' => $country]
2446
        );
2447
    }
2448
2449
    /**
2450
     * Return the address and geoLocation info closest to the specified latitude/longitude coordinate in the NL.
2451
     * This method differs from geoLocationLatLonToAddress in that it is more precise: it uses data with
2452
     * house number precision, instead of house number range precision. This means that a specific house number is
2453
     * returned instead of a range, and that the returned address is typically closer to the coordinate than with
2454
     * geoLocationLatLonToAddress. Note that this method may return a different street than geoLocationLatLonToAddress.
2455
     *
2456
     * @param float $latitude  Latitude of the location
2457
     * @param float $longitude Longitude of the location
2458
     *
2459
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToAddressV2
2460
     * @return \StdClass <GeoLocationAddressV2>
2461
     */
2462
    public function geoLocationLatLonToAddressV2($latitude, $longitude)
2463
    {
2464
        return $this->getAdapter()->call(
2465
            'geoLocationLatLonToAddressV2',
2466
            ['latitude' => $latitude, 'longitude' => $longitude]
2467
        );
2468
    }
2469
2470
    /**
2471
     * Returns the postcode of the address closest to the specified latitude/longitude coordinate in the Netherlands.
2472
     *
2473
     * @param string $latitude  Latitude of the postcode
2474
     * @param string $longitude Longitude of the postcode
2475
     *
2476
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToPostcode
2477
     * @return \StdClass <GeoLocationAddress>
2478
     */
2479
    public function geoLocationLatLonToPostcode($latitude, $longitude)
2480
    {
2481
        return $this->getAdapter()->call(
2482
            'geoLocationLatLonToPostcode',
2483
            ['latitude' => $latitude, 'longitude' => $longitude]
2484
        );
2485
    }
2486
2487
    /**
2488
     * Convert a latitude/longitude coordinate to a RD ('Rijksdriehoeksmeting') coordinate.
2489
     *
2490
     * @param string $latitude  Latitude of the postcode
2491
     * @param string $longitude Longitude of the postcode
2492
     *
2493
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToRD
2494
     * @return \StdClass <RDCoordinates>
2495
     */
2496
    public function geoLocationLatLonToRD($latitude, $longitude)
2497
    {
2498
        return $this->getAdapter()->call(
2499
            'geoLocationLatLonToRD',
2500
            ['latitude' => $latitude, 'longitude' => $longitude]
2501
        );
2502
    }
2503
2504
    /**
2505
     * Returns the coordinates in the latitude/longitude system of the neighborhood, given the neighborhood code.
2506
     *
2507
     * @param string $nbCode Neighborhoodcode to find the location of
2508
     *
2509
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodCoordinatesLatLon
2510
     * @return \StdClass <LatLonCoordinates>
2511
     */
2512
    public function geoLocationNeighborhoodCoordinatesLatLon($nbCode)
2513
    {
2514
        return $this->getAdapter()->call('geoLocationNeighborhoodCoordinatesLatLon', ['nbcode' => (string)$nbCode]);
2515
    }
2516
2517
    /**
2518
     * Returns the coordinates in the RD system of the neighborhood given the neighborhood code.
2519
     *
2520
     * @param string $nbCode Neighborhoodcode to find the location of
2521
     *
2522
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodCoordinatesRD
2523
     * @return \StdClass <RDCoordinates>
2524
     */
2525
    public function geoLocationNeighborhoodCoordinatesRD($nbCode)
2526
    {
2527
        return $this->getAdapter()->call('geoLocationNeighborhoodCoordinatesRD', ['nbcode' => (string)$nbCode]);
2528
    }
2529
2530
    /**
2531
     * Returns estimated distance in meters (in a direct line) between two neighborhoods, given the neighborhood codes.
2532
     *
2533
     * @param string $nbCodefrom Neighborhood code of the first neighborhood
2534
     * @param string $nbCodeto   Neighborhood code of the second neighborhood
2535
     *
2536
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationNeighborhoodDistance
2537
     * @return int distance in meters
2538
     */
2539
    public function geoLocationNeighborhoodDistance($nbCodefrom, $nbCodeto)
2540
    {
2541
        return $this->getAdapter()->call(
2542
            'geoLocationNeighborhoodDistance',
2543
            ['nbcodefrom' => $nbCodefrom, 'nbcodeto' => $nbCodeto]
2544
        );
2545
    }
2546
2547
    /**
2548
     * Returns the coordinates of the given postcode in degrees of latitude/longitude.
2549
     *
2550
     * @param string $postcode Postcode to find the location of
2551
     *
2552
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeCoordinatesLatLon
2553
     * @return \StdClass <LatLonCoordinates>
2554
     */
2555
    public function geoLocationPostcodeCoordinatesLatLon($postcode)
2556
    {
2557
        return $this->getAdapter()->call('geoLocationPostcodeCoordinatesLatLon', ['postcode' => $postcode]);
2558
    }
2559
2560
    /**
2561
     * Returns the coordinates of the given postcode in the RD system.
2562
     *
2563
     * @param string $postcode Postcode to find the location of
2564
     *
2565
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeCoordinatesRD
2566
     * @return \StdClass <RDCoordinates>
2567
     */
2568
    public function geoLocationPostcodeCoordinatesRD($postcode)
2569
    {
2570
        return $this->getAdapter()->call('geoLocationPostcodeCoordinatesRD', ['postcode' => $postcode]);
2571
    }
2572
2573
    /**
2574
     * Returns the estimated distance in meters (in a direct line) between two postcodes.
2575
     *
2576
     * @param string $postcodeFrom First postcode
2577
     * @param string $postcodeTo   Second postcode
2578
     *
2579
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationPostcodeDistance
2580
     * @return int distance in meters
2581
     */
2582
    public function geoLocationPostcodeDistance($postcodeFrom, $postcodeTo)
2583
    {
2584
        return $this->getAdapter()->call(
2585
            'geoLocationPostcodeDistance',
2586
            ['postcodefrom' => $postcodeFrom, 'postcodeto' => $postcodeTo]
2587
        );
2588
    }
2589
2590
    /**
2591
     * Returns the address and geoLocation info closest to the specified Rijksdriehoeksmeting X/Y coordinate in NL.
2592
     * This method differs from geoLocationLatLonToAddress in that it is more precise. it uses data with house number
2593
     * precision, instead of house number range precision. This means that a specific house number is returned instead
2594
     * of a range, and that the returned address is typically closer to the coordinate than with
2595
     * geoLocationRDToAddress.
2596
     * Note that this method may return a different street than geoLocationRDToAddress.
2597
     *
2598
     * @param int $x rd X of the location
2599
     * @param int $y rd Y of the location
2600
     *
2601
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationRDToAddressV2
2602
     * @return \StdClass <GeoLocationAddressV2>
2603
     */
2604
    public function geoLocationRDToAddressV2($x, $y)
2605
    {
2606
        return $this->getAdapter()->call('geoLocationRDToAddressV2', ['x' => $x, 'y' => $y]);
2607
    }
2608
2609
    /**
2610
     * Convert a latitude/longitude coordinate to a RD ('Rijksdriehoeksmeting') coordinate.
2611
     *
2612
     * @param int $x part of the RD coordinate
2613
     * @param int $y part of the RD coordinate
2614
     *
2615
     * @link  https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationLatLonToRD
2616
     * @return \StdClass <RDCoordinates>
2617
     */
2618
    public function geoLocationRDToLatLon($x, $y)
2619
    {
2620
        return $this->getAdapter()->call('geoLocationRDToLatLon', ['x' => $x, 'y' => $y]);
2621
    }
2622
2623
    /**
2624
     * Returns the postcode of the address closest to  Rijksdriehoeksmeting coordinate in the Netherlands
2625
     *
2626
     * @param int $x part of the RD coordinate
2627
     * @param int $y part of the RD coordinate
2628
     *
2629
     * @link https://webview.webservices.nl/documentation/files/service_geolocation-php.html#Geolocation.geoLocationRDToPostcode
2630
     * @return \StdClass postcode
2631
     */
2632
    public function geoLocationRDToPostcode($x, $y)
2633
    {
2634
        return $this->getAdapter()->call('geoLocationRDToPostcode', ['x' => $x, 'y' => $y]);
2635
    }
2636
2637
    /**
2638
     * Retrieve top-parent, parent and sibling companies of a company registered in the Netherlands.
2639
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2640
     * the alarm/calamity.
2641
     *
2642
     * @param int $graydonCompanyId 9 Digit Graydon company identification number
2643
     *
2644
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditCompanyLiaisons
2645
     * @return \StdClass <GraydonCreditReportCompanyLiaisons>.
2646
     */
2647
    public function graydonCreditCompanyLiaisons($graydonCompanyId)
2648
    {
2649
        return $this->getAdapter()->call(
2650
            'graydonCreditCompanyLiaisons',
2651
            ['graydon_company_id' => (int)$graydonCompanyId]
2652
        );
2653
    }
2654
2655
    /**
2656
     * Retrieve a Graydon credit report of a company registered in the Netherlands.
2657
     *
2658
     * @param int    $graydonCompanyId 9 Digit Graydon company identification number.
2659
     * @param string $document         Specify to retrieve an extra document with an excerpt of the data. Currently
2660
     *                                 unused. Possible values:
2661
     *                                 [empty string] -- Return no extra document.
2662
     *
2663
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditGetReport
2664
     * @return \StdClass <GraydonCreditReport>
2665
     */
2666
    public function graydonCreditGetReport($graydonCompanyId, $document)
2667
    {
2668
        return $this->getAdapter()->call(
2669
            'graydonCreditGetReport',
2670
            ['graydon_company_id' => $graydonCompanyId, 'document' => $document]
2671
        );
2672
    }
2673
2674
    /**
2675
     *  Retrieve information on the management positions in a company registered in the Netherlands.
2676
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2677
     * the alarm/calamity.
2678
     *
2679
     * @param int $graydonCompanyId 9 Digit Graydon company identification number. See <Company Test Identifiers> for a
2680
     *                              list of free test reports.
2681
     *
2682
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditManagement
2683
     * @return \StdClass <GraydonCreditReportManagement>
2684
     */
2685
    public function graydonCreditManagement($graydonCompanyId)
2686
    {
2687
        return $this->getAdapter()->call('graydonCreditManagement', ['graydon_company_id' => $graydonCompanyId]);
2688
    }
2689
2690
    /**
2691
     * Retrieve a Graydon pd ratings and credit flag of a company registered in the Netherlands.
2692
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2693
     * the alarm/calamity.
2694
     *
2695
     * @param int $graydonCompanyId 9 Digit Graydon company identification number.
2696
     *
2697
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditQuickscan
2698
     * @return \StdClass <GraydonCreditReportQuickscan>
2699
     */
2700
    public function graydonCreditQuickscan($graydonCompanyId)
2701
    {
2702
        return $this->getAdapter()->call('graydonCreditQuickscan', ['graydon_company_id' => $graydonCompanyId]);
2703
    }
2704
2705
    /**
2706
     * Retrieve various Graydon credit ratings of a company registered in the Netherlands.
2707
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2708
     * the alarm/calamity.
2709
     *
2710
     * @param int $graydonCompanyId 9 Digit Graydon company identification number. See <Company Test Identifiers> for a
2711
     *                              list of free test reports
2712
     *
2713
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditRatings
2714
     * @return \StdClass <GraydonCreditReportRatings>
2715
     */
2716
    public function graydonCreditRatings($graydonCompanyId)
2717
    {
2718
        return $this->getAdapter()->call('graydonCreditRatings', ['graydon_company_id' => $graydonCompanyId]);
2719
    }
2720
2721
    /**
2722
     * Search international Graydon credit report databases for a company using an identifier.
2723
     *
2724
     * @param string $companyId     Company identification
2725
     * @param string $companyIdType Identification type. Supported:
2726
     *                              graydon - 9 digit Graydon company id
2727
     *                              kvk     - 8 digit Dutch Chamber of Commerce (KvK) dossier number, without the sub
2728
     *                              dossier number
2729
     * @param string $countryIso2   Country where the company is registered, country name, ISO 3166 alpha 2 code.
2730
     *                              Supported countries:  nl -- The Netherlands
2731
     *
2732
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchIdentification
2733
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2734
     */
2735
    public function graydonCreditSearchIdentification($companyId, $companyIdType, $countryIso2)
2736
    {
2737
        return $this->getAdapter()->call(
2738
            'graydonCreditSearchIdentification',
2739
            [
2740
                'company_id'      => $companyId,
2741
                'company_id_type' => $companyIdType,
2742
                'country_iso2'    => $countryIso2,
2743
            ]
2744
        );
2745
    }
2746
2747
    /**
2748
     * Search the international Graydon credit report database for a company by its name.
2749
     *
2750
     * @param string $companyName Required. Company name, trade name or business name.
2751
     * @param string $residence   Name of the city or region
2752
     * @param string $countryIso2 Country where the company is registered, country name, ISO 3166 alpha 2 code.
2753
     *                            Supported countries: nl -- The Netherlands
2754
     *
2755
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchName
2756
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2757
     */
2758
    public function graydonCreditSearchName($companyName, $residence, $countryIso2)
2759
    {
2760
        return $this->getAdapter()->call(
2761
            'graydonCreditSearchName',
2762
            ['company_name' => $companyName, 'residence' => $residence, 'country_iso2' => $countryIso2]
2763
        );
2764
    }
2765
2766
    /**
2767
     * Search international Graydon credit report database for a company using its postcode.
2768
     *
2769
     * @param string $postcode    Postcode
2770
     * @param int    $houseNo     House number of the address. Requires input of postcode parameter.
2771
     * @param string $telephoneNo Telephone number
2772
     * @param string $countryIso2 Country where the company is registered, country name, ISO 3166 alpha 2 code.
2773
     *                            Supported countries: nl -- The Netherlands
2774
     *
2775
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditSearchPostcode
2776
     * @return \StdClass <Patterns::{Type}Array> of <GraydonReference>
2777
     */
2778
    public function graydonCreditSearchPostcode($postcode, $houseNo, $telephoneNo, $countryIso2)
2779
    {
2780
        return $this->getAdapter()->call(
2781
            'graydonCreditSearchPostcode',
2782
            [
2783
                'postcode'     => $postcode,
2784
                'house_no'     => $houseNo,
2785
                'telephone_no' => $telephoneNo,
2786
                'country_iso2' => $countryIso2,
2787
            ]
2788
        );
2789
    }
2790
2791
    /**
2792
     * Retrieve the BTW (VAT) number of a company registered in the Netherlands.
2793
     * If an alarm code is set, no values are returned. Use <graydonCreditGetReport> to retrieve more information about
2794
     * the alarm/calamity.
2795
     *
2796
     * @param int $graydonCompanyId 9 Digit Graydon company identification number.
2797
     *                              See <Company Test Identifiers> for a list of free test reports
2798
     *
2799
     * @link https://webview.webservices.nl/documentation/files/service_graydoncredit-php.html#Graydon_Credit.graydonCreditVatNumber
2800
     * @return \StdClass <GraydonCreditReportVatNumber>
2801
     */
2802
    public function graydonCreditVatNumber($graydonCompanyId)
2803
    {
2804
        return $this->getAdapter()->call('graydonCreditVatNumber', ['graydon_company_id' => $graydonCompanyId]);
2805
    }
2806
2807
    /**
2808
     * This method expects an address that is already more or less complete.
2809
     * Checks for the correctness of the specified address, completing it if possible. If suggestions can be generated
2810
     * they will be returned as well. Returns address suggestions related to the address information given. Suggestions
2811
     * are ranked based on a matching percentage. Per field status indications are also returned for every suggestion.
2812
     * Any parameter may be left empty, apart from the country parameter.
2813
     *
2814
     * @param string $organization  Name of the company or organisation at the address
2815
     * @param string $building      Building or sub-building name
2816
     * @param string $street        Street search phrase
2817
     * @param string $houseNr       House number search phrase
2818
     * @param string $poBox         PO box search phrase
2819
     * @param string $locality      District or municipality search phrase
2820
     * @param string $postcode      Postalcode search phrase
2821
     * @param string $province      Province search phrase
2822
     * @param string $country       Country of the address, required. Accepts ISO3 country codes.
2823
     * @param string $language      Language in which the results are returned, see <Preferred Language>.
2824
     * @param string $countryFormat The format in which the country is returned, see <Country Format>.
2825
     *
2826
     * @link https://webview.webservices.nl/documentation/files/service_internationaladdress-php.html#International_Address.internationalAddressSearchInteractive
2827
     * @return \StdClass <InternationalAddressSearchV2Result>
2828
     */
2829 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...
2830
        $organization,
2831
        $building,
2832
        $street,
2833
        $houseNr,
2834
        $poBox,
2835
        $locality,
2836
        $postcode,
2837
        $province,
2838
        $country,
2839
        $language,
2840
        $countryFormat
2841
    ) {
2842
        return $this->getAdapter()->call(
2843
            'internationalAddressSearchInteractive',
2844
            [
2845
                'organization'   => $organization,
2846
                'building'       => $building,
2847
                'street'         => $street,
2848
                'housenr'        => $houseNr,
2849
                'pobox'          => $poBox,
2850
                'locality'       => $locality,
2851
                'postcode'       => $postcode,
2852
                'province'       => $province,
2853
                'country'        => $country,
2854
                'language'       => $language,
2855
                'country_format' => $countryFormat,
2856
            ]
2857
        );
2858
    }
2859
2860
    /**
2861
     * This method is suited to handle data entry where only partial address information is provided.
2862
     * Based on the partial information a list of up to 20 addresses is suggested, saving significant key strokes when
2863
     * entering address data. Returns address suggestions related to the address information given. Suggestions are
2864
     * ranked based on a matching percentage. Per field status indications are also returned for every suggestion. Any
2865
     * parameter may be left empty, apart from the country parameter.
2866
     *
2867
     * @param string $organization  Name of the company or organisation at the address
2868
     * @param string $building      Building or sub building name
2869
     * @param string $street        Street search phrase
2870
     * @param string $houseNr       House number search phrase
2871
     * @param string $poBox         PO box search phrase
2872
     * @param string $locality      District or municipality search phrase
2873
     * @param string $postcode      Postalcode search phrase
2874
     * @param string $province      Province search phrase
2875
     * @param string $country       Country of the address, required. Accepts ISO3 country codes.
2876
     * @param string $language      Language in which the results are returned, see <Preferred Language>.
2877
     * @param string $countryFormat The format in which the country is returned, see <Country Format>.
2878
     *
2879
     * @link https://webview.webservices.nl/documentation/files/service_internationaladdress-php.html#International_Address.internationalAddressSearchV2
2880
     * @return \StdClass <InternationalAddressSearchV2Result>
2881
     */
2882 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...
2883
        $organization,
2884
        $building,
2885
        $street,
2886
        $houseNr,
2887
        $poBox,
2888
        $locality,
2889
        $postcode,
2890
        $province,
2891
        $country,
2892
        $language,
2893
        $countryFormat
2894
    ) {
2895
        return $this->getAdapter()->call(
2896
            'internationalAddressSearchV2',
2897
            [
2898
                'organization'   => $organization,
2899
                'building'       => $building,
2900
                'street'         => $street,
2901
                'housenr'        => $houseNr,
2902
                'pobox'          => $poBox,
2903
                'locality'       => $locality,
2904
                'postcode'       => $postcode,
2905
                'province'       => $province,
2906
                'country'        => $country,
2907
                'language'       => $language,
2908
                'country_format' => $countryFormat,
2909
            ]
2910
        );
2911
    }
2912
2913
    /**
2914
     * Returns the coordinates of the given address in both the RD system and the latitude/longitude system.
2915
     * The lat/lon coordinates are derived from the RD coordinates. The address may be specified by giving the
2916
     * postcode, house number & house number addition or by giving the cityname, streetname, house number & house
2917
     * number addition.
2918
     *
2919
     * @param string $postcode        Address postcode
2920
     * @param string $city            Address city
2921
     * @param string $street          Address street
2922
     * @param int    $houseNo         Address house number
2923
     * @param string $houseNoAddition Address house number addition
2924
     *
2925
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterAddressCoordinates
2926
     * @return \StdClass <KadasterCoordinates>
2927
     */
2928
    public function kadasterAddressCoordinates($postcode, $city, $street, $houseNo, $houseNoAddition)
2929
    {
2930
        return $this->getAdapter()->call(
2931
            'kadasterAddressCoordinates',
2932
            [
2933
                'postcode'        => $postcode,
2934
                'city'            => $city,
2935
                'street'          => $street,
2936
                'houseno'         => $houseNo,
2937
                'housenoaddition' => $houseNoAddition,
2938
            ]
2939
        );
2940
    }
2941
2942
2943
    /**
2944
     * Find a 'bron document', a document which is the basis for an ascription.
2945
     * See <Example documents> for an example document.
2946
     *
2947
     * @param string $aanduidingSoortRegister Identifies the type of register in which the document was registered.
2948
     *                                        Supported values:
2949
     *                                        3 -- Register of mortgage documents (dutch: hypotheekakte)
2950
     *                                        4 -- Register of transport documents (dutch: transportakte)
2951
     * @param string $deel                    Identifier for a group of documents within a register of a Kadaster.
2952
     * @param string $nummer                  Alphanumeric number used to identify a document. Note that a number does
2953
     *                                        not relate to a single revision of the document, numbers may be reused if
2954
     *                                        a change is issued on time.
2955
     * @param string $reeks                   Identifier for the (former) establishment of the Kadaster where the Stuk
2956
     *                                        was originally registered. This parameter is required for requests where
2957
     *                                        deel is less than 50000, and may be left empty if deel is 50000 or
2958
     *                                        higher. Use <kadasterValueListGetRanges> to get a full list of possible
2959
     *                                        "reeks" values.
2960
     * @param string $format                  Filetype of the result. The result will always be encoded in base 64. If
2961
     *                                        an image format is requested a conversion is performed on our servers,
2962
     *                                        which might cause the response to be delayed for large documents. We
2963
     *                                        recommend using a longer timeout setting for such requests. Supported
2964
     *                                        formats:
2965
     *                                        pdf -- Only a PDF document will be returned.
2966
     *                                        png_16 -- A PDF file, and one PNG image for every page will be returned.
2967
     *                                        Each image is approximately 132 by 187 pixels.
2968
     *                                        png_144 -- A PDF file, and one PNG image for every page will be returned.
2969
     *                                        Each image is approximately 132 by 187 pixels.
2970
     *                                        gif_144 -- A PDF file, and one GIF image for every page will be returned.
2971
     *                                        Each image is approximately 1190 by 1684 pixels.
2972
     *
2973
     * @return \StdClass <KadasterBronDocument>
2974
     */
2975
    public function kadasterBronDocument($aanduidingSoortRegister, $deel, $nummer, $reeks, $format)
2976
    {
2977
        return $this->getAdapter()->call(
2978
            'kadasterBronDocument',
2979
            [
2980
                'aanduiding_soort_register' => $aanduidingSoortRegister,
2981
                'deel'                      => $deel,
2982
                'nummer'                    => $nummer,
2983
                'reeks'                     => $reeks,
2984
                'format'                    => $format,
2985
            ]
2986
        );
2987
    }
2988
2989
    /**
2990
     * Find a 'Eigendomsbericht' by parcel details.
2991
     * Returns the result in a file of the specified format. If the input matches more than one parcel, a list of the
2992
     * parcels found is returned instead. Sectie, perceelnummer and the code or name of the municipality are required.
2993
     *
2994
     * @param string $gemeenteCode  Municipality code
2995
     * @param string $gemeenteNaam  Municipality name. See <kadasterValueListGetMunicipalities> for possible values.
2996
     * @param string $sectie        Section code
2997
     * @param string $perceelnummer Parcel number
2998
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
2999
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3000
     *                              'A', 'D', or empty.
3001
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3002
     * @param string $format        Filetype of the result. The result will always be encoded in base 64. If an image
3003
     *                              format is requested a conversion is performed on our servers, which might cause the
3004
     *                              response to be delayed for large documents. We recommend using a longer timeout
3005
     *                              setting for such requests. Supported formats: pdf - Only a PDF document will be
3006
     *                              returned. png_16 - A PDF file, and one PNG image for every page will be returned.
3007
     *                              Each image is approximately 132 by 187 pixels. png_144 - A PDF file, and one PNG
3008
     *                              image for every page will be returned. Each image is approximately 1190 by 1684
3009
     *                              pixels. gif_144 - A PDF file, and one GIF image for every page will be returned.
3010
     *                              Each image is approximately 1190 by 1684 pixels.
3011
     *
3012
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtDocumentPerceel
3013
     * @return \StdClass <BerichtObjectDocumentResultaat>
3014
     */
3015 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...
3016
        $gemeenteCode,
3017
        $gemeenteNaam,
3018
        $sectie,
3019
        $perceelnummer,
3020
        $relatieCode,
3021
        $volgnummer,
3022
        $format
3023
    ) {
3024
        return $this->getAdapter()->call(
3025
            'kadasterEigendomsBerichtDocumentPerceel',
3026
            [
3027
                'gemeentecode'  => $gemeenteCode,
3028
                'gemeentenaam'  => $gemeenteNaam,
3029
                'sectie'        => $sectie,
3030
                'perceelnummer' => $perceelnummer,
3031
                'relatiecode'   => $relatieCode,
3032
                'volgnummer'    => $volgnummer,
3033
                'format'        => $format,
3034
            ]
3035
        );
3036
    }
3037
3038
    /**
3039
     * Find a 'Eigendomsbericht' by postcode and house number.
3040
     * Returns the result in a file of the specified format. If the input matches more than one parcel, a list of the
3041
     * parcels found is returned instead. If an image format is requested a conversion is performed on our servers,
3042
     * which might cause the response to be delayed for large documents. Please use a higher timeout setting.
3043
     *
3044
     * @param string $postcode             Address postcode
3045
     * @param int    $huisNummer           Address house number
3046
     * @param string $huisNummerToevoeging Address house number addition
3047
     * @param string $format               File type of the result. The result will always be encoded in base 64.
3048
     *                                     Supported formats:
3049
     *                                     pdf    - Only a PDF document will be returned.
3050
     *                                     png_16 - A PDF file, and one PNG image for every page will be returned.
3051
     *                                     Each image is approximately 132 by 187 pixels.
3052
     *                                     png_144 - A PDF file, and one PNG image for every page will be returned.
3053
     *                                     Each image is approximately 1190 by 1684 pixels.
3054
     *                                     gif_144 - A PDF file, and one GIF image for every page will be returned.
3055
     *                                     Each image is approximately 1190 by 1684 pixels.
3056
     *
3057
     * @link https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtDocumentPostcode
3058
     * @return \StdClass <BerichtObjectDocumentResultaat>
3059
     */
3060 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...
3061
    {
3062
        return $this->getAdapter()->call(
3063
            'kadasterEigendomsBerichtDocumentPostcode',
3064
            [
3065
                'postcode'              => $postcode,
3066
                'huisnummer'            => $huisNummer,
3067
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3068
                'format'                => $format,
3069
            ]
3070
        );
3071
    }
3072
3073
3074
    /**
3075
     * Find a 'Eigendomsbericht' by parcel details.
3076
     * Returns the result as a <BerichtObjectResultaat>. In addition to the structured result, a file in the PDF format
3077
     * is returned. If the input matches more than one parcel, a list of the parcels found is returned instead. Sectie,
3078
     * perceelnummer and the code or name of the municipality are required.
3079
     *
3080
     * @param string $gemeenteCode  Municipality code
3081
     * @param string $gemeenteNaam  Municipality name
3082
     * @param string $sectie        Section code
3083
     * @param string $perceelnummer Parcel number
3084
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3085
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3086
     *                              'A', 'D', or empty.
3087
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3088
     *
3089
     * @link       https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPerceel
3090
     * @deprecated please use <kadasterEigendomsBerichtPerceelV2> instead
3091
     * @return \StdClass <BerichtObjectResultaat>
3092
     */
3093 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...
3094
        $gemeenteCode,
3095
        $gemeenteNaam,
3096
        $sectie,
3097
        $perceelnummer,
3098
        $relatieCode,
3099
        $volgnummer
3100
    ) {
3101
        return $this->getAdapter()->call(
3102
            'kadasterEigendomsBerichtPerceel',
3103
            [
3104
                'gemeentecode'  => $gemeenteCode,
3105
                'gemeentenaam'  => $gemeenteNaam,
3106
                'sectie'        => $sectie,
3107
                'perceelnummer' => $perceelnummer,
3108
                'relatiecode'   => $relatieCode,
3109
                'volgnummer'    => $volgnummer,
3110
            ]
3111
        );
3112
    }
3113
3114
    /**
3115
     * Find a 'Eigendomsbericht' by parcel details.
3116
     * Returns the result as a <BerichtObjectResultaatV2>. In addition to the structured result, a file in the PDF
3117
     * format is returned. If the input matches more than one parcel, a list of the parcels found is returned instead.
3118
     * Sectie, perceelnummer and the code or name of the municipality are required.
3119
     *
3120
     * @param string $gemeenteCode  Municipality code
3121
     * @param string $gemeenteNaam  Municipality name. See <kadasterValueListGetMunicipalities> for possible values.
3122
     * @param string $sectie        Section code
3123
     * @param string $perceelnummer Parcel number
3124
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3125
     *                              relatiecode is specified, volgnummer should be specified as well. Allowed values:
3126
     *                              'A', 'D', or empty.
3127
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3128
     *
3129
     * @link  https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPerceelV2
3130
     * @return \StdClass <BerichtObjectResultaatV2>
3131
     */
3132 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...
3133
        $gemeenteCode,
3134
        $gemeenteNaam,
3135
        $sectie,
3136
        $perceelnummer,
3137
        $relatieCode,
3138
        $volgnummer
3139
    ) {
3140
        return $this->getAdapter()->call(
3141
            'kadasterEigendomsBerichtPerceelV2',
3142
            [
3143
                'gemeentecode'  => $gemeenteCode,
3144
                'gemeentenaam'  => $gemeenteNaam,
3145
                'sectie'        => $sectie,
3146
                'perceelnummer' => $perceelnummer,
3147
                'relatiecode'   => $relatieCode,
3148
                'volgnummer'    => $volgnummer,
3149
            ]
3150
        );
3151
    }
3152
3153
    /**
3154
     * Find a 'Eigendomsbericht' by postcode and house number.
3155
     * Returns the result as a <BerichtObjectResultaat>. In addition to the structured result, a file in the PDF format
3156
     * is returned. If the input matches more than one parcel, a list of the parcels found is returned instead.
3157
     *
3158
     * @param string $postcode             Address postcode
3159
     * @param int    $huisNummer           Address house number
3160
     * @param string $huisNummerToevoeging Address house number addition
3161
     *
3162
     * @link       https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPostcode
3163
     * @deprecated please use kadasterEigendomsBerichtPostcodeV2
3164
     * @return \StdClass <BerichtObjectResultaat>
3165
     */
3166
    public function kadasterEigendomsBerichtPostcode($postcode, $huisNummer, $huisNummerToevoeging)
3167
    {
3168
        return $this->getAdapter()->call(
3169
            'kadasterEigendomsBerichtPostcode',
3170
            [
3171
                'postcode'              => $postcode,
3172
                'huisnummer'            => $huisNummer,
3173
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3174
            ]
3175
        );
3176
    }
3177
3178
    /**
3179
     * Find a 'Eigendomsbericht' by postcode and house number.
3180
     * In addition to the structured result, a file in the PDF format is returned. If the input matches more than one
3181
     * parcel, a list of the parcels found is returned instead.
3182
     *
3183
     * @param string $postcode             Address postcode
3184
     * @param int    $huisNummer           Address house number
3185
     * @param string $huisNummerToevoeging Address house number addition
3186
     *
3187
     * @link  https://webview.webservices.nl/documentation/files/service_kadaster-php.html#Kadaster.kadasterEigendomsBerichtPostcodeV2
3188
     * @return \StdClass <BerichtObjectResultaatV2>
3189
     */
3190
    public function kadasterEigendomsBerichtPostcodeV2($postcode, $huisNummer, $huisNummerToevoeging)
3191
    {
3192
        return $this->getAdapter()->call(
3193
            'kadasterEigendomsBerichtPostcodeV2',
3194
            [
3195
                'postcode'              => $postcode,
3196
                'huisnummer'            => $huisNummer,
3197
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3198
            ]
3199
        );
3200
    }
3201
3202
    /**
3203
     * Find a 'Hypothecair bericht' by parcel details.
3204
     * If one parcel is found, the "hypothecairbericht" field of the <kadasterHypothecairBerichtResultaat> contains
3205
     * information about that specific parcel. If more parcels match, the "overzicht" field contains information about
3206
     * all the parcels the requested parcel has been divided in, or transferred into. The result will always be encoded
3207
     * in base 64. If an image format is requested a conversion is performed on our servers, which might cause the
3208
     * response to be delayed for large documents. We recommend using a longer timeout setting for such requests.
3209
     *
3210
     * @param string $gemeenteCode  Municipality code
3211
     * @param string $gemeenteNaam  Municipality name
3212
     * @param string $sectie        Section code
3213
     * @param string $perceelnummer Parcel number
3214
     * @param string $relatieCode   Indicates object relation type, set if object is part of another parcel. If
3215
     *                              relatiecode is specified, volgnummer should be specified as well.
3216
     *                              Allowed values: 'A', 'D', or empty.
3217
     * @param string $volgnummer    Object index number, set if object is part of another parcel
3218
     * @param string $format        File type of the result. Supported formats:
3219
     *                              none- No document will be returned.
3220
     *                              pdf - Only a PDF document will be returned.
3221
     *                              png_16 - A PDF file, and one PNG image for every page will be returned.
3222
     *                              Each image is approximately 132 by 187 pixels.
3223
     *                              png_144 - A PDF file, and one PNG image for every page will be returned.
3224
     *                              Each image is approximately 1190 by 1684 pixels.
3225
     *                              gif_144 -- A PDF file, and one GIF image for every page will be returned.
3226
     *                              Each image is approximately 1190 by 1684 pixels.
3227
     *
3228
     * @deprecated please use <kadasterHypothecairBerichtPerceelV3>
3229
     * @return \StdClass <kadasterHypothecairBerichtResultaat>
3230
     */
3231 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...
3232
        $gemeenteCode,
3233
        $gemeenteNaam,
3234
        $sectie,
3235
        $perceelnummer,
3236
        $relatieCode,
3237
        $volgnummer,
3238
        $format
3239
    ) {
3240
        return $this->getAdapter()->call(
3241
            'kadasterHypothecairBerichtPerceel',
3242
            [
3243
                'gemeentecode'  => $gemeenteCode,
3244
                'gemeentenaam'  => $gemeenteNaam,
3245
                'sectie'        => $sectie,
3246
                'perceelnummer' => $perceelnummer,
3247
                'relatiecode'   => $relatieCode,
3248
                'volgnummer'    => $volgnummer,
3249
                'format'        => $format,
3250
            ]
3251
        );
3252
    }
3253
3254
    /**
3255
     * @param $gemeenteCode
3256
     * @param $gemeenteNaam
3257
     * @param $sectie
3258
     * @param $perceelnummer
3259
     * @param $relatieCode
3260
     * @param $volgnummer
3261
     * @param $format
3262
     *
3263
     * @return \StdClass
3264
     */
3265 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...
3266
        $gemeenteCode,
3267
        $gemeenteNaam,
3268
        $sectie,
3269
        $perceelnummer,
3270
        $relatieCode,
3271
        $volgnummer,
3272
        $format
3273
    ) {
3274
        return $this->getAdapter()->call(
3275
            'kadasterHypothecairBerichtPerceelV2',
3276
            [
3277
                'gemeentecode'  => $gemeenteCode,
3278
                'gemeentenaam'  => $gemeenteNaam,
3279
                'sectie'        => $sectie,
3280
                'perceelnummer' => $perceelnummer,
3281
                'relatiecode'   => $relatieCode,
3282
                'volgnummer'    => $volgnummer,
3283
                'format'        => $format,
3284
            ]
3285
        );
3286
    }
3287
3288
    /**
3289
     * @param $gemeenteCode
3290
     * @param $gemeenteNaam
3291
     * @param $sectie
3292
     * @param $perceelnummer
3293
     * @param $relatieCode
3294
     * @param $volgnummer
3295
     * @param $format
3296
     *
3297
     * @return \StdClass
3298
     */
3299 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...
3300
        $gemeenteCode,
3301
        $gemeenteNaam,
3302
        $sectie,
3303
        $perceelnummer,
3304
        $relatieCode,
3305
        $volgnummer,
3306
        $format
3307
    ) {
3308
        return $this->getAdapter()->call(
3309
            'kadasterHypothecairBerichtPerceelV3',
3310
            [
3311
                'gemeentecode'  => $gemeenteCode,
3312
                'gemeentenaam'  => $gemeenteNaam,
3313
                'sectie'        => $sectie,
3314
                'perceelnummer' => $perceelnummer,
3315
                'relatiecode'   => $relatieCode,
3316
                'volgnummer'    => $volgnummer,
3317
                'format'        => $format,
3318
            ]
3319
        );
3320
    }
3321
3322
    /**
3323
     * @param $postcode
3324
     * @param $huisNummer
3325
     * @param $huisNummerToevoeging
3326
     * @param $format
3327
     *
3328
     * @return \StdClass
3329
     */
3330 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...
3331
    {
3332
        return $this->getAdapter()->call(
3333
            'kadasterHypothecairBerichtPostcode',
3334
            [
3335
                'postcode'              => $postcode,
3336
                'huisnummer'            => $huisNummer,
3337
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3338
                'format'                => $format,
3339
            ]
3340
        );
3341
    }
3342
3343
    /**
3344
     * @param $postcode
3345
     * @param $huisNummer
3346
     * @param $huisNummerToevoeging
3347
     * @param $format
3348
     *
3349
     * @return \StdClass
3350
     */
3351 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...
3352
    {
3353
        return $this->getAdapter()->call(
3354
            'kadasterHypothecairBerichtPostcodeV2',
3355
            [
3356
                'postcode'              => $postcode,
3357
                'huisnummer'            => $huisNummer,
3358
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3359
                'format'                => $format,
3360
            ]
3361
        );
3362
    }
3363
3364
    /**
3365
     * @param $postcode
3366
     * @param $huisNummer
3367
     * @param $huisNummerToevoeging
3368
     * @param $format
3369
     *
3370
     * @return \StdClass
3371
     */
3372 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...
3373
    {
3374
        return $this->getAdapter()->call(
3375
            'kadasterHypothecairBerichtPostcodeV3',
3376
            [
3377
                'postcode'              => $postcode,
3378
                'huisnummer'            => $huisNummer,
3379
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3380
                'format'                => $format,
3381
            ]
3382
        );
3383
    }
3384
3385
    /**
3386
     * @param $gemeenteCode
3387
     * @param $gemeenteNaam
3388
     * @param $sectie
3389
     * @param $perceelnummer
3390
     * @param $relatieCode
3391
     * @param $volgnummer
3392
     * @param $format
3393
     * @param $schaal
3394
     *
3395
     * @return \StdClass
3396
     */
3397 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...
3398
        $gemeenteCode,
3399
        $gemeenteNaam,
3400
        $sectie,
3401
        $perceelnummer,
3402
        $relatieCode,
3403
        $volgnummer,
3404
        $format,
3405
        $schaal
3406
    ) {
3407
        return $this->getAdapter()->call(
3408
            'kadasterKadastraleKaartPerceel',
3409
            [
3410
                'gemeentecode'  => $gemeenteCode,
3411
                'gemeentenaam'  => $gemeenteNaam,
3412
                'sectie'        => $sectie,
3413
                'perceelnummer' => $perceelnummer,
3414
                'relatiecode'   => $relatieCode,
3415
                'volgnummer'    => $volgnummer,
3416
                'format'        => $format,
3417
                'schaal'        => $schaal,
3418
            ]
3419
        );
3420
    }
3421
3422
    /**
3423
     * @param $gemeenteCode
3424
     * @param $gemeenteNaam
3425
     * @param $sectie
3426
     * @param $perceelnummer
3427
     * @param $relatieCode
3428
     * @param $volgnummer
3429
     * @param $format
3430
     * @param $schaal
3431
     *
3432
     * @return \StdClass
3433
     */
3434 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...
3435
        $gemeenteCode,
3436
        $gemeenteNaam,
3437
        $sectie,
3438
        $perceelnummer,
3439
        $relatieCode,
3440
        $volgnummer,
3441
        $format,
3442
        $schaal
3443
    ) {
3444
        return $this->getAdapter()->call(
3445
            'kadasterKadastraleKaartPerceelV2',
3446
            [
3447
                'gemeentecode'  => $gemeenteCode,
3448
                'gemeentenaam'  => $gemeenteNaam,
3449
                'sectie'        => $sectie,
3450
                'perceelnummer' => $perceelnummer,
3451
                'relatiecode'   => $relatieCode,
3452
                'volgnummer'    => $volgnummer,
3453
                'format'        => $format,
3454
                'schaal'        => $schaal,
3455
            ]
3456
        );
3457
    }
3458
3459
    /**
3460
     * @param $postcode
3461
     * @param $huisNummer
3462
     * @param $huisNummerToevoeging
3463
     * @param $format
3464
     * @param $schaal
3465
     *
3466
     * @return \StdClass
3467
     */
3468 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...
3469
    {
3470
        return $this->getAdapter()->call(
3471
            'kadasterKadastraleKaartPostcode',
3472
            [
3473
                'postcode'              => $postcode,
3474
                'huisnummer'            => $huisNummer,
3475
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3476
                'format'                => $format,
3477
                'schaal'                => $schaal,
3478
            ]
3479
        );
3480
    }
3481
3482
    /**
3483
     * @param $postcode
3484
     * @param $huisNummer
3485
     * @param $huisNummerToevoeging
3486
     * @param $format
3487
     * @param $schaal
3488
     *
3489
     * @return \StdClass
3490
     */
3491 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...
3492
    {
3493
        return $this->getAdapter()->call(
3494
            'kadasterKadastraleKaartPostcodeV2',
3495
            [
3496
                'postcode'              => $postcode,
3497
                'huisnummer'            => $huisNummer,
3498
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3499
                'format'                => $format,
3500
                'schaal'                => $schaal,
3501
            ]
3502
        );
3503
    }
3504
3505
    /**
3506
     * @param $postcode
3507
     * @param $huisNummer
3508
     *
3509
     * @return \StdClass
3510
     */
3511
    public function kadasterKoopsommenOverzicht($postcode, $huisNummer)
3512
    {
3513
        return $this->getAdapter()->call(
3514
            'kadasterKoopsommenOverzicht',
3515
            [
3516
                'postcode'   => $postcode,
3517
                'huisnummer' => $huisNummer,
3518
            ]
3519
        );
3520
    }
3521
3522
    /**
3523
     * @param $postcode
3524
     * @param $huisNummer
3525
     * @param $format
3526
     *
3527
     * @return \StdClass
3528
     */
3529
    public function kadasterKoopsommenOverzichtV2($postcode, $huisNummer, $format)
3530
    {
3531
        return $this->getAdapter()->call(
3532
            'kadasterKoopsommenOverzichtV2',
3533
            [
3534
                'postcode'   => $postcode,
3535
                'huisnummer' => $huisNummer,
3536
                'format'     => $format,
3537
            ]
3538
        );
3539
    }
3540
3541
    /**
3542
     * @param $gemeenteCode
3543
     * @param $gemeenteNaam
3544
     * @param $sectie
3545
     * @param $perceelnummer
3546
     * @param $relatieCode
3547
     * @param $volgnummer
3548
     * @param $format
3549
     *
3550
     * @return \StdClass
3551
     */
3552 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...
3553
        $gemeenteCode,
3554
        $gemeenteNaam,
3555
        $sectie,
3556
        $perceelnummer,
3557
        $relatieCode,
3558
        $volgnummer,
3559
        $format
3560
    ) {
3561
        return $this->getAdapter()->call(
3562
            'kadasterUittrekselKadastraleKaartPerceel',
3563
            [
3564
                'gemeentecode'  => $gemeenteCode,
3565
                'gemeentenaam'  => $gemeenteNaam,
3566
                'sectie'        => $sectie,
3567
                'perceelnummer' => $perceelnummer,
3568
                'relatiecode'   => $relatieCode,
3569
                'volgnummer'    => $volgnummer,
3570
                'format'        => $format,
3571
            ]
3572
        );
3573
    }
3574
3575
    /**
3576
     * @param $gemeenteCode
3577
     * @param $gemeenteNaam
3578
     * @param $sectie
3579
     * @param $perceelnummer
3580
     * @param $relatieCode
3581
     * @param $volgnummer
3582
     * @param $format
3583
     *
3584
     * @return \StdClass
3585
     */
3586 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...
3587
        $gemeenteCode,
3588
        $gemeenteNaam,
3589
        $sectie,
3590
        $perceelnummer,
3591
        $relatieCode,
3592
        $volgnummer,
3593
        $format
3594
    ) {
3595
        return $this->getAdapter()->call(
3596
            'kadasterUittrekselKadastraleKaartPerceelV2',
3597
            [
3598
                'gemeentecode'  => $gemeenteCode,
3599
                'gemeentenaam'  => $gemeenteNaam,
3600
                'sectie'        => $sectie,
3601
                'perceelnummer' => $perceelnummer,
3602
                'relatiecode'   => $relatieCode,
3603
                'volgnummer'    => $volgnummer,
3604
                'format'        => $format,
3605
            ]
3606
        );
3607
    }
3608
3609
    /**
3610
     * @param $gemeenteCode
3611
     * @param $gemeenteNaam
3612
     * @param $sectie
3613
     * @param $perceelnummer
3614
     * @param $relatieCode
3615
     * @param $volgnummer
3616
     * @param $format
3617
     *
3618
     * @return \StdClass
3619
     */
3620 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...
3621
        $gemeenteCode,
3622
        $gemeenteNaam,
3623
        $sectie,
3624
        $perceelnummer,
3625
        $relatieCode,
3626
        $volgnummer,
3627
        $format
3628
    ) {
3629
        return $this->getAdapter()->call(
3630
            'kadasterUittrekselKadastraleKaartPerceelV3',
3631
            [
3632
                'gemeentecode'  => $gemeenteCode,
3633
                'gemeentenaam'  => $gemeenteNaam,
3634
                'sectie'        => $sectie,
3635
                'perceelnummer' => $perceelnummer,
3636
                'relatiecode'   => $relatieCode,
3637
                'volgnummer'    => $volgnummer,
3638
                'format'        => $format,
3639
            ]
3640
        );
3641
    }
3642
3643
    /**
3644
     * @param $postcode
3645
     * @param $huisNummer
3646
     * @param $huisNummerToevoeging
3647
     * @param $format
3648
     *
3649
     * @return \StdClass
3650
     */
3651 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...
3652
    {
3653
        return $this->getAdapter()->call(
3654
            'kadasterUittrekselKadastraleKaartPostcode',
3655
            [
3656
                'postcode'              => $postcode,
3657
                'huisnummer'            => $huisNummer,
3658
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3659
                'format'                => $format,
3660
            ]
3661
        );
3662
    }
3663
3664
    /**
3665
     * @param $postcode
3666
     * @param $huisNummer
3667
     * @param $huisNummerToevoeging
3668
     * @param $format
3669
     *
3670
     * @return \StdClass
3671
     */
3672 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...
3673
    {
3674
        return $this->getAdapter()->call(
3675
            'kadasterUittrekselKadastraleKaartPostcodeV2',
3676
            [
3677
                'postcode'              => $postcode,
3678
                'huisnummer'            => $huisNummer,
3679
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3680
                'format'                => $format,
3681
            ]
3682
        );
3683
    }
3684
3685
    /**
3686
     * @param $postcode
3687
     * @param $huisNummer
3688
     * @param $huisNummerToevoeging
3689
     * @param $format
3690
     *
3691
     * @return \StdClass
3692
     */
3693 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...
3694
    {
3695
        return $this->getAdapter()->call(
3696
            'kadasterUittrekselKadastraleKaartPostcodeV3',
3697
            [
3698
                'postcode'              => $postcode,
3699
                'huisnummer'            => $huisNummer,
3700
                'huisnummer_toevoeging' => $huisNummerToevoeging,
3701
                'format'                => $format,
3702
            ]
3703
        );
3704
    }
3705
3706
    /**
3707
     * @return \StdClass
3708
     */
3709
    public function kadasterValueListGetMunicipalities()
3710
    {
3711
        return $this->getAdapter()->call('kadasterValueListGetMunicipalities', []);
3712
    }
3713
3714
    /**
3715
     * @return \StdClass
3716
     */
3717
    public function kadasterValueListGetRanges()
3718
    {
3719
        return $this->getAdapter()->call('kadasterValueListGetRanges', []);
3720
    }
3721
3722
    /**
3723
     * @param $dossierNumber
3724
     * @param $establishmentNumber
3725
     *
3726
     * @return \StdClass
3727
     */
3728
    public function kvkGetDossier($dossierNumber, $establishmentNumber)
3729
    {
3730
        return $this->getAdapter()->call(
3731
            'kvkGetDossier',
3732
            [
3733
                'dossier_number'       => $dossierNumber,
3734
                'establishment_number' => $establishmentNumber,
3735
            ]
3736
        );
3737
    }
3738
3739
    /**
3740
     * @param $dossierNumber
3741
     * @param $allowCaching
3742
     *
3743
     * @return \StdClass
3744
     */
3745
    public function kvkGetExtractDocument($dossierNumber, $allowCaching)
3746
    {
3747
        return $this->getAdapter()->call(
3748
            'kvkGetExtractDocument',
3749
            ['dossier_number' => $dossierNumber, 'allow_caching' => $allowCaching]
3750
        );
3751
    }
3752
3753
    /**
3754
     * @param $dossierNumber
3755
     * @param $establishmentNumber
3756
     * @param $rsinNumber
3757
     * @param $page
3758
     *
3759
     * @return \StdClass
3760
     */
3761 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...
3762
    {
3763
        return $this->getAdapter()->call(
3764
            'kvkSearchDossierNumber',
3765
            [
3766
                'dossier_number'       => $dossierNumber,
3767
                'establishment_number' => $establishmentNumber,
3768
                'rsin_number'          => $rsinNumber,
3769
                'page'                 => $page,
3770
            ]
3771
        );
3772
    }
3773
3774
    /**
3775
     * @param $tradeName
3776
     * @param $city
3777
     * @param $street
3778
     * @param $postcode
3779
     * @param $houseNumber
3780
     * @param $houseNumberAddition
3781
     * @param $telephoneNumber
3782
     * @param $domainName
3783
     * @param $strictSearch
3784
     * @param $page
3785
     *
3786
     * @return \StdClass
3787
     */
3788
    public function kvkSearchParameters(
3789
        $tradeName,
3790
        $city,
3791
        $street,
3792
        $postcode,
3793
        $houseNumber,
3794
        $houseNumberAddition,
3795
        $telephoneNumber,
3796
        $domainName,
3797
        $strictSearch,
3798
        $page
3799
    ) {
3800
        return $this->getAdapter()->call(
3801
            'kvkSearchParameters',
3802
            [
3803
                'trade_name'            => $tradeName,
3804
                'city'                  => $city,
3805
                'street'                => $street,
3806
                'postcode'              => $postcode,
3807
                'house_number'          => $houseNumber,
3808
                'house_number_addition' => $houseNumberAddition,
3809
                'telephone_number'      => $telephoneNumber,
3810
                'domain_name'           => $domainName,
3811
                'strict_search'         => $strictSearch,
3812
                'page'                  => $page,
3813
            ]
3814
        );
3815
    }
3816
3817
    /**
3818
     * @param $postcode
3819
     * @param $houseNumber
3820
     * @param $houseNumberAddition
3821
     * @param $page
3822
     *
3823
     * @return \StdClass
3824
     */
3825 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...
3826
    {
3827
        return $this->getAdapter()->call(
3828
            'kvkSearchPostcode',
3829
            [
3830
                'postcode'              => $postcode,
3831
                'house_number'          => $houseNumber,
3832
                'house_number_addition' => $houseNumberAddition,
3833
                'page'                  => $page,
3834
            ]
3835
        );
3836
    }
3837
3838
    /**
3839
     * @param $city
3840
     * @param $postcode
3841
     * @param $sbi
3842
     * @param $primarySbiOnly
3843
     * @param $legalForm
3844
     * @param $employeesMin
3845
     * @param $employeesMax
3846
     * @param $economicallyActive
3847
     * @param $financialStatus
3848
     * @param $changedSince
3849
     * @param $newSince
3850
     * @param $page
3851
     *
3852
     * @return \StdClass
3853
     */
3854 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...
3855
        $city,
3856
        $postcode,
3857
        $sbi,
3858
        $primarySbiOnly,
3859
        $legalForm,
3860
        $employeesMin,
3861
        $employeesMax,
3862
        $economicallyActive,
3863
        $financialStatus,
3864
        $changedSince,
3865
        $newSince,
3866
        $page
3867
    ) {
3868
        return $this->getAdapter()->call(
3869
            'kvkSearchSelection',
3870
            [
3871
                'city'                => $city,
3872
                'postcode'            => $postcode,
3873
                'sbi'                 => $sbi,
3874
                'primary_sbi_only'    => $primarySbiOnly,
3875
                'legal_form'          => $legalForm,
3876
                'employees_min'       => $employeesMin,
3877
                'employees_max'       => $employeesMax,
3878
                'economically_active' => $economicallyActive,
3879
                'financial_status'    => $financialStatus,
3880
                'changed_since'       => $changedSince,
3881
                'new_since'           => $newSince,
3882
                'page'                => $page,
3883
            ]
3884
        );
3885
    }
3886
3887
    /**
3888
     * @param $dossierNumber
3889
     * @param $establishmentNumber
3890
     *
3891
     * @return \StdClass
3892
     */
3893
    public function kvkUpdateAddDossier($dossierNumber, $establishmentNumber)
3894
    {
3895
        return $this->getAdapter()->call(
3896
            'kvkUpdateAddDossier',
3897
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
3898
        );
3899
    }
3900
3901
    /**
3902
     * @param $dossierNumber
3903
     * @param $establishmentNumber
3904
     * @param $updateTypes
3905
     *
3906
     * @return \StdClass
3907
     */
3908
    public function kvkUpdateCheckDossier($dossierNumber, $establishmentNumber, $updateTypes)
3909
    {
3910
        return $this->getAdapter()->call(
3911
            'kvkUpdateCheckDossier',
3912
            [
3913
                'dossier_number'       => $dossierNumber,
3914
                'establishment_number' => $establishmentNumber,
3915
                'update_types'         => $updateTypes,
3916
            ]
3917
        );
3918
    }
3919
3920
    /**
3921
     * @param $changedSince
3922
     * @param $updateTypes
3923
     * @param $page
3924
     *
3925
     * @return \StdClass
3926
     */
3927
    public function kvkUpdateGetChangedDossiers($changedSince, $updateTypes, $page)
3928
    {
3929
        return $this->getAdapter()->call(
3930
            'kvkUpdateGetChangedDossiers',
3931
            ['changed_since' => $changedSince, 'update_types' => $updateTypes, 'page' => $page]
3932
        );
3933
    }
3934
3935
    /**
3936
     * @param $updateTypes
3937
     * @param $page
3938
     *
3939
     * @return \StdClass
3940
     */
3941
    public function kvkUpdateGetDossiers($updateTypes, $page)
3942
    {
3943
        return $this->getAdapter()->call('kvkUpdateGetDossiers', ['update_types' => $updateTypes, 'page' => $page]);
3944
    }
3945
3946
    /**
3947
     * @param $dossierNumber
3948
     * @param $establishmentNumber
3949
     *
3950
     * @return \StdClass
3951
     */
3952
    public function kvkUpdateRemoveDossier($dossierNumber, $establishmentNumber)
3953
    {
3954
        return $this->getAdapter()->call(
3955
            'kvkUpdateRemoveDossier',
3956
            ['dossier_number' => $dossierNumber, 'establishment_number' => $establishmentNumber]
3957
        );
3958
    }
3959
3960
    /**
3961
     * Login.
3962
     *
3963
     * @param string $username
3964
     * @param string $password
3965
     *
3966
     * @return \StdClass
3967
     */
3968
    public function login($username, $password)
3969
    {
3970
        return $this->getAdapter()->call('login', ['username' => $username, 'password' => $password]);
3971
    }
3972
3973
    /**
3974
     * End the session of the current user.
3975
     */
3976
    public function logout()
3977
    {
3978
        return $this->getAdapter()->call('logout', []);
3979
    }
3980
3981
    /**
3982
     * @param $latitude
3983
     * @param $longitude
3984
     * @param $format
3985
     * @param $width
3986
     * @param $height
3987
     * @param $zoom
3988
     *
3989
     * @return \StdClass
3990
     */
3991
    public function mapViewInternationalLatLon($latitude, $longitude, $format, $width, $height, $zoom)
3992
    {
3993
        return $this->getAdapter()->call(
3994
            'mapViewInternationalLatLon',
3995
            [
3996
                'latitude'  => $latitude,
3997
                'longitude' => $longitude,
3998
                'format'    => $format,
3999
                'width'     => $width,
4000
                'height'    => $height,
4001
                'zoom'      => $zoom,
4002
            ]
4003
        );
4004
    }
4005
4006
    /**
4007
     * @param $centerLat
4008
     * @param $centerLon
4009
     * @param $extraLatLon
4010
     * @param $format
4011
     * @param $width
4012
     * @param $height
4013
     * @param $zoom
4014
     *
4015
     * @return \StdClass
4016
     */
4017
    public function mapViewLatLon($centerLat, $centerLon, $extraLatLon, $format, $width, $height, $zoom)
4018
    {
4019
        return $this->getAdapter()->call(
4020
            'mapViewLatLon',
4021
            [
4022
                'center_lat'   => $centerLat,
4023
                'center_lon'   => $centerLon,
4024
                'extra_latlon' => $extraLatLon,
4025
                'format'       => $format,
4026
                'width'        => $width,
4027
                'height'       => $height,
4028
                'zoom'         => $zoom,
4029
            ]
4030
        );
4031
    }
4032
4033
    /**
4034
     * @param $postcode
4035
     * @param $format
4036
     * @param $width
4037
     * @param $height
4038
     * @param $zoom
4039
     *
4040
     * @return \StdClass
4041
     */
4042
    public function mapViewPostcodeV2($postcode, $format, $width, $height, $zoom)
4043
    {
4044
        return $this->getAdapter()->call(
4045
            'mapViewPostcodeV2',
4046
            [
4047
                'postcode' => $postcode,
4048
                'format'   => $format,
4049
                'width'    => $width,
4050
                'height'   => $height,
4051
                'zoom'     => $zoom,
4052
            ]
4053
        );
4054
    }
4055
4056
    /**
4057
     * Returns a map in PNG or JPG format centered on the xy RD coordinate.
4058
     * The extra_xy parameter can be used to specify additional locations, the map is not centered or zoomed to
4059
     * automatically enclose these locations.
4060
     *
4061
     * @param int    $centerX The RD X component of the coordinate
4062
     * @param int    $centerY The RD Y component of the coordinate
4063
     * @param array  $extraXY Additional RDCoordinates, an <Patterns::{Type}Array> of type <RDCoordinates>
4064
     * @param string $format  Image format, PNG (default) or JPG
4065
     * @param int    $width   Width in pixels, domain [1 - 2048]
4066
     * @param int    $height  Height in pixels, domain [1 - 2048]
4067
     * @param float  $zoom    Scale in meters per pixel. See: <Zoom>
4068
     *
4069
     * @return \StdClass
4070
     */
4071
    public function mapViewRD($centerX, $centerY, $extraXY, $format, $width, $height, $zoom)
4072
    {
4073
        return $this->getAdapter()->call(
4074
            'mapViewRD',
4075
            [
4076
                'center_x' => $centerX,
4077
                'center_y' => $centerY,
4078
                'extra_xy' => $extraXY,
4079
                'format'   => $format,
4080
                'width'    => $width,
4081
                'height'   => $height,
4082
                'zoom'     => $zoom,
4083
            ]
4084
        );
4085
    }
4086
4087
    /**
4088
     * Returns a value estimate for the real estate at the specified address.
4089
     * The required parameters are: postcode, houseno and testing_date. The remaining parameters are retrieved from the
4090
     * Kadaster if available. If those parameters are specified in the request they override any Kadaster data, and will
4091
     * be used in the calculation of the value estimate. If no value estimate can be determined the response will be an
4092
     * error with error code (see <Error Handling::Error codes>) 'Server.Data.NotFound.Nbwo.EstimateUnavailable'.
4093
     * Type of houses:
4094
     * A -- Appartment
4095
     * H -- Corner house (Hoekwoning)
4096
     * K -- Semi detached house (Twee onder een kap)
4097
     * N -- Not a house
4098
     * O -- Unknown type of house
4099
     * T -- Townhouse (Tussingwoning)
4100
     * V -- Detached house (Vrijstaande woning).
4101
     *
4102
     * @param string $postcode             Postalcode
4103
     * @param int    $huisNummer           House number
4104
     * @param string $huisNummerToevoeging House number addition, may be left empty
4105
     * @param string $prijspeilDatum       Date for which the value should be determined, in the format Y-m-d
4106
     * @param string $woningtype           house type, may be empty
4107
     * @param int    $inhoud               Volume in cubic meters, may be empty (0)
4108
     * @param int    $grootte              Surface area of the parcel in square meters, may be empty (0)
4109
     *
4110
     * @return \StdClass
4111
     */
4112
    public function nbwoEstimateValue(
4113
        $postcode,
4114
        $huisNummer,
4115
        $huisNummerToevoeging,
4116
        $prijspeilDatum,
4117
        $woningtype,
4118
        $inhoud,
4119
        $grootte
4120
    ) {
4121
        return $this->getAdapter()->call(
4122
            'nbwoEstimateValue',
4123
            [
4124
                'postcode'              => $postcode,
4125
                'huisnummer'            => $huisNummer,
4126
                'huisnummer_toevoeging' => $huisNummerToevoeging,
4127
                'prijspeil_datum'       => $prijspeilDatum,
4128
                'woningtype'            => $woningtype,
4129
                'inhoud'                => $inhoud,
4130
                'grootte'               => $grootte,
4131
            ]
4132
        );
4133
    }
4134
4135
    /**
4136
     * @param $gender
4137
     * @param $initials
4138
     * @param $prefix
4139
     * @param $lastName
4140
     * @param $birthDate
4141
     * @param $street
4142
     * @param $houseNumber
4143
     * @param $houseNumberAddition
4144
     * @param $postcode
4145
     * @param $city
4146
     *
4147
     * @return \StdClass
4148
     */
4149 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...
4150
        $gender,
4151
        $initials,
4152
        $prefix,
4153
        $lastName,
4154
        $birthDate,
4155
        $street,
4156
        $houseNumber,
4157
        $houseNumberAddition,
4158
        $postcode,
4159
        $city
4160
    ) {
4161
        return $this->getAdapter()->call(
4162
            'riskCheckGetRiskPersonCompanyReport',
4163
            [
4164
                'gender'                => $gender,
4165
                'initials'              => $initials,
4166
                'prefix'                => $prefix,
4167
                'last_name'             => $lastName,
4168
                'birth_date'            => $birthDate,
4169
                'street'                => $street,
4170
                'house_number'          => $houseNumber,
4171
                'house_number_addition' => $houseNumberAddition,
4172
                'postcode'              => $postcode,
4173
                'city'                  => $city,
4174
            ]
4175
        );
4176
    }
4177
4178
    /**
4179
     * Returns a score indicating creditworthiness for a Dutch person, address and postcode area.
4180
     * The given parameters are used to search for a person.
4181
     *   The following fields are tried in the order listed, until a matching person is found:
4182
     *   1 - initials, name, postcode, house number
4183
     *   2 - initials, name, birth date
4184
     *   3 - postcode, house number, birth date
4185
     *   4 - account number, birth date
4186
     *   5 - phone number, birth date
4187
     *   6 - mobile number, birth date
4188
     *   7 - email, birth date
4189
     * For instance, if initials, postcode, house number and birth date are specified and a match is found on the
4190
     * fields
4191
     * listed under 1, birth date will be ignored. Scores for address and postcode are determined independent of the
4192
     * person details. Search fields are case-insensitive. Non-ASCII characters are mapped to the corresponding
4193
     * character without diacritical mark (e.g. an accented e is mapped to an 'e').
4194
     *
4195
     * @param string $gender              Gender of the person. M or F, may be empty.
4196
     * @param string $initials            The initials, mandatory.
4197
     * @param string $prefix              The surname prefix, like "van" or "de", may be empty.
4198
     * @param string $lastName            The last name of the person, mandatory.
4199
     * @param string $birthDate           Birth date in the format yyyy-mm-dd, may be empty.
4200
     * @param string $street              Street part of the address, may be empty.
4201
     * @param int    $houseNumber         House number, mandatory.
4202
     * @param string $houseNumberAddition Extension part of the house number, may be empty.
4203
     * @param string $postcode            Dutch postcode in the format 1234AB, mandatory.
4204
     * @param string $city                City, may be empty.
4205
     * @param string $accountNumber       Bank account number, only numeric characters, may be empty.
4206
     * @param string $phoneNumber         Home phone number, only numeric characters (e.g. 0201234567), may be empty
4207
     * @param string $mobileNumber        Mobile phone number, only numeric characters (e.g. 0612345678), may be empty
4208
     * @param string $email               Email address, may be empty.
4209
     * @param string $testingDate         Date for which the credit score should be determined, format Y-m-d, mandatory.
4210
     *
4211
     * @return \StdClass
4212
     */
4213
    public function riskCheckPerson(
4214
        $gender,
4215
        $initials,
4216
        $prefix,
4217
        $lastName,
4218
        $birthDate,
4219
        $street,
4220
        $houseNumber,
4221
        $houseNumberAddition,
4222
        $postcode,
4223
        $city,
4224
        $accountNumber,
4225
        $phoneNumber,
4226
        $mobileNumber,
4227
        $email,
4228
        $testingDate
4229
    ) {
4230
        return $this->getAdapter()->call(
4231
            'riskCheckPerson',
4232
            [
4233
                'gender'                => $gender,
4234
                'initials'              => $initials,
4235
                'prefix'                => $prefix,
4236
                'last_name'             => $lastName,
4237
                'birth_date'            => $birthDate,
4238
                'street'                => $street,
4239
                'house_number'          => $houseNumber,
4240
                'house_number_addition' => $houseNumberAddition,
4241
                'postcode'              => $postcode,
4242
                'city'                  => $city,
4243
                'account_number'        => $accountNumber,
4244
                'phone_number'          => $phoneNumber,
4245
                'mobile_number'         => $mobileNumber,
4246
                'email'                 => $email,
4247
                'testing_date'          => $testingDate,
4248
            ]
4249
        );
4250
    }
4251
4252
    /**
4253
     * Returns a description of the fastest route between two dutch postcodes.
4254
     * For every part of the route the drivetime in seconds and drivedistance in meters are given as well. The
4255
     * description is available in dutch and english, depending on the english parameter toggle.
4256
     *
4257
     * @param string $postcodeFrom Postcode at the start of the route
4258
     * @param string $postcodeTo   Postcode at the end of the route
4259
     * @param bool   $english      Whether to returns the description in english (true) or Dutch (false)
4260
     *
4261
     * @return \StdClass
4262
     */
4263
    public function routePlannerDescription($postcodeFrom, $postcodeTo, $english)
4264
    {
4265
        return $this->getAdapter()->call(
4266
            'routePlannerDescription',
4267
            [
4268
                'postcodefrom' => $postcodeFrom,
4269
                'postcodeto'   => $postcodeTo,
4270
                'english'      => $english,
4271
            ]
4272
        );
4273
    }
4274
4275
    /**
4276
     * Returns a description of the route calculated between two addresses.
4277
     * For every part of the route the drive time and drive distance are given. The description is available in several
4278
     * languages controlled by the language parameter. The fastest, most economic or shortest route can be calculated.
4279
     *
4280
     * @param string $routeType    Type of route to calculate, 'fastest', 'shortest' or 'economic'
4281
     * @param string $toPostalCode Start address postal code
4282
     * @param string $fromHouseNo  Start address house number
4283
     * @param string $fromStreet   Start address street
4284
     * @param string $fromCity     Start address city
4285
     * @param string $fromCountry  Start country (ISO3, ISO2 or Full-Text)
4286
     * @param string $toPostalcode Destination address postal code
4287
     * @param string $toHouseNo    Destination address house-number
4288
     * @param string $toStreet     Destination address street
4289
     * @param string $toCity       Destination address city
4290
     * @param string $toCountry    Destination country (ISO3, ISO2 or Full-Text)
4291
     * @param string $language     'danish', 'dutch', 'english', 'french', 'german' or 'italian'
4292
     *
4293
     * @return \StdClass
4294
     */
4295
    public function routePlannerDescriptionAddress(
4296
        $routeType,
4297
        $toPostalCode,
4298
        $fromHouseNo,
4299
        $fromStreet,
4300
        $fromCity,
4301
        $fromCountry,
4302
        $toPostalcode,
4303
        $toHouseNo,
4304
        $toStreet,
4305
        $toCity,
4306
        $toCountry,
4307
        $language
4308
    ) {
4309
        return $this->getAdapter()->call(
4310
            'routePlannerDescriptionAddress',
4311
            [
4312
                'routetype'       => $routeType,
4313
                'from_postalcode' => $toPostalCode,
4314
                'from_houseno'    => $fromHouseNo,
4315
                'from_street'     => $fromStreet,
4316
                'from_city'       => $fromCity,
4317
                'from_country'    => $fromCountry,
4318
                'to_postalcode'   => $toPostalcode,
4319
                'to_houseno'      => $toHouseNo,
4320
                'to_street'       => $toStreet,
4321
                'to_city'         => $toCity,
4322
                'to_country'      => $toCountry,
4323
                'language'        => $language,
4324
            ]
4325
        );
4326
    }
4327
4328
    /**
4329
     * Returns a description of the route between two dutch postcodes, including the RD coordinates along the route.
4330
     * For every part of the route the drive time in seconds and drive distance in meters are given as well.
4331
     * The route type can be shortest, economic or fastest. By default the fastest route will be calculated.
4332
     * The description is available in dutch and english, depending on the english parameter toggle.
4333
     *
4334
     * @param string $postcodeFrom Postcode at the start of the route
4335
     * @param string $postcodeTo   Postcode at the end of the route
4336
     * @param string $routeType    Type of route to calculate: 'fastest', 'shortest' or 'economic'
4337
     * @param bool   $english      Whether to returns the description in english (true) or dutch (false)
4338
     *
4339
     * @return \StdClass <RouteDescriptionCoordinatesRD> entry.
4340
     */
4341
    public function routePlannerDescriptionCoordinatesRD($postcodeFrom, $postcodeTo, $routeType, $english)
4342
    {
4343
        return $this->getAdapter()->call(
4344
            'routePlannerDescriptionCoordinatesRD',
4345
            [
4346
                'postcodefrom' => $postcodeFrom,
4347
                'postcodeto'   => $postcodeTo,
4348
                'routetype'    => $routeType,
4349
                'english'      => $english,
4350
            ]
4351
        );
4352
    }
4353
4354
    /**
4355
     * Returns a description of the route calculated between two dutch addresses.
4356
     * For every part of the route the drive time and drive distance are given as well. The description is available in
4357
     * several languages depending on the language parameter. The fastest, most economic or shortest route can be
4358
     * calculated.
4359
     *
4360
     * @param string $routeType      Type of route to calculate, 'fastest', 'shortest' or 'economic'
4361
     * @param string $fromPostalCode Start address postal code
4362
     * @param string $fromHousNo     Start address house number
4363
     * @param string $fromStreet     Start address street
4364
     * @param string $fromCity       Start address city
4365
     * @param string $toPostalCode   Destination address postal code
4366
     * @param string $toHousNo       Destination address house-number
4367
     * @param string $toStreet       Destination address street
4368
     * @param string $toCity         Destination address city
4369
     * @param string $language       Language description: 'danish', 'dutch', 'english', 'french', 'german' or 'italian'
4370
     *
4371
     * @return \StdClass <Patterns::{Type}Array> of <RoutePart> entries
4372
     */
4373 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...
4374
        $routeType,
4375
        $fromPostalCode,
4376
        $fromHousNo,
4377
        $fromStreet,
4378
        $fromCity,
4379
        $toPostalCode,
4380
        $toHousNo,
4381
        $toStreet,
4382
        $toCity,
4383
        $language
4384
    ) {
4385
        return $this->getAdapter()->call(
4386
            'routePlannerDescriptionDutchAddress',
4387
            [
4388
                'routetype'       => $routeType,
4389
                'from_postalcode' => $fromPostalCode,
4390
                'from_housno'     => $fromHousNo,
4391
                'from_street'     => $fromStreet,
4392
                'from_city'       => $fromCity,
4393
                'to_postalcode'   => $toPostalCode,
4394
                'to_housno'       => $toHousNo,
4395
                'to_street'       => $toStreet,
4396
                'to_city'         => $toCity,
4397
                'language'        => $language,
4398
            ]
4399
        );
4400
    }
4401
4402
    /**
4403
     * @param $postcodeFrom
4404
     * @param $postcodeTo
4405
     * @param $english
4406
     *
4407
     * @return \StdClass
4408
     */
4409
    public function routePlannerDescriptionShortest($postcodeFrom, $postcodeTo, $english)
4410
    {
4411
        return $this->getAdapter()->call(
4412
            'routePlannerDescriptionShortest',
4413
            ['postcodefrom' => $postcodeFrom, 'postcodeto' => $postcodeTo, 'english' => $english]
4414
        );
4415
    }
4416
4417
    /**
4418
     * Returns a description of the route between two latitude/longitude coordinates in Europe.
4419
     * For every part of the route the drive time and drive distance are given as well. The description is available in
4420
     * several languages depending on the language parameter. The fastest, economic or shortest route is calculated.
4421
     *
4422
     * @param float  $latitudeFrom  Latitude of the start of the route
4423
     * @param float  $longitudeFrom Longitude of the start of the route
4424
     * @param float  $latitudeTo    Latitude of the end of the route
4425
     * @param float  $longitudeTo   Longitude of the end of the route
4426
     * @param float  $routeType     Type of route to calculate: 'fastest', 'shortest' or 'economic'
4427
     * @param string $language      'danish', 'dutch', 'english', 'french', 'german', 'italian' or 'swedish'
4428
     *
4429
     * @return \StdClass <Patterns::{Type}Array> of <RoutePart> entries.
4430
     */
4431
    public function routePlannerEUDescription(
4432
        $latitudeFrom,
4433
        $longitudeFrom,
4434
        $latitudeTo,
4435
        $longitudeTo,
4436
        $routeType,
4437
        $language
4438
    ) {
4439
        return $this->getAdapter()->call(
4440
            'routePlannerEUDescription',
4441
            [
4442
                'latitudefrom'  => (float)$latitudeFrom,
4443
                'longitudefrom' => (float)$longitudeFrom,
4444
                'latitudeto'    => (float)$latitudeTo,
4445
                'longitudeto'   => (float)$longitudeTo,
4446
                'routetype'     => (float)$routeType,
4447
                'language'      => $language,
4448
            ]
4449
        );
4450
    }
4451
4452
    /**
4453
     * @param $latitudeFrom
4454
     * @param $longitudeFrom
4455
     * @param $latitudeTo
4456
     * @param $longitudeTo
4457
     * @param $routeType
4458
     * @param $language
4459
     *
4460
     * @return \StdClass
4461
     */
4462 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...
4463
        $latitudeFrom,
4464
        $longitudeFrom,
4465
        $latitudeTo,
4466
        $longitudeTo,
4467
        $routeType,
4468
        $language
4469
    ) {
4470
        return $this->getAdapter()->call(
4471
            'routePlannerEUDescriptionCoordinatesLatLon',
4472
            [
4473
                'latitudefrom'  => $latitudeFrom,
4474
                'longitudefrom' => $longitudeFrom,
4475
                'latitudeto'    => $latitudeTo,
4476
                'longitudeto'   => $longitudeTo,
4477
                'routetype'     => $routeType,
4478
                'language'      => $language,
4479
            ]
4480
        );
4481
    }
4482
4483
    /**
4484
     * @param $latitudeFrom
4485
     * @param $longitudeFrom
4486
     * @param $latitudeTo
4487
     * @param $longitudeTo
4488
     * @param $routeType
4489
     *
4490
     * @return \StdClass
4491
     */
4492 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...
4493
        $latitudeFrom,
4494
        $longitudeFrom,
4495
        $latitudeTo,
4496
        $longitudeTo,
4497
        $routeType
4498
    ) {
4499
        return $this->getAdapter()->call(
4500
            'routePlannerEUInformation',
4501
            [
4502
                'latitudefrom'  => $latitudeFrom,
4503
                'longitudefrom' => $longitudeFrom,
4504
                'latitudeto'    => $latitudeTo,
4505
                'longitudeto'   => $longitudeTo,
4506
                'routetype'     => $routeType,
4507
            ]
4508
        );
4509
    }
4510
4511
    /**
4512
     * @param $latitudeFrom
4513
     * @param $longitudeFrom
4514
     * @param $latitudeTo
4515
     * @param $longitudeTo
4516
     * @param $routeType
4517
     * @param $language
4518
     * @param $format
4519
     * @param $width
4520
     * @param $height
4521
     * @param $view
4522
     *
4523
     * @return \StdClass
4524
     */
4525
    public function routePlannerEUMap(
4526
        $latitudeFrom,
4527
        $longitudeFrom,
4528
        $latitudeTo,
4529
        $longitudeTo,
4530
        $routeType,
4531
        $language,
4532
        $format,
4533
        $width,
4534
        $height,
4535
        $view
4536
    ) {
4537
        return $this->getAdapter()->call(
4538
            'routePlannerEUMap',
4539
            [
4540
                'latitudefrom'  => $latitudeFrom,
4541
                'longitudefrom' => $longitudeFrom,
4542
                'latitudeto'    => $latitudeTo,
4543
                'longitudeto'   => $longitudeTo,
4544
                'routetype'     => $routeType,
4545
                'language'      => $language,
4546
                'format'        => $format,
4547
                'width'         => $width,
4548
                'height'        => $height,
4549
                'view'          => $view,
4550
            ]
4551
        );
4552
    }
4553
4554
    /**
4555
     * @param $startPostcode
4556
     * @param $startHouseNumber
4557
     * @param $startHouseNumberAddition
4558
     * @param $startStreet
4559
     * @param $startCity
4560
     * @param $startCountry
4561
     * @param $destinationPostcode
4562
     * @param $destinationHouseNumber
4563
     * @param $destinationHouseNumberAddition
4564
     * @param $destinationStreet
4565
     * @param $destinationCity
4566
     * @param $destinationCountry
4567
     * @param $routeType
4568
     * @param $language
4569
     *
4570
     * @return \StdClass
4571
     */
4572
    public function routePlannerGetRoute(
4573
        $startPostcode,
4574
        $startHouseNumber,
4575
        $startHouseNumberAddition,
4576
        $startStreet,
4577
        $startCity,
4578
        $startCountry,
4579
        $destinationPostcode,
4580
        $destinationHouseNumber,
4581
        $destinationHouseNumberAddition,
4582
        $destinationStreet,
4583
        $destinationCity,
4584
        $destinationCountry,
4585
        $routeType,
4586
        $language
4587
    ) {
4588
        return $this->getAdapter()->call(
4589
            'routePlannerGetRoute',
4590
            [
4591
                'start_postcode'                    => $startPostcode,
4592
                'start_house_number'                => $startHouseNumber,
4593
                'start_house_number_addition'       => $startHouseNumberAddition,
4594
                'start_street'                      => $startStreet,
4595
                'start_city'                        => $startCity,
4596
                'start_country'                     => $startCountry,
4597
                'destination_postcode'              => $destinationPostcode,
4598
                'destination_house_number'          => $destinationHouseNumber,
4599
                'destination_house_number_addition' => $destinationHouseNumberAddition,
4600
                'destination_street'                => $destinationStreet,
4601
                'destination_city'                  => $destinationCity,
4602
                'destination_country'               => $destinationCountry,
4603
                'route_type'                        => $routeType,
4604
                'language'                          => $language,
4605
            ]
4606
        );
4607
    }
4608
4609
    /**
4610
     * @param $postcodeFrom
4611
     * @param $postcodeTo
4612
     * @param $routeType
4613
     *
4614
     * @return \StdClass
4615
     */
4616
    public function routePlannerInformation($postcodeFrom, $postcodeTo, $routeType)
4617
    {
4618
        return $this->getAdapter()->call(
4619
            'routePlannerInformation',
4620
            [
4621
                'postcodefrom' => $postcodeFrom,
4622
                'postcodeto'   => $postcodeTo,
4623
                'routetype'    => $routeType,
4624
            ]
4625
        );
4626
    }
4627
4628
    /**
4629
     * @param $routeType
4630
     * @param $fromPostalCode
4631
     * @param $fromHouseNo
4632
     * @param $fromStreet
4633
     * @param $fromCity
4634
     * @param $fromCountry
4635
     * @param $toPostalCode
4636
     * @param $toHouseNo
4637
     * @param $toStreet
4638
     * @param $toCity
4639
     * @param $toCountry
4640
     *
4641
     * @return \StdClass
4642
     */
4643 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...
4644
        $routeType,
4645
        $fromPostalCode,
4646
        $fromHouseNo,
4647
        $fromStreet,
4648
        $fromCity,
4649
        $fromCountry,
4650
        $toPostalCode,
4651
        $toHouseNo,
4652
        $toStreet,
4653
        $toCity,
4654
        $toCountry
4655
    ) {
4656
        return $this->getAdapter()->call(
4657
            'routePlannerInformationAddress',
4658
            [
4659
                'routetype'       => $routeType,
4660
                'from_postalcode' => $fromPostalCode,
4661
                'from_houseno'    => $fromHouseNo,
4662
                'from_street'     => $fromStreet,
4663
                'from_city'       => $fromCity,
4664
                'from_country'    => $fromCountry,
4665
                'to_postalcode'   => $toPostalCode,
4666
                'to_houseno'      => $toHouseNo,
4667
                'to_street'       => $toStreet,
4668
                'to_city'         => $toCity,
4669
                'to_country'      => $toCountry,
4670
            ]
4671
        );
4672
    }
4673
4674
    /**
4675
     * @param $routeType
4676
     * @param $toPostalCode
4677
     * @param $fromHousNo
4678
     * @param $fromStreet
4679
     * @param $fromCity
4680
     * @param $toPostalcode
4681
     * @param $toHousNo
4682
     * @param $toStreet
4683
     * @param $toCity
4684
     *
4685
     * @return \StdClass
4686
     */
4687 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...
4688
        $routeType,
4689
        $toPostalCode,
4690
        $fromHousNo,
4691
        $fromStreet,
4692
        $fromCity,
4693
        $toPostalcode,
4694
        $toHousNo,
4695
        $toStreet,
4696
        $toCity
4697
    ) {
4698
        return $this->getAdapter()->call(
4699
            'routePlannerInformationDutchAddress',
4700
            [
4701
                'routetype'       => $routeType,
4702
                'from_postalcode' => $toPostalCode,
4703
                'from_housno'     => $fromHousNo,
4704
                'from_street'     => $fromStreet,
4705
                'from_city'       => $fromCity,
4706
                'to_postalcode'   => $toPostalcode,
4707
                'to_housno'       => $toHousNo,
4708
                'to_street'       => $toStreet,
4709
                'to_city'         => $toCity,
4710
            ]
4711
        );
4712
    }
4713
4714
    /**
4715
     * @param $xfrom
4716
     * @param $yfrom
4717
     * @param $xto
4718
     * @param $yto
4719
     * @param $routeType
4720
     * @param $english
4721
     *
4722
     * @return \StdClass
4723
     */
4724 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...
4725
    {
4726
        return $this->getAdapter()->call(
4727
            'routePlannerRDDescription',
4728
            [
4729
                'xfrom'     => $xfrom,
4730
                'yfrom'     => $yfrom,
4731
                'xto'       => $xto,
4732
                'yto'       => $yto,
4733
                'routetype' => $routeType,
4734
                'english'   => $english,
4735
            ]
4736
        );
4737
    }
4738
4739
    /**
4740
     * @param $xfrom
4741
     * @param $yfrom
4742
     * @param $xto
4743
     * @param $yto
4744
     * @param $routeType
4745
     * @param $english
4746
     *
4747
     * @return \StdClass
4748
     */
4749 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...
4750
    {
4751
        return $this->getAdapter()->call(
4752
            'routePlannerRDDescriptionCoordinatesRD',
4753
            [
4754
                'xfrom'     => $xfrom,
4755
                'yfrom'     => $yfrom,
4756
                'xto'       => $xto,
4757
                'yto'       => $yto,
4758
                'routetype' => $routeType,
4759
                'english'   => $english,
4760
            ]
4761
        );
4762
    }
4763
4764
    /**
4765
     * @param $xfrom
4766
     * @param $yfrom
4767
     * @param $xto
4768
     * @param $yto
4769
     * @param $routeType
4770
     *
4771
     * @return \StdClass
4772
     */
4773 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...
4774
    {
4775
        return $this->getAdapter()->call(
4776
            'routePlannerRDInformation',
4777
            [
4778
                'xfrom'     => $xfrom,
4779
                'yfrom'     => $yfrom,
4780
                'xto'       => $xto,
4781
                'yto'       => $yto,
4782
                'routetype' => $routeType,
4783
            ]
4784
        );
4785
    }
4786
4787
    /**
4788
     * @param $bban
4789
     * @param $countryIso
4790
     *
4791
     * @return \StdClass
4792
     */
4793
    public function sepaConvertBasicBankAccountNumber($bban, $countryIso)
4794
    {
4795
        return $this->getAdapter()->call(
4796
            'sepaConvertBasicBankAccountNumber',
4797
            ['bban' => $bban, 'country_iso' => $countryIso]
4798
        );
4799
    }
4800
4801
    /**
4802
     * @param $iban
4803
     *
4804
     * @return \StdClass
4805
     */
4806
    public function sepaValidateInternationalBankAccountNumberFormat($iban)
4807
    {
4808
        return $this->getAdapter()->call('sepaValidateInternationalBankAccountNumberFormat', ['iban' => $iban]);
4809
    }
4810
4811
    /**
4812
     * Add a user to a group. A user can use <userListAssignableGroups> to view the groups that can be assigned.
4813
     *
4814
     * @param int $userId      User ID of the user to add to the group, use 0 for the current user
4815
     * @param int $userGroupId User Group ID of the group to add the user to
4816
     *
4817
     * @return \StdClass
4818
     */
4819
    public function userAddGroup($userId, $userGroupId)
4820
    {
4821
        return $this->getAdapter()->call('userAddGroup', ['userid' => $userId, 'usergroupid' => $userGroupId]);
4822
    }
4823
4824
    /**
4825
     * @param int    $userId
4826
     * @param string $oldPassword
4827
     * @param string $newPassword
4828
     *
4829
     * @return \StdClass
4830
     */
4831
    public function userChangePassword($userId, $oldPassword, $newPassword)
4832
    {
4833
        return $this->getAdapter()->call(
4834
            'userChangePassword',
4835
            [
4836
                'userid'       => $userId,
4837
                'old_password' => $oldPassword,
4838
                'new_password' => $newPassword,
4839
            ]
4840
        );
4841
    }
4842
4843
    /**
4844
     * Create a user, assign it to groups and send it an activation mail.
4845
     * Together with the activation email, this is the only time the password is plainly visible.
4846
     *
4847
     * @param int    $accountId    Account ID to assign this user to
4848
     * @param string $nickname     Nickname to use for this user, leave empty to to create a random nickname. All users
4849
     *                             get a prefix set by <Account::Username prefix>
4850
     * @param string $password     Password to use for authentication, leave empty for a strong random password.
4851
     * @param array  $userGroups   array of usergroup IDs to assign this user to. See <userListAssignableGroups> for
4852
     *                             list
4853
     * @param string $email        Registration email address, used for activation
4854
     * @param string $companyName  Name of the company using this user, if any
4855
     * @param string $address      Address of the company using this user, if any
4856
     * @param string $contactName  Name of the contact person responsible for this user
4857
     * @param string $contactEmail This field is not used and is ignored by the method.
4858
     * @param string $telephone    Telephone number of the contact person responsible for this user
4859
     * @param string $fax          Fax number of the contact person responsible for this user.
4860
     * @param string $clientCode   Deprecated, should contain an empty string
4861
     * @param string $comments     Comments on the user, can only be seen and edited by <Group::Account admins>
4862
     *
4863
     * @link http://webview.webservices.nl/documentation/files/service_accounting-class-php.html#Accounting.userCreateV2
4864
     * @return \StdClass
4865
     */
4866
    public function userCreateV2(
4867
        $accountId,
4868
        $nickname,
4869
        $password,
4870
        $userGroups,
4871
        $email,
4872
        $companyName,
4873
        $address,
4874
        $contactName,
4875
        $contactEmail,
4876
        $telephone,
4877
        $fax,
4878
        $clientCode,
4879
        $comments
4880
    ) {
4881
        return $this->getAdapter()->call(
4882
            'userCreateV2',
4883
            [
4884
                'accountid'    => $accountId,
4885
                'nickname'     => $nickname,
4886
                'password'     => $password,
4887
                'usergroups'   => $userGroups,
4888
                'email'        => $email,
4889
                'companyname'  => $companyName,
4890
                'address'      => $address,
4891
                'contactname'  => $contactName,
4892
                'contactemail' => $contactEmail,
4893
                'telephone'    => $telephone,
4894
                'fax'          => $fax,
4895
                'clientcode'   => $clientCode,
4896
                'comments'     => $comments,
4897
            ]
4898
        );
4899
    }
4900
4901
    /**
4902
     * Change the user's balance.
4903
     *
4904
     * @param int $userId  ID of the user to edit the balance of, use 0 for the current user
4905
     * @param int $balance Amount of balance to add to (or remove from, if negative) the user
4906
     *
4907
     * @return \StdClass
4908
     */
4909
    public function userEditBalance($userId, $balance)
4910
    {
4911
        return $this->getAdapter()->call('userEditBalance', ['userid' => $userId, 'balance' => $balance]);
4912
    }
4913
4914
    /**
4915
     * Edit the complete profile of a user.
4916
     * This method is only available to <Group::Account admins>. <Group::Account users> can use <userEditV2>
4917
     * to change some part of the profile.
4918
     *
4919
     * @param int    $userId                 User ID of the user to edit, use 0 for the current user
4920
     * @param string $nickname               Nickname to use for this user. All users get a prefix set by
4921
     *                                       <Account::Username prefix>.
4922
     * @param string $password               new password for this user. To keep the current password pass the empty
4923
     *                                       string.
4924
     * @param string $email                  Registration email address, used for activation.
4925
     * @param string $companyName            Name of the company using this user, if any.
4926
     * @param string $address                Address of the company using this user, if any
4927
     * @param string $contactName            Name of the contact person responsible for this user
4928
     * @param string $contactEmail           Telephone number of the contact person responsible for this user
4929
     * @param string $telephone              Telephone number of the contact person responsible for this user
4930
     * @param string $fax                    Fax number of the contact person responsible for this user.
4931
     * @param string $clientCode             Deprecated, shoud contain an empty string
4932
     * @param string $comments               Comments on the user, can only be seen and edited by <Group::Account
4933
     *                                       admins>.
4934
     * @param int    $accountId              accountID to assign user to, use 0 for current account. Only usable by
4935
     *                                       <Group::Admins>
4936
     * @param int    $balanceThreshold       Balance threshold to alert user, 0 to disable.
4937
     * @param string $notificationRecipients Recipients of balance alert notification:
4938
     *                                       'accountcontact' = contact account contact, 'user' = contact user,
4939
     *                                       'accountcontact_and_user' = both
4940
     *
4941
     * @return \StdClass
4942
     */
4943
    public function userEditExtendedV2(
4944
        $userId,
4945
        $nickname,
4946
        $password,
4947
        $email,
4948
        $companyName,
4949
        $address,
4950
        $contactName,
4951
        $contactEmail,
4952
        $telephone,
4953
        $fax,
4954
        $clientCode,
4955
        $comments,
4956
        $accountId,
4957
        $balanceThreshold,
4958
        $notificationRecipients
4959
    ) {
4960
        return $this->getAdapter()->call('userEditExtendedV2', [
4961
            $userId,
4962
            $nickname,
4963
            $password,
4964
            $email,
4965
            $companyName,
4966
            $address,
4967
            $contactName,
4968
            $contactEmail,
4969
            $telephone,
4970
            $fax,
4971
            $clientCode,
4972
            $comments,
4973
            $accountId,
4974
            $balanceThreshold,
4975
            $notificationRecipients,
4976
        ]);
4977
    }
4978
4979
    /**
4980
     * Set host restrictions for the user.
4981
     *
4982
     * @param int    $userId
4983
     * @param string $restrictions string with host restrictions separated by semi colons (;)
4984
     *
4985
     * @return \stdClass
4986
     */
4987
    public function userEditHostRestrictions($userId, $restrictions)
4988
    {
4989
        return $this->getAdapter()->call(
4990
            'userEditHostRestrictions',
4991
            ['userid' => $userId, 'restrictions' => $restrictions]
4992
        );
4993
    }
4994
4995
    /**
4996
     * List all groups that the current user can assign to the target user.
4997
     * This list contains both assigned and unassigned groups.
4998
     *
4999
     * @param int $userId User ID of the user to target, use 0 for the current user
5000
     * @param int $page   Page to retrieve, pages start counting at 1
5001
     *
5002
     * @return \StdClass
5003
     */
5004
    public function userListAssignableGroups($userId, $page)
5005
    {
5006
        return $this->getAdapter()->call('userListAssignableGroups', ['userid' => $userId, 'page' => $page]);
5007
    }
5008
5009
    /**
5010
     * Send a notification email to a user with a new password. This method is part of the <User::Creation> process.
5011
     *
5012
     * @param int    $userId   User ID of the user to notify, use 0 for the current user
5013
     * @param string $password Password to use for authentication, leave empty for a strong random password.
5014
     *
5015
     * @return \StdClass
5016
     */
5017
    public function userNotify($userId, $password)
5018
    {
5019
        return $this->getAdapter()->call('userNotify', ['userid' => $userId, 'password' => $password]);
5020
    }
5021
5022
    /**
5023
     * @param int $userId
5024
     *
5025
     * @return \StdClass
5026
     */
5027
    public function userRemove($userId)
5028
    {
5029
        return $this->getAdapter()->call('userRemove', ['userid' => $userId]);
5030
    }
5031
5032
    /**
5033
     * Remove a user from a group. A user can use <userViewV2> to view the groups that are currently assigned to user.
5034
     *
5035
     * @param int $userId      - User ID of the user to remove from the group, use 0 for the current user
5036
     * @param int $userGroupId - User Group ID of the group to remove the user from
5037
     *
5038
     * @return \StdClass
5039
     */
5040
    public function userRemoveGroup($userId, $userGroupId)
5041
    {
5042
        return $this->getAdapter()->call('userRemoveGroup', ['userid' => $userId, 'usergroupid' => $userGroupId]);
5043
    }
5044
5045
    /**
5046
     * Lists all the current valid <User::Sessions> of a <User>.
5047
     *
5048
     * @param int $userId User ID of the user to view, use 0 for the current user
5049
     * @param int $page   Page to retrieve, pages start counting at 1
5050
     *
5051
     * @return \StdClass <Patterns::{Type}PagedResult> of <Session> entries
5052
     */
5053
    public function userSessionList($userId, $page)
5054
    {
5055
        return $this->getAdapter()->call('userSessionList', ['userid' => $userId, 'page' => $page]);
5056
    }
5057
5058
    /**
5059
     * Remove all or one <User::Session> of a <User>.
5060
     *
5061
     * @param int $userId  ID of the user to view, use 0 for the current user
5062
     * @param int $reactId Session ID to remove, use 0 to remove all sessions
5063
     *
5064
     * @return \StdClass
5065
     */
5066
    public function userSessionRemove($userId, $reactId)
5067
    {
5068
        return $this->getAdapter()->call('userSessionRemove', ['userid' => $userId, 'reactid' => $reactId]);
5069
    }
5070
5071
    /**
5072
     * Returns the users balance.
5073
     * If the user is in the 'autoassign' user group, he is not restricted by his balance. In that case, he can still do
5074
     * method calls even though his balance amount is zero. If the user is not in the 'autoassign' user group, the user
5075
     * can spend his own balance amount, but not more.
5076
     *
5077
     * @param int $userId ID of the user to view the balance of, use 0 for the current user
5078
     *
5079
     * @return int
5080
     */
5081
    public function userViewBalance($userId)
5082
    {
5083
        return $this->getAdapter()->call('userViewBalance', ['userid' => $userId]);
5084
    }
5085
5086
    /**
5087
     * View host restrictions for the user.
5088
     *
5089
     * @param int $userId User ID of the user, use 0 for the current user
5090
     *
5091
     * @return string String containing all restrictions, separated by  semi colons
5092
     */
5093
    public function userViewHostRestrictions($userId)
5094
    {
5095
        return $this->getAdapter()->call('userViewHostRestrictions', ['userid' => $userId]);
5096
    }
5097
5098
    /**
5099
     * View the profile of a user.
5100
     *
5101
     * @param int $userId Id of the user to view, use 0 for the current user
5102
     *
5103
     * @return array
5104
     */
5105
    public function userViewV2($userId = 0)
5106
    {
5107
        return $this->getAdapter()->call('userViewV2', ['userid' => $userId]);
5108
    }
5109
5110
    /**
5111
     * @param $vatNumber
5112
     *
5113
     * @return \StdClass
5114
     */
5115
    public function vatValidate($vatNumber)
5116
    {
5117
        return $this->getAdapter()->call('vatValidate', ['vat_number' => $vatNumber]);
5118
    }
5119
5120
    /**
5121
     * @param $vatNumber
5122
     *
5123
     * @return \StdClass
5124
     */
5125
    public function vatViesProxyCheckVat($vatNumber)
5126
    {
5127
        return $this->getAdapter()->call('vatViesProxyCheckVat', ['vat_number' => $vatNumber]);
5128
    }
5129
}
5130