| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WebService::ValidSign::Object::Sender; | 
| 2 |  |  |  |  |  |  | our $VERSION = '0.003'; | 
| 3 | 3 |  |  | 3 |  | 21 | use Moo; | 
|  | 3 |  |  |  |  | 9 |  | 
|  | 3 |  |  |  |  | 18 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | extends 'WebService::ValidSign::Object'; | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 3 |  |  | 3 |  | 1045 | use Types::Standard qw(Str Bool); | 
|  | 3 |  |  |  |  | 8 |  | 
|  | 3 |  |  |  |  | 23 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | # ABSTRACT: A ValidSign Sender object | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | has '+type' => (default => "SENDER"); | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | has first_name => ( | 
| 14 |  |  |  |  |  |  | is => 'ro', | 
| 15 |  |  |  |  |  |  | isa => Str, | 
| 16 |  |  |  |  |  |  | required => 1, | 
| 17 |  |  |  |  |  |  | ); | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | has last_name => ( | 
| 20 |  |  |  |  |  |  | is       => 'rw', | 
| 21 |  |  |  |  |  |  | isa      => Str, | 
| 22 |  |  |  |  |  |  | required => 1, | 
| 23 |  |  |  |  |  |  | ); | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | has email => ( | 
| 26 |  |  |  |  |  |  | is       => 'rw', | 
| 27 |  |  |  |  |  |  | isa      => Str, | 
| 28 |  |  |  |  |  |  | required => 1, | 
| 29 |  |  |  |  |  |  | ); | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | sub as_signer { | 
| 32 | 0 |  |  | 0 | 0 |  | my $self = shift; | 
| 33 | 0 |  |  |  |  |  | my $meta = $self->meta; | 
| 34 |  |  |  |  |  |  |  | 
| 35 | 0 |  |  |  |  |  | my %result; | 
| 36 | 0 |  |  |  |  |  | for my $attr ($meta->get_all_attributes) { | 
| 37 | 0 |  |  |  |  |  | my $name  = $attr->name; | 
| 38 | 0 |  |  |  |  |  | my $value = $attr->get_value($self); | 
| 39 | 0 | 0 |  |  |  |  | $result{$name} = $value if defined $value; | 
| 40 |  |  |  |  |  |  | } | 
| 41 | 0 |  |  |  |  |  | require WebService::ValidSign::Object::Signer; | 
| 42 | 0 |  |  |  |  |  | return WebService::ValidSign::Object::Signer->new(%result); | 
| 43 |  |  |  |  |  |  | } | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | __PACKAGE__->meta->make_immutable; | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | __END__ | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | =pod | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =encoding UTF-8 | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 NAME | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | WebService::ValidSign::Object::Sender - A ValidSign Sender object | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | =head1 VERSION | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | version 0.003 | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | =head1 AUTHOR | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | Wesley Schwengle <waterkip@cpan.org> | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  | This software is Copyright (c) 2019 by Wesley Schwengle. | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | This is free software, licensed under: | 
| 70 |  |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | The (three-clause) BSD License | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | =cut |