« blib/lib/Google/Ads/AdWords/v201710/CustomerService/CustomerServiceInterfacePort.pm
↑ Summary
blib/lib/Google/Ads/AdWords/v201802/AdGroupCriterionService/AdGroupCriterionServiceInterfacePort.pm »
| 1 | package Google::Ads::AdWords::v201802::AdGroupAdService::AdGroupAdServiceInterfacePort; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use Class::Std::Fast::Storable; | ||
| 5 | use Scalar::Util qw(blessed); | ||
| 6 | use base qw(SOAP::WSDL::Client::Base); | ||
| 7 | |||
| 8 | # only load if it hasn't been loaded before | ||
| 9 | require Google::Ads::AdWords::v201802::TypeMaps::AdGroupAdService | ||
| 10 | if not Google::Ads::AdWords::v201802::TypeMaps::AdGroupAdService->can('get_class'); | ||
| 11 | |||
| 12 | sub START { | ||
| 13 | $_[0]->set_proxy('https://adwords.google.com/api/adwords/cm/v201802/AdGroupAdService') if not $_[2]->{proxy}; | ||
| 14 | $_[0]->set_class_resolver('Google::Ads::AdWords::v201802::TypeMaps::AdGroupAdService') | ||
| 15 | if not $_[2]->{class_resolver}; | ||
| 16 | |||
| 17 | $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix}; | ||
| 18 | } | ||
| 19 | |||
| 20 | sub get { | ||
| 21 | my ($self, $body, $header) = @_; | ||
| 22 | die "get must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 23 | return $self->SUPER::call({ | ||
| 24 | operation => 'get', | ||
| 25 | soap_action => '', | ||
| 26 | style => 'document', | ||
| 27 | body => { | ||
| 28 | |||
| 29 | |||
| 30 | 'use' => 'literal', | ||
| 31 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 32 | encodingStyle => '', | ||
| 33 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::get )], | ||
| 34 | }, | ||
| 35 | header => { | ||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | 'use' => 'literal', | ||
| 40 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 41 | encodingStyle => '', | ||
| 42 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::RequestHeader )], | ||
| 43 | }, | ||
| 44 | headerfault => { | ||
| 45 | |||
| 46 | } | ||
| 47 | }, $body, $header); | ||
| 48 | } | ||
| 49 | |||
| 50 | |||
| 51 | sub mutate { | ||
| 52 | my ($self, $body, $header) = @_; | ||
| 53 | die "mutate must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 54 | return $self->SUPER::call({ | ||
| 55 | operation => 'mutate', | ||
| 56 | soap_action => '', | ||
| 57 | style => 'document', | ||
| 58 | body => { | ||
| 59 | |||
| 60 | |||
| 61 | 'use' => 'literal', | ||
| 62 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 63 | encodingStyle => '', | ||
| 64 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::mutate )], | ||
| 65 | }, | ||
| 66 | header => { | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | 'use' => 'literal', | ||
| 71 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 72 | encodingStyle => '', | ||
| 73 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::RequestHeader )], | ||
| 74 | }, | ||
| 75 | headerfault => { | ||
| 76 | |||
| 77 | } | ||
| 78 | }, $body, $header); | ||
| 79 | } | ||
| 80 | |||
| 81 | |||
| 82 | sub mutateLabel { | ||
| 83 | my ($self, $body, $header) = @_; | ||
| 84 | die "mutateLabel must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 85 | return $self->SUPER::call({ | ||
| 86 | operation => 'mutateLabel', | ||
| 87 | soap_action => '', | ||
| 88 | style => 'document', | ||
| 89 | body => { | ||
| 90 | |||
| 91 | |||
| 92 | 'use' => 'literal', | ||
| 93 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 94 | encodingStyle => '', | ||
| 95 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::mutateLabel )], | ||
| 96 | }, | ||
| 97 | header => { | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | 'use' => 'literal', | ||
| 102 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 103 | encodingStyle => '', | ||
| 104 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::RequestHeader )], | ||
| 105 | }, | ||
| 106 | headerfault => { | ||
| 107 | |||
| 108 | } | ||
| 109 | }, $body, $header); | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | sub query { | ||
| 114 | my ($self, $body, $header) = @_; | ||
| 115 | die "query must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 116 | return $self->SUPER::call({ | ||
| 117 | operation => 'query', | ||
| 118 | soap_action => '', | ||
| 119 | style => 'document', | ||
| 120 | body => { | ||
| 121 | |||
| 122 | |||
| 123 | 'use' => 'literal', | ||
| 124 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 125 | encodingStyle => '', | ||
| 126 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::query )], | ||
| 127 | }, | ||
| 128 | header => { | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | 'use' => 'literal', | ||
| 133 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 134 | encodingStyle => '', | ||
| 135 | parts => [qw( Google::Ads::AdWords::v201802::AdGroupAdService::RequestHeader )], | ||
| 136 | }, | ||
| 137 | headerfault => { | ||
| 138 | |||
| 139 | } | ||
| 140 | }, $body, $header); | ||
| 141 | } | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | 1; | ||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | __END__ | ||
| 151 | |||
| 152 | =pod | ||
| 153 | |||
| 154 | =head1 NAME | ||
| 155 | |||
| 156 | Google::Ads::AdWords::v201802::AdGroupAdService::AdGroupAdServiceInterfacePort - SOAP Interface for the AdGroupAdService Web Service | ||
| 157 | |||
| 158 | =head1 SYNOPSIS | ||
| 159 | |||
| 160 | use Google::Ads::AdWords::v201802::AdGroupAdService::AdGroupAdServiceInterfacePort; | ||
| 161 | my $interface = Google::Ads::AdWords::v201802::AdGroupAdService::AdGroupAdServiceInterfacePort->new(); | ||
| 162 | |||
| 163 | my $response; | ||
| 164 | $response = $interface->get(); | ||
| 165 | $response = $interface->mutate(); | ||
| 166 | $response = $interface->mutateLabel(); | ||
| 167 | $response = $interface->query(); | ||
| 168 | |||
| 169 | |||
| 170 | |||
| 171 | =head1 DESCRIPTION | ||
| 172 | |||
| 173 | SOAP Interface for the AdGroupAdService web service | ||
| 174 | located at https://adwords.google.com/api/adwords/cm/v201802/AdGroupAdService. | ||
| 175 | |||
| 176 | =head1 SERVICE AdGroupAdService | ||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | =head2 Port AdGroupAdServiceInterfacePort | ||
| 181 | |||
| 182 | |||
| 183 | |||
| 184 | =head1 METHODS | ||
| 185 | |||
| 186 | =head2 General methods | ||
| 187 | |||
| 188 | =head3 new | ||
| 189 | |||
| 190 | Constructor. | ||
| 191 | |||
| 192 | All arguments are forwarded to L<SOAP::WSDL::Client|SOAP::WSDL::Client>. | ||
| 193 | |||
| 194 | =head2 SOAP Service methods | ||
| 195 | |||
| 196 | Method synopsis is displayed with hash refs as parameters. | ||
| 197 | |||
| 198 | The commented class names in the method's parameters denote that objects | ||
| 199 | of the corresponding class can be passed instead of the marked hash ref. | ||
| 200 | |||
| 201 | You may pass any combination of objects, hash and list refs to these | ||
| 202 | methods, as long as you meet the structure. | ||
| 203 | |||
| 204 | List items (i.e. multiple occurences) are not displayed in the synopsis. | ||
| 205 | You may generally pass a list ref of hash refs (or objects) instead of a hash | ||
| 206 | ref - this may result in invalid XML if used improperly, though. Note that | ||
| 207 | SOAP::WSDL always expects list references at maximum depth position. | ||
| 208 | |||
| 209 | XML attributes are not displayed in this synopsis and cannot be set using | ||
| 210 | hash refs. See the respective class' documentation for additional information. | ||
| 211 | |||
| 212 | |||
| 213 | |||
| 214 | =head3 get | ||
| 215 | |||
| 216 | Returns a list of AdGroupAds. AdGroupAds that had been removed are not returned by default. @param serviceSelector The selector specifying the {@link AdGroupAd}s to return. @return The page containing the AdGroupAds that meet the criteria specified by the selector. @throws ApiException when there is at least one error with the request. | ||
| 217 | |||
| 218 | Returns a L<Google::Ads::AdWords::v201802::AdGroupAdService::getResponse|Google::Ads::AdWords::v201802::AdGroupAdService::getResponse> object. | ||
| 219 | |||
| 220 | $response = $interface->get( { | ||
| 221 | serviceSelector => $a_reference_to, # see Google::Ads::AdWords::v201802::Selector | ||
| 222 | },, | ||
| 223 | ); | ||
| 224 | |||
| 225 | =head3 mutate | ||
| 226 | |||
| 227 | Applies the list of mutate operations (ie. add, set, remove): <p>Add - Creates a new {@linkplain AdGroupAd ad group ad}. The {@code adGroupId} must reference an existing ad group. The child {@code Ad} must be sufficiently specified by constructing a concrete ad type (such as {@code TextAd}) and setting its fields accordingly.</p> <p>Set - Updates an ad group ad. Except for {@code status}, ad group ad fields are not mutable. Status updates are straightforward - the status of the ad group ad is updated as specified. If any other field has changed, it will be ignored. If you want to change any of the fields other than status, you must make a new ad and then remove the old one.</p> <p>Remove - Removes the link between the specified AdGroup and Ad.</p> @param operations The operations to apply. @return A list of AdGroupAds where each entry in the list is the result of applying the operation in the input list with the same index. For an add/set operation, the return AdGroupAd will be what is saved to the db. In the case of the remove operation, the return AdGroupAd will simply be an AdGroupAd containing an Ad with the id set to the Ad being removed from the AdGroup. | ||
| 228 | |||
| 229 | Returns a L<Google::Ads::AdWords::v201802::AdGroupAdService::mutateResponse|Google::Ads::AdWords::v201802::AdGroupAdService::mutateResponse> object. | ||
| 230 | |||
| 231 | $response = $interface->mutate( { | ||
| 232 | operations => $a_reference_to, # see Google::Ads::AdWords::v201802::AdGroupAdOperation | ||
| 233 | },, | ||
| 234 | ); | ||
| 235 | |||
| 236 | =head3 mutateLabel | ||
| 237 | |||
| 238 | Adds labels to the AdGroupAd or removes labels from the AdGroupAd. <p>Add - Apply an existing label to an existing {@linkplain AdGroupAd ad group ad}. The {@code adGroupId} and {@code adId} must reference an existing {@linkplain AdGroupAd ad group ad}. The {@code labelId} must reference an existing {@linkplain Label label}. <p>Remove - Removes the link between the specified {@linkplain AdGroupAd ad group ad} and {@linkplain Label label}. @param operations The operations to apply. @return A list of AdGroupAdLabel where each entry in the list is the result of applying the operation in the input list with the same index. For an add operation, the returned AdGroupAdLabel contains the AdGroupId, AdId and the LabelId. In the case of a remove operation, the returned AdGroupAdLabel will only have AdGroupId and AdId. @throws ApiException when there are one or more errors with the request. | ||
| 239 | |||
| 240 | Returns a L<Google::Ads::AdWords::v201802::AdGroupAdService::mutateLabelResponse|Google::Ads::AdWords::v201802::AdGroupAdService::mutateLabelResponse> object. | ||
| 241 | |||
| 242 | $response = $interface->mutateLabel( { | ||
| 243 | operations => $a_reference_to, # see Google::Ads::AdWords::v201802::AdGroupAdLabelOperation | ||
| 244 | },, | ||
| 245 | ); | ||
| 246 | |||
| 247 | =head3 query | ||
| 248 | |||
| 249 | Returns a list of AdGroupAds based on the query. @param query The SQL-like AWQL query string. @return A list of AdGroupAds. @throws ApiException if problems occur while parsing the query or fetching AdGroupAds. | ||
| 250 | |||
| 251 | Returns a L<Google::Ads::AdWords::v201802::AdGroupAdService::queryResponse|Google::Ads::AdWords::v201802::AdGroupAdService::queryResponse> object. | ||
| 252 | |||
| 253 | $response = $interface->query( { | ||
| 254 | query => $some_value, # string | ||
| 255 | },, | ||
| 256 | ); | ||
| 257 | |||
| 258 | |||
| 259 | |||
| 260 | =head1 AUTHOR | ||
| 261 | |||
| 262 | Generated by SOAP::WSDL on Mon Feb 26 21:07:06 2018 | ||
| 263 | |||
| 264 | =cut |