Net-Stripe

 view release on metacpan or  search on metacpan

lib/Net/Stripe/BalanceTransaction.pm  view on Meta::CPAN

package Net::Stripe::BalanceTransaction;
$Net::Stripe::BalanceTransaction::VERSION = '0.43';
use Moose;
use Moose::Util::TypeConstraints qw(subtype as where message);
extends 'Net::Stripe::Resource';

# ABSTRACT: represent a BalanceTransaction object from Stripe

subtype 'TransactionType',
      as 'Str',
      where { $_ =~ /^(?:charge|refund|adjustment|application_fee(?:_refund)?|transfer_?(?:cancelfailure)?)$/ },
      message { "A transaction type must be one of charge, refund, adjustment, application_fee, application_fee_refund, transfer, transfer_cancel or transfer_failure" };

subtype 'StatusType',
  as 'Str',
  where { $_ =~ /^(?:available|pending)$/ },
  message { "A Status must be one of available or pending" };

has 'id'            => (is => 'ro', isa => 'Str');
has 'amount'        => (is => 'ro', isa => 'Int');
has 'currency'      => (is => 'ro', isa => 'Str', required => 1);
has 'net'           => (is => 'ro', isa => 'Int');
has 'type'          => (is => 'ro', isa => 'TransactionType');
has 'created'       => (is => 'ro', isa => 'Int');
has 'available_on'  => (is => 'ro', isa => 'Int');
has 'status'        => (is => 'ro', isa => 'StatusType');
has 'fee'           => (is => 'ro', isa => 'Int');
has 'fee_details'   => (is => 'ro', isa => 'Maybe[ArrayRef]');
has 'source'        => (is => 'ro', isa => 'Str');
has 'description'   => (is => 'ro', isa => 'Maybe[Str]');

__PACKAGE__->meta->make_immutable;
1;

__END__

=pod

=head1 NAME

Net::Stripe::BalanceTransaction - represent a BalanceTransaction object from Stripe

=head1 VERSION

version 0.43

=head1 ATTRIBUTES

=head2 amount

Reader: amount

Type: Int

=head2 available_on

Reader: available_on

Type: Int

=head2 boolean_attributes

Reader: boolean_attributes

Type: ArrayRef[Str]

=head2 created

Reader: created

Type: Int

=head2 currency

Reader: currency

Type: Str

This attribute is required.

=head2 description

Reader: description

Type: Maybe[Str]

=head2 fee



( run in 0.998 second using v1.01-cache-2.11-cpan-39bf76dae61 )