Net-Stripe

 view release on metacpan or  search on metacpan

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

package Net::Stripe::PaymentMethod;
$Net::Stripe::PaymentMethod::VERSION = '0.43';
use Moose;
use Moose::Util::TypeConstraints qw(enum);
use Kavorka;
extends 'Net::Stripe::Resource';

# ABSTRACT: represent a PaymentMethod object from Stripe

# Args for posting to PaymentMethod endpoints
has 'billing_details' => (is => 'ro', isa => 'Maybe[HashRef]');
has 'card'            => (is => 'ro', isa => 'Maybe[Net::Stripe::Card|StripeTokenId]');
has 'fpx'             => (is => 'ro', isa => 'Maybe[HashRef]');
has 'ideal'           => (is => 'ro', isa => 'Maybe[HashRef]');
has 'metadata'        => (is => 'ro', isa => 'Maybe[HashRef[Str]|EmptyStr]');
has 'sepa_debit'      => (is => 'ro', isa => 'Maybe[HashRef]');
has 'type'            => (is => 'ro', isa => 'StripePaymentMethodType');

# Args returned by the API
has 'id'            => (is => 'ro', isa => 'StripePaymentMethodId');
has 'card_present'  => (is => 'ro', isa => 'Maybe[HashRef]');
has 'created'       => (is => 'ro', isa => 'Int');
has 'customer'      => (is => 'ro', isa => 'Maybe[StripeCustomerId]');
has 'livemode'      => (is => 'ro', isa => 'Bool');

method form_fields {
    return $self->form_fields_for(qw/
        billing_details card customer expand fpx ideal metadata sepa_debit type
    /);
}

__PACKAGE__->meta->make_immutable;
1;

__END__

=pod

=head1 NAME

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

=head1 VERSION

version 0.43

=head1 ATTRIBUTES

=head2 billing_details

Reader: billing_details

Type: Maybe[HashRef]

=head2 boolean_attributes

Reader: boolean_attributes

Type: ArrayRef[Str]

=head2 card

Reader: card

Type: Maybe[Net::Stripe::Card|StripeTokenId]

=head2 card_present

Reader: card_present

Type: Maybe[HashRef]

=head2 created

Reader: created

Type: Int

=head2 customer

Reader: customer



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