ACME2/Order.pm

filter: Statementstmt 55.1% 16 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 66.6% 2 / 3 totaltotal 57.5% 23 / 40 SCAR 8.6
CC
2
Cov
55%
update
6.0
authorizations
2.0
identifiers
2.0
CRAP 2.4
« ACME2/Challenge/http_01.pm ↑ Summary ACME2/Challenge/dns_01.pm »
1 package Net::ACME2::Order;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =encoding utf-8
7  
8 =head1 NAME
9  
10 Net::ACME2::Order
11  
12 =head1 DESCRIPTION
13  
14 The ACME Order object.
15  
16 =cut
17  
18 2 ▶use parent qw( Net::ACME2::AccessorBase );
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶use Call::Context ();
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 use constant _ACCESSORS => (
23 'id',
24 'status',
25 'expires',
26 'notBefore',
27 'notAfter',
28 'certificate',
29 'finalize',
30 2 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 =head1 ACCESSORS
33  
34 These provide text strings as defined in the ACME specification.
35  
36 =over
37  
38 =item * B<id()>
39  
40 =item * B<status()>
41  
42 =item * B<expires()>
43  
44 =item * B<notBefore()>
45  
46 =item * B<notAfter()>
47  
48 =item * B<certificate()>
49  
50 =item * B<finalize()>
51  
52 =back
53  
54 =head2 I<OBJ>->authorizations()
55  
56 The URLs for the order’s authorizations.
57  
58 =cut
59  
60 sub authorizations {
61 0 ▶ my ($self) = @_;
Subroutine authorizations: not called CC=1 SCAR=6.9
Pod documented
62  
63 0 Call::Context::must_be_list();
64  
65 0 return @{ $self->{'_authorizations'} };
66 }
67  
68 =head2 I<OBJ>->identifiers()
69  
70 The order’s identifiers, as a list of hash references.
71 The content matches the ACME specification.
72  
73 =cut
74  
75 sub identifiers {
76 0 ▶ my ($self) = @_;
Subroutine identifiers: not called CC=1 SCAR=6.9
Pod documented
77  
78 0 Call::Context::must_be_list();
79  
80 0 return map { { %$_ } } @{ $self->{'_identifiers'} };
81 }
82  
83 #Only to be called from ACME2.pm?
84  
85 sub update {
86 0 ▶ my ($self, $new_hr) = @_;
Subroutine update: not called CC=2 SCAR=17.9
Pod undocumented
87  
88 0 for my $name ( 'status', 'certificate' ) {
89 0 $self->{"_$name"} = $new_hr->{$name};
90 }
91  
92 0 return $self;
93 }
94  
95 2 1;
« ACME2/Challenge/http_01.pm ↑ Summary ACME2/Challenge/dns_01.pm »