Braintree/CreditCard.pm

filter: Statementstmt 61.0% 36 / 59 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 11 / 22 Podpod 0.0% 0 / 11 totaltotal 50.0% 47 / 94 CC 2 SCAR 6.3
CC
2
Cov
59%
BUILD
6.0
create
2.0
delete
2.0
CRAP 1.9
« Braintree/Address.pm ↑ Summary Braintree/PaymentMethod.pm »
1 package Net::Braintree::CreditCard;
2 1 ▶use Net::Braintree::CreditCard::CardType;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Net::Braintree::CreditCard::Location;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Net::Braintree::CreditCard::Prepaid;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Net::Braintree::CreditCard::Debit;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Net::Braintree::CreditCard::Payroll;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Net::Braintree::CreditCard::Healthcare;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Net::Braintree::CreditCard::DurbinRegulated;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Net::Braintree::CreditCard::Commercial;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Net::Braintree::CreditCard::CountryOfIssuance;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Net::Braintree::CreditCard::IssuingBank;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 extends 'Net::Braintree::PaymentMethod';
15  
16 1 my $meta = __PACKAGE__->meta;
17  
18 0 ▶sub BUILD {
Subroutine BUILD: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my ($self, $attributes) = @_;
20 0 $meta->add_attribute('billing_address', is => 'rw');
21 0 ▶ $self->billing_address(Net::Braintree::Address->new($attributes->{billing_address})) if ref($attributes->{billing_address}) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $attributes->{"billing_address"} eq "HASH" 0 0 0
22 0 delete($attributes->{billing_address});
23 0 $self->set_attributes_from_hash($self, $attributes);
24 }
25  
26 0 ▶sub create {
Subroutine create: not called CC=1 SCAR=6.9
Pod undocumented
27 0 my ($class, $params) = @_;
28 0 $class->gateway->credit_card->create($params);
29 }
30  
31 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod undocumented
32 0 my ($class, $token) = @_;
33 0 $class->gateway->credit_card->delete($token);
34 }
35  
36 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod undocumented
37 0 my($class, $token, $params) = @_;
38 0 $class->gateway->credit_card->update($token, $params);
39 }
40  
41 0 ▶sub find {
Subroutine find: not called CC=1 SCAR=6.9
Pod undocumented
42 0 my ($class, $token) = @_;
43 0 $class->gateway->credit_card->find($token);
44 }
45  
46 0 ▶sub from_nonce {
Subroutine from_nonce: not called CC=1 SCAR=6.9
Pod undocumented
47 0 my ($class, $nonce) = @_;
48 0 $class->gateway->credit_card->from_nonce($nonce);
49 }
50  
51 0 ▶sub gateway {
Subroutine gateway: not called CC=1 SCAR=6.9
Pod undocumented
52 0 Net::Braintree->configuration->gateway;
53 }
54  
55 0 ▶sub masked_number {
Subroutine masked_number: not called CC=1 SCAR=6.9
Pod undocumented
56 0 my $self = shift;
57 0 return $self->bin . "******" . $self->last_4;
58 }
59  
60 0 ▶sub expiration_date {
Subroutine expiration_date: not called CC=1 SCAR=6.9
Pod undocumented
61 0 my $self = shift;
62 0 return $self->expiration_month . "/" . $self->expiration_year;
63 }
64  
65 0 ▶sub is_default {
Subroutine is_default: not called CC=1 SCAR=6.9
Pod undocumented
66 0 return shift->default;
67 }
68  
69 0 ▶sub is_venmo_sdk {
Subroutine is_venmo_sdk: not called CC=1 SCAR=6.9
Pod undocumented
70 0 my $self = shift;
71 0 return $self->venmo_sdk;
72 }
73  
74 1 1;
« Braintree/Address.pm ↑ Summary Braintree/PaymentMethod.pm »