File Coverage

blib/lib/Paymill/REST/Item/Webhook.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Paymill::REST::Item::Webhook;
2              
3 9     9   6508 use Moose;
  9         81  
  9         74  
4 9     9   62140 use MooseX::Types::DateTime::ButMaintained qw(DateTime);
  9         24  
  9         114  
5 9     9   18278 use MooseX::Types::URI qw(Uri);
  9         28  
  9         121  
6 9     9   21661 use MooseX::Types::Email qw(EmailAddress);
  9         1682164  
  9         234  
7              
8             with 'Paymill::REST::Operations::Delete';
9              
10             has _factory => (is => 'ro', isa => 'Object');
11              
12             has id => (is => 'ro', isa => 'Str');
13             has url => (is => 'ro', isa => Uri, coerce => 1);
14             has email => (is => 'ro', isa => EmailAddress);
15             has livemode => (is => 'ro', isa => 'Bool');
16             has event_types => (is => 'ro', isa => 'ArrayRef[Str]');
17             has app_id => (is => 'ro', isa => 'Undef|Str');
18              
19 9     9   21457 no Moose;
  9         59  
  9         238  
20             1;
21             __END__
22              
23             =encoding utf-8
24              
25             =head1 NAME
26              
27             Paymill::REST::Item::Webhook - Item class for a webhook
28              
29             =head1 SYNOPSIS
30              
31             my $webhook_api = Paymill::REST::Webhooks->new;
32             $webhook = $webhook_api->find('hook_lk2j34h5lk34h5lkjh2');
33              
34             say $webhook->url; # Prints the URL of the webhook
35              
36             =head1 DESCRIPTION
37              
38             Represents a webhook with all attributes.
39              
40             =head1 ATTRIBUTES
41              
42             =over 4
43              
44             =item id
45              
46             String containing the identifier of the webhook
47              
48             =item url
49              
50             L<Uri> object of the webhook's URL
51              
52             =item email
53              
54             String containing the webhook's e-mail address
55              
56             =item livemode
57              
58             Boolean indicating whether this webhook is for livemode events
59              
60             =item event_types
61              
62             Array of event types this webhook is subscribed to
63              
64             =item app_id
65              
66             String representing the app id that created this webhook
67              
68             =back
69              
70             =head1 AVAILABLE OPERATIONS
71              
72             =over 4
73              
74             =item delete
75              
76             L<Paymill::REST::Operations::Delete>
77              
78             =back
79              
80             =head1 SEE ALSO
81              
82             L<Paymill::REST> for more documentation.
83              
84             =head1 AUTHOR
85              
86             Matthias Dietrich E<lt>perl@rainboxx.deE<gt>
87              
88             =head1 COPYRIGHT
89              
90             Copyright 2013 - Matthias Dietrich
91              
92             =head1 LICENSE
93              
94             This library is free software; you can redistribute it and/or modify
95             it under the same terms as Perl itself.