line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/File/Link.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <@sitael.tokyo.deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/file_links/object |
11
|
|
|
|
|
|
|
package Net::API::Stripe::File::Link; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
819
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
16
|
1
|
|
|
1
|
|
248
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub id { shift->_set_get_scalar( 'id', @_ ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub object { shift->_set_get_scalar( 'object', @_ ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub created { shift->_set_get_datetime( 'created', @_ ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub expired { shift->_set_get_boolean( 'expired', @_ ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub expires_at { shift->_set_get_datetime( 'expires_at', @_ ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub file { shift->_set_get_scalar_or_object( 'file', 'Net::API::Stripe::File', @_ ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub livemode { shift->_set_get_boolean( 'livemode', @_ ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub metadata { shift->_set_get_hash( 'metadata', @_ ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub url { shift->_set_get_uri( 'url', @_ ); } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Net::API::Stripe::File::Link - A Stripe File Link Object |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $link = $stripe->file_link({ |
50
|
|
|
|
|
|
|
expires_at => '2020-04-12', |
51
|
|
|
|
|
|
|
file => $file_object, |
52
|
|
|
|
|
|
|
livemode => $stripe->false, |
53
|
|
|
|
|
|
|
metadata => { transaction_id => 123 }, |
54
|
|
|
|
|
|
|
url => 'https://example.com/some/file.jpg', |
55
|
|
|
|
|
|
|
}); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
v0.100.0 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is a Stripe File Link object. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
To share the contents of a File object with non-Stripe users, you can create a FileLink. FileLinks contain a URL that can be used to retrieve the contents of the file without authentication. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=over 4 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::File::Link> object. |
76
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=back |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 METHODS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over 4 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item B<id> string |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Unique identifier for the object. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item B<object> string, value is "file_link" |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item B<created> timestamp |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item B<expired> boolean |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Whether this link is already expired. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item B<expires_at> timestamp |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Time at which the link expires. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item B<file> string (expandable) |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The file object this link points to. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::File> object. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item B<livemode> boolean |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item B<metadata> hash |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item B<url> string |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
The publicly accessible URL to download the file. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 API SAMPLE |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
{ |
127
|
|
|
|
|
|
|
"id": "file_fake123456789", |
128
|
|
|
|
|
|
|
"object": "file", |
129
|
|
|
|
|
|
|
"created": 1540111053, |
130
|
|
|
|
|
|
|
"filename": "file_fake123456789", |
131
|
|
|
|
|
|
|
"links": { |
132
|
|
|
|
|
|
|
"object": "list", |
133
|
|
|
|
|
|
|
"data": [ |
134
|
|
|
|
|
|
|
{ |
135
|
|
|
|
|
|
|
"id": "link_fake123456789", |
136
|
|
|
|
|
|
|
"object": "file_link", |
137
|
|
|
|
|
|
|
"created": 1571229407, |
138
|
|
|
|
|
|
|
"expired": false, |
139
|
|
|
|
|
|
|
"expires_at": null, |
140
|
|
|
|
|
|
|
"file": "file_fake123456789", |
141
|
|
|
|
|
|
|
"livemode": false, |
142
|
|
|
|
|
|
|
"metadata": {}, |
143
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
{ |
146
|
|
|
|
|
|
|
"id": "link_fake123456789", |
147
|
|
|
|
|
|
|
"object": "file_link", |
148
|
|
|
|
|
|
|
"created": 1571225071, |
149
|
|
|
|
|
|
|
"expired": false, |
150
|
|
|
|
|
|
|
"expires_at": null, |
151
|
|
|
|
|
|
|
"file": "file_fake123456789", |
152
|
|
|
|
|
|
|
"livemode": false, |
153
|
|
|
|
|
|
|
"metadata": {}, |
154
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
155
|
|
|
|
|
|
|
}, |
156
|
|
|
|
|
|
|
{ |
157
|
|
|
|
|
|
|
"id": "link_fake123456789", |
158
|
|
|
|
|
|
|
"object": "file_link", |
159
|
|
|
|
|
|
|
"created": 1571223490, |
160
|
|
|
|
|
|
|
"expired": false, |
161
|
|
|
|
|
|
|
"expires_at": null, |
162
|
|
|
|
|
|
|
"file": "file_fake123456789", |
163
|
|
|
|
|
|
|
"livemode": false, |
164
|
|
|
|
|
|
|
"metadata": {}, |
165
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
166
|
|
|
|
|
|
|
}, |
167
|
|
|
|
|
|
|
{ |
168
|
|
|
|
|
|
|
"id": "link_1FUA14CeyNCl6fY2s3gFUjmP", |
169
|
|
|
|
|
|
|
"object": "file_link", |
170
|
|
|
|
|
|
|
"created": 1571222766, |
171
|
|
|
|
|
|
|
"expired": false, |
172
|
|
|
|
|
|
|
"expires_at": null, |
173
|
|
|
|
|
|
|
"file": "file_fake123456789", |
174
|
|
|
|
|
|
|
"livemode": false, |
175
|
|
|
|
|
|
|
"metadata": {}, |
176
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
177
|
|
|
|
|
|
|
}, |
178
|
|
|
|
|
|
|
{ |
179
|
|
|
|
|
|
|
"id": "link_fake123456789", |
180
|
|
|
|
|
|
|
"object": "file_link", |
181
|
|
|
|
|
|
|
"created": 1571197169, |
182
|
|
|
|
|
|
|
"expired": false, |
183
|
|
|
|
|
|
|
"expires_at": null, |
184
|
|
|
|
|
|
|
"file": "file_fake123456789", |
185
|
|
|
|
|
|
|
"livemode": false, |
186
|
|
|
|
|
|
|
"metadata": {}, |
187
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
188
|
|
|
|
|
|
|
}, |
189
|
|
|
|
|
|
|
{ |
190
|
|
|
|
|
|
|
"id": "link_fake123456789", |
191
|
|
|
|
|
|
|
"object": "file_link", |
192
|
|
|
|
|
|
|
"created": 1571176460, |
193
|
|
|
|
|
|
|
"expired": false, |
194
|
|
|
|
|
|
|
"expires_at": null, |
195
|
|
|
|
|
|
|
"file": "file_fake123456789", |
196
|
|
|
|
|
|
|
"livemode": false, |
197
|
|
|
|
|
|
|
"metadata": {}, |
198
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
199
|
|
|
|
|
|
|
}, |
200
|
|
|
|
|
|
|
{ |
201
|
|
|
|
|
|
|
"id": "link_fake123456789", |
202
|
|
|
|
|
|
|
"object": "file_link", |
203
|
|
|
|
|
|
|
"created": 1571099998, |
204
|
|
|
|
|
|
|
"expired": false, |
205
|
|
|
|
|
|
|
"expires_at": null, |
206
|
|
|
|
|
|
|
"file": "file_fake123456789", |
207
|
|
|
|
|
|
|
"livemode": false, |
208
|
|
|
|
|
|
|
"metadata": {}, |
209
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
210
|
|
|
|
|
|
|
}, |
211
|
|
|
|
|
|
|
{ |
212
|
|
|
|
|
|
|
"id": "link_fake123456789", |
213
|
|
|
|
|
|
|
"object": "file_link", |
214
|
|
|
|
|
|
|
"created": 1551509650, |
215
|
|
|
|
|
|
|
"expired": false, |
216
|
|
|
|
|
|
|
"expires_at": null, |
217
|
|
|
|
|
|
|
"file": "file_fake123456789", |
218
|
|
|
|
|
|
|
"livemode": false, |
219
|
|
|
|
|
|
|
"metadata": {}, |
220
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
221
|
|
|
|
|
|
|
}, |
222
|
|
|
|
|
|
|
{ |
223
|
|
|
|
|
|
|
"id": "link_fake123456789", |
224
|
|
|
|
|
|
|
"object": "file_link", |
225
|
|
|
|
|
|
|
"created": 1551509211, |
226
|
|
|
|
|
|
|
"expired": false, |
227
|
|
|
|
|
|
|
"expires_at": null, |
228
|
|
|
|
|
|
|
"file": "file_fake123456789", |
229
|
|
|
|
|
|
|
"livemode": false, |
230
|
|
|
|
|
|
|
"metadata": {}, |
231
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
232
|
|
|
|
|
|
|
}, |
233
|
|
|
|
|
|
|
{ |
234
|
|
|
|
|
|
|
"id": "link_fake123456789", |
235
|
|
|
|
|
|
|
"object": "file_link", |
236
|
|
|
|
|
|
|
"created": 1547559540, |
237
|
|
|
|
|
|
|
"expired": false, |
238
|
|
|
|
|
|
|
"expires_at": null, |
239
|
|
|
|
|
|
|
"file": "file_fake123456789", |
240
|
|
|
|
|
|
|
"livemode": false, |
241
|
|
|
|
|
|
|
"metadata": {}, |
242
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
], |
245
|
|
|
|
|
|
|
"has_more": true, |
246
|
|
|
|
|
|
|
"url": "/v1/file_links?file=file_fake123456789" |
247
|
|
|
|
|
|
|
}, |
248
|
|
|
|
|
|
|
"purpose": "dispute_evidence", |
249
|
|
|
|
|
|
|
"size": 9863, |
250
|
|
|
|
|
|
|
"title": null, |
251
|
|
|
|
|
|
|
"type": "png", |
252
|
|
|
|
|
|
|
"url": "https://files.stripe.com/v1/files/file_fake123456789/contents" |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=head1 HISTORY |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=head2 v0.1 |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
Initial version |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=head1 AUTHOR |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=head1 SEE ALSO |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
Stripe API documentation: |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/files/object>, L<https://stripe.com/docs/api/file_links/object> |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
276
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=cut |