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   11 use Moops -strict;
  2         3  
  2         71  
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   5704 class WebService::Intercom::Tag types WebService::Intercom::Types {
  2     2   60  
  2     2   13  
  2         4  
  2         145  
  2         8  
  2         3  
  2         18  
  2         520  
  2         4  
  2         13  
  2         109  
  2         4  
  2         89  
  2         9  
  2         3  
  2         164  
  2         72  
  2         9  
  2         3  
  2         19  
  2         11619  
  2         6  
  2         16  
  2         862  
  2         4  
  2         24  
  2         247  
  2         3  
  2         20  
  2         138  
  2         3  
  2         24  
  2         393  
  2         2  
  2         15  
  2         1710  
  2         4  
  2         17  
  2         6721  
  2         7  
  2         85  
  2         8  
  2         3  
  2         56  
  2         9  
  2         2  
  2         90  
  2         8  
  2         3  
  2         249  
  2         16  
  2         6278  
54 2         24 has 'type' => (is => 'ro');
55 2         1296 has 'id' => (is => 'ro', isa => Str);
56 2         700 has 'name' => (is => 'rw', isa => Str);
57 2         992 has 'intercom' => (is => 'ro', isa => InstanceOf["WebService::Intercom"], required => 1);
58            
59 2 0   2   3085 method save() {
  2 0   0   4  
  2         180  
  2         1008  
  0            
  0            
  0            
60 0           $self->intercom->tag_create_or_update($self);
61             }
62            
63 2 0   2   1851 method delete() {
  2 0   0   3  
  2         174  
  2         347  
  0            
  0            
  0            
64 0           $self->intercom->tag_delete($self);
65             }
66             };
67              
68             1;