Stripe/Billing/Invoice/StatusTransition.pm

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