File Coverage

blib/lib/Business/Monzo/Address.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 1 2 50.0
total 29 30 96.6


line stmt bran cond sub pod time code
1             package Business::Monzo::Address;
2              
3             =head1 NAME
4              
5             Business::Monzo::Address
6              
7             =head1 DESCRIPTION
8              
9             A class for a Monzo address, extends L<Business::Monzo::Resource>
10              
11             =cut
12              
13 10     10   77 use strict;
  10         26  
  10         349  
14 10     10   56 use warnings;
  10         34  
  10         319  
15              
16 10     10   56 use Moo;
  10         19  
  10         84  
17             extends 'Business::Monzo::Resource';
18             with 'Business::Monzo::Utils';
19              
20 10     10   3745 use Types::Standard qw/ :all /;
  10         24  
  10         71  
21 10     10   438251 use Business::Monzo::Address;
  10         33  
  10         340  
22 10     10   61 use Business::Monzo::Exception;
  10         23  
  10         1622  
23              
24             =head1 ATTRIBUTES
25              
26             The Address class has the following attributes (with their type).
27              
28             address (Str)
29             city (Str)
30             country (Str)
31             postcode (Str)
32             region (Str)
33             longitude (Num)
34             latitude (Num)
35              
36             =cut
37              
38             has [ qw/ address city country postcode region / ] => (
39             is => 'ro',
40             isa => Str,
41             );
42              
43             has [ qw/ latitude longitude / ] => (
44             is => 'ro',
45             isa => Num,
46             );
47              
48             =head1 Operations on an address
49              
50             None at present
51              
52             =cut
53              
54             sub url {
55 1     1 0 889 Business::Monzo::Exception->throw({
56             message => "Monzo API does not currently support getting address data",
57             });
58             }
59              
60             sub get {
61 1     1 1 1018 Business::Monzo::Exception->throw({
62             message => "Monzo API does not currently support getting address data",
63             });
64             }
65              
66             =head1 SEE ALSO
67              
68             L<Business::Monzo>
69              
70             L<Business::Monzo::Resource>
71              
72             =head1 AUTHOR
73              
74             Lee Johnson - C<leejo@cpan.org>
75              
76             =head1 LICENSE
77              
78             This library is free software; you can redistribute it and/or modify it under
79             the same terms as Perl itself. If you would like to contribute documentation,
80             features, bug fixes, or anything else then please raise an issue / pull request:
81              
82             https://github.com/leejo/business-monzo
83              
84             =cut
85              
86             1;
87              
88             # vim: ts=4:sw=4:et