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
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
2
|
|
|
2
|
|
24014341
|
use warnings; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
61
|
|
14
|
2
|
|
|
2
|
|
9
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
15
|
2
|
|
|
2
|
|
9
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
16
|
2
|
|
|
2
|
|
135
|
our( $VERSION ) = 'v0.100.0'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
111
|
|
17
|
2
|
|
|
2
|
|
41
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
39
|
|
21
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
154
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding utf8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Net::API::Stripe::Event::Request - A Stripe Event Request object |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $req = $stripe->event->request({ |
36
|
|
|
|
|
|
|
id => 'req_HwlkQJshckjIsj', |
37
|
|
|
|
|
|
|
idempotency_key => '677A3112-FBAD-4804-BA61-CEF1CC13D155', |
38
|
|
|
|
|
|
|
}); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
v0.100.0 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This is a Stripe Event Request object. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This is instantiated by the method B<request> in module L<Net::API::Stripe::Event> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 new( %ARG ) |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Event::Request> object. |
55
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 id string |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
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. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 idempotency_key string |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The idempotency key transmitted during the request, if any. Note: This property is populated only for events on or after May 23, 2017. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 API SAMPLE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
{ |
70
|
|
|
|
|
|
|
"id": "evt_fake123456789", |
71
|
|
|
|
|
|
|
"object": "event", |
72
|
|
|
|
|
|
|
"api_version": "2017-02-14", |
73
|
|
|
|
|
|
|
"created": 1528914645, |
74
|
|
|
|
|
|
|
"data": { |
75
|
|
|
|
|
|
|
"object": { |
76
|
|
|
|
|
|
|
"object": "balance", |
77
|
|
|
|
|
|
|
"available": [ |
78
|
|
|
|
|
|
|
{ |
79
|
|
|
|
|
|
|
"currency": "jpy", |
80
|
|
|
|
|
|
|
"amount": 1025751, |
81
|
|
|
|
|
|
|
"source_types": { |
82
|
|
|
|
|
|
|
"card": 1025751 |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
], |
86
|
|
|
|
|
|
|
"connect_reserved": [ |
87
|
|
|
|
|
|
|
{ |
88
|
|
|
|
|
|
|
"currency": "jpy", |
89
|
|
|
|
|
|
|
"amount": 0 |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
], |
92
|
|
|
|
|
|
|
"livemode": false, |
93
|
|
|
|
|
|
|
"pending": [ |
94
|
|
|
|
|
|
|
{ |
95
|
|
|
|
|
|
|
"currency": "jpy", |
96
|
|
|
|
|
|
|
"amount": 0, |
97
|
|
|
|
|
|
|
"source_types": { |
98
|
|
|
|
|
|
|
"card": 0 |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
] |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
"livemode": false, |
105
|
|
|
|
|
|
|
"pending_webhooks": 0, |
106
|
|
|
|
|
|
|
"request": { |
107
|
|
|
|
|
|
|
"id": null, |
108
|
|
|
|
|
|
|
"idempotency_key": null |
109
|
|
|
|
|
|
|
}, |
110
|
|
|
|
|
|
|
"type": "balance.available" |
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/events/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 |