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
|
|
|
|
|
|
|
package Net::API::Stripe::File::Link; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
2
|
|
|
2
|
|
21236475
|
use strict; |
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
61
|
|
15
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
90
|
|
16
|
2
|
|
|
2
|
|
12
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
17
|
2
|
|
|
2
|
|
142
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
123
|
|
18
|
2
|
|
|
2
|
|
40
|
our( $VERSION ) = 'v0.100.0'; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
38
|
|
22
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
414
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub expired { return( shift->_set_get_boolean( 'expired', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub expires_at { return( shift->_set_get_datetime( 'expires_at', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub file { return( shift->_set_get_scalar_or_object( 'file', 'Net::API::Stripe::File', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
|
sub url { return( shift->_set_get_uri( 'url', @_ ) ); } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=encoding utf8 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Net::API::Stripe::File::Link - A Stripe File Link Object |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SYNOPSIS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my $link = $stripe->file_link({ |
55
|
|
|
|
|
|
|
expires_at => '2020-04-12', |
56
|
|
|
|
|
|
|
file => $file_object, |
57
|
|
|
|
|
|
|
livemode => $stripe->false, |
58
|
|
|
|
|
|
|
metadata => { transaction_id => 123 }, |
59
|
|
|
|
|
|
|
url => 'https://example.com/some/file.jpg', |
60
|
|
|
|
|
|
|
}); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 VERSION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
v0.100.0 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This is a Stripe File Link object. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
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. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 new( %ARG ) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::File::Link> object. |
79
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 METHODS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 id string |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Unique identifier for the object. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 object string, value is "file_link" |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 created timestamp |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 expired boolean |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Whether this link is already expired. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 expires_at timestamp |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Time at which the link expires. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 file string (expandable) |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
The file object this link points to. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::File> object. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 livemode boolean |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 metadata hash |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
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. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 url string |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
The publicly accessible URL to download the file. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 API SAMPLE |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
{ |
124
|
|
|
|
|
|
|
"id": "file_fake123456789", |
125
|
|
|
|
|
|
|
"object": "file", |
126
|
|
|
|
|
|
|
"created": 1540111053, |
127
|
|
|
|
|
|
|
"filename": "file_fake123456789", |
128
|
|
|
|
|
|
|
"links": { |
129
|
|
|
|
|
|
|
"object": "list", |
130
|
|
|
|
|
|
|
"data": [ |
131
|
|
|
|
|
|
|
{ |
132
|
|
|
|
|
|
|
"id": "link_fake123456789", |
133
|
|
|
|
|
|
|
"object": "file_link", |
134
|
|
|
|
|
|
|
"created": 1571229407, |
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": 1571225071, |
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_fake123456789", |
155
|
|
|
|
|
|
|
"object": "file_link", |
156
|
|
|
|
|
|
|
"created": 1571223490, |
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_1FUA14CeyNCl6fY2s3gFUjmP", |
166
|
|
|
|
|
|
|
"object": "file_link", |
167
|
|
|
|
|
|
|
"created": 1571222766, |
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": 1571197169, |
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": 1571176460, |
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": 1571099998, |
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": 1551509650, |
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": 1551509211, |
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
|
|
|
|
|
|
|
"id": "link_fake123456789", |
232
|
|
|
|
|
|
|
"object": "file_link", |
233
|
|
|
|
|
|
|
"created": 1547559540, |
234
|
|
|
|
|
|
|
"expired": false, |
235
|
|
|
|
|
|
|
"expires_at": null, |
236
|
|
|
|
|
|
|
"file": "file_fake123456789", |
237
|
|
|
|
|
|
|
"livemode": false, |
238
|
|
|
|
|
|
|
"metadata": {}, |
239
|
|
|
|
|
|
|
"url": "https://files.stripe.com/links/fl_test_fake123456789" |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
], |
242
|
|
|
|
|
|
|
"has_more": true, |
243
|
|
|
|
|
|
|
"url": "/v1/file_links?file=file_fake123456789" |
244
|
|
|
|
|
|
|
}, |
245
|
|
|
|
|
|
|
"purpose": "dispute_evidence", |
246
|
|
|
|
|
|
|
"size": 9863, |
247
|
|
|
|
|
|
|
"title": null, |
248
|
|
|
|
|
|
|
"type": "png", |
249
|
|
|
|
|
|
|
"url": "https://files.stripe.com/v1/files/file_fake123456789/contents" |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head1 HISTORY |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=head2 v0.1 |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
Initial version |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=head1 AUTHOR |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=head1 SEE ALSO |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
Stripe API documentation: |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/files/object>, L<https://stripe.com/docs/api/file_links/object> |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
273
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=cut |