| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Net::Braintree::MerchantAccount; | 
| 2 | 1 |  |  | 1 |  | 446 | use Net::Braintree::MerchantAccount::IndividualDetails; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 37 |  | 
| 3 | 1 |  |  | 1 |  | 9 | use Net::Braintree::MerchantAccount::AddressDetails; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 28 |  | 
| 4 | 1 |  |  | 1 |  | 560 | use Net::Braintree::MerchantAccount::BusinessDetails; | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 35 |  | 
| 5 | 1 |  |  | 1 |  | 560 | use Net::Braintree::MerchantAccount::FundingDetails; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 35 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 1 |  |  | 1 |  | 7 | use Moose; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 8 |  |  |  |  |  |  | extends "Net::Braintree::ResultObject"; | 
| 9 |  |  |  |  |  |  | my $meta = __PACKAGE__->meta; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | { | 
| 12 |  |  |  |  |  |  | package Net::Braintree::MerchantAccount::Status; | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 1 |  |  | 1 |  | 5451 | use constant Active => "active"; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 69 |  | 
| 15 | 1 |  |  | 1 |  | 3 | use constant Pending => "pending"; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 41 |  | 
| 16 | 1 |  |  | 1 |  | 4 | use constant Suspended => "suspended"; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 52 |  | 
| 17 |  |  |  |  |  |  | } | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | { | 
| 20 |  |  |  |  |  |  | package Net::Braintree::MerchantAccount::FundingDestination; | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 1 |  |  | 1 |  | 8 | use constant Bank => "bank"; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 80 |  | 
| 23 | 1 |  |  | 1 |  | 6 | use constant Email => "email"; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 51 |  | 
| 24 | 1 |  |  | 1 |  | 5 | use constant MobilePhone => "mobile_phone"; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 313 |  | 
| 25 |  |  |  |  |  |  | } | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | sub BUILD { | 
| 28 | 0 |  |  | 0 | 0 |  | my ($self, $attributes) = @_; | 
| 29 | 0 |  |  |  |  |  | $meta->add_attribute('master_merchant_account', is => 'rw'); | 
| 30 | 0 | 0 |  |  |  |  | $self->master_merchant_account(Net::Braintree::MerchantAccount->new($attributes->{master_merchant_account})) if ref($attributes->{master_merchant_account}) eq 'HASH'; | 
| 31 | 0 |  |  |  |  |  | delete($attributes->{master_merchant_account}); | 
| 32 |  |  |  |  |  |  |  | 
| 33 | 0 |  |  |  |  |  | $meta->add_attribute('individual_details', is => 'rw'); | 
| 34 | 0 | 0 |  |  |  |  | $self->individual_details(Net::Braintree::MerchantAccount::IndividualDetails->new($attributes->{individual})) if ref($attributes->{individual}) eq 'HASH'; | 
| 35 | 0 |  |  |  |  |  | delete($attributes->{individual}); | 
| 36 |  |  |  |  |  |  |  | 
| 37 | 0 |  |  |  |  |  | $meta->add_attribute('business_details', is => 'rw'); | 
| 38 | 0 | 0 |  |  |  |  | $self->business_details(Net::Braintree::MerchantAccount::BusinessDetails->new($attributes->{business})) if ref($attributes->{business}) eq 'HASH'; | 
| 39 | 0 |  |  |  |  |  | delete($attributes->{business}); | 
| 40 |  |  |  |  |  |  |  | 
| 41 | 0 |  |  |  |  |  | $meta->add_attribute('funding_details', is => 'rw'); | 
| 42 | 0 | 0 |  |  |  |  | $self->funding_details(Net::Braintree::MerchantAccount::FundingDetails->new($attributes->{funding})) if ref($attributes->{funding}) eq 'HASH'; | 
| 43 | 0 |  |  |  |  |  | delete($attributes->{funding}); | 
| 44 |  |  |  |  |  |  |  | 
| 45 | 0 |  |  |  |  |  | $self->set_attributes_from_hash($self, $attributes); | 
| 46 |  |  |  |  |  |  | } | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | sub create { | 
| 49 | 0 |  |  | 0 | 0 |  | my ($class, $params) = @_; | 
| 50 | 0 |  |  |  |  |  | $class->gateway->merchant_account->create($params); | 
| 51 |  |  |  |  |  |  | } | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | sub update { | 
| 54 | 0 |  |  | 0 | 0 |  | my ($class, $merchant_account_id, $params) = @_; | 
| 55 | 0 |  |  |  |  |  | $class->gateway->merchant_account->update($merchant_account_id, $params); | 
| 56 |  |  |  |  |  |  | } | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | sub find { | 
| 59 | 0 |  |  | 0 | 0 |  | my ($class, $merchant_account_id) = @_; | 
| 60 | 0 |  |  |  |  |  | $class->gateway->merchant_account->find($merchant_account_id); | 
| 61 |  |  |  |  |  |  | } | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | sub gateway { | 
| 64 | 0 |  |  | 0 | 0 |  | return Net::Braintree->configuration->gateway; | 
| 65 |  |  |  |  |  |  | } | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  | 1; |