cXML/Response/PunchOutSetup.pm

filter: Statementstmt 75.0% 18 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 2 / 2 totaltotal 76.4% 26 / 34 CC 1 SCAR 2.2
CC
1
Cov
75%
from_node
2.0
to_node
2.0
BEGIN
1.0
CRAP 1.2
« cXML/Address/Number.pm ↑ Summary cXML/Description.pm »
1 =encoding utf-8
2  
3 =head1 NAME
4  
5 Business::cXML::Response::PunchOutSetup - cXML punch-out setup response payload
6  
7 =head1 SYNOPSIS
8  
9 # This is normally done for you in Business::cXML::process()
10 use Business::cXML::Response::PunchOutSetup;
11 my $posr = new Business::cXML::Response::PunchOutSetup {
12 url => '...',
13 };
14  
15 =head1 DESCRIPTION
16  
17 Object representation of a cXML punch-out setup response.
18  
19 =head1 METHODS
20  
21 See L<Business::cXML::Object/COMMON METHODS>.
22  
23 =head1 PROPERTY METHODS
24  
25 See L<Business::cXML::Object/PROPERTY METHODS> for how the following operate.
26  
27 =over
28  
29 =cut
30  
31 1 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 package Business::cXML::Response::PunchOutSetup;
35 1 ▶use base qw(Business::cXML::Object);
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 1 ▶use constant NODENAME => 'PunchOutSetupResponse';
Subroutine BEGIN: called CC=1 SCAR=0.0
38 1 ▶use constant PROPERTIES => (
Subroutine BEGIN: called CC=1 SCAR=0.0
39 url => '',
40 1 );
41  
42 1 ▶use XML::LibXML::Ferry;
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 0 ▶sub from_node {
Subroutine from_node: not called CC=1 SCAR=6.9
Pod documented
45 0 my ($self, $el) = @_;
46  
47 # Recursing into StartPage will catch URL to url for us
48 0 $el->ferry($self, { StartPage => {} });
49 }
50  
51 0 ▶sub to_node {
Subroutine to_node: not called CC=1 SCAR=6.9
Pod documented
52 0 my ($self, $doc) = @_;
53 0 my $node = $doc->create($self->{_nodeName});
54  
55 0 $node->add('StartPage')->add('URL', $self->{url});
56  
57 0 return $node;
58 }
59  
60 =item C<B<url>>
61  
62 Mandatory, URL of start page to which the buyer's browser will be directed.
63  
64 =back
65  
66 =head1 AUTHOR
67  
68 Stéphane Lavergne L<https://github.com/vphantom>
69  
70 =head1 ACKNOWLEDGEMENTS
71  
72 Graph X Design Inc. L<https://www.gxd.ca/> sponsored this project.
73  
74 =head1 COPYRIGHT & LICENSE
75  
76 Copyright (c) 2017-2018 Stéphane Lavergne L<https://github.com/vphantom>
77  
78 Permission is hereby granted, free of charge, to any person obtaining a copy
79 of this software and associated documentation files (the "Software"), to deal
80 in the Software without restriction, including without limitation the rights
81 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82 copies of the Software, and to permit persons to whom the Software is
83 furnished to do so, subject to the following conditions:
84  
85 The above copyright notice and this permission notice shall be included in all
86 copies or substantial portions of the Software.
87  
88 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
94 SOFTWARE.
95  
96 =cut
97  
98 1 1;
« cXML/Address/Number.pm ↑ Summary cXML/Description.pm »