« lib/WebService/Braintree/TransactionGateway.pm
↑ Summary
lib/WebService/Braintree/PaymentMethodGateway.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||||||||||||
| 2 | |||||||||||||
| 3 | package # hide from pause | ||||||||||||
| 4 | WebService::Braintree::TransactionLineItemGateway; | ||||||||||||
| 5 | |||||||||||||
| 6 | 22 | ▶ | use 5.010_001; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 22 | ▶ | use strictures 1; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 22 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 22 | with 'WebService::Braintree::Role::MakeRequest'; | |||||||||||
| 11 | |||||||||||||
| 12 | 22 | ▶ | use Carp qw(confess); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 22 | ▶ | use Scalar::Util qw(blessed); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 22 | ▶ | use WebService::Braintree::Util qw(validate_id); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | |||||||||||||
| 17 | 22 | ▶ | use WebService::Braintree::_::TransactionLineItem; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 18 | |||||||||||||
| 19 | 0 | ▶ | sub find_all { | ||||||||||
|
Subroutine
find_all: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||
| 20 | 0 | my ($self, $id) = @_; | |||||||||||
| 21 | 0 | ▶ | confess "NotFoundError" unless validate_id($id); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 22 | 0 | my $response = $self->_make_raw_request( | |||||||||||
| 23 | "/transactions/${id}/line_items", 'get', undef, | ||||||||||||
| 24 | ); | ||||||||||||
| 25 | 0 | ▶ | return $response if blessed($response); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 26 | return ( | ||||||||||||
| 27 | map { | ||||||||||||
| 28 | 0 | WebService::Braintree::_::TransactionLineItem->new($_); | |||||||||||
| 29 | 0 | ▶ | } @{$response->{line_items} // []} | ||||||||||
|
Condition0%0/2
$response->{"line_items"} // []
MC/DC0%0/1
$response->{"line_items"} // []
$response->{"line_items"}
Truth table0%0/2
A
A= $response->{"line_items"}
| |||||||||||||
| 30 | ); | ||||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 22 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 34 | |||||||||||||
| 35 | 22 | 1; | |||||||||||
| 36 | __END__ | ||||||||||||