-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathInvoiceitem.pm
27 lines (22 loc) · 950 Bytes
/
Invoiceitem.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package Net::Stripe::Invoiceitem;
use Moose;
use Kavorka;
extends 'Net::Stripe::Resource';
with 'MooseX::Clone';
# ABSTRACT: represent an Invoice Item object from Stripe
has 'id' => (is => 'ro', isa => 'Maybe[Str]');
has 'customer' => (is => 'ro', isa => 'Maybe[Str]', required => 1);
has 'amount' => (is => 'rw', isa => 'Maybe[Int]', required => 1);
has 'currency' => (is => 'rw', isa => 'Maybe[Str]', required => 1, clearer => 'clear_currency');
has 'description' => (is => 'rw', isa => 'Maybe[Str]');
has 'date' => (is => 'ro', isa => 'Maybe[Int]');
has 'invoice' => (is => 'ro', isa => 'Maybe[Str]');
has 'metadata' => (is => 'rw', isa => 'Maybe[HashRef]');
method form_fields {
return $self->form_fields_for(
qw/amount currency description invoice metadata/,
($self->id ? () : qw/customer/)
);
}
__PACKAGE__->meta->make_immutable;
1;