Braintree/MerchantAccount.pm

filter: Statementstmt 64.4% 38 / 59 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 68.7% 11 / 16 Podpod 0.0% 0 / 5 totaltotal 55.6% 49 / 88 CC 5 SCAR 20.4
CC
5
Cov
57%
BUILD
26.9
create
2.0
update
2.0
CRAP 7.7
« Braintree/ResourceCollection.pm ↑ Summary Braintree/AdvancedSearch.pm »
1 package Net::Braintree::MerchantAccount;
2 1 ▶use Net::Braintree::MerchantAccount::IndividualDetails;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Net::Braintree::MerchantAccount::AddressDetails;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Net::Braintree::MerchantAccount::BusinessDetails;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Net::Braintree::MerchantAccount::FundingDetails;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 extends "Net::Braintree::ResultObject";
9 1 my $meta = __PACKAGE__->meta;
10  
11 {
12 package Net::Braintree::MerchantAccount::Status;
13  
14 1 ▶ use constant Active => "active";
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use constant Pending => "pending";
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶ use constant Suspended => "suspended";
Subroutine BEGIN: called CC=1 SCAR=0.0
17 }
18  
19 {
20 1 package Net::Braintree::MerchantAccount::FundingDestination;
21  
22 1 ▶ use constant Bank => "bank";
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶ use constant Email => "email";
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶ use constant MobilePhone => "mobile_phone";
Subroutine BEGIN: called CC=1 SCAR=0.0
25 }
26  
27 1 ▶sub BUILD {
Subroutine BUILD: not called CC=5 SCAR=32.9
Pod undocumented
28 0 my ($self, $attributes) = @_;
29 0 $meta->add_attribute('master_merchant_account', is => 'rw');
30 0 ▶ $self->master_merchant_account(Net::Braintree::MerchantAccount->new($attributes->{master_merchant_account})) if ref($attributes->{master_merchant_account}) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $attributes->{"master_merchant_account"} eq "HASH" 0 0 0
31 0 delete($attributes->{master_merchant_account});
32  
33 0 $meta->add_attribute('individual_details', is => 'rw');
34 0 ▶ $self->individual_details(Net::Braintree::MerchantAccount::IndividualDetails->new($attributes->{individual})) if ref($attributes->{individual}) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $attributes->{"individual"} eq "HASH" 0 0 0
35 0 delete($attributes->{individual});
36  
37 0 $meta->add_attribute('business_details', is => 'rw');
38 0 ▶ $self->business_details(Net::Braintree::MerchantAccount::BusinessDetails->new($attributes->{business})) if ref($attributes->{business}) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $attributes->{"business"} eq "HASH" 0 0 0
39 0 delete($attributes->{business});
40  
41 0 $meta->add_attribute('funding_details', is => 'rw');
42 0 ▶ $self->funding_details(Net::Braintree::MerchantAccount::FundingDetails->new($attributes->{funding})) if ref($attributes->{funding}) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $attributes->{"funding"} eq "HASH" 0 0 0
43 0 delete($attributes->{funding});
44  
45 0 $self->set_attributes_from_hash($self, $attributes);
46 }
47  
48 0 ▶sub create {
Subroutine create: not called CC=1 SCAR=6.9
Pod undocumented
49 0 my ($class, $params) = @_;
50 0 $class->gateway->merchant_account->create($params);
51 }
52  
53 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod undocumented
54 0 my ($class, $merchant_account_id, $params) = @_;
55 0 $class->gateway->merchant_account->update($merchant_account_id, $params);
56 }
57  
58 0 ▶sub find {
Subroutine find: not called CC=1 SCAR=6.9
Pod undocumented
59 0 my ($class, $merchant_account_id) = @_;
60 0 $class->gateway->merchant_account->find($merchant_account_id);
61 }
62  
63 0 ▶sub gateway {
Subroutine gateway: not called CC=1 SCAR=6.9
Pod undocumented
64 0 return Net::Braintree->configuration->gateway;
65 }
66  
67 1 1;
« Braintree/ResourceCollection.pm ↑ Summary Braintree/AdvancedSearch.pm »