| 1 | package Business::TrueLayer::Provider; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Business::TrueLayer::Provider - class representing a provider | ||
| 6 | as used in the TrueLayer v3 API. | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | my $Provider = Business::TrueLayer::Provider->new( | ||
| 11 | name => ... | ||
| 12 | ); | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 3 | ▶ | use feature qw/ signatures postderef /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 3 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 3 | ▶ | no warnings qw/ experimental::signatures experimental::postderef /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 3 | ▶ | use Business::TrueLayer::Provider::Filter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 3 | ▶ | use Business::TrueLayer::Provider::Scheme; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | |||
| 27 | 3 | with 'Business::TrueLayer::Types::Remitter'; | |
| 28 | |||
| 29 | 3 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 30 | |||
| 31 | =head1 ATTRIBUTES | ||
| 32 | |||
| 33 | =over | ||
| 34 | |||
| 35 | =item type (Str) | ||
| 36 | |||
| 37 | =item filter | ||
| 38 | |||
| 39 | A L<Business::TrueLayer::Provider::Filter> object. Hash refs will be coerced. | ||
| 40 | |||
| 41 | =item scheme_selection | ||
| 42 | |||
| 43 | A L<Business::TrueLayer::Provider::Scheme> object. Hash refs will be coerced. | ||
| 44 | |||
| 45 | =back | ||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | 3 | has [ qw/ type / ] => ( | |
| 50 | is => 'ro', | ||
| 51 | isa => 'Str', | ||
| 52 | required => 1, | ||
| 53 | ); | ||
| 54 | |||
| 55 | coerce 'Business::TrueLayer::Provider::Filter' | ||
| 56 | => from 'HashRef' | ||
| 57 | 5 | ▶ | => via { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 58 | 5 | Business::TrueLayer::Provider::Filter->new( %{ $_ } ); | |
| 59 | } | ||
| 60 | 3 | ; | |
| 61 | |||
| 62 | 3 | has filter => ( | |
| 63 | is => 'ro', | ||
| 64 | isa => 'Business::TrueLayer::Provider::Filter', | ||
| 65 | coerce => 1, | ||
| 66 | required => 1, | ||
| 67 | ); | ||
| 68 | |||
| 69 | coerce 'Business::TrueLayer::Provider::Scheme' | ||
| 70 | => from 'HashRef' | ||
| 71 | 5 | ▶ | => via { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 72 | 5 | Business::TrueLayer::Provider::Scheme->new( %{ $_ } ); | |
| 73 | } | ||
| 74 | 3 | ; | |
| 75 | |||
| 76 | 3 | has scheme_selection => ( | |
| 77 | is => 'ro', | ||
| 78 | isa => 'Business::TrueLayer::Provider::Scheme', | ||
| 79 | coerce => 1, | ||
| 80 | required => 1, | ||
| 81 | ); | ||
| 82 | |||
| 83 | =head1 METHODS | ||
| 84 | |||
| 85 | None yet. | ||
| 86 | |||
| 87 | =head1 SEE ALSO | ||
| 88 | |||
| 89 | L<Business::TrueLayer::Provider::Filter> | ||
| 90 | |||
| 91 | L<Business::TrueLayer::Provider::Scheme> | ||
| 92 | |||
| 93 | =cut | ||
| 94 | |||
| 95 | 3 | 1; | |