File Coverage

lib/WebService/Intercom/Tag.pm
Criterion Covered Total %
statement 68 76 89.4
branch 0 8 0.0
condition n/a
subroutine 6 8 75.0
pod n/a
total 74 92 80.4


line stmt bran cond sub pod time code
1 2     2   9 use Moops -strict;
  2         4  
  2         17  
2              
3             # ABSTRACT: represents a tag
4              
5             =pod
6              
7             =head1 NAME
8              
9             WebService::Intercom::Tag - represent a tag
10              
11             =head1 SYNOPSIS
12              
13             my $user = $intercom->user_get(email => 'test@example.com');
14              
15             # Add a tag to a user
16             my $tag = $user->tag('test tag');
17              
18             =head1 DESCRIPTION
19              
20             Provides an object that represents a tag at Intercom.
21              
22             =head2 ATTRIBUTES
23              
24             Tags are defined at L<http://doc.intercom.io/api/#tags>
25              
26             =over
27              
28             =item type
29              
30             =item id
31              
32             =item name
33              
34             =item intercom - the WebService::Intercom object that created this user object
35              
36             =back
37              
38             =head2 METHODS
39              
40             =over
41              
42             =item save() - save any changes made to this tag back to
43             Intercom.io, returns a new WebService::Intercom::Tag object with the
44             updated tag.
45              
46             =item delete() - delete this tag at Intercom.io
47              
48             =back
49              
50             =cut
51              
52              
53 2     2   6123 class WebService::Intercom::Tag types WebService::Intercom::Types {
  2     2   48  
  2     2   12  
  2         4  
  2         202  
  2         12  
  2         3  
  2         18  
  2         585  
  2         4  
  2         13  
  2         106  
  2         4  
  2         96  
  2         10  
  2         4  
  2         162  
  2         115  
  2         11  
  2         4  
  2         21  
  2         11705  
  2         4  
  2         15  
  2         1158  
  2         3  
  2         48  
  2         233  
  2         2  
  2         20  
  2         208  
  2         3  
  2         26  
  2         474  
  2         4  
  2         21  
  2         2275  
  2         4  
  2         19  
  2         7062  
  2         6  
  2         96  
  2         10  
  2         6  
  2         73  
  2         9  
  2         2  
  2         93  
  2         8  
  2         3  
  2         275  
  2         18  
  2         6347  
54 2         25 has 'type' => (is => 'ro');
55 2         1373 has 'id' => (is => 'ro', isa => Str);
56 2         690 has 'name' => (is => 'rw', isa => Str);
57 2         1112 has 'intercom' => (is => 'ro', isa => InstanceOf["WebService::Intercom"], required => 1);
58            
59 2 0   2   3788 method save() {
  2 0   0   7  
  2         184  
  2         1143  
  0            
  0            
  0            
60 0           $self->intercom->tag_create_or_update($self);
61             }
62            
63 2 0   2   1995 method delete() {
  2 0   0   4  
  2         173  
  2         367  
  0            
  0            
  0            
64 0           $self->intercom->tag_delete($self);
65             }
66             };
67              
68             1;