line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Fixflo::Envelope; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::Fixflo::Envelope |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A class for a fixflo envelope, extends L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
16
|
|
|
16
|
|
113
|
use strict; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
517
|
|
14
|
16
|
|
|
16
|
|
89
|
use warnings; |
|
16
|
|
|
|
|
31
|
|
|
16
|
|
|
|
|
433
|
|
15
|
|
|
|
|
|
|
|
16
|
16
|
|
|
16
|
|
86
|
use Moo; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
81
|
|
17
|
16
|
|
|
16
|
|
5584
|
use Business::Fixflo::Exception; |
|
16
|
|
|
|
|
44
|
|
|
16
|
|
|
|
|
2969
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
extends 'Business::Fixflo::Resource'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Entity |
24
|
|
|
|
|
|
|
Errors |
25
|
|
|
|
|
|
|
HttpStatusCode |
26
|
|
|
|
|
|
|
HttpStatusCodeDesc |
27
|
|
|
|
|
|
|
Messages |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
There attributes are all required. When a Business::Fixflo::Envelope is |
30
|
|
|
|
|
|
|
instantiated the Errors array will be checked and if it contains any data |
31
|
|
|
|
|
|
|
a Business::Fixflo::Exception will be thrown. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has [ qw/ |
36
|
|
|
|
|
|
|
Entity |
37
|
|
|
|
|
|
|
Errors |
38
|
|
|
|
|
|
|
HttpStatusCode |
39
|
|
|
|
|
|
|
HttpStatusCodeDesc |
40
|
|
|
|
|
|
|
Messages |
41
|
|
|
|
|
|
|
/ ] => ( |
42
|
|
|
|
|
|
|
is => 'rw', |
43
|
|
|
|
|
|
|
required => 1, |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub BUILD { |
47
|
4
|
|
|
4
|
0
|
40
|
my ( $self ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
4
|
100
|
100
|
|
|
8
|
if ( @{ $self->Errors // [] } ) { |
|
4
|
|
|
|
|
41
|
|
50
|
|
|
|
|
|
|
Business::Fixflo::Exception->throw({ |
51
|
1
|
|
|
|
|
3
|
message => join( ', ',@{ $self->Errors } ) , |
|
1
|
|
|
|
|
13
|
|
52
|
|
|
|
|
|
|
code => $self->HttpStatusCode, |
53
|
|
|
|
|
|
|
response => $self->HttpStatusCodeDesc, |
54
|
|
|
|
|
|
|
}); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
3
|
|
|
|
|
19
|
return $self; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SEE ALSO |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
L |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 AUTHOR |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Lee Johnson - C |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as Perl itself. If you would like to contribute documentation, |
70
|
|
|
|
|
|
|
features, bug fixes, or anything else then please raise an issue / pull request: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
https://github.com/Humanstate/business-fixflo |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# vim: ts=4:sw=4:et |