line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Connect/AppsSecret.pm |
3
|
|
|
|
|
|
|
## Version v0.1.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2022 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2022/10/29 |
7
|
|
|
|
|
|
|
## Modified 2022/10/29 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
package Net::API::Stripe::Connect::AppsSecret; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
2
|
|
|
2
|
|
21237968
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
68
|
|
14
|
2
|
|
|
2
|
|
18
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
15
|
2
|
|
|
2
|
|
580
|
our( $VERSION ) = 'v0.1.0'; |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub deleted { return( shift->_set_get_boolean( 'deleted', @_ ) ); } |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub expires_at { return( shift->_set_get_datetime( 'expires_at', @_ ) ); } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub name { return( shift->_set_get_scalar( 'name', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub payload { return( shift->_set_get_scalar( 'payload', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub scope { return( shift->_set_get_class( 'scope', |
35
|
|
|
|
|
|
|
{ type => { type => "scalar" }, user => { type => "scalar" } }, @_ ) ); } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
# NOTE: POD |
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Net::API::Stripe::Connect::AppsSecret - The Secret object |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 VERSION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
v0.1.0 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
The primary resource in Secret Store is a C<secret>. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
All Dashboard users and the app backend share C<account> scoped secrets. Use the C<account> scope for secrets that don't change per-user, like a third-party API key. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
A C<user> scoped secret is accessible by the app backend and one specific Dashboard user. Use the C<user> scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Related guide: L<Store data between page reloads|https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects>. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 id string |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Unique identifier for the object. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 object string |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
String representing the object's type. Objects of the same type share the same value. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 created timestamp |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 deleted boolean |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
If true, indicates that this secret has been deleted |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 expires_at timestamp |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The Unix timestamp for the expiry time of the secret, after which the secret deletes. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 livemode boolean |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 name string |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
A name for the secret that's unique within the scope. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 payload string |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The plaintext secret value to be stored. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 scope hash |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
It has the following properties: |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=over 4 |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item C<type> string |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
The secret scope type. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item C<user> string |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The user ID, if type is set to "user" |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=back |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 API SAMPLE |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
[ |
120
|
|
|
|
|
|
|
{ |
121
|
|
|
|
|
|
|
"created" : "1662261085", |
122
|
|
|
|
|
|
|
"expires_at" : null, |
123
|
|
|
|
|
|
|
"id" : "appsecret_5110QzMIZ0005GiEH1m0419O8KAxCG", |
124
|
|
|
|
|
|
|
"livemode" : 0, |
125
|
|
|
|
|
|
|
"name" : "test-secret", |
126
|
|
|
|
|
|
|
"object" : "apps.secret", |
127
|
|
|
|
|
|
|
"scope" : { |
128
|
|
|
|
|
|
|
"type" : "account" |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
] |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 HISTORY |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head2 v0.1.0 |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Initial version |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 AUTHOR |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 SEE ALSO |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
L<Stripe API documentation|https://stripe.com/docs/api/secret_management> |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Copyright (c) 2019-2022 DEGUEST Pte. Ltd. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
152
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |