line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Terminal/Reader.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/readers/object |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Terminal::Reader; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
831
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
1
|
|
254
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub device_sw_version { return( shift->_set_get_scalar( 'device_sw_version', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub device_type { return( shift->_set_get_scalar( 'device_type', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub ip_address { return( shift->_set_get_scalar( 'ip_address', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub label { return( shift->_set_get_scalar( 'label', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub location { return( shift->_set_get_scalar( 'location', @_ ) ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
0
|
|
sub registration_code { return( shift->_set_get_scalar( 'registration_code', @_ ) ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub serial_number { return( shift->_set_get_scalar( 'serial_number', @_ ) ); } |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub status { return( shift->_set_get_scalar( 'status', @_ ) ); } |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=encoding utf8 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Net::API::Stripe::Terminal::Reader - A Stripe Terminal Reader Object |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $reader = $stripe->reader({ |
52
|
|
|
|
|
|
|
device_sw_version => '1.0.2', |
53
|
|
|
|
|
|
|
device_type => 'verifone_P400', |
54
|
|
|
|
|
|
|
ip_address => '1.2.3.4', |
55
|
|
|
|
|
|
|
label => 'Blue Rabbit', |
56
|
|
|
|
|
|
|
# Anywhere |
57
|
|
|
|
|
|
|
location => undef, |
58
|
|
|
|
|
|
|
registration_code => 'puppies-plug-could', |
59
|
|
|
|
|
|
|
serial_number => '123-456-789', |
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
|
|
|
|
|
|
|
A Reader represents a physical device for accepting payment details. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Terminal::Reader> object. |
79
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=back |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 METHODS |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=over 4 |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item B<id> string |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Unique identifier for the object. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item B<object> string, value is "terminal.reader" |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item B<device_sw_version> string |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The current software version of the reader. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item B<device_type> string |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Type of reader, e.g., verifone_P400 or bbpos_chipper2x. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item B<ip_address> string |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
The local IP address of the reader. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item B<label> string |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item B<location> string |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The location to assign the reader to. If no location is specified, the reader will be assigned to the accountâs default location. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item B<serial_number> string |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Serial number of the reader. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item B<status> string |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
The networking status of the reader. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=back |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 API SAMPLE |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
{ |
128
|
|
|
|
|
|
|
"id": "tmr_P400-123-456-789", |
129
|
|
|
|
|
|
|
"object": "terminal.reader", |
130
|
|
|
|
|
|
|
"device_sw_version": null, |
131
|
|
|
|
|
|
|
"device_type": "verifone_P400", |
132
|
|
|
|
|
|
|
"ip_address": "192.168.2.2", |
133
|
|
|
|
|
|
|
"label": "Blue Rabbit", |
134
|
|
|
|
|
|
|
"livemode": false, |
135
|
|
|
|
|
|
|
"location": "tml_1234", |
136
|
|
|
|
|
|
|
"metadata": {}, |
137
|
|
|
|
|
|
|
"serial_number": "123-456-789", |
138
|
|
|
|
|
|
|
"status": "online", |
139
|
|
|
|
|
|
|
"registration_code": "puppies-plug-could" |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 HISTORY |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 v0.1 |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Initial version |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 AUTHOR |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 SEE ALSO |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Stripe API documentation: |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/terminal/readers>, L<https://stripe.com/docs/terminal/readers/connecting> |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
163
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=cut |