line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::BigDoor::NamedTransactionGroup; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1857
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
7
|
|
|
|
|
|
|
#use Smart::Comments -ENV; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use base qw(WWW::BigDoor::Resource Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1015
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__PACKAGE__->follow_best_practice; |
12
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( |
13
|
|
|
|
|
|
|
qw(id read_only end_user_cap end_user_cap_interval non_secure challenge_response_enabled urls named_transactions) |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub execute_transaction { |
17
|
1
|
|
|
1
|
1
|
23072
|
my ( $self, $end_user_login, $payload, $client ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
9
|
unless ( defined $self->get_id ) { |
20
|
0
|
|
|
|
|
0
|
croak 'TransactionGroup should have ID - save before execution'; |
21
|
|
|
|
|
|
|
} |
22
|
1
|
|
|
|
|
25
|
my $ep = $self->_end_point; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
5
|
my $result = $client->POST( sprintf( '%s/%s/execute/%s', $ep, $self->get_id, $end_user_login ), |
25
|
|
|
|
|
|
|
{format => 'json'}, $payload ); |
26
|
1
|
|
|
|
|
9
|
return $result; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |