File Coverage

blib/lib/WebService/KvKAPI/BasicProfile.pm
Criterion Covered Total %
statement 31 31 100.0
branch 4 4 100.0
condition n/a
subroutine 10 10 100.0
pod 4 4 100.0
total 49 49 100.0


line stmt bran cond sub pod time code
1 2     2   143530 use utf8;
  2         44  
  2         10  
2             package WebService::KvKAPI::BasicProfile;
3             our $VERSION = '0.103';
4             # ABSTRACT: Instance of OpenAPI client for Basisprofiel API of the KvK.
5              
6 2     2   141 use v5.26;
  2         8  
7 2     2   907 use Object::Pad;
  2         17405  
  2         9  
8 2     2   947 use WebService::KvKAPI::Formatters qw(format_kvk_number);
  2         4  
  2         182  
9              
10 2     2   724 class WebService::KvKAPI::BasicProfile does WebService::KvKAPI::Roles::OpenAPI;
  2         6  
  2         134  
11              
12 6     6 1 23822 method get_basic_profile {
13 6         13 my ($kvk, $geo) = @_;
14 6         18 return $self->_api_call('getBasisprofielByKvkNummer', $kvk, $geo);
15             }
16              
17 2     2 1 5728 method get_owner {
18 2         6 my ($kvk, $geo) = @_;
19 2         11 return $self->_api_call('getEigenaar', $kvk, $geo);
20             }
21              
22 2     2 1 5590 method get_main_location {
23 2         7 my ($kvk, $geo) = @_;
24 2         5 return $self->_api_call('getHoofdvestiging', $kvk, $geo);
25             }
26              
27 1     1 1 2968 method get_locations {
28 1         3 my $kvk = shift;
29 1         3 return $self->_api_call('getVestigingen', $kvk);
30             }
31              
32 11     11   20 method _api_call {
33 11         24 my ($op, $kvk, $geo) = @_;
34 11         31 $kvk = format_kvk_number($kvk);
35 11 100       30 $geo = $geo ? 1 : 0;
36 11 100       40 return $self->api_call(
37             $op,
38             kvkNummer => $kvk,
39             $geo ? (geoData => $geo) : (),
40             );
41             }
42              
43              
44             1;
45              
46             =pod
47              
48             =encoding UTF-8
49              
50             =head1 NAME
51              
52             WebService::KvKAPI::BasicProfile - Instance of OpenAPI client for Basisprofiel API of the KvK.
53              
54             =head1 VERSION
55              
56             version 0.103
57              
58             =head1 AUTHOR
59              
60             Wesley Schwengle
61              
62             =head1 COPYRIGHT AND LICENSE
63              
64             This software is Copyright (c) 2018 by Mintlab / Zaaksysteem.nl.
65              
66             This is free software, licensed under:
67              
68             The European Union Public License (EUPL) v1.1
69              
70             =cut
71              
72             __DATA__