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