line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Billing/PortalSession.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 2022/07/10 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
2
|
|
|
2
|
|
23977389
|
use warnings; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
63
|
|
14
|
2
|
|
|
2
|
|
12
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
60
|
|
15
|
2
|
|
|
2
|
|
10
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
16
|
2
|
|
|
2
|
|
139
|
our( $VERSION ) = 'v0.1.0'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
113
|
|
17
|
2
|
|
|
2
|
|
41
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
21
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
443
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
|
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
0
|
|
|
0
|
1
|
|
|
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
=encoding utf8 |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
Net::API::Stripe::Billing::PortalSession - The session object |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $portal = $stripe->portal_session({ |
44
|
|
|
|
|
|
|
created => 'now', |
45
|
|
|
|
|
|
|
customer => 'cust_fake123456789', |
46
|
|
|
|
|
|
|
livemode => $stripe->false, |
47
|
|
|
|
|
|
|
return_url => 'https://example.com/ec/df63685a-6cd2-4c5d-9d4c-81b417646a58', |
48
|
|
|
|
|
|
|
url => 'https://billing.stripe.com/session/{SESSION_SECRET}', |
49
|
|
|
|
|
|
|
}); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 VERSION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
v0.1.0 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
A session describes the instantiation of the customer portal for a particular customer. By visiting the session's URL, the customer can manage their subscriptions and billing details. For security reasons, sessions are short-lived and will expire if the customer does not visit the URL. |
58
|
|
|
|
|
|
|
Create sessions on-demand when customers intend to manage their subscriptions and billing details. |
59
|
|
|
|
|
|
|
Integration guide: [Billing customer portal](/docs/billing/subscriptions/integrating-customer-portal). |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 id string |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Unique identifier for the object. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 object string |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
String representing the object's type. Objects of the same type share the same value. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 configuration string |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Expandable to L<Net::API::Stripe::Billing::PortalConfiguration> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
The configuration used by this session, describing the features available. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 created timestamp |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 customer string |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The ID of the customer for this session. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 livemode boolean |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 locale enum |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
The IETF language tag of the locale Customer Portal is displayed in (e.g. C<ja> or C<en-GB>. If blank or set to C<auto>, the customer’s C<preferred_locales> or browser’s locale is used. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 on_behalf_of string |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Connect only |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The L<account|Net::API::Stripe::Connect::Account> for which the session was created on behalf of. When specified, only subscriptions and invoices with this C<on_behalf_of> account appear in the portal. For more information, see the docs. Use the Accounts API to modify the C<on_behalf_of> account’s branding settings, which the portal displays. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 return_url string |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The URL to which Stripe should send customers when they click on the link to return to your website. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 url string |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
The short-lived URL of the session giving customers access to the customer portal. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 API SAMPLE |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
{ |
110
|
|
|
|
|
|
|
"id": "bps_1LK7CQCeyNCl6fY2zTGZOzQa", |
111
|
|
|
|
|
|
|
"object": "billing_portal.session", |
112
|
|
|
|
|
|
|
"configuration": "bpc_1LK7CQCeyNCl6fY2ESFdGr6O", |
113
|
|
|
|
|
|
|
"created": 1657486674, |
114
|
|
|
|
|
|
|
"customer": "cus_AODr7KhjWjH7Yk", |
115
|
|
|
|
|
|
|
"livemode": true, |
116
|
|
|
|
|
|
|
"locale": null, |
117
|
|
|
|
|
|
|
"on_behalf_of": null, |
118
|
|
|
|
|
|
|
"return_url": "https://example.com/account", |
119
|
|
|
|
|
|
|
"url": "https://billing.stripe.com/session/{SESSION_SECRET}" |
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
|
|
|
|
|
|
|
Stripe API documentation: |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
L<https://stripe.com/docs/api#portal_session_object> |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Copyright (c) 2019-2022 DEGUEST Pte. Ltd. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
143
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=cut |