line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Fixflo::Landlord; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::Fixflo::Landlord |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A class for a fixflo landlord, extends L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
16
|
|
|
16
|
|
120
|
use strict; |
|
16
|
|
|
|
|
55
|
|
|
16
|
|
|
|
|
585
|
|
14
|
16
|
|
|
16
|
|
187
|
use warnings; |
|
16
|
|
|
|
|
46
|
|
|
16
|
|
|
|
|
479
|
|
15
|
|
|
|
|
|
|
|
16
|
16
|
|
|
16
|
|
88
|
use Moo; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
108
|
|
17
|
16
|
|
|
16
|
|
5824
|
use Business::Fixflo::Exception; |
|
16
|
|
|
|
|
80
|
|
|
16
|
|
|
|
|
946
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
extends 'Business::Fixflo::Resource'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Id |
24
|
|
|
|
|
|
|
CompanyName |
25
|
|
|
|
|
|
|
Title |
26
|
|
|
|
|
|
|
FirstName |
27
|
|
|
|
|
|
|
Surname |
28
|
|
|
|
|
|
|
EmailAddress |
29
|
|
|
|
|
|
|
ContactNumber |
30
|
|
|
|
|
|
|
ContactNumberAlt |
31
|
|
|
|
|
|
|
DisplayName |
32
|
|
|
|
|
|
|
WorksAuthorisationLimit |
33
|
|
|
|
|
|
|
EmailCC |
34
|
|
|
|
|
|
|
IsDeleted |
35
|
|
|
|
|
|
|
ExternalRef |
36
|
|
|
|
|
|
|
UpdateDate |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
16
|
|
|
16
|
|
133
|
use Carp qw/ confess /; |
|
16
|
|
|
|
|
75
|
|
|
16
|
|
|
|
|
4373
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has [ qw/ |
43
|
|
|
|
|
|
|
Id |
44
|
|
|
|
|
|
|
CompanyName |
45
|
|
|
|
|
|
|
Title |
46
|
|
|
|
|
|
|
FirstName |
47
|
|
|
|
|
|
|
Surname |
48
|
|
|
|
|
|
|
EmailAddress |
49
|
|
|
|
|
|
|
ContactNumber |
50
|
|
|
|
|
|
|
ContactNumberAlt |
51
|
|
|
|
|
|
|
DisplayName |
52
|
|
|
|
|
|
|
WorksAuthorisationLimit |
53
|
|
|
|
|
|
|
EmailCC |
54
|
|
|
|
|
|
|
IsDeleted |
55
|
|
|
|
|
|
|
ExternalRef |
56
|
|
|
|
|
|
|
UpdateDate |
57
|
|
|
|
|
|
|
/ ] => ( |
58
|
|
|
|
|
|
|
is => 'rw', |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has 'Properties' => ( |
62
|
|
|
|
|
|
|
is => 'rw', |
63
|
|
|
|
|
|
|
lazy => 1, |
64
|
|
|
|
|
|
|
default => sub { |
65
|
|
|
|
|
|
|
shift->_paginated_items( 'Landlord','LandlordProperties','Property' ); |
66
|
|
|
|
|
|
|
}, |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub create { |
70
|
5
|
|
|
5
|
0
|
65
|
my ( $self,$update ) = @_; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
$self->SUPER::_create( $update,'Landlord',sub { |
73
|
3
|
|
|
3
|
|
7
|
my ( $self ) = @_; |
74
|
|
|
|
|
|
|
|
75
|
3
|
100
|
|
|
|
12
|
$self->Id or $self->Id( undef ); # force Id of null in JSON |
76
|
3
|
|
|
|
|
15
|
return { $self->to_hash }; |
77
|
5
|
|
|
|
|
39
|
} ); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
1; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
# vim: ts=4:sw=4:et |