line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Terminal/Location.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/locations |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Terminal::Location; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
2
|
|
|
2
|
|
21361110
|
use strict; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
74
|
|
15
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
16
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
17
|
2
|
|
|
2
|
|
166
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
152
|
|
18
|
2
|
|
|
2
|
|
49
|
our( $VERSION ) = 'v0.101.0'; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
48
|
|
22
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
408
|
|
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 address { return( shift->_set_get_object( 'address', 'Net::API::Stripe::Address', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub configuration_overrides { return( shift->_set_get_scalar( 'configuration_overrides', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub display_name { return( shift->_set_get_scalar( 'display_name', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
# NOTE: POD |
40
|
|
|
|
|
|
|
__END__ |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding utf8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Net::API::Stripe::Terminal::Location - A Strip Terminal Reader Location Object |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SYNOPSIS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $loc = $stripe->location({ |
51
|
|
|
|
|
|
|
address => $address_object, |
52
|
|
|
|
|
|
|
display_name => 'Tokyo central', |
53
|
|
|
|
|
|
|
}); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
v0.101.0 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
A Location represents a grouping of readers. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 new( %ARG ) |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Terminal::Location> object. |
70
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 id string |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Unique identifier for the object. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 object string, value is "terminal.location" |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 address hash |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The full address of the location. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Address> object. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 configuration_overrides string |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The ID of a configuration that will be used to customize all readers in this location. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 display_name string |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The display name of the location. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 livemode boolean |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 metadata hash |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Set of [key-value pairs](/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. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 API SAMPLE |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
{ |
107
|
|
|
|
|
|
|
"id": "tml_fake123456789", |
108
|
|
|
|
|
|
|
"object": "terminal.location", |
109
|
|
|
|
|
|
|
"address": { |
110
|
|
|
|
|
|
|
"city": "Anytown", |
111
|
|
|
|
|
|
|
"country": "US", |
112
|
|
|
|
|
|
|
"line1": "1234 Main street", |
113
|
|
|
|
|
|
|
"line2": null, |
114
|
|
|
|
|
|
|
"postal_code": "123456", |
115
|
|
|
|
|
|
|
"state": null |
116
|
|
|
|
|
|
|
}, |
117
|
|
|
|
|
|
|
"display_name": "My First Store" |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 HISTORY |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 v0.1 |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Initial version |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 AUTHOR |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 SEE ALSO |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Stripe API documentation: |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/terminal/locations>, L<https://stripe.com/docs/terminal/readers/fleet-management#create> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
141
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |