1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.ads.googleads.v14.services; 18 19import "google/ads/googleads/v14/resources/billing_setup.proto"; 20import "google/api/annotations.proto"; 21import "google/api/client.proto"; 22import "google/api/field_behavior.proto"; 23import "google/api/resource.proto"; 24 25option csharp_namespace = "Google.Ads.GoogleAds.V14.Services"; 26option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/services;services"; 27option java_multiple_files = true; 28option java_outer_classname = "BillingSetupServiceProto"; 29option java_package = "com.google.ads.googleads.v14.services"; 30option objc_class_prefix = "GAA"; 31option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Services"; 32option ruby_package = "Google::Ads::GoogleAds::V14::Services"; 33 34// Proto file describing the BillingSetup service. 35 36// A service for designating the business entity responsible for accrued costs. 37// 38// A billing setup is associated with a payments account. Billing-related 39// activity for all billing setups associated with a particular payments account 40// will appear on a single invoice generated monthly. 41// 42// Mutates: 43// The REMOVE operation cancels a pending billing setup. 44// The CREATE operation creates a new billing setup. 45service BillingSetupService { 46 option (google.api.default_host) = "googleads.googleapis.com"; 47 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords"; 48 49 // Creates a billing setup, or cancels an existing billing setup. 50 // 51 // List of thrown errors: 52 // [AuthenticationError]() 53 // [AuthorizationError]() 54 // [BillingSetupError]() 55 // [DateError]() 56 // [FieldError]() 57 // [HeaderError]() 58 // [InternalError]() 59 // [MutateError]() 60 // [QuotaError]() 61 // [RequestError]() 62 rpc MutateBillingSetup(MutateBillingSetupRequest) 63 returns (MutateBillingSetupResponse) { 64 option (google.api.http) = { 65 post: "/v14/customers/{customer_id=*}/billingSetups:mutate" 66 body: "*" 67 }; 68 option (google.api.method_signature) = "customer_id,operation"; 69 } 70} 71 72// Request message for billing setup mutate operations. 73message MutateBillingSetupRequest { 74 // Required. Id of the customer to apply the billing setup mutate operation 75 // to. 76 string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; 77 78 // Required. The operation to perform. 79 BillingSetupOperation operation = 2 [(google.api.field_behavior) = REQUIRED]; 80} 81 82// A single operation on a billing setup, which describes the cancellation of an 83// existing billing setup. 84message BillingSetupOperation { 85 // Only one of these operations can be set. "Update" operations are not 86 // supported. 87 oneof operation { 88 // Creates a billing setup. No resource name is expected for the new billing 89 // setup. 90 google.ads.googleads.v14.resources.BillingSetup create = 2; 91 92 // Resource name of the billing setup to remove. A setup cannot be 93 // removed unless it is in a pending state or its scheduled start time is in 94 // the future. The resource name looks like 95 // `customers/{customer_id}/billingSetups/{billing_id}`. 96 string remove = 1 [(google.api.resource_reference) = { 97 type: "googleads.googleapis.com/BillingSetup" 98 }]; 99 } 100} 101 102// Response message for a billing setup operation. 103message MutateBillingSetupResponse { 104 // A result that identifies the resource affected by the mutate request. 105 MutateBillingSetupResult result = 1; 106} 107 108// Result for a single billing setup mutate. 109message MutateBillingSetupResult { 110 // Returned for successful operations. 111 string resource_name = 1 [(google.api.resource_reference) = { 112 type: "googleads.googleapis.com/BillingSetup" 113 }]; 114} 115