TrueLayer/Provider/Filter.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« TrueLayer/Provider.pm ↑ Summary TrueLayer/Remitter.pm »
1 package Business::TrueLayer::Provider::Filter;
2  
3 =head1 NAME
4  
5 Business::TrueLayer::Provider::Filter - class representing a provider
6 filter as used in the TrueLayer v3 API.
7  
8 =head1 SYNOPSIS
9  
10 my $Filter = Business::TrueLayer::Provider::Filter->new(
11 countries => ...
12 );
13  
14 =cut
15  
16 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 4 ▶use feature qw/ signatures postderef /;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 4 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 4 ▶no warnings qw/ experimental::signatures experimental::postderef /;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 4 ▶use Complete::Country qw/ complete_country_code /;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 =head1 ATTRIBUTES
29  
30 =over
31  
32 =item release_channel (Str)
33  
34 =item customer_segments (ArrayRef[Str])
35  
36 =item countries (ArrayRef[Country])
37  
38 Where Country is Alpha-2 ISO 3166 country code (e.g. "DE")
39  
40 =back
41  
42 =cut
43  
44 4 has [ qw/ release_channel / ] => (
45 is => 'ro',
46 isa => 'Str',
47 required => 1,
48 );
49  
50 4 my @iso_codes = map { uc( $_->{word} ) }
51 complete_country_code()->@*;
52  
53 4 enum 'Country' => \@iso_codes;
54  
55 4 has [ qw/ countries / ] => (
56 is => 'ro',
57 isa => 'ArrayRef[Country]',
58 required => 1,
59 );
60  
61 4 has [ qw/ customer_segments / ] => (
62 is => 'ro',
63 isa => 'ArrayRef[Str]',
64 required => 1,
65 );
66  
67 =head1 METHODS
68  
69 None yet.
70  
71 =head1 SEE ALSO
72  
73 L<Business::TrueLayer::Provider::Scheme>
74  
75 =cut
76  
77 4 1;
« TrueLayer/Provider.pm ↑ Summary TrueLayer/Remitter.pm »