1 // Copyright 2018 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.v0.resources;
20 import "google/ads/googleads/v0/enums/billing_setup_status.proto";
21 import "google/ads/googleads/v0/enums/time_type.proto";
22 import "google/protobuf/wrappers.proto";
24 option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
25 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
26 option java_multiple_files = true;
27 option java_outer_classname = "BillingSetupProto";
28 option java_package = "com.google.ads.googleads.v0.resources";
29 option objc_class_prefix = "GAA";
30 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
31 option ruby_package = "Google::Ads::GoogleAds::V0::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.v0.enums.BillingSetupStatusEnum.BillingSetupStatus
82 // The resource name of the Payments account associated with this billing
83 // setup. Payments resource names have the form:
85 // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
86 // When setting up billing, this is used to signup with an existing Payments
87 // account (and then payments_account_info should not be set).
88 // When getting a billing setup, this and payments_account_info will be
90 google.protobuf.StringValue payments_account = 11;
92 // The Payments account information associated with this billing setup.
93 // When setting up billing, this is used to signup with a new Payments account
94 // (and then payments_account should not be set).
95 // When getting a billing setup, this and payments_account will be
97 PaymentsAccountInfo payments_account_info = 12;
99 // When creating a new billing setup, this is when the setup should take
100 // effect. NOW is the only acceptable start time if the customer doesn't have
101 // any approved setups.
103 // When fetching an existing billing setup, this is the requested start time.
104 // However, if the setup was approved (see status) after the requested start
105 // time, then this is the approval time.
107 // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a
108 // future time is allowed.
109 google.protobuf.StringValue start_date_time = 9;
111 // The start time as a type. Only NOW is allowed.
112 google.ads.googleads.v0.enums.TimeTypeEnum.TimeType start_time_type = 10;
115 // When the billing setup ends / ended. This is either FOREVER or the start
116 // time of the next scheduled billing setup.
118 // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format.
119 google.protobuf.StringValue end_date_time = 13;
121 // The end time as a type. The only possible value is FOREVER.
122 google.ads.googleads.v0.enums.TimeTypeEnum.TimeType end_time_type = 14;