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