line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Salesforce::Message::Notification; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4845
|
use Moo; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
568
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'notification_element' => ( is => 'ro', required => 1 ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'id' => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
lazy => 1, |
13
|
|
|
|
|
|
|
default => sub { |
14
|
|
|
|
|
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
return $self->notification_element->getChildrenByTagName( 'Id' )->[0] |
16
|
|
|
|
|
|
|
->textContent; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has 'sobject' => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
lazy => 1, |
23
|
|
|
|
|
|
|
default => sub { |
24
|
|
|
|
|
|
|
my $self = shift; |
25
|
|
|
|
|
|
|
return $self->notification_element->getChildrenByTagName( 'sObject' )->[0]; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'object_type' => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
lazy => 1, |
32
|
|
|
|
|
|
|
default => sub { |
33
|
|
|
|
|
|
|
my $self = shift; |
34
|
|
|
|
|
|
|
my ( $ns, $type ) = |
35
|
|
|
|
|
|
|
split( ':', $self->sobject->getAttribute( 'xsi:type' ) ); |
36
|
|
|
|
|
|
|
return $type; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
has 'attrs' => ( |
41
|
|
|
|
|
|
|
is => 'ro', |
42
|
|
|
|
|
|
|
lazy => 1, |
43
|
|
|
|
|
|
|
default => sub { |
44
|
|
|
|
|
|
|
my $self = shift; |
45
|
|
|
|
|
|
|
my @childnodes = $self->sobject->childNodes(); |
46
|
|
|
|
|
|
|
return [ |
47
|
|
|
|
|
|
|
map { $_->localname } |
48
|
|
|
|
|
|
|
grep { $_->isa( 'XML::LibXML::Element' ) } @childnodes |
49
|
|
|
|
|
|
|
]; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub get { |
55
|
|
|
|
|
|
|
my ( $self, $attr ) = @_; |
56
|
|
|
|
|
|
|
return $self->sobject->findnodes( "./sf:$attr" )->[0]->textContent; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |