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 <@sitael.tokyo.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
|
|
|
|
|
|
|
package Net::API::Stripe::Terminal::ConnectionToken; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
846
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
1
|
|
120
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub location { return( shift->_set_get_scalar( 'location', @_ ) ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub secret { return( shift->_set_get_scalar( 'secret', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
=over 4 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Terminal::ConnectionToken> object. |
60
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item B<object> string, value is "terminal.connection_token" |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item B<location> string |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
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. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B<secret> string |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Your application should pass this token to the Stripe Terminal SDK. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 API SAMPLE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
{ |
85
|
|
|
|
|
|
|
"object": "terminal.connection_token", |
86
|
|
|
|
|
|
|
"secret": "pst_test_fake123456789" |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 HISTORY |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 v0.1 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Initial version |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SEE ALSO |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Stripe API documentation: |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/terminal/connection_tokens>, L<https://stripe.com/docs/terminal/readers/fleet-management#create> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
110
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |