SOAP/ItemDTOEx.pm

filter: Statementstmt 52.2% 23 / 44 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 44.6% 25 / 56 CC 6 SCAR 34.6
CC
6
Cov
44%
defaultPrice
42.0
BEGIN
1.0
BEGIN
1.0
CRAP 31.8
« SOAP/OrderWS.pm ↑ Summary SOAP/Object.pm »
1 package jBilling::Client::SOAP::ItemDTOEx;
2 1 ▶ use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'jBilling::Client::SOAP::Object';
5 1 has 'currencyId', is => 'rw', isa => 'Str';
6 1 has 'deleted', is => 'rw', isa => 'Int';
7 1 has 'entityId', is => 'rw', isa => 'Int';
8 1 has 'hasDecimals', is => 'rw', isa => 'Int';
9 1 has 'id', is => 'rw', isa => 'Int';
10 1 has 'orderLineTypeId', is => 'rw', isa => 'Str';
11 1 has 'types', is => 'rw', isa => 'Int';
12 1 has 'description', is => 'rw', isa => 'Str';
13 1 has 'glCode', is => 'rw', isa => 'Str';
14 1 has 'number', is => 'rw', isa => 'Str';
15 1 has 'percentage', is => 'rw', isa => 'Str';
16 1 has 'price', is => 'rw', isa => 'Str';
17 1 has 'promoCode', is => 'rw', isa => 'Str';
18 1 has 'metaFields', is => 'bare', isa => 'arrayRef';
19 1 has 'excludedTypes', is => 'rw', isa => 'Int';
20 1 has 'defaultPrice', is => 'bare', isa => 'arrayRef';
21
22
23 0 ▶ sub defaultPrice {
Subroutine defaultPrice: not called CC=6 SCAR=37.4
Pod undocumented
24 0 my $self = shift;
25 0 my @lines;
26 0 my $item = shift;
27 0 ▶ if ( ref($item) eq 'HASH' ) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $item eq 'HASH') { } 0 0 0
elsif (ref $item eq 'ARRAY') { } 0 0 0
28 0 my %hash = %{$item};
29 0 my $line = jBilling::Client::SOAP::PriceModelWS->new();
30 0 $line->load($item);
31 0 push @lines, $line;
32 0 $self->{defaultPrice} = \@lines;
33 }
34 elsif ( ref($item) eq 'ARRAY' ) {
35 0 foreach my $v ( @{$item} ) {
36 0 ▶ if ( ref($v) eq 'jBilling::Client::SOAP::PriceModelWS' ) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $v eq 'jBilling::Client::SOAP::PriceModelWS') { } 0 0 0
elsif (ref $v eq 'HASH') { } 0 0 0
37
38 # This is an object created by our Client
39 0 push @lines, $v;
40 }
41 elsif ( ref($v) eq 'HASH' ) {
42
43 #This is coming back from jBilling
44 0 my %hash = %{$v};
45 0 my $line = jBilling::Client::SOAP::PriceModelWS->new();
46 0 $line->load( \%hash );
47 0 push @lines, $line;
48 }
49
50 }
51 0 $self->{defaultPrice} = \@lines;
52 }
53 else {
54 0 return $self->{defaultPrice};
55 }
56
57 }
58 1 1;
« SOAP/OrderWS.pm ↑ Summary SOAP/Object.pm »