File Coverage

lib/Net/API/Stripe/Connect/AppsSecret.pm
Criterion Covered Total %
statement 7 16 43.7
branch n/a
condition n/a
subroutine 3 12 25.0
pod 9 9 100.0
total 19 37 51.3


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             BEGIN
11             {
12             use strict;
13 2     2   24162798 use parent qw( Net::API::Stripe::Generic );
  2         14  
  2         87  
14 2     2   11 our( $VERSION ) = 'v0.1.0';
  2         3  
  2         10  
15 2     2   547 };
16              
17              
18 0     0 1    
19              
20 0     0 1    
21              
22 0     0 1    
23              
24 0     0 1    
25             { type => { type => "scalar" }, user => { type => "scalar" } }, @_ ) ); }
26 0     0 1    
27             1;
28 0     0 1   # NOTE: POD
29              
30 0     0 1   =encoding utf8
31              
32 0     0 1   =head1 NAME
33              
34 0     0 1   Net::API::Stripe::Connect::AppsSecret - The Secret object
35              
36             =head1 SYNOPSIS
37              
38             =head1 VERSION
39              
40             v0.1.0
41              
42             =head1 DESCRIPTION
43              
44             Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
45              
46             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.
47              
48             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.
49              
50             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.
51              
52             Related guide: L<Store data between page reloads|https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects>.
53              
54             =head1 METHODS
55              
56             =head2 id string
57              
58             Unique identifier for the object.
59              
60             =head2 object string
61              
62             String representing the object's type. Objects of the same type share the same value.
63              
64             =head2 created timestamp
65              
66             Time at which the object was created. Measured in seconds since the Unix epoch.
67              
68             =head2 deleted boolean
69              
70             If true, indicates that this secret has been deleted
71              
72             =head2 expires_at timestamp
73              
74             The Unix timestamp for the expiry time of the secret, after which the secret deletes.
75              
76             =head2 livemode boolean
77              
78             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
79              
80             =head2 name string
81              
82             A name for the secret that's unique within the scope.
83              
84             =head2 payload string
85              
86             The plaintext secret value to be stored.
87              
88             =head2 scope hash
89              
90             Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
91              
92             It has the following properties:
93              
94             =over 4
95              
96             =item C<type> string
97              
98             The secret scope type.
99              
100             =item C<user> string
101              
102             The user ID, if type is set to "user"
103              
104             =back
105              
106             =head1 API SAMPLE
107              
108             [
109             {
110             "created" : "1662261085",
111             "expires_at" : null,
112             "id" : "appsecret_5110QzMIZ0005GiEH1m0419O8KAxCG",
113             "livemode" : 0,
114             "name" : "test-secret",
115             "object" : "apps.secret",
116             "scope" : {
117             "type" : "account"
118             }
119             }
120             ]
121              
122             =head1 HISTORY
123              
124             =head2 v0.1.0
125              
126             Initial version
127              
128             =head1 AUTHOR
129              
130             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
131              
132             =head1 SEE ALSO
133              
134             L<Stripe API documentation|https://stripe.com/docs/api/secret_management>
135              
136             =head1 COPYRIGHT & LICENSE
137              
138             Copyright (c) 2019-2022 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