File Coverage

blib/lib/Google/Ads/GoogleAds/V11/Common/Segments.pm
Criterion Covered Total %
statement 12 17 70.5
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 23 69.5


line stmt bran cond sub pod time code
1             # Copyright 2020, Google LLC
2             #
3             # Licensed under the Apache License, Version 2.0 (the "License");
4             # you may not use this file except in compliance with the License.
5             # You may obtain a copy of the License at
6             #
7             # http://www.apache.org/licenses/LICENSE-2.0
8             #
9             # Unless required by applicable law or agreed to in writing, software
10             # distributed under the License is distributed on an "AS IS" BASIS,
11             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12             # See the License for the specific language governing permissions and
13             # limitations under the License.
14              
15              
16             use strict;
17 1     1   671 use warnings;
  1         2  
  1         21  
18 1     1   4 use base qw(Google::Ads::GoogleAds::BaseEntity);
  1         2  
  1         20  
19 1     1   11  
  1         2  
  1         60  
20             use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
21 1     1   5  
  1         2  
  1         370  
22             my ($class, $args) = @_;
23             my $self = {
24 0     0 0   adDestinationType => $args->{adDestinationType},
25             adNetworkType => $args->{adNetworkType},
26             assetInteractionTarget => $args->{assetInteractionTarget},
27             auctionInsightDomain => $args->{auctionInsightDomain},
28             budgetCampaignAssociationStatus => $args->{budgetCampaignAssociationStatus},
29             clickType => $args->{clickType},
30             conversionAction => $args->{conversionAction},
31             conversionActionCategory => $args->{conversionActionCategory},
32             conversionActionName => $args->{conversionActionName},
33             conversionAdjustment => $args->{conversionAdjustment},
34             conversionAttributionEventType => $args->{conversionAttributionEventType},
35             conversionLagBucket => $args->{conversionLagBucket},
36             conversionOrAdjustmentLagBucket => $args->{conversionOrAdjustmentLagBucket},
37             conversionValueRulePrimaryDimension =>
38             $args->{conversionValueRulePrimaryDimension},
39             date => $args->{date},
40             dayOfWeek => $args->{dayOfWeek},
41             device => $args->{device},
42             externalConversionSource => $args->{externalConversionSource},
43             geoTargetAirport => $args->{geoTargetAirport},
44             geoTargetCanton => $args->{geoTargetCanton},
45             geoTargetCity => $args->{geoTargetCity},
46             geoTargetCountry => $args->{geoTargetCountry},
47             geoTargetCounty => $args->{geoTargetCounty},
48             geoTargetDistrict => $args->{geoTargetDistrict},
49             geoTargetMetro => $args->{geoTargetMetro},
50             geoTargetMostSpecificLocation => $args->{geoTargetMostSpecificLocation},
51             geoTargetPostalCode => $args->{geoTargetPostalCode},
52             geoTargetProvince => $args->{geoTargetProvince},
53             geoTargetRegion => $args->{geoTargetRegion},
54             geoTargetState => $args->{geoTargetState},
55             hotelBookingWindowDays => $args->{hotelBookingWindowDays},
56             hotelCenterId => $args->{hotelCenterId},
57             hotelCheckInDate => $args->{hotelCheckInDate},
58             hotelCheckInDayOfWeek => $args->{hotelCheckInDayOfWeek},
59             hotelCity => $args->{hotelCity},
60             hotelClass => $args->{hotelClass},
61             hotelCountry => $args->{hotelCountry},
62             hotelDateSelectionType => $args->{hotelDateSelectionType},
63             hotelLengthOfStay => $args->{hotelLengthOfStay},
64             hotelPriceBucket => $args->{hotelPriceBucket},
65             hotelRateRuleId => $args->{hotelRateRuleId},
66             hotelRateType => $args->{hotelRateType},
67             hotelState => $args->{hotelState},
68             hour => $args->{hour},
69             interactionOnThisExtension => $args->{interactionOnThisExtension},
70             keyword => $args->{keyword},
71             month => $args->{month},
72             monthOfYear => $args->{monthOfYear},
73             partnerHotelId => $args->{partnerHotelId},
74             placeholderType => $args->{placeholderType},
75             productAggregatorId => $args->{productAggregatorId},
76             productBiddingCategoryLevel1 => $args->{productBiddingCategoryLevel1},
77             productBiddingCategoryLevel2 => $args->{productBiddingCategoryLevel2},
78             productBiddingCategoryLevel3 => $args->{productBiddingCategoryLevel3},
79             productBiddingCategoryLevel4 => $args->{productBiddingCategoryLevel4},
80             productBiddingCategoryLevel5 => $args->{productBiddingCategoryLevel5},
81             productBrand => $args->{productBrand},
82             productChannel => $args->{productChannel},
83             productChannelExclusivity => $args->{productChannelExclusivity},
84             productCondition => $args->{productCondition},
85             productCountry => $args->{productCountry},
86             productCustomAttribute0 => $args->{productCustomAttribute0},
87             productCustomAttribute1 => $args->{productCustomAttribute1},
88             productCustomAttribute2 => $args->{productCustomAttribute2},
89             productCustomAttribute3 => $args->{productCustomAttribute3},
90             productCustomAttribute4 => $args->{productCustomAttribute4},
91             productItemId => $args->{productItemId},
92             productLanguage => $args->{productLanguage},
93             productMerchantId => $args->{productMerchantId},
94             productStoreId => $args->{productStoreId},
95             productTitle => $args->{productTitle},
96             productTypeL1 => $args->{productTypeL1},
97             productTypeL2 => $args->{productTypeL2},
98             productTypeL3 => $args->{productTypeL3},
99             productTypeL4 => $args->{productTypeL4},
100             productTypeL5 => $args->{productTypeL5},
101             quarter => $args->{quarter},
102             recommendationType => $args->{recommendationType},
103             searchEngineResultsPageType => $args->{searchEngineResultsPageType},
104             searchTermMatchType => $args->{searchTermMatchType},
105             skAdNetworkAdEventType => $args->{skAdNetworkAdEventType},
106             skAdNetworkAttributionCredit => $args->{skAdNetworkAttributionCredit},
107             skAdNetworkConversionValue => $args->{skAdNetworkConversionValue},
108             skAdNetworkSourceApp => $args->{skAdNetworkSourceApp},
109             skAdNetworkUserType => $args->{skAdNetworkUserType},
110             slot => $args->{slot},
111             webpage => $args->{webpage},
112             week => $args->{week},
113             year => $args->{year}};
114              
115 0           # Delete the unassigned fields in this object for a more concise JSON payload
116             remove_unassigned_fields($self, $args);
117              
118 0           bless $self, $class;
119             return $self;
120 0           }
121 0            
122             1;