File Coverage

blib/lib/Net/Stripe/Charge.pm
Criterion Covered Total %
statement 9 12 75.0
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod n/a
total 12 18 66.6


line stmt bran cond sub pod time code
1             package Net::Stripe::Charge;
2             $Net::Stripe::Charge::VERSION = '0.40_005'; # TRIAL
3              
4 2     2   14 $Net::Stripe::Charge::VERSION = '0.40005';use Moose;
  2         4  
  2         16  
5 2     2   12350 use Kavorka;
  2         4  
  2         17  
6             extends 'Net::Stripe::Resource';
7              
8             # ABSTRACT: represent an Charge object from Stripe
9              
10             has 'id' => (is => 'ro', isa => 'Maybe[Str]');
11             has 'created' => (is => 'ro', isa => 'Maybe[Int]');
12             has 'amount' => (is => 'ro', isa => 'Maybe[Int]', required => 1);
13             has 'currency' => (is => 'ro', isa => 'Maybe[Str]', required => 1);
14             has 'customer' => (is => 'ro', isa => 'Maybe[StripeCustomerId]');
15             has 'card' => (is => 'ro', isa => 'Maybe[Net::Stripe::Card|StripeTokenId|StripeCardId]');
16             has 'source' => (is => 'ro', isa => 'Maybe[Net::Stripe::Card|Net::Stripe::Source|StripeTokenId|StripeCardId|StripeSourceId]');
17             has 'description' => (is => 'ro', isa => 'Maybe[Str]');
18             has 'livemode' => (is => 'ro', isa => 'Maybe[Bool|Object]');
19             has 'paid' => (is => 'ro', isa => 'Maybe[Bool|Object]');
20             has 'refunded' => (is => 'ro', isa => 'Maybe[Bool|Object]');
21             has 'amount_refunded' => (is => 'ro', isa => 'Maybe[Int]');
22             has 'captured' => (is => 'ro', isa => 'Maybe[Bool|Object]');
23             has 'balance_transaction' => (is => 'ro', isa => 'Maybe[Str]');
24             has 'failure_message' => (is => 'ro', isa => 'Maybe[Str]');
25             has 'failure_code' => (is => 'ro', isa => 'Maybe[Str]');
26             has 'application_fee' => (is => 'ro', isa => 'Maybe[Int]');
27             has 'metadata' => (is => 'rw', isa => 'Maybe[HashRef]');
28             has 'invoice' => (is => 'ro', isa => 'Maybe[Str]');
29             has 'receipt_email' => (is => 'ro', isa => 'Maybe[Str]');
30             has 'status' => (is => 'ro', isa => 'Maybe[Str]');
31             has 'capture' => (is => 'ro', isa => 'Bool', default=> 1);
32             has 'statement_descriptor' => (is => 'ro', isa => 'Maybe[Str]');
33             has 'refunds' => (is => 'ro', isa => 'Net::Stripe::List');
34              
35 2 0   2   4424 method form_fields {
  2     0   12  
  2         293  
  0            
  0            
36 0           return $self->form_fields_for(
37             qw/amount currency customer description application_fee receipt_email
38             capture statement_descriptor card source metadata/
39             );
40             }
41              
42             __PACKAGE__->meta->make_immutable;
43             1;
44              
45             __END__
46              
47             =pod
48              
49             =head1 NAME
50              
51             Net::Stripe::Charge - represent an Charge object from Stripe
52              
53             =head1 VERSION
54              
55             version 0.40_005
56              
57             =head1 ATTRIBUTES
58              
59             =head2 amount
60              
61             Reader: amount
62              
63             Type: Maybe[Int]
64              
65             This attribute is required.
66              
67             =head2 amount_refunded
68              
69             Reader: amount_refunded
70              
71             Type: Maybe[Int]
72              
73             =head2 application_fee
74              
75             Reader: application_fee
76              
77             Type: Maybe[Int]
78              
79             =head2 balance_transaction
80              
81             Reader: balance_transaction
82              
83             Type: Maybe[Str]
84              
85             =head2 boolean_attributes
86              
87             Reader: boolean_attributes
88              
89             Type: ArrayRef[Str]
90              
91             =head2 capture
92              
93             Reader: capture
94              
95             Type: Bool
96              
97             =head2 captured
98              
99             Reader: captured
100              
101             Type: Maybe[Bool|Object]
102              
103             =head2 card
104              
105             Reader: card
106              
107             Type: Maybe[Net::Stripe::Card|StripeCardId|StripeTokenId]
108              
109             =head2 created
110              
111             Reader: created
112              
113             Type: Maybe[Int]
114              
115             =head2 currency
116              
117             Reader: currency
118              
119             Type: Maybe[Str]
120              
121             This attribute is required.
122              
123             =head2 customer
124              
125             Reader: customer
126              
127             Type: Maybe[StripeCustomerId]
128              
129             =head2 description
130              
131             Reader: description
132              
133             Type: Maybe[Str]
134              
135             =head2 failure_code
136              
137             Reader: failure_code
138              
139             Type: Maybe[Str]
140              
141             =head2 failure_message
142              
143             Reader: failure_message
144              
145             Type: Maybe[Str]
146              
147             =head2 id
148              
149             Reader: id
150              
151             Type: Maybe[Str]
152              
153             =head2 invoice
154              
155             Reader: invoice
156              
157             Type: Maybe[Str]
158              
159             =head2 livemode
160              
161             Reader: livemode
162              
163             Type: Maybe[Bool|Object]
164              
165             =head2 metadata
166              
167             Reader: metadata
168              
169             Writer: metadata
170              
171             Type: Maybe[HashRef]
172              
173             =head2 paid
174              
175             Reader: paid
176              
177             Type: Maybe[Bool|Object]
178              
179             =head2 receipt_email
180              
181             Reader: receipt_email
182              
183             Type: Maybe[Str]
184              
185             =head2 refunded
186              
187             Reader: refunded
188              
189             Type: Maybe[Bool|Object]
190              
191             =head2 refunds
192              
193             Reader: refunds
194              
195             Type: Net::Stripe::List
196              
197             =head2 source
198              
199             Reader: source
200              
201             Type: Maybe[Net::Stripe::Card|Net::Stripe::Source|StripeCardId|StripeSourceId|StripeTokenId]
202              
203             =head2 statement_descriptor
204              
205             Reader: statement_descriptor
206              
207             Type: Maybe[Str]
208              
209             =head2 status
210              
211             Reader: status
212              
213             Type: Maybe[Str]
214              
215             =head1 AUTHORS
216              
217             =over 4
218              
219             =item *
220              
221             Luke Closs
222              
223             =item *
224              
225             Rusty Conover
226              
227             =back
228              
229             =head1 COPYRIGHT AND LICENSE
230              
231             This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC.
232              
233             This is free software; you can redistribute it and/or modify it under
234             the same terms as the Perl 5 programming language system itself.
235              
236             =cut