line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Cash/Balance.pm |
3
|
|
|
|
|
|
|
## Version v0.1.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2022 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2022/07/06 |
7
|
|
|
|
|
|
|
## Modified 2022/07/06 |
8
|
|
|
|
|
|
|
## All rights reserved |
9
|
|
|
|
|
|
|
## |
10
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify it |
11
|
|
|
|
|
|
|
## under the same terms as Perl itself. |
12
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
13
|
|
|
|
|
|
|
package Net::API::Stripe::Cash::Balance; |
14
|
|
|
|
|
|
|
BEGIN |
15
|
|
|
|
|
|
|
{ |
16
|
2
|
|
|
2
|
|
21406324
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
60
|
|
17
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
55
|
|
18
|
2
|
|
|
2
|
|
10
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
19
|
2
|
|
|
2
|
|
147
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
132
|
|
20
|
2
|
|
|
2
|
|
40
|
our $VERSION = 'v0.1.0'; |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
2
|
|
32
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
24
|
2
|
|
|
2
|
|
23
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
335
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
0
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub available { return( shift->_set_get_hash_as_mix_object( 'available', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub customer { return( shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub settings |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
0
|
1
|
|
return( shift->_set_get_class( 'settings', |
39
|
|
|
|
|
|
|
{ |
40
|
|
|
|
|
|
|
reconciliation_mode => { type => 'scalar' }, |
41
|
|
|
|
|
|
|
}, @_ ) ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
# NOTE: POD |
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding utf-8 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Net::API::Stripe::Cash::Balance - Stripe API |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
use Net::API::Stripe::Cash::Balance; |
57
|
|
|
|
|
|
|
my $this = Net::API::Stripe::Cash::Balance->new( |
58
|
|
|
|
|
|
|
object => 'cash_balance', |
59
|
|
|
|
|
|
|
available => |
60
|
|
|
|
|
|
|
{ |
61
|
|
|
|
|
|
|
jpy => 10000, |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
customer => 'cu_abcdefgh1234567890', |
64
|
|
|
|
|
|
|
livemode => 0, |
65
|
|
|
|
|
|
|
settings => |
66
|
|
|
|
|
|
|
{ |
67
|
|
|
|
|
|
|
reconciliation_mode => 'automatic' |
68
|
|
|
|
|
|
|
) || die( Net::API::Stripe::Cash::Balance->error, "\n" ); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 VERSION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
v0.1.0 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 DESCRIPTION |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This class represent a Stripe customer cash balance. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 METHODS |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 object |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
String, value is "cash_balance" |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 available |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 customer |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
String |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The ID of the customer whose cash balance this object represents. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 livemode |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Boolean |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 settings |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Hash |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The customer’s default cash balance settings. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=over 4 |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * C<reconciliation_mode> string |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=back |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
The configuration for how funds that land in the customer cash balance are reconciled. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 API SAMPLE |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
{ |
119
|
|
|
|
|
|
|
"object": "cash_balance", |
120
|
|
|
|
|
|
|
"available": { |
121
|
|
|
|
|
|
|
"jpy": 10000 |
122
|
|
|
|
|
|
|
}, |
123
|
|
|
|
|
|
|
"customer": "cu_1A3RPuCeyNCl6fY2YeKa3wSH", |
124
|
|
|
|
|
|
|
"livemode": false, |
125
|
|
|
|
|
|
|
"settings": { |
126
|
|
|
|
|
|
|
"reconciliation_mode": "automatic" |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 AUTHOR |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 SEE ALSO |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Stripe API documentation: |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/cash_balance/object> |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Copyright(c) 2022 DEGUEST Pte. Ltd. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
All rights reserved |
145
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |