line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Event/Request.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::Event::Request; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
2
|
|
|
2
|
|
21043009
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
80
|
|
14
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
56
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
11
|
|
16
|
2
|
|
|
2
|
|
143
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
125
|
|
17
|
2
|
|
|
2
|
|
51
|
our( $VERSION ) = 'v0.100.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
37
|
|
21
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
191
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub idempotency_key { return( shift->_set_get_scalar( 'idempotency_key', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding utf8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Net::API::Stripe::Event::Request - A Stripe Event Request object |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $req = $stripe->event->request({ |
40
|
|
|
|
|
|
|
id => 'req_HwlkQJshckjIsj', |
41
|
|
|
|
|
|
|
idempotency_key => '677A3112-FBAD-4804-BA61-CEF1CC13D155', |
42
|
|
|
|
|
|
|
}); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
v0.100.0 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This is a Stripe Event Request object. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This is instantiated by the method B<request> in module L<Net::API::Stripe::Event> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 new( %ARG ) |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Event::Request> object. |
59
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 id string |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe’s automatic subscription handling). Request logs are available in the dashboard, but currently not in the API. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 idempotency_key string |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
The idempotency key transmitted during the request, if any. Note: This property is populated only for events on or after May 23, 2017. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 API SAMPLE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
{ |
74
|
|
|
|
|
|
|
"id": "evt_fake123456789", |
75
|
|
|
|
|
|
|
"object": "event", |
76
|
|
|
|
|
|
|
"api_version": "2017-02-14", |
77
|
|
|
|
|
|
|
"created": 1528914645, |
78
|
|
|
|
|
|
|
"data": { |
79
|
|
|
|
|
|
|
"object": { |
80
|
|
|
|
|
|
|
"object": "balance", |
81
|
|
|
|
|
|
|
"available": [ |
82
|
|
|
|
|
|
|
{ |
83
|
|
|
|
|
|
|
"currency": "jpy", |
84
|
|
|
|
|
|
|
"amount": 1025751, |
85
|
|
|
|
|
|
|
"source_types": { |
86
|
|
|
|
|
|
|
"card": 1025751 |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
], |
90
|
|
|
|
|
|
|
"connect_reserved": [ |
91
|
|
|
|
|
|
|
{ |
92
|
|
|
|
|
|
|
"currency": "jpy", |
93
|
|
|
|
|
|
|
"amount": 0 |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
], |
96
|
|
|
|
|
|
|
"livemode": false, |
97
|
|
|
|
|
|
|
"pending": [ |
98
|
|
|
|
|
|
|
{ |
99
|
|
|
|
|
|
|
"currency": "jpy", |
100
|
|
|
|
|
|
|
"amount": 0, |
101
|
|
|
|
|
|
|
"source_types": { |
102
|
|
|
|
|
|
|
"card": 0 |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
] |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
}, |
108
|
|
|
|
|
|
|
"livemode": false, |
109
|
|
|
|
|
|
|
"pending_webhooks": 0, |
110
|
|
|
|
|
|
|
"request": { |
111
|
|
|
|
|
|
|
"id": null, |
112
|
|
|
|
|
|
|
"idempotency_key": null |
113
|
|
|
|
|
|
|
}, |
114
|
|
|
|
|
|
|
"type": "balance.available" |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 HISTORY |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 v0.1 |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Initial version |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 AUTHOR |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 SEE ALSO |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Stripe API documentation: |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/events/object> |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
138
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=cut |