Stripe/Terminal/Location.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 65.2% 15 / 23 CC 1 SCAR 4.5
CC
1
Cov
67%
id
2.0
object
2.0
address
2.0
CRAP 1.6
« Stripe/Payment/Source/Redirect.pm ↑ Summary Stripe/Balance/ConnectReserved.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Terminal/Location.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/locations
11 package Net::API::Stripe::Terminal::Location;
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 id { shift->_set_get_scalar( 'id', @_ ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
20  
21 0 ▶sub object { shift->_set_get_scalar( 'object', @_ ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub address { shift->_set_get_object( 'address', 'Net::API::Stripe::Address', @_ ); }
Subroutine address: not called CC=1 SCAR=6.9
Pod documented
24  
25 0 ▶sub display_name { shift->_set_get_scalar( 'display_name', @_ ); }
Subroutine display_name: not called CC=1 SCAR=6.9
Pod documented
26  
27 1 1;
28  
29 __END__
30  
31 =encoding utf8
32  
33 =head1 NAME
34  
35 Net::API::Stripe::Terminal::Location - A Strip Terminal Reader Location Object
36  
37 =head1 SYNOPSIS
38  
39 my $loc = $stripe->location({
40 address => $address_object,
41 display_name => 'Tokyo central',
42 });
43  
44 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
45  
46 =head1 VERSION
47  
48 v0.100.0
49  
50 =head1 DESCRIPTION
51  
52 A Location represents a grouping of readers.
53  
54 =head1 CONSTRUCTOR
55  
56 =over 4
57  
58 =item B<new>( %ARG )
59  
60 Creates a new L<Net::API::Stripe::Terminal::Location> object.
61 It may also take an hash like arguments, that also are method of the same name.
62  
63 =back
64  
65 =head1 METHODS
66  
67 =over 4
68  
69 =item B<id> string
70  
71 Unique identifier for the object.
72  
73 =item B<object> string, value is "terminal.location"
74  
75 String representing the object’s type. Objects of the same type share the same value.
76  
77 =item B<address> hash
78  
79 The full address of the location.
80  
81 This is a L<Net::API::Stripe::Address> object.
82  
83 =item B<display_name> string
84  
85 The display name of the location.
86  
87 =back
88  
89 =head1 API SAMPLE
90  
91 {
92 "id": "tml_fake123456789",
93 "object": "terminal.location",
94 "address": {
95 "city": "Anytown",
96 "country": "US",
97 "line1": "1234 Main street",
98 "line2": null,
99 "postal_code": "123456",
100 "state": null
101 },
102 "display_name": "My First Store"
103 }
104  
105 =head1 HISTORY
106  
107 =head2 v0.1
108  
109 Initial version
110  
111 =head1 AUTHOR
112  
113 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
114  
115 =head1 SEE ALSO
116  
117 Stripe API documentation:
118  
119 L<https://stripe.com/docs/api/terminal/locations>, L<https://stripe.com/docs/terminal/readers/fleet-management#create>
120  
121 =head1 COPYRIGHT & LICENSE
122  
123 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
124  
125 You can use, copy, modify and redistribute this package and associated
126 files under the same terms as Perl itself.
127  
128 =cut
« Stripe/Payment/Source/Redirect.pm ↑ Summary Stripe/Balance/ConnectReserved.pm »