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   12 use Moops -strict;
  2         5  
  2         31  
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   7177 class WebService::Intercom::Tag types WebService::Intercom::Types {
  2     2   69  
  2     2   16  
  2         4  
  2         155  
  2         12  
  2         3  
  2         20  
  2         729  
  2         5  
  2         17  
  2         138  
  2         3  
  2         115  
  2         13  
  2         4  
  2         220  
  2         81  
  2         14  
  2         3  
  2         23  
  2         14257  
  2         6  
  2         19  
  2         977  
  2         4  
  2         18  
  2         290  
  2         5  
  2         32  
  2         183  
  2         10  
  2         28  
  2         509  
  2         4  
  2         20  
  2         2131  
  2         5  
  2         22  
  2         7688  
  2         7  
  2         111  
  2         10  
  2         9  
  2         78  
  2         11  
  2         4  
  2         126  
  2         16  
  2         3  
  2         321  
  2         20  
  2         8025  
54 2         29 has 'type' => (is => 'ro');
55 2         1549 has 'id' => (is => 'ro', isa => Str);
56 2         820 has 'name' => (is => 'rw', isa => Str);
57 2         1416 has 'intercom' => (is => 'ro', isa => InstanceOf["WebService::Intercom"], required => 1);
58            
59 2 0   2   3829 method save() {
  2 0   0   4  
  2         240  
  2         1319  
  0            
  0            
  0            
60 0           $self->intercom->tag_create_or_update($self);
61             }
62            
63 2 0   2   2353 method delete() {
  2 0   0   4  
  2         210  
  2         483  
  0            
  0            
  0            
64 0           $self->intercom->tag_delete($self);
65             }
66             };
67              
68             1;