« blib/lib/Google/Ads/AdWords/v201802/BiddingStrategyService/BiddingStrategyServiceInterfacePort.pm
↑ Summary
blib/lib/Google/Ads/AdWords/v201802/BudgetService/BudgetServiceInterfacePort.pm »
| 1 | package Google::Ads::AdWords::v201802::BudgetOrderService::BudgetOrderServiceInterfacePort; | ||
| 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::BudgetOrderService | ||
| 10 | if not Google::Ads::AdWords::v201802::TypeMaps::BudgetOrderService->can('get_class'); | ||
| 11 | |||
| 12 | sub START { | ||
| 13 | $_[0]->set_proxy('https://adwords.google.com/api/adwords/billing/v201802/BudgetOrderService') if not $_[2]->{proxy}; | ||
| 14 | $_[0]->set_class_resolver('Google::Ads::AdWords::v201802::TypeMaps::BudgetOrderService') | ||
| 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::BudgetOrderService::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::BudgetOrderService::RequestHeader )], | ||
| 43 | }, | ||
| 44 | headerfault => { | ||
| 45 | |||
| 46 | } | ||
| 47 | }, $body, $header); | ||
| 48 | } | ||
| 49 | |||
| 50 | |||
| 51 | sub getBillingAccounts { | ||
| 52 | my ($self, $body, $header) = @_; | ||
| 53 | die "getBillingAccounts must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 54 | return $self->SUPER::call({ | ||
| 55 | operation => 'getBillingAccounts', | ||
| 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::BudgetOrderService::getBillingAccounts )], | ||
| 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::BudgetOrderService::RequestHeader )], | ||
| 74 | }, | ||
| 75 | headerfault => { | ||
| 76 | |||
| 77 | } | ||
| 78 | }, $body, $header); | ||
| 79 | } | ||
| 80 | |||
| 81 | |||
| 82 | sub mutate { | ||
| 83 | my ($self, $body, $header) = @_; | ||
| 84 | die "mutate must be called as object method (\$self is <$self>)" if not blessed($self); | ||
| 85 | return $self->SUPER::call({ | ||
| 86 | operation => 'mutate', | ||
| 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::BudgetOrderService::mutate )], | ||
| 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::BudgetOrderService::RequestHeader )], | ||
| 105 | }, | ||
| 106 | headerfault => { | ||
| 107 | |||
| 108 | } | ||
| 109 | }, $body, $header); | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | |||
| 115 | 1; | ||
| 116 | |||
| 117 | |||
| 118 | |||
| 119 | __END__ | ||
| 120 | |||
| 121 | =pod | ||
| 122 | |||
| 123 | =head1 NAME | ||
| 124 | |||
| 125 | Google::Ads::AdWords::v201802::BudgetOrderService::BudgetOrderServiceInterfacePort - SOAP Interface for the BudgetOrderService Web Service | ||
| 126 | |||
| 127 | =head1 SYNOPSIS | ||
| 128 | |||
| 129 | use Google::Ads::AdWords::v201802::BudgetOrderService::BudgetOrderServiceInterfacePort; | ||
| 130 | my $interface = Google::Ads::AdWords::v201802::BudgetOrderService::BudgetOrderServiceInterfacePort->new(); | ||
| 131 | |||
| 132 | my $response; | ||
| 133 | $response = $interface->get(); | ||
| 134 | $response = $interface->getBillingAccounts(); | ||
| 135 | $response = $interface->mutate(); | ||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | =head1 DESCRIPTION | ||
| 140 | |||
| 141 | SOAP Interface for the BudgetOrderService web service | ||
| 142 | located at https://adwords.google.com/api/adwords/billing/v201802/BudgetOrderService. | ||
| 143 | |||
| 144 | =head1 SERVICE BudgetOrderService | ||
| 145 | |||
| 146 | |||
| 147 | |||
| 148 | =head2 Port BudgetOrderServiceInterfacePort | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | =head1 METHODS | ||
| 153 | |||
| 154 | =head2 General methods | ||
| 155 | |||
| 156 | =head3 new | ||
| 157 | |||
| 158 | Constructor. | ||
| 159 | |||
| 160 | All arguments are forwarded to L<SOAP::WSDL::Client|SOAP::WSDL::Client>. | ||
| 161 | |||
| 162 | =head2 SOAP Service methods | ||
| 163 | |||
| 164 | Method synopsis is displayed with hash refs as parameters. | ||
| 165 | |||
| 166 | The commented class names in the method's parameters denote that objects | ||
| 167 | of the corresponding class can be passed instead of the marked hash ref. | ||
| 168 | |||
| 169 | You may pass any combination of objects, hash and list refs to these | ||
| 170 | methods, as long as you meet the structure. | ||
| 171 | |||
| 172 | List items (i.e. multiple occurences) are not displayed in the synopsis. | ||
| 173 | You may generally pass a list ref of hash refs (or objects) instead of a hash | ||
| 174 | ref - this may result in invalid XML if used improperly, though. Note that | ||
| 175 | SOAP::WSDL always expects list references at maximum depth position. | ||
| 176 | |||
| 177 | XML attributes are not displayed in this synopsis and cannot be set using | ||
| 178 | hash refs. See the respective class' documentation for additional information. | ||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | =head3 get | ||
| 183 | |||
| 184 | Gets a list of {@link BudgetOrder}s using the generic selector. @param serviceSelector specifies which BudgetOrder to return. @return A {@link BudgetOrderPage} of BudgetOrders of the client customer. All BudgetOrder fields are returned. Stats are not yet supported. @throws ApiException | ||
| 185 | |||
| 186 | Returns a L<Google::Ads::AdWords::v201802::BudgetOrderService::getResponse|Google::Ads::AdWords::v201802::BudgetOrderService::getResponse> object. | ||
| 187 | |||
| 188 | $response = $interface->get( { | ||
| 189 | serviceSelector => $a_reference_to, # see Google::Ads::AdWords::v201802::Selector | ||
| 190 | },, | ||
| 191 | ); | ||
| 192 | |||
| 193 | =head3 getBillingAccounts | ||
| 194 | |||
| 195 | Returns all the open/active BillingAccounts associated with the current manager. @return A list of {@link BillingAccount}s. @throws ApiException | ||
| 196 | |||
| 197 | Returns a L<Google::Ads::AdWords::v201802::BudgetOrderService::getBillingAccountsResponse|Google::Ads::AdWords::v201802::BudgetOrderService::getBillingAccountsResponse> object. | ||
| 198 | |||
| 199 | $response = $interface->getBillingAccounts( { | ||
| 200 | },, | ||
| 201 | ); | ||
| 202 | |||
| 203 | =head3 mutate | ||
| 204 | |||
| 205 | Adds, updates, or removes budget orders. Supported operations are: <p><code>ADD</code>: Adds a {@link BudgetOrder} to the billing account specified by the billing account ID.</p> <p><code>SET</code>: Sets the start/end date and amount of the {@link BudgetOrder}.</p> <p><code>REMOVE</code>: Cancels the {@link BudgetOrder} (status change).</p> <p class="warning"><b>Warning:</b> The <code>BudgetOrderService</code> is limited to one operation per mutate request. Any attempt to make more than one operation will result in an <code>ApiException</code>.</p> <p class="note"><b>Note:</b> This action is available only on a whitelist basis.</p> @param operations A list of operations, <b>however currently we only support one operation per mutate call</b>. @return BudgetOrders affected by the mutate operation. @throws ApiException | ||
| 206 | |||
| 207 | Returns a L<Google::Ads::AdWords::v201802::BudgetOrderService::mutateResponse|Google::Ads::AdWords::v201802::BudgetOrderService::mutateResponse> object. | ||
| 208 | |||
| 209 | $response = $interface->mutate( { | ||
| 210 | operations => $a_reference_to, # see Google::Ads::AdWords::v201802::BudgetOrderOperation | ||
| 211 | },, | ||
| 212 | ); | ||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | =head1 AUTHOR | ||
| 217 | |||
| 218 | Generated by SOAP::WSDL on Mon Feb 26 21:11:07 2018 | ||
| 219 | |||
| 220 | =cut |