billing_setup.proto 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.resources;
  16. import "google/ads/googleads/v11/enums/billing_setup_status.proto";
  17. import "google/ads/googleads/v11/enums/time_type.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. option csharp_namespace = "Google.Ads.GoogleAds.V11.Resources";
  21. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/resources;resources";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "BillingSetupProto";
  24. option java_package = "com.google.ads.googleads.v11.resources";
  25. option objc_class_prefix = "GAA";
  26. option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Resources";
  27. option ruby_package = "Google::Ads::GoogleAds::V11::Resources";
  28. // Proto file describing the BillingSetup resource.
  29. // A billing setup, which associates a payments account and an advertiser. A
  30. // billing setup is specific to one advertiser.
  31. message BillingSetup {
  32. option (google.api.resource) = {
  33. type: "googleads.googleapis.com/BillingSetup"
  34. pattern: "customers/{customer_id}/billingSetups/{billing_setup_id}"
  35. };
  36. // Container of payments account information for this billing.
  37. message PaymentsAccountInfo {
  38. // Output only. A 16 digit id used to identify the payments account associated with the
  39. // billing setup.
  40. //
  41. // This must be passed as a string with dashes, for example,
  42. // "1234-5678-9012-3456".
  43. optional string payments_account_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  44. // Immutable. The name of the payments account associated with the billing setup.
  45. //
  46. // This enables the user to specify a meaningful name for a payments account
  47. // to aid in reconciling monthly invoices.
  48. //
  49. // This name will be printed in the monthly invoices.
  50. optional string payments_account_name = 7 [(google.api.field_behavior) = IMMUTABLE];
  51. // Immutable. A 12 digit id used to identify the payments profile associated with the
  52. // billing setup.
  53. //
  54. // This must be passed in as a string with dashes, for example,
  55. // "1234-5678-9012".
  56. optional string payments_profile_id = 8 [(google.api.field_behavior) = IMMUTABLE];
  57. // Output only. The name of the payments profile associated with the billing setup.
  58. optional string payments_profile_name = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  59. // Output only. A secondary payments profile id present in uncommon situations, for
  60. // example, when a sequential liability agreement has been arranged.
  61. optional string secondary_payments_profile_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  62. }
  63. // Immutable. The resource name of the billing setup.
  64. // BillingSetup resource names have the form:
  65. //
  66. // `customers/{customer_id}/billingSetups/{billing_setup_id}`
  67. string resource_name = 1 [
  68. (google.api.field_behavior) = IMMUTABLE,
  69. (google.api.resource_reference) = {
  70. type: "googleads.googleapis.com/BillingSetup"
  71. }
  72. ];
  73. // Output only. The ID of the billing setup.
  74. optional int64 id = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. // Output only. The status of the billing setup.
  76. google.ads.googleads.v11.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  77. // Immutable. The resource name of the payments account associated with this billing
  78. // setup. Payments resource names have the form:
  79. //
  80. // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
  81. // When setting up billing, this is used to signup with an existing payments
  82. // account (and then payments_account_info should not be set).
  83. // When getting a billing setup, this and payments_account_info will be
  84. // populated.
  85. optional string payments_account = 18 [
  86. (google.api.field_behavior) = IMMUTABLE,
  87. (google.api.resource_reference) = {
  88. type: "googleads.googleapis.com/PaymentsAccount"
  89. }
  90. ];
  91. // Immutable. The payments account information associated with this billing setup.
  92. // When setting up billing, this is used to signup with a new payments account
  93. // (and then payments_account should not be set).
  94. // When getting a billing setup, this and payments_account will be
  95. // populated.
  96. PaymentsAccountInfo payments_account_info = 12 [(google.api.field_behavior) = IMMUTABLE];
  97. // When creating a new billing setup, this is when the setup should take
  98. // effect. NOW is the only acceptable start time if the customer doesn't have
  99. // any approved setups.
  100. //
  101. // When fetching an existing billing setup, this is the requested start time.
  102. // However, if the setup was approved (see status) after the requested start
  103. // time, then this is the approval time.
  104. oneof start_time {
  105. // Immutable. The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a
  106. // future time is allowed.
  107. string start_date_time = 16 [(google.api.field_behavior) = IMMUTABLE];
  108. // Immutable. The start time as a type. Only NOW is allowed.
  109. google.ads.googleads.v11.enums.TimeTypeEnum.TimeType start_time_type = 10 [(google.api.field_behavior) = IMMUTABLE];
  110. }
  111. // When the billing setup ends / ended. This is either FOREVER or the start
  112. // time of the next scheduled billing setup.
  113. oneof end_time {
  114. // Output only. The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format.
  115. string end_date_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  116. // Output only. The end time as a type. The only possible value is FOREVER.
  117. google.ads.googleads.v11.enums.TimeTypeEnum.TimeType end_time_type = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  118. }
  119. }