line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Terminal/ConnectionToken.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/terminal/connection_tokens/object |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
use strict; |
14
|
2
|
|
|
2
|
|
26645429
|
use warnings; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
65
|
|
15
|
2
|
|
|
2
|
|
13
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
61
|
|
16
|
2
|
|
|
2
|
|
11
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
145
|
our( $VERSION ) = 'v0.100.0'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
114
|
|
18
|
2
|
|
|
2
|
|
57
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
21
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
22
|
2
|
|
|
2
|
|
12
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
220
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
1; |
27
|
|
|
|
|
|
|
# NOTE: POD |
28
|
0
|
|
|
0
|
1
|
|
|
29
|
|
|
|
|
|
|
=encoding utf8 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Net::API::Stripe::Terminal::ConnectionToken - A Stripe Connection Token Object |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $token = $stripe->connection_token({ |
38
|
|
|
|
|
|
|
# Usable anywhere because undef |
39
|
|
|
|
|
|
|
location => undef, |
40
|
|
|
|
|
|
|
secret => 'pst_SGHJYDGHjfdldjflTHshfj', |
41
|
|
|
|
|
|
|
}); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
v0.100.0 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
A Connection Token is used by the Stripe Terminal SDK to connect to a reader. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 new( %ARG ) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Terminal::ConnectionToken> object. |
58
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 object string, value is "terminal.connection_token" |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 location string |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 secret string |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Your application should pass this token to the Stripe Terminal SDK. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 API SAMPLE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
{ |
77
|
|
|
|
|
|
|
"object": "terminal.connection_token", |
78
|
|
|
|
|
|
|
"secret": "pst_test_fake123456789" |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 HISTORY |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 v0.1 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Initial version |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SEE ALSO |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Stripe API documentation: |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/terminal/connection_tokens>, L<https://stripe.com/docs/terminal/readers/fleet-management#create> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
102
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |