| 1 | package Net::Stripe::BalanceTransaction; | ||
| 2 | 2 | $Net::Stripe::BalanceTransaction::VERSION = '0.43'; | |
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use Moose::Util::TypeConstraints qw(subtype as where message); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | extends 'Net::Stripe::Resource'; | |
| 6 | |||
| 7 | # ABSTRACT: represent a BalanceTransaction object from Stripe | ||
| 8 | |||
| 9 | subtype 'TransactionType', | ||
| 10 | as 'Str', | ||
| 11 | 0 | ▶ | where { $_ =~ /^(?:charge|refund|adjustment|application_fee(?:_refund)?|transfer_?(?:cancelfailure)?)$/ }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 12 | 0 | ▶ | message { "A transaction type must be one of charge, refund, adjustment, application_fee, application_fee_refund, transfer, transfer_cancel or transfer_failure" }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 13 | |||
| 14 | subtype 'StatusType', | ||
| 15 | as 'Str', | ||
| 16 | 0 | ▶ | where { $_ =~ /^(?:available|pending)$/ }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 17 | 0 | ▶ | message { "A Status must be one of available or pending" }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 18 | |||
| 19 | 2 | has 'id' => (is => 'ro', isa => 'Str'); | |
| 20 | 2 | has 'amount' => (is => 'ro', isa => 'Int'); | |
| 21 | 2 | has 'currency' => (is => 'ro', isa => 'Str', required => 1); | |
| 22 | 2 | has 'net' => (is => 'ro', isa => 'Int'); | |
| 23 | 2 | has 'type' => (is => 'ro', isa => 'TransactionType'); | |
| 24 | 2 | has 'created' => (is => 'ro', isa => 'Int'); | |
| 25 | 2 | has 'available_on' => (is => 'ro', isa => 'Int'); | |
| 26 | 2 | has 'status' => (is => 'ro', isa => 'StatusType'); | |
| 27 | 2 | has 'fee' => (is => 'ro', isa => 'Int'); | |
| 28 | 2 | has 'fee_details' => (is => 'ro', isa => 'Maybe[ArrayRef]'); | |
| 29 | 2 | has 'source' => (is => 'ro', isa => 'Str'); | |
| 30 | 2 | has 'description' => (is => 'ro', isa => 'Maybe[Str]'); | |
| 31 | |||
| 32 | 2 | __PACKAGE__->meta->make_immutable; | |
| 33 | 2 | 1; | |
| 34 | |||
| 35 | __END__ | ||