billing_setup_service.proto 4.2 KB

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