line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Terminal/Reader.pm |
3
|
|
|
|
|
|
|
## Version v0.101.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2022/10/29 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/terminal/readers/object |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Terminal::Reader; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
2
|
|
|
2
|
|
21301720
|
use strict; |
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
65
|
|
15
|
2
|
|
|
2
|
|
35
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
68
|
|
16
|
2
|
|
|
2
|
|
14
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
11
|
|
17
|
2
|
|
|
2
|
|
222
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
132
|
|
18
|
2
|
|
|
2
|
|
55
|
our( $VERSION ) = 'v0.101.0'; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
55
|
|
22
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
700
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub action { return( shift->_set_get_object( 'action', 'Net::API::Stripe::Payout', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub device_sw_version { return( shift->_set_get_scalar( 'device_sw_version', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub device_type { return( shift->_set_get_scalar( 'device_type', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub ip_address { return( shift->_set_get_scalar( 'ip_address', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub label { return( shift->_set_get_scalar( 'label', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
|
sub location { return( shift->_set_get_scalar( 'location', @_ ) ); } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
0
|
0
|
|
sub registration_code { return( shift->_set_get_scalar( 'registration_code', @_ ) ); } |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
1
|
|
sub serial_number { return( shift->_set_get_scalar( 'serial_number', @_ ) ); } |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
|
sub status { return( shift->_set_get_scalar( 'status', @_ ) ); } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
# NOTE: POD |
52
|
|
|
|
|
|
|
__END__ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=encoding utf8 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Net::API::Stripe::Terminal::Reader - A Stripe Terminal Reader Object |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $reader = $stripe->reader({ |
63
|
|
|
|
|
|
|
device_sw_version => '1.0.2', |
64
|
|
|
|
|
|
|
device_type => 'verifone_P400', |
65
|
|
|
|
|
|
|
ip_address => '1.2.3.4', |
66
|
|
|
|
|
|
|
label => 'Blue Rabbit', |
67
|
|
|
|
|
|
|
# Anywhere |
68
|
|
|
|
|
|
|
location => undef, |
69
|
|
|
|
|
|
|
registration_code => 'puppies-plug-could', |
70
|
|
|
|
|
|
|
serial_number => '123-456-789', |
71
|
|
|
|
|
|
|
}); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
v0.101.0 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DESCRIPTION |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
A Reader represents a physical device for accepting payment details. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 new( %ARG ) |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Terminal::Reader> object. |
88
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 METHODS |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 id string |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Unique identifier for the object. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 object string, value is "terminal.reader" |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 action object |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
The most recent action performed by the reader. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Payout> object. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 device_sw_version string |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
The current software version of the reader. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 device_type string |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Type of reader, e.g., verifone_P400 or bbpos_chipper2x. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 ip_address string |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The local IP address of the reader. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 label string |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 livemode boolean |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 location string |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
The location to assign the reader to. If no location is specified, the reader will be assigned to the account’s default location. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 metadata hash |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 serial_number string |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Serial number of the reader. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 status string |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
The networking status of the reader. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 API SAMPLE |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
{ |
145
|
|
|
|
|
|
|
"id": "tmr_P400-123-456-789", |
146
|
|
|
|
|
|
|
"object": "terminal.reader", |
147
|
|
|
|
|
|
|
"device_sw_version": null, |
148
|
|
|
|
|
|
|
"device_type": "verifone_P400", |
149
|
|
|
|
|
|
|
"ip_address": "192.168.2.2", |
150
|
|
|
|
|
|
|
"label": "Blue Rabbit", |
151
|
|
|
|
|
|
|
"livemode": false, |
152
|
|
|
|
|
|
|
"location": "tml_1234", |
153
|
|
|
|
|
|
|
"metadata": {}, |
154
|
|
|
|
|
|
|
"serial_number": "123-456-789", |
155
|
|
|
|
|
|
|
"status": "online", |
156
|
|
|
|
|
|
|
"registration_code": "puppies-plug-could" |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 HISTORY |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 v0.1 |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Initial version |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head1 AUTHOR |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head1 SEE ALSO |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Stripe API documentation: |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/terminal/readers>, L<https://stripe.com/docs/terminal/readers/connecting> |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
180
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |