invoice_service.proto 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright 2021 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.v6.services;
  16. import "google/ads/googleads/v6/enums/month_of_year.proto";
  17. import "google/ads/googleads/v6/resources/invoice.proto";
  18. import "google/api/annotations.proto";
  19. import "google/api/client.proto";
  20. import "google/api/field_behavior.proto";
  21. option csharp_namespace = "Google.Ads.GoogleAds.V6.Services";
  22. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v6/services;services";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "InvoiceServiceProto";
  25. option java_package = "com.google.ads.googleads.v6.services";
  26. option objc_class_prefix = "GAA";
  27. option php_namespace = "Google\\Ads\\GoogleAds\\V6\\Services";
  28. option ruby_package = "Google::Ads::GoogleAds::V6::Services";
  29. // Proto file describing the Invoice service.
  30. // A service to fetch invoices issued for a billing setup during a given month.
  31. service InvoiceService {
  32. option (google.api.default_host) = "googleads.googleapis.com";
  33. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  34. // Returns all invoices associated with a billing setup, for a given month.
  35. rpc ListInvoices(ListInvoicesRequest) returns (ListInvoicesResponse) {
  36. option (google.api.http) = {
  37. get: "/v6/customers/{customer_id=*}/invoices"
  38. };
  39. option (google.api.method_signature) = "customer_id,billing_setup,issue_year,issue_month";
  40. }
  41. }
  42. // Request message for fetching the invoices of a given billing setup that were
  43. // issued during a given month.
  44. message ListInvoicesRequest {
  45. // Required. The ID of the customer to fetch invoices for.
  46. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  47. // Required. The billing setup resource name of the requested invoices.
  48. //
  49. // `customers/{customer_id}/billingSetups/{billing_setup_id}`
  50. string billing_setup = 2 [(google.api.field_behavior) = REQUIRED];
  51. // Required. The issue year to retrieve invoices, in yyyy format. Only
  52. // invoices issued in 2019 or later can be retrieved.
  53. string issue_year = 3 [(google.api.field_behavior) = REQUIRED];
  54. // Required. The issue month to retrieve invoices.
  55. google.ads.googleads.v6.enums.MonthOfYearEnum.MonthOfYear issue_month = 4 [(google.api.field_behavior) = REQUIRED];
  56. }
  57. // Response message for [InvoiceService.ListInvoices][google.ads.googleads.v6.services.InvoiceService.ListInvoices].
  58. message ListInvoicesResponse {
  59. // The list of invoices that match the billing setup and time period.
  60. repeated google.ads.googleads.v6.resources.Invoice invoices = 1;
  61. }