line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Payment/Intent/TransferData.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
package Net::API::Stripe::Payment::Intent::TransferData; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
2
|
|
|
2
|
|
21229565
|
use strict; |
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
63
|
|
14
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
61
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
16
|
2
|
|
|
2
|
|
162
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
117
|
|
17
|
2
|
|
|
2
|
|
61
|
our( $VERSION ) = 'v0.100.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
41
|
|
21
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
180
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub amount { return( shift->_set_get_number( 'amount', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub destination { return( shift->_set_get_scalar_or_object( 'destination', 'Net::API::Stripe::Connect::Account', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding utf8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Net::API::Stripe::Payment::Intent::TransferData - A Stripe TransferData Object |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $tf_data = $stripe->payment_intent->transfer_data({ |
40
|
|
|
|
|
|
|
amount => 2000, |
41
|
|
|
|
|
|
|
destination => $connect_account_object, |
42
|
|
|
|
|
|
|
}); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
v0.100.0 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This is instantiated by method B<transfer_data> in module L<Net::API::Stripe::Payment::Intent> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 new( %ARG ) |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Payment::Intent::TransferData> object. |
59
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 amount integer |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 destination string (expandable) |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to upon payment success. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Connect::Account> object. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 API SAMPLE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
"id": "pi_fake123456789", |
77
|
|
|
|
|
|
|
"object": "payment_intent", |
78
|
|
|
|
|
|
|
"amount": 1099, |
79
|
|
|
|
|
|
|
"amount_capturable": 0, |
80
|
|
|
|
|
|
|
"amount_received": 0, |
81
|
|
|
|
|
|
|
"application": null, |
82
|
|
|
|
|
|
|
"application_fee_amount": null, |
83
|
|
|
|
|
|
|
"canceled_at": null, |
84
|
|
|
|
|
|
|
"cancellation_reason": null, |
85
|
|
|
|
|
|
|
"capture_method": "automatic", |
86
|
|
|
|
|
|
|
"charges": { |
87
|
|
|
|
|
|
|
"object": "list", |
88
|
|
|
|
|
|
|
"data": [], |
89
|
|
|
|
|
|
|
"has_more": false, |
90
|
|
|
|
|
|
|
"url": "/v1/charges?payment_intent=pi_fake123456789" |
91
|
|
|
|
|
|
|
}, |
92
|
|
|
|
|
|
|
"client_secret": "pi_fake123456789_secret_kfhksfhlajfl", |
93
|
|
|
|
|
|
|
"confirmation_method": "automatic", |
94
|
|
|
|
|
|
|
"created": 1556596976, |
95
|
|
|
|
|
|
|
"currency": "jpy", |
96
|
|
|
|
|
|
|
"customer": null, |
97
|
|
|
|
|
|
|
"description": null, |
98
|
|
|
|
|
|
|
"invoice": null, |
99
|
|
|
|
|
|
|
"last_payment_error": null, |
100
|
|
|
|
|
|
|
"livemode": false, |
101
|
|
|
|
|
|
|
"metadata": {}, |
102
|
|
|
|
|
|
|
"next_action": null, |
103
|
|
|
|
|
|
|
"on_behalf_of": null, |
104
|
|
|
|
|
|
|
"payment_method": null, |
105
|
|
|
|
|
|
|
"payment_method_options": {}, |
106
|
|
|
|
|
|
|
"payment_method_types": [ |
107
|
|
|
|
|
|
|
"card" |
108
|
|
|
|
|
|
|
], |
109
|
|
|
|
|
|
|
"receipt_email": null, |
110
|
|
|
|
|
|
|
"review": null, |
111
|
|
|
|
|
|
|
"setup_future_usage": null, |
112
|
|
|
|
|
|
|
"shipping": null, |
113
|
|
|
|
|
|
|
"statement_descriptor": null, |
114
|
|
|
|
|
|
|
"statement_descriptor_suffix": null, |
115
|
|
|
|
|
|
|
"status": "requires_payment_method", |
116
|
|
|
|
|
|
|
"transfer_data": null, |
117
|
|
|
|
|
|
|
"transfer_group": null |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 HISTORY |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 v0.1 |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Initial version |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 AUTHOR |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 SEE ALSO |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Stripe API documentation: |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/payment_intents/object> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
141
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
|