File Coverage

File:lib/WWW/Google/Contacts/Type/Organization.pm
Coverage:100.0%

linestmtbrancondsubpodtimecode
1package WWW::Google::Contacts::Type::Organization;
2
3
12
12
12
93
50
99
use Moose;
4
12
12
12
130
35
109
use MooseX::Types::Moose qw( Str );
5
12
12
12
126
39
98
use WWW::Google::Contacts::InternalTypes qw( Rel XmlBool );
6
12
12
12
123
40
92
use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField;
7
8extends 'WWW::Google::Contacts::Type::Base';
9
10with 'WWW::Google::Contacts::Roles::HasTypeAndLabel' => {
11    valid_types => [ qw( work ) ],
12};
13
14has department => (
15    isa => Str,
16    is => 'rw',
17    traits => [ 'XmlField' ],
18    xml_key => 'gd:orgDepartment',
19    predicate => 'has_department',
20    is_element => 1,
21);
22
23has job_description => (
24    isa => Str,
25    is => 'rw',
26    traits => [ 'XmlField' ],
27    xml_key => 'gd:orgJobDescription',
28    predicate => 'has_job_description',
29    is_element => 1,
30);
31
32has name => (
33    isa => Str,
34    is => 'rw',
35    traits => [ 'XmlField' ],
36    xml_key => 'gd:orgName',
37    predicate => 'has_name',
38    is_element => 1,
39);
40
41has symbol => (
42    isa => Str,
43    is => 'rw',
44    traits => [ 'XmlField' ],
45    xml_key => 'gd:orgSymbol',
46    predicate => 'has_symbol',
47    is_element => 1,
48);
49
50has title => (
51    isa => Str,
52    is => 'rw',
53    traits => [ 'XmlField' ],
54    xml_key => 'gd:orgTitle',
55    predicate => 'has_title',
56    is_element => 1,
57);
58
59has primary => (
60    isa => XmlBool,
61    is => 'rw',
62    traits => [ 'XmlField' ],
63    predicate => 'has_primary',
64    xml_key => 'primary',
65    to_xml => sub { my $val = shift; return "true" if $val == 1; return "false" },
66    default => sub { 0 },
67    coerce => 1,
68);
69
70has where => (
71    isa => Str,
72    is => 'rw',
73    traits => [ 'XmlField' ],
74    xml_key => 'gd:where',
75    predicate => 'has_where',
76    is_element => 1,
77);
78
79
12
12
12
118
36
94
no Moose;
80__PACKAGE__->meta->make_immutable;
811;