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