line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Billing/Invoice/Period.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::Billing::Invoice::Period; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
870
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
14
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
15
|
1
|
|
|
1
|
|
106
|
our( $VERSION ) = 'v0.100.0'; |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
1
|
|
sub end { shift->_set_get_datetime( 'end', @_ ); } |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
1
|
|
sub start { shift->_set_get_datetime( 'start', @_ ); } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=encoding utf8 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Net::API::Stripe::Billing::Invoice::Period - A Stripe Invoice Period Object |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $period = $invoice_line_item->period({ |
35
|
|
|
|
|
|
|
end => '2020-12-31', |
36
|
|
|
|
|
|
|
start => '2020-01-01', |
37
|
|
|
|
|
|
|
}); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
v0.100.0 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
The timespan covered by an invoice item. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This is instantiated from method B<period> in L<Net::API::Stripe::Billing::Invoice::Item> or method B<period> from L<Net::API::Stripe::Billing::Invoice::LineItem>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over 4 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Billing::Invoice::Period> 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<end> integer |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
End of the line itemâs billing period |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item B<start> integer |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Start of the line itemâs billing period |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 API SAMPLE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
{ |
77
|
|
|
|
|
|
|
"id": "in_fake123456789", |
78
|
|
|
|
|
|
|
"object": "invoice", |
79
|
|
|
|
|
|
|
"account_country": "JP", |
80
|
|
|
|
|
|
|
"account_name": "Provider, Inc", |
81
|
|
|
|
|
|
|
"amount_due": 8000, |
82
|
|
|
|
|
|
|
"amount_paid": 8000, |
83
|
|
|
|
|
|
|
"amount_remaining": 0, |
84
|
|
|
|
|
|
|
"application_fee_amount": null, |
85
|
|
|
|
|
|
|
"attempt_count": 1, |
86
|
|
|
|
|
|
|
"attempted": true, |
87
|
|
|
|
|
|
|
"auto_advance": false, |
88
|
|
|
|
|
|
|
"billing": "charge_automatically", |
89
|
|
|
|
|
|
|
"billing_reason": "subscription", |
90
|
|
|
|
|
|
|
"charge": "ch_fake123456789", |
91
|
|
|
|
|
|
|
"collection_method": "charge_automatically", |
92
|
|
|
|
|
|
|
"created": 1507273919, |
93
|
|
|
|
|
|
|
"currency": "jpy", |
94
|
|
|
|
|
|
|
"custom_fields": null, |
95
|
|
|
|
|
|
|
"customer": "cus_fake123456789", |
96
|
|
|
|
|
|
|
"customer_address": null, |
97
|
|
|
|
|
|
|
"customer_email": "john.doe@example.com", |
98
|
|
|
|
|
|
|
"customer_name": null, |
99
|
|
|
|
|
|
|
"customer_phone": null, |
100
|
|
|
|
|
|
|
"customer_shipping": null, |
101
|
|
|
|
|
|
|
"customer_tax_exempt": "none", |
102
|
|
|
|
|
|
|
"customer_tax_ids": [], |
103
|
|
|
|
|
|
|
"default_payment_method": null, |
104
|
|
|
|
|
|
|
"default_source": null, |
105
|
|
|
|
|
|
|
"default_tax_rates": [], |
106
|
|
|
|
|
|
|
"description": null, |
107
|
|
|
|
|
|
|
"discount": null, |
108
|
|
|
|
|
|
|
"due_date": null, |
109
|
|
|
|
|
|
|
"ending_balance": 0, |
110
|
|
|
|
|
|
|
"footer": null, |
111
|
|
|
|
|
|
|
"hosted_invoice_url": "https://pay.stripe.com/invoice/invst_fake123456789", |
112
|
|
|
|
|
|
|
"invoice_pdf": "https://pay.stripe.com/invoice/invst_fake123456789/pdf", |
113
|
|
|
|
|
|
|
"lines": { |
114
|
|
|
|
|
|
|
"data": [ |
115
|
|
|
|
|
|
|
{ |
116
|
|
|
|
|
|
|
"id": "sli_fake123456789", |
117
|
|
|
|
|
|
|
"object": "line_item", |
118
|
|
|
|
|
|
|
"amount": 8000, |
119
|
|
|
|
|
|
|
"currency": "jpy", |
120
|
|
|
|
|
|
|
"description": "1 à Provider, Inc professional monthly membership (at ¥8,000 / month)", |
121
|
|
|
|
|
|
|
"discountable": true, |
122
|
|
|
|
|
|
|
"livemode": false, |
123
|
|
|
|
|
|
|
"metadata": {}, |
124
|
|
|
|
|
|
|
"period": { |
125
|
|
|
|
|
|
|
"end": 1559441759, |
126
|
|
|
|
|
|
|
"start": 1556763359 |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
"plan": { |
129
|
|
|
|
|
|
|
"id": "professional-monthly-jpy", |
130
|
|
|
|
|
|
|
"object": "plan", |
131
|
|
|
|
|
|
|
"active": true, |
132
|
|
|
|
|
|
|
"aggregate_usage": null, |
133
|
|
|
|
|
|
|
"amount": 8000, |
134
|
|
|
|
|
|
|
"amount_decimal": "8000", |
135
|
|
|
|
|
|
|
"billing_scheme": "per_unit", |
136
|
|
|
|
|
|
|
"created": 1541833564, |
137
|
|
|
|
|
|
|
"currency": "jpy", |
138
|
|
|
|
|
|
|
"interval": "month", |
139
|
|
|
|
|
|
|
"interval_count": 1, |
140
|
|
|
|
|
|
|
"livemode": false, |
141
|
|
|
|
|
|
|
"metadata": {}, |
142
|
|
|
|
|
|
|
"nickname": null, |
143
|
|
|
|
|
|
|
"product": "prod_fake123456789", |
144
|
|
|
|
|
|
|
"tiers": null, |
145
|
|
|
|
|
|
|
"tiers_mode": null, |
146
|
|
|
|
|
|
|
"transform_usage": null, |
147
|
|
|
|
|
|
|
"trial_period_days": null, |
148
|
|
|
|
|
|
|
"usage_type": "licensed" |
149
|
|
|
|
|
|
|
}, |
150
|
|
|
|
|
|
|
"proration": false, |
151
|
|
|
|
|
|
|
"quantity": 1, |
152
|
|
|
|
|
|
|
"subscription": "sub_fake123456789", |
153
|
|
|
|
|
|
|
"subscription_item": "si_fake123456789", |
154
|
|
|
|
|
|
|
"tax_amounts": [], |
155
|
|
|
|
|
|
|
"tax_rates": [], |
156
|
|
|
|
|
|
|
"type": "subscription" |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
], |
159
|
|
|
|
|
|
|
"has_more": false, |
160
|
|
|
|
|
|
|
"object": "list", |
161
|
|
|
|
|
|
|
"url": "/v1/invoices/in_fake123456789/lines" |
162
|
|
|
|
|
|
|
}, |
163
|
|
|
|
|
|
|
"livemode": false, |
164
|
|
|
|
|
|
|
"metadata": {}, |
165
|
|
|
|
|
|
|
"next_payment_attempt": null, |
166
|
|
|
|
|
|
|
"number": "53DB91F-0001", |
167
|
|
|
|
|
|
|
"paid": true, |
168
|
|
|
|
|
|
|
"payment_intent": null, |
169
|
|
|
|
|
|
|
"period_end": 1507273919, |
170
|
|
|
|
|
|
|
"period_start": 1507273919, |
171
|
|
|
|
|
|
|
"post_payment_credit_notes_amount": 0, |
172
|
|
|
|
|
|
|
"pre_payment_credit_notes_amount": 0, |
173
|
|
|
|
|
|
|
"receipt_number": "2066-1929", |
174
|
|
|
|
|
|
|
"starting_balance": 0, |
175
|
|
|
|
|
|
|
"statement_descriptor": null, |
176
|
|
|
|
|
|
|
"status": "paid", |
177
|
|
|
|
|
|
|
"status_transitions": { |
178
|
|
|
|
|
|
|
"finalized_at": 1507273919, |
179
|
|
|
|
|
|
|
"marked_uncollectible_at": null, |
180
|
|
|
|
|
|
|
"paid_at": 1507273919, |
181
|
|
|
|
|
|
|
"voided_at": null |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
"subscription": "sub_fake123456789", |
184
|
|
|
|
|
|
|
"subtotal": 8000, |
185
|
|
|
|
|
|
|
"tax": null, |
186
|
|
|
|
|
|
|
"tax_percent": null, |
187
|
|
|
|
|
|
|
"total": 8000, |
188
|
|
|
|
|
|
|
"total_tax_amounts": [], |
189
|
|
|
|
|
|
|
"webhooks_delivered_at": 1507273920 |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head1 HISTORY |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head2 v0.1 |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
Initial version |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=head1 AUTHOR |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head1 SEE ALSO |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Stripe API documentation: |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/invoices/line_item> |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
213
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=cut |