invoice_service.proto 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/enums/month_of_year.proto";
  17. import "google/ads/googleads/v11/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.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 = "InvoiceServiceProto";
  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 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. //
  36. // List of thrown errors:
  37. // [AuthenticationError]()
  38. // [AuthorizationError]()
  39. // [FieldError]()
  40. // [HeaderError]()
  41. // [InternalError]()
  42. // [InvoiceError]()
  43. // [QuotaError]()
  44. // [RequestError]()
  45. rpc ListInvoices(ListInvoicesRequest) returns (ListInvoicesResponse) {
  46. option (google.api.http) = {
  47. get: "/v11/customers/{customer_id=*}/invoices"
  48. };
  49. option (google.api.method_signature) = "customer_id,billing_setup,issue_year,issue_month";
  50. }
  51. }
  52. // Request message for fetching the invoices of a given billing setup that were
  53. // issued during a given month.
  54. message ListInvoicesRequest {
  55. // Required. The ID of the customer to fetch invoices for.
  56. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  57. // Required. The billing setup resource name of the requested invoices.
  58. //
  59. // `customers/{customer_id}/billingSetups/{billing_setup_id}`
  60. string billing_setup = 2 [(google.api.field_behavior) = REQUIRED];
  61. // Required. The issue year to retrieve invoices, in yyyy format. Only
  62. // invoices issued in 2019 or later can be retrieved.
  63. string issue_year = 3 [(google.api.field_behavior) = REQUIRED];
  64. // Required. The issue month to retrieve invoices.
  65. google.ads.googleads.v11.enums.MonthOfYearEnum.MonthOfYear issue_month = 4 [(google.api.field_behavior) = REQUIRED];
  66. }
  67. // Response message for [InvoiceService.ListInvoices][google.ads.googleads.v11.services.InvoiceService.ListInvoices].
  68. message ListInvoicesResponse {
  69. // The list of invoices that match the billing setup and time period.
  70. repeated google.ads.googleads.v11.resources.Invoice invoices = 1;
  71. }