File Coverage

lib/Net/API/Stripe/Terminal/Reader.pm
Criterion Covered Total %
statement 19 32 59.3
branch n/a
condition n/a
subroutine 7 20 35.0
pod 12 13 92.3
total 38 65 58.4


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