| 1 | package Business::GoCardless::RedirectFlow; | ||||||||||
| 2 | |||||||||||
| 3 | =head1 NAME | ||||||||||
| 4 | |||||||||||
| 5 | Business::GoCardless::RedirectFlow | ||||||||||
| 6 | |||||||||||
| 7 | =head1 DESCRIPTION | ||||||||||
| 8 | |||||||||||
| 9 | A class for a gocardless redirect flow, extends L<Business::GoCardless::PreAuthorization> | ||||||||||
| 10 | |||||||||||
| 11 | =cut | ||||||||||
| 12 | |||||||||||
| 13 | 55 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 55 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 55 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 55 | extends 'Business::GoCardless::PreAuthorization'; | |||||||||
| 18 | |||||||||||
| 19 | 55 | ▶ | use Business::GoCardless::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 55 | ▶ | use Business::GoCardless::Mandate; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | =head1 ATTRIBUTES | ||||||||||
| 23 | |||||||||||
| 24 | confirmation_url | ||||||||||
| 25 | mandate_reference | ||||||||||
| 26 | redirect_url | ||||||||||
| 27 | scheme | ||||||||||
| 28 | session_token | ||||||||||
| 29 | success_redirect_url | ||||||||||
| 30 | links | ||||||||||
| 31 | metadata | ||||||||||
| 32 | |||||||||||
| 33 | =cut | ||||||||||
| 34 | |||||||||||
| 35 | 55 | has [ qw/ | |||||||||
| 36 | confirmation_url | ||||||||||
| 37 | mandate_reference | ||||||||||
| 38 | redirect_url | ||||||||||
| 39 | scheme | ||||||||||
| 40 | session_token | ||||||||||
| 41 | success_redirect_url | ||||||||||
| 42 | links | ||||||||||
| 43 | metadata | ||||||||||
| 44 | / ] => ( | ||||||||||
| 45 | is => 'rw', | ||||||||||
| 46 | ); | ||||||||||
| 47 | |||||||||||
| 48 | |||||||||||
| 49 | =head1 AUTHOR | ||||||||||
| 50 | |||||||||||
| 51 | Lee Johnson - C<lee@payprop.com> | ||||||||||
| 52 | |||||||||||
| 53 | This library is free software; you can redistribute it and/or modify it under | ||||||||||
| 54 | the same terms as Perl itself. If you would like to contribute documentation, | ||||||||||
| 55 | features, bug fixes, or anything else then please raise an issue / pull request: | ||||||||||
| 56 | |||||||||||
| 57 | https://github.com/payprop/business-gocardless | ||||||||||
| 58 | |||||||||||
| 59 | =cut | ||||||||||
| 60 | |||||||||||
| 61 | 1 | ▶ | sub cancel { | ||||||||
|
Subroutine
cancel: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 62 | 1 | Business::GoCardless::Exception->throw({ | |||||||||
| 63 | message => "->cancel on a RedirectFlow is not meaningful in the Pro API", | ||||||||||
| 64 | }); | ||||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | 2 | ▶ | sub mandate { | ||||||||
|
Subroutine
mandate: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 68 | 2 | my ( $self ) = @_; | |||||||||
| 69 | |||||||||||
| 70 | 2 | ▶ | if ( ! $self->links ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 71 | 1 | $self->find_with_client( 'redirect_flows' ); | |||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | my $Mandate = Business::GoCardless::Mandate->new( | ||||||||||
| 75 | client => $self->client, | ||||||||||
| 76 | id => $self->links ? $self->links->{mandate} : undef, | ||||||||||
| 77 | 2 | ▶ | ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 78 | |||||||||||
| 79 | 2 | return $Mandate->find_with_client( 'mandates' ); | |||||||||
| 80 | } | ||||||||||
| 81 | |||||||||||
| 82 | 55 | 1; | |||||||||
| 83 | |||||||||||
| 84 | # vim: ts=4:sw=4:et | ||||||||||