Braintree/Gateway.pm

filter: Statementstmt 94.4% 34 / 36 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod n/a totaltotal 95.8% 46 / 48 CC 1 SCAR 0.2
CC
1
Cov
94%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Braintree/TransparentRedirectGateway.pm ↑ Summary Braintree.pm »
1 package Net::Braintree::Gateway;
2  
3 1 ▶use Net::Braintree::AddressGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Net::Braintree::ClientTokenGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Net::Braintree::CreditCardGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Net::Braintree::CreditCardVerificationGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Net::Braintree::CustomerGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Net::Braintree::MerchantAccountGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Net::Braintree::PaymentMethodGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Net::Braintree::PayPalAccountGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Net::Braintree::SettlementBatchSummaryGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Net::Braintree::SubscriptionGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Net::Braintree::TransactionGateway;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 0 ▶use Net::Braintree::TransparentRedirectGateway;
Subroutine BEGIN: called CC=1 SCAR=2.6
15 use Net::Braintree::WebhookNotificationGateway;
16 use Net::Braintree::WebhookTestingGateway;
17  
18 use Moose;
19  
20 has 'config' => (is => 'ro');
21  
22 has 'address' => (is => 'ro', lazy => 1, default => sub {
23 my $self = shift;
24 Net::Braintree::AddressGateway->new(gateway => $self);
25 });
26  
27 has 'client_token' => (is => 'ro', lazy => 1, default => sub {
28 my $self = shift;
29 Net::Braintree::ClientTokenGateway->new(gateway => $self);
30 });
31  
32 has 'credit_card' => (is => 'ro', lazy => 1, default => sub {
33 my $self = shift;
34 Net::Braintree::CreditCardGateway->new(gateway => $self);
35 });
36  
37 has 'credit_card_verification' => (is => 'ro', lazy => 1, default => sub {
38 my $self = shift;
39 Net::Braintree::CreditCardVerificationGateway->new(gateway => $self);
40 });
41  
42 has 'customer' => (is => 'ro', lazy => 1, default => sub {
43 my $self = shift;
44 Net::Braintree::CustomerGateway->new(gateway => $self);
45 });
46  
47 has 'merchant_account' => (is => 'ro', lazy => 1, default => sub {
48 my $self = shift;
49 Net::Braintree::MerchantAccountGateway->new(gateway => $self);
50 });
51  
52 has 'payment_method' => (is => 'ro', lazy => 1, default => sub {
53 my $self = shift;
54 Net::Braintree::PaymentMethodGateway->new(gateway => $self);
55 });
56  
57 has 'paypal_account' => (is => 'ro', lazy => 1, default => sub {
58 my $self = shift;
59 Net::Braintree::PayPalAccountGateway->new(gateway => $self);
60 });
61  
62 has 'settlement_batch_summary' => (is => 'ro', lazy => 1, default => sub {
63 my $self = shift;
64 Net::Braintree::SettlementBatchSummaryGateway->new(gateway => $self);
65 });
66  
67 has 'subscription' => (is => 'ro', lazy => 1, default => sub {
68 my $self = shift;
69 Net::Braintree::SubscriptionGateway->new(gateway => $self);
70 });
71  
72 has 'transaction' => (is => 'ro', lazy => 1, default => sub {
73 my $self = shift;
74 Net::Braintree::TransactionGateway->new(gateway => $self);
75 });
76  
77 has 'transparent_redirect' => (is => 'ro', lazy => 1, default => sub {
78 my $self = shift;
79 Net::Braintree::TransparentRedirectGateway->new(gateway => $self);
80 });
81  
82 has 'webhook_notification' => (is => 'ro', lazy => 1, default => sub {
83 my $self = shift;
84 Net::Braintree::WebhookNotificationGateway->new(gateway => $self);
85 });
86  
87 has 'webhook_testing' => (is => 'ro', lazy => 1, default => sub {
88 my $self = shift;
89 Net::Braintree::WebhookTestingGateway->new(gateway => $self);
90 });
91  
92 sub http {
93 Net::Braintree::HTTP->new(config => shift->config);
94 }
95  
96 1;
« Braintree/TransparentRedirectGateway.pm ↑ Summary Braintree.pm »