line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/GeoLocation.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
package Net::API::Stripe::GeoLocation; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
2
|
|
|
2
|
|
21088297
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
62
|
|
14
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
60
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
16
|
2
|
|
|
2
|
|
146
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
129
|
|
17
|
2
|
|
|
2
|
|
43
|
our( $VERSION ) = 'v0.100.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
41
|
|
21
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
283
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub city { return( shift->_set_get_scalar( 'city', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub country { return( shift->_set_get_scalar( 'country', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub latitude { return( shift->_set_get_number( 'latitude', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub longitude { return( shift->_set_get_number( 'longitude', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub region { return( shift->_set_get_scalar( 'region', @_ ) ); } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding utf8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Net::API::Stripe::GeoLocation - A Stripe Geo Location Object |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $geo_loc = $stripe->fraud_review->ip_address_location({ |
46
|
|
|
|
|
|
|
city => 'Tokyo', |
47
|
|
|
|
|
|
|
country => 'jp', |
48
|
|
|
|
|
|
|
latitude => '35.6935496', |
49
|
|
|
|
|
|
|
longitude => '139.7461204', |
50
|
|
|
|
|
|
|
region => undef, |
51
|
|
|
|
|
|
|
}); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
v0.100.0 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This is used in L<Net::API::Stripe::Fraud::Review> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 new( %ARG ) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::GeoLocation> object. |
68
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 city string |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The city where the payment originated. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 country string |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Two-letter ISO code representing the country where the payment originated. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 latitude decimal |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The geographic latitude where the payment originated. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 longitude decimal |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The geographic longitude where the payment originated. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 region string |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The state/county/province/region where the payment originated. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 API SAMPLE |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
{ |
95
|
|
|
|
|
|
|
"id": "prv_fake123456789", |
96
|
|
|
|
|
|
|
"object": "review", |
97
|
|
|
|
|
|
|
"billing_zip": null, |
98
|
|
|
|
|
|
|
"charge": "ch_fake123456789", |
99
|
|
|
|
|
|
|
"closed_reason": null, |
100
|
|
|
|
|
|
|
"created": 1571480456, |
101
|
|
|
|
|
|
|
"ip_address": null, |
102
|
|
|
|
|
|
|
"ip_address_location": null, |
103
|
|
|
|
|
|
|
"livemode": false, |
104
|
|
|
|
|
|
|
"open": true, |
105
|
|
|
|
|
|
|
"opened_reason": "rule", |
106
|
|
|
|
|
|
|
"reason": "rule", |
107
|
|
|
|
|
|
|
"session": null |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 HISTORY |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 v0.1 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Initial version |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 AUTHOR |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 SEE ALSO |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Stripe API documentation: |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/radar/reviews/object> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
131
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |