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