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