| 1 | package Net::Stripe::PaymentMethod; | ||||||||||
| 2 | 2 | $Net::Stripe::PaymentMethod::VERSION = '0.43'; | |||||||||
| 3 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use Moose::Util::TypeConstraints qw(enum); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use Kavorka; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | extends 'Net::Stripe::Resource'; | |||||||||
| 7 | |||||||||||
| 8 | # ABSTRACT: represent a PaymentMethod object from Stripe | ||||||||||
| 9 | |||||||||||
| 10 | # Args for posting to PaymentMethod endpoints | ||||||||||
| 11 | 2 | has 'billing_details' => (is => 'ro', isa => 'Maybe[HashRef]'); | |||||||||
| 12 | 2 | has 'card' => (is => 'ro', isa => 'Maybe[Net::Stripe::Card|StripeTokenId]'); | |||||||||
| 13 | 2 | has 'fpx' => (is => 'ro', isa => 'Maybe[HashRef]'); | |||||||||
| 14 | 2 | has 'ideal' => (is => 'ro', isa => 'Maybe[HashRef]'); | |||||||||
| 15 | 2 | has 'metadata' => (is => 'ro', isa => 'Maybe[HashRef[Str]|EmptyStr]'); | |||||||||
| 16 | 2 | has 'sepa_debit' => (is => 'ro', isa => 'Maybe[HashRef]'); | |||||||||
| 17 | 2 | has 'type' => (is => 'ro', isa => 'StripePaymentMethodType'); | |||||||||
| 18 | |||||||||||
| 19 | # Args returned by the API | ||||||||||
| 20 | 2 | has 'id' => (is => 'ro', isa => 'StripePaymentMethodId'); | |||||||||
| 21 | 2 | has 'card_present' => (is => 'ro', isa => 'Maybe[HashRef]'); | |||||||||
| 22 | 2 | has 'created' => (is => 'ro', isa => 'Int'); | |||||||||
| 23 | 2 | has 'customer' => (is => 'ro', isa => 'Maybe[StripeCustomerId]'); | |||||||||
| 24 | 2 | has 'livemode' => (is => 'ro', isa => 'Bool'); | |||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | method form_fields { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
Subroutine
form_fields: not called CC=2 SCAR=9.9
Branch: 1 branch
| |||||||||||
| 27 | 0 | return $self->form_fields_for(qw/ | |||||||||
| 28 | billing_details card customer expand fpx ideal metadata sepa_debit type | ||||||||||
| 29 | /); | ||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 33 | 2 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||