1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v1.resources;
20 import "google/ads/googleads/v1/enums/billing_setup_status.proto";
21 import "google/ads/googleads/v1/enums/time_type.proto";
22 import "google/protobuf/wrappers.proto";
23 import "google/api/annotations.proto";
25 option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
26 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
27 option java_multiple_files = true;
28 option java_outer_classname = "BillingSetupProto";
29 option java_package = "com.google.ads.googleads.v1.resources";
30 option objc_class_prefix = "GAA";
31 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
32 option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
33 // Proto file describing the BillingSetup resource.
35 // A billing setup across Ads and Payments systems; an association between a
36 // Payments account and an advertiser. A billing setup is specific to one
38 message BillingSetup {
39 // Container of Payments account information for this billing.
40 message PaymentsAccountInfo {
41 // A 16 digit id used to identify the Payments account associated with the
44 // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456".
45 google.protobuf.StringValue payments_account_id = 1;
47 // The name of the Payments account associated with the billing setup.
49 // This enables the user to specify a meaningful name for a Payments account
50 // to aid in reconciling monthly invoices.
52 // This name will be printed in the monthly invoices.
53 google.protobuf.StringValue payments_account_name = 2;
55 // A 12 digit id used to identify the Payments profile associated with the
58 // This must be passed in as a string with dashes, e.g. "1234-5678-9012".
59 google.protobuf.StringValue payments_profile_id = 3;
61 // The name of the Payments profile associated with the billing setup.
62 google.protobuf.StringValue payments_profile_name = 4;
64 // A secondary payments profile id present in uncommon situations, e.g.
65 // when a sequential liability agreement has been arranged.
66 google.protobuf.StringValue secondary_payments_profile_id = 5;
69 // The resource name of the billing setup.
70 // BillingSetup resource names have the form:
72 // `customers/{customer_id}/billingSetups/{billing_setup_id}`
73 string resource_name = 1;
75 // The ID of the billing setup.
76 google.protobuf.Int64Value id = 2;
78 // The status of the billing setup.
79 google.ads.googleads.v1.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3;
81 // The resource name of the Payments account associated with this billing
82 // setup. Payments resource names have the form:
84 // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
85 // When setting up billing, this is used to signup with an existing Payments
86 // account (and then payments_account_info should not be set).
87 // When getting a billing setup, this and payments_account_info will be
89 google.protobuf.StringValue payments_account = 11;
91 // 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
96 PaymentsAccountInfo payments_account_info = 12;
98 // When creating a new billing setup, this is when the setup should take
99 // effect. NOW is the only acceptable start time if the customer doesn't have
100 // any approved setups.
102 // When fetching an existing billing setup, this is the requested start time.
103 // However, if the setup was approved (see status) after the requested start
104 // time, then this is the approval time.
106 // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a
107 // future time is allowed.
108 google.protobuf.StringValue start_date_time = 9;
110 // The start time as a type. Only NOW is allowed.
111 google.ads.googleads.v1.enums.TimeTypeEnum.TimeType start_time_type = 10;
114 // When the billing setup ends / ended. This is either FOREVER or the start
115 // time of the next scheduled billing setup.
117 // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format.
118 google.protobuf.StringValue end_date_time = 13;
120 // The end time as a type. The only possible value is FOREVER.
121 google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 14;