| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Business::BalancedPayments::V11; |
|
2
|
11
|
|
|
11
|
|
43
|
use Moo; |
|
|
11
|
|
|
|
|
14
|
|
|
|
11
|
|
|
|
|
51
|
|
|
3
|
|
|
|
|
|
|
with 'Business::BalancedPayments::Base'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.0500'; # VERSION |
|
6
|
|
|
|
|
|
|
|
|
7
|
11
|
|
|
11
|
|
2762
|
use Carp qw(croak); |
|
|
11
|
|
|
|
|
15
|
|
|
|
11
|
|
|
|
|
567
|
|
|
8
|
11
|
|
|
11
|
|
6190
|
use Method::Signatures; |
|
|
11
|
|
|
|
|
531991
|
|
|
|
11
|
|
|
|
|
67
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has marketplaces_uri => ( is => 'ro', default => '/marketplaces' ); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has marketplaces => ( is => 'ro', lazy => 1, builder => '_build_marketplaces' ); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub BUILD { |
|
15
|
0
|
|
|
0
|
0
|
0
|
my ($self) = @_; |
|
16
|
0
|
|
|
|
|
0
|
$self->ua->default_header( |
|
17
|
|
|
|
|
|
|
accept => 'application/vnd.api+json;revision=1.1'); |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
around get_card => _unpack_response('cards'); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
around create_card => _unpack_response('cards'); |
|
23
|
|
|
|
|
|
|
|
|
24
|
11
|
0
|
0
|
11
|
|
1082164
|
method add_card(HashRef $card, HashRef :$customer!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
25
|
0
|
0
|
|
|
|
0
|
my $card_href = $card->{href} or croak 'The card href is missing'; |
|
26
|
0
|
0
|
|
|
|
0
|
my $cust_href = $customer->{href} or croak 'The customer href is missing'; |
|
27
|
0
|
|
|
|
|
0
|
return $self->put($card->{href}, { customer => $cust_href })->{cards}[0]; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
around get_customer => _unpack_response('customers'); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
around create_customer => _unpack_response('customers'); |
|
33
|
|
|
|
|
|
|
|
|
34
|
11
|
0
|
0
|
11
|
|
24588
|
method update_customer(HashRef $customer) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
35
|
0
|
0
|
|
|
|
0
|
my $cust_href = $customer->{href} or croak 'The customer href is missing'; |
|
36
|
0
|
|
|
|
|
0
|
return $self->put($cust_href, $customer)->{customers}[0]; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
11
|
0
|
0
|
11
|
|
20934
|
method get_hold(Str $id) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
40
|
0
|
|
|
|
|
0
|
my $res = $self->get($self->_uri('card_holds', $id)); |
|
41
|
0
|
0
|
|
|
|
0
|
return $res ? $res->{card_holds}[0] : undef; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
11
|
0
|
0
|
11
|
|
29822
|
method create_hold(HashRef $hold, HashRef :$card!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
45
|
0
|
0
|
|
|
|
0
|
croak 'The hold amount is missing' unless $hold->{amount}; |
|
46
|
0
|
0
|
|
|
|
0
|
my $card_href = $card->{href} or croak 'The card href is missing'; |
|
47
|
0
|
|
|
|
|
0
|
return $self->post("$card_href/card_holds", $hold)->{card_holds}[0]; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
11
|
0
|
0
|
11
|
|
47553
|
method capture_hold(HashRef $hold, HashRef :$debit={}) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
51
|
0
|
0
|
|
|
|
0
|
my $hold_href = $hold->{href} or croak 'The hold href is missing'; |
|
52
|
0
|
|
|
|
|
0
|
return $self->post("$hold_href/debits", $debit)->{debits}[0]; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
11
|
0
|
0
|
11
|
|
22648
|
method void_hold(HashRef $hold) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
56
|
0
|
0
|
|
|
|
0
|
my $hold_href = $hold->{href} or croak 'The hold href is missing'; |
|
57
|
0
|
|
|
|
|
0
|
return $self->put($hold_href, { is_void => 'true' })->{card_holds}[0]; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
11
|
0
|
0
|
11
|
|
30314
|
method create_debit(HashRef $debit, HashRef :$card!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
61
|
0
|
0
|
|
|
|
0
|
croak 'The debit amount is missing' unless $debit->{amount}; |
|
62
|
0
|
0
|
|
|
|
0
|
my $card_href = $card->{href} or croak 'The card href is missing'; |
|
63
|
0
|
|
|
|
|
0
|
return $self->post("$card_href/debits", $debit)->{debits}[0]; |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
around get_debit => _unpack_response('debits'); |
|
67
|
|
|
|
|
|
|
|
|
68
|
11
|
0
|
0
|
11
|
|
23441
|
method refund_debit(HashRef $debit) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
69
|
0
|
0
|
|
|
|
0
|
my $debit_href = $debit->{href} or croak 'The debit href is missing'; |
|
70
|
0
|
|
|
|
|
0
|
return $self->post("$debit_href/refunds", $debit)->{refunds}[0]; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
around get_bank_account => _unpack_response('bank_accounts'); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
around create_bank_account => _unpack_response('bank_accounts'); |
|
76
|
|
|
|
|
|
|
|
|
77
|
11
|
0
|
0
|
11
|
|
31138
|
method add_bank_account(HashRef $bank, HashRef :$customer!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
78
|
0
|
0
|
|
|
|
0
|
my $bank_href = $bank->{href} or croak 'The bank href is missing'; |
|
79
|
0
|
0
|
|
|
|
0
|
my $cust_href = $customer->{href} or croak 'The customer href is missing'; |
|
80
|
0
|
|
|
|
|
0
|
my $res = $self->put($bank->{href}, { customer => $cust_href }); |
|
81
|
0
|
|
|
|
|
0
|
return $res->{bank_accounts}[0]; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
11
|
0
|
0
|
11
|
|
38193
|
method create_credit(HashRef $credit, HashRef :$bank_account, HashRef :$card) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
85
|
0
|
0
|
|
|
|
0
|
croak 'The credit amount is missing' unless $credit->{amount}; |
|
86
|
0
|
0
|
|
|
|
0
|
if ($bank_account) { |
|
|
|
0
|
|
|
|
|
|
|
87
|
0
|
0
|
|
|
|
0
|
my $bank_href = $bank_account->{href} |
|
88
|
|
|
|
|
|
|
or croak 'The bank_account href is missing'; |
|
89
|
0
|
|
|
|
|
0
|
return $self->post("$bank_href/credits", $credit)->{credits}[0]; |
|
90
|
|
|
|
|
|
|
} elsif ($card) { |
|
91
|
0
|
0
|
|
|
|
0
|
my $card_href = $card->{href} or croak 'The card href is missing'; |
|
92
|
0
|
|
|
|
|
0
|
return $self->post("$card_href/credits", $credit)->{credits}[0]; |
|
93
|
|
|
|
|
|
|
} else { |
|
94
|
0
|
|
|
|
|
0
|
croak 'A bank or card param is required'; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
} |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
around get_credit => _unpack_response('credits'); |
|
99
|
|
|
|
|
|
|
|
|
100
|
11
|
0
|
0
|
11
|
|
23672
|
method update_bank_account(HashRef $bank) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
101
|
0
|
0
|
|
|
|
0
|
my $bank_href = $bank->{href} or croak 'The bank_account href is missing'; |
|
102
|
0
|
|
|
|
|
0
|
return $self->put($bank_href, $bank)->{bank_accounts}[0]; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
11
|
0
|
0
|
11
|
|
25916
|
method create_bank_verification(HashRef :$bank_account!) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
106
|
0
|
0
|
|
|
|
0
|
my $bank_href = $bank_account->{href} |
|
107
|
|
|
|
|
|
|
or croak 'The bank_account href is missing'; |
|
108
|
0
|
|
|
|
|
0
|
return $self->post("$bank_href/verifications", {}) |
|
109
|
|
|
|
|
|
|
->{bank_account_verifications}[0]; |
|
110
|
|
|
|
|
|
|
} |
|
111
|
|
|
|
|
|
|
|
|
112
|
11
|
0
|
0
|
11
|
|
22348
|
method get_bank_verification(Str $id) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
113
|
0
|
|
|
|
|
0
|
my $res = $self->get("/verifications/$id"); |
|
114
|
0
|
0
|
|
|
|
0
|
return $res ? $res->{bank_account_verifications}[0] : undef; |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
|
|
117
|
11
|
0
|
0
|
11
|
|
39722
|
method confirm_bank_verification(HashRef $verification, Int :$amount_1!, Int :$amount_2!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
118
|
0
|
0
|
|
|
|
0
|
my $ver_href = $verification->{href} |
|
119
|
|
|
|
|
|
|
or croak 'The verification href is missing'; |
|
120
|
0
|
|
|
|
|
0
|
return $self->put($ver_href, {amount_1 => $amount_1, amount_2 => $amount_2}) |
|
121
|
|
|
|
|
|
|
->{bank_account_verifications}[0]; |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
11
|
0
|
0
|
11
|
|
23224
|
method create_check_recipient(HashRef $rec) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
125
|
0
|
0
|
|
|
|
0
|
croak 'The recipient name is missing' unless defined $rec->{name}; |
|
126
|
0
|
0
|
|
|
|
0
|
croak 'The recipient address line1 is missing' |
|
127
|
|
|
|
|
|
|
unless $rec->{address}{line1}; |
|
128
|
0
|
0
|
|
|
|
0
|
croak 'The recipient address postal_code is missing' |
|
129
|
|
|
|
|
|
|
unless $rec->{address}{postal_code}; |
|
130
|
0
|
|
|
|
|
0
|
my $res = $self->post('/check_recipients', $rec); |
|
131
|
0
|
|
|
|
|
0
|
return $res->{check_recipients}[0]; |
|
132
|
|
|
|
|
|
|
} |
|
133
|
|
|
|
|
|
|
|
|
134
|
11
|
0
|
0
|
11
|
|
21382
|
method get_dispute(Str $id) { |
|
|
0
|
0
|
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
135
|
0
|
|
|
|
|
0
|
my $res = $self->get($self->_uri('disputes', $id)); |
|
136
|
0
|
0
|
|
|
|
0
|
return $res ? $res->{disputes}[0] : undef; |
|
137
|
|
|
|
|
|
|
} |
|
138
|
|
|
|
|
|
|
|
|
139
|
11
|
|
|
11
|
|
38798
|
method get_disputes(HashRef $query = {}) { |
|
140
|
|
|
|
|
|
|
return $self->get($self->_uri('disputes'), $query); |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
around get_disputes => _autopaginate(); |
|
144
|
|
|
|
|
|
|
|
|
145
|
11
|
0
|
0
|
11
|
|
31018
|
method create_check_recipient_credit(HashRef $credit, HashRef :$check_recipient!) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
146
|
0
|
0
|
|
|
|
0
|
my $rec_id = $check_recipient->{id} |
|
147
|
|
|
|
|
|
|
or croak 'The check_recipient hashref needs an id'; |
|
148
|
0
|
0
|
|
|
|
0
|
croak 'The credit must contain an amount' unless $credit->{amount}; |
|
149
|
0
|
|
|
|
|
0
|
my $res = $self->post("/check_recipients/$rec_id/credits", $credit); |
|
150
|
0
|
|
|
|
|
0
|
return $res->{credits}[0]; |
|
151
|
|
|
|
|
|
|
} |
|
152
|
|
|
|
|
|
|
|
|
153
|
11
|
0
|
0
|
11
|
|
39196
|
method get_all(HashRef $data, Maybe[CodeRef] :$page_handler) { |
|
|
0
|
0
|
0
|
0
|
|
0
|
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
154
|
0
|
|
|
|
|
0
|
my ($key) = grep !/^(links|meta)$/, keys %$data; |
|
155
|
0
|
0
|
|
|
|
0
|
croak "Could not find the top level resource" unless $key; |
|
156
|
0
|
|
|
|
|
0
|
my $result = $data->{$key}; |
|
157
|
0
|
|
|
|
|
0
|
while ( my $next = $data->{meta}{next} ) { |
|
158
|
0
|
|
|
|
|
0
|
$data = $self->get($next); |
|
159
|
0
|
0
|
|
|
|
0
|
$page_handler->( $data ) if $page_handler; |
|
160
|
0
|
|
|
|
|
0
|
push @$result, @{ $data->{$key} }; |
|
|
0
|
|
|
|
|
0
|
|
|
161
|
|
|
|
|
|
|
} |
|
162
|
0
|
|
|
|
|
0
|
return { $key => $result }; |
|
163
|
|
|
|
|
|
|
} |
|
164
|
|
|
|
|
|
|
|
|
165
|
11
|
0
|
|
11
|
|
8705
|
method _build_marketplaces { $self->get($self->marketplaces_uri) } |
|
|
0
|
|
|
0
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
166
|
|
|
|
|
|
|
|
|
167
|
11
|
0
|
|
11
|
|
5139
|
method _build_marketplace { $self->marketplaces->{marketplaces}[0] } |
|
|
0
|
|
|
0
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
168
|
|
|
|
|
|
|
|
|
169
|
11
|
0
|
|
11
|
|
5136
|
method _build_uris { |
|
|
0
|
|
|
0
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
170
|
0
|
|
|
|
|
0
|
my $links = $self->marketplaces->{links}; |
|
171
|
0
|
|
|
|
|
0
|
return { map { (split /^marketplaces./)[1] => $links->{$_} } keys %$links }; |
|
|
0
|
|
|
|
|
0
|
|
|
172
|
|
|
|
|
|
|
} |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub _unpack_response { |
|
175
|
88
|
|
|
88
|
|
138
|
my ($name) = @_; |
|
176
|
|
|
|
|
|
|
return sub { |
|
177
|
0
|
|
|
0
|
|
0
|
my ($orig, $self, @args) = @_; |
|
178
|
0
|
|
|
|
|
0
|
my $res = $self->$orig(@args); |
|
179
|
0
|
0
|
|
|
|
0
|
return $res->{$name}[0] if $res; |
|
180
|
0
|
|
|
|
|
0
|
return $res; |
|
181
|
|
|
|
|
|
|
} |
|
182
|
88
|
|
|
|
|
440
|
}; |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
sub _autopaginate { |
|
185
|
|
|
|
|
|
|
return sub { |
|
186
|
0
|
|
|
0
|
|
0
|
my ($orig, $self, $query, %params) = @_; |
|
187
|
0
|
|
|
|
|
0
|
my $res = $self->$orig($query); |
|
188
|
0
|
0
|
0
|
|
|
0
|
return $self->get_all($res, page_handler => $params{page_handler}) |
|
189
|
|
|
|
|
|
|
if $params{page_handler} and 'CODE' eq ref $params{page_handler}; |
|
190
|
0
|
|
|
|
|
0
|
return $res; |
|
191
|
|
|
|
|
|
|
} |
|
192
|
11
|
|
|
11
|
|
52
|
}; |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
1; |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
__END__ |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=pod |
|
199
|
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=encoding UTF-8 |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head1 NAME |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Business::BalancedPayments::V11 |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=head1 VERSION |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
version 1.0500 |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head1 AUTHORS |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=over 4 |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=item * |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
Ali Anari <ali@tilt.com> |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=item * |
|
219
|
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
Khaled Hussein <khaled@tilt.com> |
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=item * |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
Naveed Massjouni <naveed@tilt.com> |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=item * |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Al Newkirk <al@tilt.com> |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
Will Wolf <will@tilt.com> |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=back |
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Crowdtilt, Inc.. |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
241
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=cut |