| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Braintree::Address; |
|
2
|
1
|
|
|
1
|
|
199
|
use Moose; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
extends 'Net::Braintree::ResultObject'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub BUILD { |
|
6
|
|
|
|
|
|
|
my ($self, $attributes) = @_; |
|
7
|
|
|
|
|
|
|
$self->set_attributes_from_hash($self, $attributes); |
|
8
|
|
|
|
|
|
|
} |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub create { |
|
11
|
|
|
|
|
|
|
my($class, $params) = @_; |
|
12
|
|
|
|
|
|
|
$class->gateway->address->create($params); |
|
13
|
|
|
|
|
|
|
} |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub find { |
|
16
|
|
|
|
|
|
|
my ($class, $customer_id, $address_id) = @_; |
|
17
|
|
|
|
|
|
|
$class->gateway->address->find($customer_id, $address_id); |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub update { |
|
21
|
|
|
|
|
|
|
my ($class, $customer_id, $address_id, $params) = @_; |
|
22
|
|
|
|
|
|
|
$class->gateway->address->update($customer_id, $address_id, $params); |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub delete { |
|
26
|
|
|
|
|
|
|
my ($class, $customer_id, $address_id) = @_; |
|
27
|
|
|
|
|
|
|
$class->gateway->address->delete($customer_id, $address_id); |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub gateway { |
|
31
|
|
|
|
|
|
|
return Net::Braintree->configuration->gateway; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub full_name { |
|
35
|
|
|
|
|
|
|
my $self = shift; |
|
36
|
|
|
|
|
|
|
return $self->first_name . " " . $self->last_name |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |