Stripe/Terminal/ConnectionToken.pm

filter: Statementstmt 72.7% 8 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 70.0% 14 / 20 CC 1 SCAR 4.1
CC
1
Cov
73%
object
2.0
location
2.0
secret
2.0
CRAP 1.5
« Stripe/Payment/Intent/NextAction.pm ↑ Summary Stripe/Billing/Invoice/Period.pm »
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 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
17 };
18  
19 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
20  
21 0 ▶sub location { return( shift->_set_get_scalar( 'location', @_ ) ); }
Subroutine location: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub secret { return( shift->_set_get_scalar( 'secret', @_ ) ); }
Subroutine secret: not called CC=1 SCAR=6.9
Pod documented
24  
25 1 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
« Stripe/Payment/Intent/NextAction.pm ↑ Summary Stripe/Billing/Invoice/Period.pm »