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