line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/File.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
|
|
|
|
|
|
|
## https://stripe.com/docs/api/files/object |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
use strict; |
14
|
2
|
|
|
2
|
|
24241047
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
60
|
|
15
|
2
|
|
|
2
|
|
10
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
57
|
|
16
|
2
|
|
|
2
|
|
11
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
17
|
2
|
|
|
2
|
|
138
|
our( $VERSION ) = 'v0.100.0'; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
121
|
|
18
|
2
|
|
|
2
|
|
55
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
21
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
46
|
|
22
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
486
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
|
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
|
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
|
37
|
|
|
|
|
|
|
=encoding utf8 |
38
|
0
|
|
|
0
|
1
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
0
|
|
|
0
|
1
|
|
|
41
|
|
|
|
|
|
|
Net::API::Stripe::File - A file in Stripe API |
42
|
0
|
|
|
0
|
1
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
0
|
|
|
0
|
1
|
|
|
45
|
|
|
|
|
|
|
my $file = $stripe->file({ |
46
|
|
|
|
|
|
|
filename => 'some_file.jpg', |
47
|
|
|
|
|
|
|
links => $file_links_object, |
48
|
|
|
|
|
|
|
purpose => 'business_logo', |
49
|
|
|
|
|
|
|
size => 40069, |
50
|
|
|
|
|
|
|
title => 'Big Corp, Inc Logo', |
51
|
|
|
|
|
|
|
type => 'jpg', |
52
|
|
|
|
|
|
|
url => 'https://files.stripe.com/v1/files/file_fake123456789/contents', |
53
|
|
|
|
|
|
|
}); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
v0.100.0 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is an object representing a file hosted on Stripe's servers. The file may have been uploaded by yourself using the create file request (for example, when uploading dispute evidence) or it may have been created by Stripe (for example, the results of a Sigma scheduled query L<https://stripe.com/docs/api/files#scheduled_queries>). |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 new( %ARG ) |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::File> object. |
70
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 id string |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Unique identifier for the object. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 object string, value is "file" |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 created timestamp |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 expires_at timestamp |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The time at which the file expires and is no longer available in epoch seconds. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 filename string |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
A filename for the file, suitable for saving to a filesystem. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 links list |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::File::Links> object. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 purpose string |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
The purpose of the file. Possible values are business_icon, business_logo, customer_signature, dispute_evidence, finance_report_run, identity_document, pci_document, sigma_scheduled_query, or tax_document_user_upload. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 size integer |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The size in bytes of the file object. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 title string |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
A user friendly title for the document. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 type string |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
The type of the file returned (e.g., csv, pdf, jpg, or png). |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 url string |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The URL from which the file can be downloaded using your live secret API key. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 API SAMPLE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
{ |
121
|
|
|
|
|
|
|
"id": "file_fake123456789", |
122
|
|
|
|
|
|
|
"object": "file", |
123
|
|
|
|
|
|
|
"created": 1540111053, |
124
|
|
|
|
|
|
|
"filename": "file_fake123456789", |
125
|
|
|
|
|
|
|
"links": { |
126
|
|
|
|
|
|
|
"object": "list", |
127
|
|
|
|
|
|
|
"data": [ |
128
|
|
|
|
|
|
|
{ |
129
|
|
|
|
|
|
|
"id": "link_fake123456789", |
130
|
|
|
|
|
|
|
"object": "file_link", |
131
|
|
|
|
|
|
|
"created": 1571229407, |
132
|
|
|
|
|
|
|
"expired": false, |
133
|
|
|
|
|
|
|
"expires_at": null, |
134
|
|
|
|
|
|
|
"file": "file_fake123456789", |
135
|
|
|
|
|
|
|
"livemode": false, |
136
|
|
|
|
|
|
|
"metadata": {}, |
137
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
138
|
|
|
|
|
|
|
}, |
139
|
|
|
|
|
|
|
{ |
140
|
|
|
|
|
|
|
"id": "link_fake123456789", |
141
|
|
|
|
|
|
|
"object": "file_link", |
142
|
|
|
|
|
|
|
"created": 1571225071, |
143
|
|
|
|
|
|
|
"expired": false, |
144
|
|
|
|
|
|
|
"expires_at": null, |
145
|
|
|
|
|
|
|
"file": "file_fake123456789", |
146
|
|
|
|
|
|
|
"livemode": false, |
147
|
|
|
|
|
|
|
"metadata": {}, |
148
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
149
|
|
|
|
|
|
|
}, |
150
|
|
|
|
|
|
|
{ |
151
|
|
|
|
|
|
|
"id": "link_fake123456789", |
152
|
|
|
|
|
|
|
"object": "file_link", |
153
|
|
|
|
|
|
|
"created": 1571223490, |
154
|
|
|
|
|
|
|
"expired": false, |
155
|
|
|
|
|
|
|
"expires_at": null, |
156
|
|
|
|
|
|
|
"file": "file_fake123456789", |
157
|
|
|
|
|
|
|
"livemode": false, |
158
|
|
|
|
|
|
|
"metadata": {}, |
159
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
160
|
|
|
|
|
|
|
}, |
161
|
|
|
|
|
|
|
{ |
162
|
|
|
|
|
|
|
"id": "link_1FUA14CeyNCl6fY2s3gFUjmP", |
163
|
|
|
|
|
|
|
"object": "file_link", |
164
|
|
|
|
|
|
|
"created": 1571222766, |
165
|
|
|
|
|
|
|
"expired": false, |
166
|
|
|
|
|
|
|
"expires_at": null, |
167
|
|
|
|
|
|
|
"file": "file_fake123456789", |
168
|
|
|
|
|
|
|
"livemode": false, |
169
|
|
|
|
|
|
|
"metadata": {}, |
170
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
171
|
|
|
|
|
|
|
}, |
172
|
|
|
|
|
|
|
{ |
173
|
|
|
|
|
|
|
"id": "link_fake123456789", |
174
|
|
|
|
|
|
|
"object": "file_link", |
175
|
|
|
|
|
|
|
"created": 1571197169, |
176
|
|
|
|
|
|
|
"expired": false, |
177
|
|
|
|
|
|
|
"expires_at": null, |
178
|
|
|
|
|
|
|
"file": "file_fake123456789", |
179
|
|
|
|
|
|
|
"livemode": false, |
180
|
|
|
|
|
|
|
"metadata": {}, |
181
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
{ |
184
|
|
|
|
|
|
|
"id": "link_fake123456789", |
185
|
|
|
|
|
|
|
"object": "file_link", |
186
|
|
|
|
|
|
|
"created": 1571176460, |
187
|
|
|
|
|
|
|
"expired": false, |
188
|
|
|
|
|
|
|
"expires_at": null, |
189
|
|
|
|
|
|
|
"file": "file_fake123456789", |
190
|
|
|
|
|
|
|
"livemode": false, |
191
|
|
|
|
|
|
|
"metadata": {}, |
192
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
193
|
|
|
|
|
|
|
}, |
194
|
|
|
|
|
|
|
{ |
195
|
|
|
|
|
|
|
"id": "link_fake123456789", |
196
|
|
|
|
|
|
|
"object": "file_link", |
197
|
|
|
|
|
|
|
"created": 1571099998, |
198
|
|
|
|
|
|
|
"expired": false, |
199
|
|
|
|
|
|
|
"expires_at": null, |
200
|
|
|
|
|
|
|
"file": "file_fake123456789", |
201
|
|
|
|
|
|
|
"livemode": false, |
202
|
|
|
|
|
|
|
"metadata": {}, |
203
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
204
|
|
|
|
|
|
|
}, |
205
|
|
|
|
|
|
|
{ |
206
|
|
|
|
|
|
|
"id": "link_fake123456789", |
207
|
|
|
|
|
|
|
"object": "file_link", |
208
|
|
|
|
|
|
|
"created": 1551509650, |
209
|
|
|
|
|
|
|
"expired": false, |
210
|
|
|
|
|
|
|
"expires_at": null, |
211
|
|
|
|
|
|
|
"file": "file_fake123456789", |
212
|
|
|
|
|
|
|
"livemode": false, |
213
|
|
|
|
|
|
|
"metadata": {}, |
214
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
215
|
|
|
|
|
|
|
}, |
216
|
|
|
|
|
|
|
{ |
217
|
|
|
|
|
|
|
"id": "link_fake123456789", |
218
|
|
|
|
|
|
|
"object": "file_link", |
219
|
|
|
|
|
|
|
"created": 1551509211, |
220
|
|
|
|
|
|
|
"expired": false, |
221
|
|
|
|
|
|
|
"expires_at": null, |
222
|
|
|
|
|
|
|
"file": "file_fake123456789", |
223
|
|
|
|
|
|
|
"livemode": false, |
224
|
|
|
|
|
|
|
"metadata": {}, |
225
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
226
|
|
|
|
|
|
|
}, |
227
|
|
|
|
|
|
|
{ |
228
|
|
|
|
|
|
|
"id": "link_fake123456789", |
229
|
|
|
|
|
|
|
"object": "file_link", |
230
|
|
|
|
|
|
|
"created": 1547559540, |
231
|
|
|
|
|
|
|
"expired": false, |
232
|
|
|
|
|
|
|
"expires_at": null, |
233
|
|
|
|
|
|
|
"file": "file_fake123456789", |
234
|
|
|
|
|
|
|
"livemode": false, |
235
|
|
|
|
|
|
|
"metadata": {}, |
236
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
], |
239
|
|
|
|
|
|
|
"has_more": true, |
240
|
|
|
|
|
|
|
"url": "/v1/file_links?file=file_fake123456789" |
241
|
|
|
|
|
|
|
}, |
242
|
|
|
|
|
|
|
"purpose": "dispute_evidence", |
243
|
|
|
|
|
|
|
"size": 9863, |
244
|
|
|
|
|
|
|
"title": null, |
245
|
|
|
|
|
|
|
"type": "png", |
246
|
|
|
|
|
|
|
"url": "https://files.stripe.com/v1/files/file_fake123456789/contents" |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=head1 HISTORY |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
=head2 v0.1 |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
Initial version |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=head1 AUTHOR |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=head1 SEE ALSO |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
Stripe API documentation: |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/files>, L<https://stripe.com/docs/file-upload> |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
270
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
=cut |