-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathCoupon.pm
25 lines (20 loc) · 821 Bytes
/
Coupon.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
package Net::Stripe::Coupon;
use Moose;
use Kavorka;
extends 'Net::Stripe::Resource';
# ABSTRACT: represent a Coupon object from Stripe
has 'id' => (is => 'rw', isa => 'Maybe[Str]');
has 'percent_off' => (is => 'rw', isa => 'Maybe[Int]', required => 1);
has 'duration' => (is => 'rw', isa => 'Maybe[Str]', required => 1);
has 'duration_in_months' => (is => 'rw', isa => 'Maybe[Int]');
has 'max_redemptions' => (is => 'rw', isa => 'Maybe[Int]');
has 'redeem_by' => (is => 'rw', isa => 'Maybe[Int]');
has 'metadata' => (is => 'ro', isa => 'Maybe[HashRef]');
method form_fields {
return $self->form_fields_for(
qw/id percent_off duration duration_in_months max_redemptions redeem_by
metadata/
);
}
__PACKAGE__->meta->make_immutable;
1;