line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Fixflo::LandlordProperty; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::Fixflo::LandlordProperty |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A class for a fixflo landlord property, extends L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
16
|
|
|
16
|
|
101
|
use strict; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
435
|
|
14
|
16
|
|
|
16
|
|
71
|
use warnings; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
329
|
|
15
|
|
|
|
|
|
|
|
16
|
16
|
|
|
16
|
|
69
|
use Moo; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
73
|
|
17
|
16
|
|
|
16
|
|
4724
|
use Business::Fixflo::Exception; |
|
16
|
|
|
|
|
41
|
|
|
16
|
|
|
|
|
796
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
extends 'Business::Fixflo::Resource'; |
20
|
|
|
|
|
|
|
|
21
|
16
|
|
|
16
|
|
120
|
use Business::Fixflo::Property; |
|
16
|
|
|
|
|
37
|
|
|
16
|
|
|
|
|
495
|
|
22
|
16
|
|
|
16
|
|
107
|
use Business::Fixflo::Address; |
|
16
|
|
|
|
|
51
|
|
|
16
|
|
|
|
|
370
|
|
23
|
16
|
|
|
16
|
|
79
|
use Business::Fixflo::Landlord; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
472
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Id |
28
|
|
|
|
|
|
|
CompanyName |
29
|
|
|
|
|
|
|
Title |
30
|
|
|
|
|
|
|
FirstName |
31
|
|
|
|
|
|
|
Surname |
32
|
|
|
|
|
|
|
EmailAddress |
33
|
|
|
|
|
|
|
ContactNumber |
34
|
|
|
|
|
|
|
ContactNumberAlt |
35
|
|
|
|
|
|
|
DisplayName |
36
|
|
|
|
|
|
|
WorksAuthorisationLimit |
37
|
|
|
|
|
|
|
EmailCC |
38
|
|
|
|
|
|
|
IsDeleted |
39
|
|
|
|
|
|
|
ExternalRef |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
16
|
|
|
16
|
|
115
|
use Carp qw/ confess /; |
|
16
|
|
|
|
|
44
|
|
|
16
|
|
|
|
|
4957
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has [ qw/ |
46
|
|
|
|
|
|
|
Id |
47
|
|
|
|
|
|
|
LandlordId |
48
|
|
|
|
|
|
|
PropertyId |
49
|
|
|
|
|
|
|
DateFrom |
50
|
|
|
|
|
|
|
DateTo |
51
|
|
|
|
|
|
|
Address |
52
|
|
|
|
|
|
|
/ ] => ( |
53
|
|
|
|
|
|
|
is => 'rw', |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 Operations on a landlord address |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 create |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Creates a landlord property in the Fixflo API |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 update |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Updates a landlord property in the Fixflo API - will throw an exception if the Id |
65
|
|
|
|
|
|
|
is not set |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 property |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Returns the property as a L object |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 address |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Returns the address as a L object |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 landlord |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Returns the landlord as a L object |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub create { |
82
|
5
|
|
|
5
|
1
|
51
|
my ( $self,$update ) = @_; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
$self->SUPER::_create( $update,'LandlordProperty',sub { |
85
|
3
|
|
|
3
|
|
7
|
my ( $self ) = @_; |
86
|
|
|
|
|
|
|
|
87
|
3
|
100
|
|
|
|
9
|
$self->Id or $self->Id( undef ); # force Id of null in JSON |
88
|
3
|
|
|
|
|
10
|
return { $self->to_hash }; |
89
|
5
|
|
|
|
|
30
|
} ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub property { |
93
|
1
|
|
|
1
|
1
|
4
|
my ( $self ) = @_; |
94
|
|
|
|
|
|
|
|
95
|
1
|
|
|
|
|
12
|
my $Property = Business::Fixflo::Property->new( |
96
|
|
|
|
|
|
|
client => $self->client, |
97
|
|
|
|
|
|
|
Id => $self->PropertyId, |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
|
100
|
1
|
|
|
|
|
12
|
return $Property->get; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub address { |
104
|
1
|
|
|
1
|
1
|
3
|
my ( $self ) = @_; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
return Business::Fixflo::Address->new( |
107
|
|
|
|
|
|
|
client => $self->client, |
108
|
1
|
|
|
|
|
5
|
%{ $self->Address }, |
|
1
|
|
|
|
|
10
|
|
109
|
|
|
|
|
|
|
); |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub landlord { |
113
|
1
|
|
|
1
|
1
|
453
|
my ( $self ) = @_; |
114
|
|
|
|
|
|
|
|
115
|
1
|
|
|
|
|
12
|
my $Landlord = Business::Fixflo::Landlord->new( |
116
|
|
|
|
|
|
|
client => $self->client, |
117
|
|
|
|
|
|
|
Id => $self->LandlordId, |
118
|
|
|
|
|
|
|
); |
119
|
|
|
|
|
|
|
|
120
|
1
|
|
|
|
|
13
|
return $Landlord->get; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# vim: ts=4:sw=4:et |