google-ads-googleads 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/Rakefile +3 -3
- data/lib/google/ads/google_ads/factories/v1/enums.rb +1130 -1130
- data/lib/google/ads/google_ads/factories/v1/operations.rb +1057 -1057
- data/lib/google/ads/google_ads/factories/v1/resources.rb +2420 -2420
- data/lib/google/ads/google_ads/factories/v1/services.rb +298 -298
- data/lib/google/ads/google_ads/factories/v2/enums.rb +1221 -1197
- data/lib/google/ads/google_ads/factories/v2/operations.rb +1080 -1080
- data/lib/google/ads/google_ads/factories/v2/resources.rb +2497 -2458
- data/lib/google/ads/google_ads/factories/v2/services.rb +329 -309
- data/lib/google/ads/google_ads/google_ads_client.rb +1 -0
- data/lib/google/ads/google_ads/v2/common/extensions_pb.rb +5 -0
- data/lib/google/ads/google_ads/v2/common/segments_pb.rb +2 -0
- data/lib/google/ads/google_ads/v2/enums/extension_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v2/enums/hotel_price_bucket_pb.rb +21 -0
- data/lib/google/ads/google_ads/v2/enums/invoice_type_pb.rb +21 -0
- data/lib/google/ads/google_ads/v2/errors/errors_pb.rb +2 -0
- data/lib/google/ads/google_ads/v2/errors/invoice_error_pb.rb +21 -0
- data/lib/google/ads/google_ads/v2/resources/ad_pb.rb +1 -0
- data/lib/google/ads/google_ads/v2/resources/campaign_pb.rb +13 -13
- data/lib/google/ads/google_ads/v2/resources/extension_feed_item_pb.rb +2 -0
- data/lib/google/ads/google_ads/v2/resources/invoice_pb.rb +47 -0
- data/lib/google/ads/google_ads/v2/resources/recommendation_pb.rb +21 -21
- data/lib/google/ads/google_ads/v2/services/invoice_service_client.rb +233 -0
- data/lib/google/ads/google_ads/v2/services/invoice_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v2/services/invoice_service_pb.rb +25 -0
- data/lib/google/ads/google_ads/v2/services/invoice_service_services_pb.rb +42 -0
- data/lib/google/ads/google_ads/v2/services/merchant_center_link_service_client.rb +1 -1
- data/lib/google/ads/google_ads/v2/services/merchant_center_link_service_services_pb.rb +1 -1
- data/lib/google/ads/google_ads/v2/services/reach_plan_service_client.rb +1 -1
- data/lib/google/ads/google_ads/v2/services/reach_plan_service_services_pb.rb +1 -1
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +10 -2
@@ -116,6 +116,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
116
116
|
repeated :url_custom_parameters, :message, 7, "google.ads.googleads.v2.common.CustomParameter"
|
117
117
|
optional :final_url_suffix, :message, 8, "google.protobuf.StringValue"
|
118
118
|
end
|
119
|
+
add_message "google.ads.googleads.v2.common.HotelCalloutFeedItem" do
|
120
|
+
optional :text, :message, 1, "google.protobuf.StringValue"
|
121
|
+
optional :language_code, :message, 2, "google.protobuf.StringValue"
|
122
|
+
end
|
119
123
|
end
|
120
124
|
|
121
125
|
module Google::Ads::GoogleAds::V2::Common
|
@@ -130,4 +134,5 @@ module Google::Ads::GoogleAds::V2::Common
|
|
130
134
|
PromotionFeedItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.common.PromotionFeedItem").msgclass
|
131
135
|
StructuredSnippetFeedItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.common.StructuredSnippetFeedItem").msgclass
|
132
136
|
SitelinkFeedItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.common.SitelinkFeedItem").msgclass
|
137
|
+
HotelCalloutFeedItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.common.HotelCalloutFeedItem").msgclass
|
133
138
|
end
|
@@ -14,6 +14,7 @@ require 'google/ads/google_ads/v2/enums/day_of_week_pb'
|
|
14
14
|
require 'google/ads/google_ads/v2/enums/device_pb'
|
15
15
|
require 'google/ads/google_ads/v2/enums/external_conversion_source_pb'
|
16
16
|
require 'google/ads/google_ads/v2/enums/hotel_date_selection_type_pb'
|
17
|
+
require 'google/ads/google_ads/v2/enums/hotel_price_bucket_pb'
|
17
18
|
require 'google/ads/google_ads/v2/enums/hotel_rate_type_pb'
|
18
19
|
require 'google/ads/google_ads/v2/enums/month_of_year_pb'
|
19
20
|
require 'google/ads/google_ads/v2/enums/placeholder_type_pb'
|
@@ -63,6 +64,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
63
64
|
optional :hotel_length_of_stay, :message, 14, "google.protobuf.Int32Value"
|
64
65
|
optional :hotel_rate_rule_id, :message, 73, "google.protobuf.StringValue"
|
65
66
|
optional :hotel_rate_type, :enum, 74, "google.ads.googleads.v2.enums.HotelRateTypeEnum.HotelRateType"
|
67
|
+
optional :hotel_price_bucket, :enum, 78, "google.ads.googleads.v2.enums.HotelPriceBucketEnum.HotelPriceBucket"
|
66
68
|
optional :hotel_state, :message, 15, "google.protobuf.StringValue"
|
67
69
|
optional :hour, :message, 16, "google.protobuf.Int32Value"
|
68
70
|
optional :interaction_on_this_extension, :message, 49, "google.protobuf.BoolValue"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v2/enums/hotel_price_bucket.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "google.ads.googleads.v2.enums.HotelPriceBucketEnum" do
|
9
|
+
end
|
10
|
+
add_enum "google.ads.googleads.v2.enums.HotelPriceBucketEnum.HotelPriceBucket" do
|
11
|
+
value :UNSPECIFIED, 0
|
12
|
+
value :UNKNOWN, 1
|
13
|
+
value :LOWEST_TIED, 3
|
14
|
+
value :NOT_LOWEST, 4
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Google::Ads::GoogleAds::V2::Enums
|
19
|
+
HotelPriceBucketEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.enums.HotelPriceBucketEnum").msgclass
|
20
|
+
HotelPriceBucketEnum::HotelPriceBucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.enums.HotelPriceBucketEnum.HotelPriceBucket").enummodule
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v2/enums/invoice_type.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "google.ads.googleads.v2.enums.InvoiceTypeEnum" do
|
9
|
+
end
|
10
|
+
add_enum "google.ads.googleads.v2.enums.InvoiceTypeEnum.InvoiceType" do
|
11
|
+
value :UNSPECIFIED, 0
|
12
|
+
value :UNKNOWN, 1
|
13
|
+
value :CREDIT_MEMO, 2
|
14
|
+
value :INVOICE, 3
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Google::Ads::GoogleAds::V2::Enums
|
19
|
+
InvoiceTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.enums.InvoiceTypeEnum").msgclass
|
20
|
+
InvoiceTypeEnum::InvoiceType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.enums.InvoiceTypeEnum.InvoiceType").enummodule
|
21
|
+
end
|
@@ -66,6 +66,7 @@ require 'google/ads/google_ads/v2/errors/header_error_pb'
|
|
66
66
|
require 'google/ads/google_ads/v2/errors/id_error_pb'
|
67
67
|
require 'google/ads/google_ads/v2/errors/image_error_pb'
|
68
68
|
require 'google/ads/google_ads/v2/errors/internal_error_pb'
|
69
|
+
require 'google/ads/google_ads/v2/errors/invoice_error_pb'
|
69
70
|
require 'google/ads/google_ads/v2/errors/keyword_plan_ad_group_error_pb'
|
70
71
|
require 'google/ads/google_ads/v2/errors/keyword_plan_campaign_error_pb'
|
71
72
|
require 'google/ads/google_ads/v2/errors/keyword_plan_error_pb'
|
@@ -230,6 +231,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
230
231
|
optional :currency_code_error, :enum, 122, "google.ads.googleads.v2.errors.CurrencyCodeErrorEnum.CurrencyCodeError"
|
231
232
|
optional :access_invitation_error, :enum, 124, "google.ads.googleads.v2.errors.AccessInvitationErrorEnum.AccessInvitationError"
|
232
233
|
optional :reach_plan_error, :enum, 125, "google.ads.googleads.v2.errors.ReachPlanErrorEnum.ReachPlanError"
|
234
|
+
optional :invoice_error, :enum, 126, "google.ads.googleads.v2.errors.InvoiceErrorEnum.InvoiceError"
|
233
235
|
end
|
234
236
|
end
|
235
237
|
add_message "google.ads.googleads.v2.errors.ErrorLocation" do
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v2/errors/invoice_error.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "google.ads.googleads.v2.errors.InvoiceErrorEnum" do
|
9
|
+
end
|
10
|
+
add_enum "google.ads.googleads.v2.errors.InvoiceErrorEnum.InvoiceError" do
|
11
|
+
value :UNSPECIFIED, 0
|
12
|
+
value :UNKNOWN, 1
|
13
|
+
value :YEAR_MONTH_TOO_OLD, 2
|
14
|
+
value :NOT_INVOICED_CUSTOMER, 3
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Google::Ads::GoogleAds::V2::Errors
|
19
|
+
InvoiceErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.errors.InvoiceErrorEnum").msgclass
|
20
|
+
InvoiceErrorEnum::InvoiceError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.errors.InvoiceErrorEnum.InvoiceError").enummodule
|
21
|
+
end
|
@@ -20,6 +20,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
20
|
repeated :final_app_urls, :message, 35, "google.ads.googleads.v2.common.FinalAppUrl"
|
21
21
|
repeated :final_mobile_urls, :message, 16, "google.protobuf.StringValue"
|
22
22
|
optional :tracking_url_template, :message, 12, "google.protobuf.StringValue"
|
23
|
+
optional :final_url_suffix, :message, 38, "google.protobuf.StringValue"
|
23
24
|
repeated :url_custom_parameters, :message, 10, "google.ads.googleads.v2.common.CustomParameter"
|
24
25
|
optional :display_url, :message, 4, "google.protobuf.StringValue"
|
25
26
|
optional :type, :enum, 5, "google.ads.googleads.v2.enums.AdTypeEnum.AdType"
|
@@ -84,6 +84,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
84
84
|
add_message "google.ads.googleads.v2.resources.Campaign.HotelSettingInfo" do
|
85
85
|
optional :hotel_center_id, :message, 1, "google.protobuf.Int64Value"
|
86
86
|
end
|
87
|
+
add_message "google.ads.googleads.v2.resources.Campaign.AppCampaignSetting" do
|
88
|
+
optional :bidding_strategy_goal_type, :enum, 1, "google.ads.googleads.v2.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType"
|
89
|
+
optional :app_id, :message, 2, "google.protobuf.StringValue"
|
90
|
+
optional :app_store, :enum, 3, "google.ads.googleads.v2.enums.AppCampaignAppStoreEnum.AppCampaignAppStore"
|
91
|
+
end
|
87
92
|
add_message "google.ads.googleads.v2.resources.Campaign.DynamicSearchAdsSetting" do
|
88
93
|
optional :domain_name, :message, 1, "google.protobuf.StringValue"
|
89
94
|
optional :language_code, :message, 2, "google.protobuf.StringValue"
|
@@ -93,9 +98,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
93
98
|
add_message "google.ads.googleads.v2.resources.Campaign.TrackingSetting" do
|
94
99
|
optional :tracking_url, :message, 1, "google.protobuf.StringValue"
|
95
100
|
end
|
96
|
-
add_message "google.ads.googleads.v2.resources.Campaign.
|
97
|
-
|
98
|
-
optional :vanity_pharma_text, :enum, 2, "google.ads.googleads.v2.enums.VanityPharmaTextEnum.VanityPharmaText"
|
101
|
+
add_message "google.ads.googleads.v2.resources.Campaign.SelectiveOptimization" do
|
102
|
+
repeated :conversion_actions, :message, 1, "google.protobuf.StringValue"
|
99
103
|
end
|
100
104
|
add_message "google.ads.googleads.v2.resources.Campaign.ShoppingSetting" do
|
101
105
|
optional :merchant_id, :message, 1, "google.protobuf.Int64Value"
|
@@ -103,17 +107,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
103
107
|
optional :campaign_priority, :message, 3, "google.protobuf.Int32Value"
|
104
108
|
optional :enable_local, :message, 4, "google.protobuf.BoolValue"
|
105
109
|
end
|
106
|
-
add_message "google.ads.googleads.v2.resources.Campaign.AppCampaignSetting" do
|
107
|
-
optional :bidding_strategy_goal_type, :enum, 1, "google.ads.googleads.v2.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType"
|
108
|
-
optional :app_id, :message, 2, "google.protobuf.StringValue"
|
109
|
-
optional :app_store, :enum, 3, "google.ads.googleads.v2.enums.AppCampaignAppStoreEnum.AppCampaignAppStore"
|
110
|
-
end
|
111
110
|
add_message "google.ads.googleads.v2.resources.Campaign.GeoTargetTypeSetting" do
|
112
111
|
optional :positive_geo_target_type, :enum, 1, "google.ads.googleads.v2.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType"
|
113
112
|
optional :negative_geo_target_type, :enum, 2, "google.ads.googleads.v2.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType"
|
114
113
|
end
|
115
|
-
add_message "google.ads.googleads.v2.resources.Campaign.
|
116
|
-
|
114
|
+
add_message "google.ads.googleads.v2.resources.Campaign.VanityPharma" do
|
115
|
+
optional :vanity_pharma_display_url_mode, :enum, 1, "google.ads.googleads.v2.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode"
|
116
|
+
optional :vanity_pharma_text, :enum, 2, "google.ads.googleads.v2.enums.VanityPharmaTextEnum.VanityPharmaText"
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -121,11 +121,11 @@ module Google::Ads::GoogleAds::V2::Resources
|
|
121
121
|
Campaign = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign").msgclass
|
122
122
|
Campaign::NetworkSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.NetworkSettings").msgclass
|
123
123
|
Campaign::HotelSettingInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.HotelSettingInfo").msgclass
|
124
|
+
Campaign::AppCampaignSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.AppCampaignSetting").msgclass
|
124
125
|
Campaign::DynamicSearchAdsSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.DynamicSearchAdsSetting").msgclass
|
125
126
|
Campaign::TrackingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.TrackingSetting").msgclass
|
126
|
-
Campaign::
|
127
|
+
Campaign::SelectiveOptimization = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.SelectiveOptimization").msgclass
|
127
128
|
Campaign::ShoppingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.ShoppingSetting").msgclass
|
128
|
-
Campaign::AppCampaignSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.AppCampaignSetting").msgclass
|
129
129
|
Campaign::GeoTargetTypeSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.GeoTargetTypeSetting").msgclass
|
130
|
-
Campaign::
|
130
|
+
Campaign::VanityPharma = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Campaign.VanityPharma").msgclass
|
131
131
|
end
|
@@ -13,6 +13,7 @@ require 'google/api/annotations_pb'
|
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_message "google.ads.googleads.v2.resources.ExtensionFeedItem" do
|
15
15
|
optional :resource_name, :string, 1
|
16
|
+
optional :id, :message, 24, "google.protobuf.Int64Value"
|
16
17
|
optional :extension_type, :enum, 13, "google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType"
|
17
18
|
optional :start_date_time, :message, 5, "google.protobuf.StringValue"
|
18
19
|
optional :end_date_time, :message, 6, "google.protobuf.StringValue"
|
@@ -32,6 +33,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
33
|
optional :promotion_feed_item, :message, 12, "google.ads.googleads.v2.common.PromotionFeedItem"
|
33
34
|
optional :location_feed_item, :message, 14, "google.ads.googleads.v2.common.LocationFeedItem"
|
34
35
|
optional :affiliate_location_feed_item, :message, 15, "google.ads.googleads.v2.common.AffiliateLocationFeedItem"
|
36
|
+
optional :hotel_callout_feed_item, :message, 23, "google.ads.googleads.v2.common.HotelCalloutFeedItem"
|
35
37
|
end
|
36
38
|
oneof :serving_resource_targeting do
|
37
39
|
optional :targeted_campaign, :message, 18, "google.protobuf.StringValue"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v2/resources/invoice.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/ads/google_ads/v2/common/dates_pb'
|
7
|
+
require 'google/ads/google_ads/v2/enums/invoice_type_pb'
|
8
|
+
require 'google/protobuf/wrappers_pb'
|
9
|
+
require 'google/api/annotations_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_message "google.ads.googleads.v2.resources.Invoice" do
|
12
|
+
optional :resource_name, :string, 1
|
13
|
+
optional :id, :message, 2, "google.protobuf.StringValue"
|
14
|
+
optional :type, :enum, 3, "google.ads.googleads.v2.enums.InvoiceTypeEnum.InvoiceType"
|
15
|
+
optional :billing_setup, :message, 4, "google.protobuf.StringValue"
|
16
|
+
optional :payments_account_id, :message, 5, "google.protobuf.StringValue"
|
17
|
+
optional :payments_profile_id, :message, 6, "google.protobuf.StringValue"
|
18
|
+
optional :issue_date, :message, 7, "google.protobuf.StringValue"
|
19
|
+
optional :due_date, :message, 8, "google.protobuf.StringValue"
|
20
|
+
optional :service_date_range, :message, 9, "google.ads.googleads.v2.common.DateRange"
|
21
|
+
optional :currency_code, :message, 10, "google.protobuf.StringValue"
|
22
|
+
optional :invoice_level_adjustments_micros, :message, 11, "google.protobuf.Int64Value"
|
23
|
+
optional :subtotal_amount_micros, :message, 12, "google.protobuf.Int64Value"
|
24
|
+
optional :tax_amount_micros, :message, 13, "google.protobuf.Int64Value"
|
25
|
+
optional :total_amount_micros, :message, 14, "google.protobuf.Int64Value"
|
26
|
+
optional :corrected_invoice, :message, 15, "google.protobuf.StringValue"
|
27
|
+
repeated :replaced_invoices, :message, 16, "google.protobuf.StringValue"
|
28
|
+
optional :pdf_url, :message, 17, "google.protobuf.StringValue"
|
29
|
+
repeated :account_budget_summaries, :message, 18, "google.ads.googleads.v2.resources.Invoice.AccountBudgetSummary"
|
30
|
+
end
|
31
|
+
add_message "google.ads.googleads.v2.resources.Invoice.AccountBudgetSummary" do
|
32
|
+
optional :customer, :message, 1, "google.protobuf.StringValue"
|
33
|
+
optional :customer_descriptive_name, :message, 2, "google.protobuf.StringValue"
|
34
|
+
optional :account_budget, :message, 3, "google.protobuf.StringValue"
|
35
|
+
optional :account_budget_name, :message, 4, "google.protobuf.StringValue"
|
36
|
+
optional :purchase_order_number, :message, 5, "google.protobuf.StringValue"
|
37
|
+
optional :subtotal_amount_micros, :message, 6, "google.protobuf.Int64Value"
|
38
|
+
optional :tax_amount_micros, :message, 7, "google.protobuf.Int64Value"
|
39
|
+
optional :total_amount_micros, :message, 8, "google.protobuf.Int64Value"
|
40
|
+
optional :billable_activity_date_range, :message, 9, "google.ads.googleads.v2.common.DateRange"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
module Google::Ads::GoogleAds::V2::Resources
|
45
|
+
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Invoice").msgclass
|
46
|
+
Invoice::AccountBudgetSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Invoice.AccountBudgetSummary").msgclass
|
47
|
+
end
|
@@ -61,8 +61,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
61
61
|
optional :keyword, :message, 1, "google.ads.googleads.v2.common.KeywordInfo"
|
62
62
|
optional :recommended_cpc_bid_micros, :message, 2, "google.protobuf.Int64Value"
|
63
63
|
end
|
64
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.
|
65
|
-
|
64
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.OptimizeAdRotationRecommendation" do
|
65
|
+
end
|
66
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.CallExtensionRecommendation" do
|
67
|
+
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v2.common.CallFeedItem"
|
66
68
|
end
|
67
69
|
add_message "google.ads.googleads.v2.resources.Recommendation.TextAdRecommendation" do
|
68
70
|
optional :ad, :message, 1, "google.ads.googleads.v2.resources.Ad"
|
@@ -82,28 +84,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
82
84
|
add_message "google.ads.googleads.v2.resources.Recommendation.MaximizeConversionsOptInRecommendation" do
|
83
85
|
optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
84
86
|
end
|
85
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.SitelinkExtensionRecommendation" do
|
86
|
-
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v2.common.SitelinkFeedItem"
|
87
|
-
end
|
88
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.EnhancedCpcOptInRecommendation" do
|
89
|
-
end
|
90
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.KeywordMatchTypeRecommendation" do
|
91
|
-
optional :keyword, :message, 1, "google.ads.googleads.v2.common.KeywordInfo"
|
92
|
-
optional :recommended_match_type, :enum, 2, "google.ads.googleads.v2.enums.KeywordMatchTypeEnum.KeywordMatchType"
|
93
|
-
end
|
94
87
|
add_message "google.ads.googleads.v2.resources.Recommendation.SearchPartnersOptInRecommendation" do
|
95
88
|
end
|
96
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.OptimizeAdRotationRecommendation" do
|
97
|
-
end
|
98
89
|
add_message "google.ads.googleads.v2.resources.Recommendation.MoveUnusedBudgetRecommendation" do
|
99
90
|
optional :excess_campaign_budget, :message, 1, "google.protobuf.StringValue"
|
100
91
|
optional :budget_recommendation, :message, 2, "google.ads.googleads.v2.resources.Recommendation.CampaignBudgetRecommendation"
|
101
92
|
end
|
93
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.EnhancedCpcOptInRecommendation" do
|
94
|
+
end
|
95
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.MaximizeClicksOptInRecommendation" do
|
96
|
+
optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
97
|
+
end
|
102
98
|
add_message "google.ads.googleads.v2.resources.Recommendation.CalloutExtensionRecommendation" do
|
103
99
|
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v2.common.CalloutFeedItem"
|
104
100
|
end
|
105
|
-
add_message "google.ads.googleads.v2.resources.Recommendation.
|
106
|
-
|
101
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.KeywordMatchTypeRecommendation" do
|
102
|
+
optional :keyword, :message, 1, "google.ads.googleads.v2.common.KeywordInfo"
|
103
|
+
optional :recommended_match_type, :enum, 2, "google.ads.googleads.v2.enums.KeywordMatchTypeEnum.KeywordMatchType"
|
104
|
+
end
|
105
|
+
add_message "google.ads.googleads.v2.resources.Recommendation.SitelinkExtensionRecommendation" do
|
106
|
+
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v2.common.SitelinkFeedItem"
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
@@ -114,17 +114,17 @@ module Google::Ads::GoogleAds::V2::Resources
|
|
114
114
|
Recommendation::CampaignBudgetRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.CampaignBudgetRecommendation").msgclass
|
115
115
|
Recommendation::CampaignBudgetRecommendation::CampaignBudgetRecommendationOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption").msgclass
|
116
116
|
Recommendation::KeywordRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.KeywordRecommendation").msgclass
|
117
|
-
Recommendation::
|
117
|
+
Recommendation::OptimizeAdRotationRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.OptimizeAdRotationRecommendation").msgclass
|
118
|
+
Recommendation::CallExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.CallExtensionRecommendation").msgclass
|
118
119
|
Recommendation::TextAdRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.TextAdRecommendation").msgclass
|
119
120
|
Recommendation::TargetCpaOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.TargetCpaOptInRecommendation").msgclass
|
120
121
|
Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption").msgclass
|
121
122
|
Recommendation::MaximizeConversionsOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.MaximizeConversionsOptInRecommendation").msgclass
|
122
|
-
Recommendation::SitelinkExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.SitelinkExtensionRecommendation").msgclass
|
123
|
-
Recommendation::EnhancedCpcOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.EnhancedCpcOptInRecommendation").msgclass
|
124
|
-
Recommendation::KeywordMatchTypeRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.KeywordMatchTypeRecommendation").msgclass
|
125
123
|
Recommendation::SearchPartnersOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.SearchPartnersOptInRecommendation").msgclass
|
126
|
-
Recommendation::OptimizeAdRotationRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.OptimizeAdRotationRecommendation").msgclass
|
127
124
|
Recommendation::MoveUnusedBudgetRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.MoveUnusedBudgetRecommendation").msgclass
|
125
|
+
Recommendation::EnhancedCpcOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.EnhancedCpcOptInRecommendation").msgclass
|
126
|
+
Recommendation::MaximizeClicksOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.MaximizeClicksOptInRecommendation").msgclass
|
128
127
|
Recommendation::CalloutExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.CalloutExtensionRecommendation").msgclass
|
129
|
-
Recommendation::
|
128
|
+
Recommendation::KeywordMatchTypeRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.KeywordMatchTypeRecommendation").msgclass
|
129
|
+
Recommendation::SitelinkExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v2.resources.Recommendation.SitelinkExtensionRecommendation").msgclass
|
130
130
|
end
|
@@ -0,0 +1,233 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
#
|
15
|
+
# EDITING INSTRUCTIONS
|
16
|
+
# This file was generated from the file
|
17
|
+
# https://github.com/googleapis/googleapis/blob/master/google/ads/google_ads/v2/services/invoice_service.proto,
|
18
|
+
# and updates to that file get reflected here through a refresh process.
|
19
|
+
# For the short term, the refresh process will only be runnable by Google
|
20
|
+
# engineers.
|
21
|
+
|
22
|
+
require "json"
|
23
|
+
require "pathname"
|
24
|
+
|
25
|
+
require "google/gax"
|
26
|
+
|
27
|
+
require "google/ads/google_ads/v2/services/invoice_service_pb"
|
28
|
+
require "google/ads/google_ads/v2/services/credentials"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Ads
|
32
|
+
module GoogleAds
|
33
|
+
module V2
|
34
|
+
module Services
|
35
|
+
# A service to fetch invoices issued for a billing setup during a given month.
|
36
|
+
#
|
37
|
+
# @!attribute [r] invoice_service_stub
|
38
|
+
# @return [Google::Ads::GoogleAds::V2::Services::InvoiceService::Stub]
|
39
|
+
class InvoiceServiceClient
|
40
|
+
attr_reader :invoice_service_stub
|
41
|
+
|
42
|
+
# The default address of the service.
|
43
|
+
SERVICE_ADDRESS = "googleads.googleapis.com".freeze
|
44
|
+
|
45
|
+
# The default port of the service.
|
46
|
+
DEFAULT_SERVICE_PORT = 443
|
47
|
+
|
48
|
+
# The default set of gRPC interceptors.
|
49
|
+
GRPC_INTERCEPTORS = []
|
50
|
+
|
51
|
+
DEFAULT_TIMEOUT = 30
|
52
|
+
|
53
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
54
|
+
# this service.
|
55
|
+
ALL_SCOPES = [
|
56
|
+
].freeze
|
57
|
+
|
58
|
+
|
59
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
60
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
61
|
+
# be many types.
|
62
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
63
|
+
# authenticating requests made by this client.
|
64
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
65
|
+
# credentials for this client.
|
66
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
67
|
+
# credentials for this client.
|
68
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
69
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
70
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
71
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
72
|
+
# metadata for requests, generally, to give OAuth credentials.
|
73
|
+
# @param scopes [Array<String>]
|
74
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
75
|
+
# an updater_proc is supplied.
|
76
|
+
# @param client_config [Hash]
|
77
|
+
# A Hash for call options for each method. See
|
78
|
+
# Google::Gax#construct_settings for the structure of
|
79
|
+
# this data. Falls back to the default config if not specified
|
80
|
+
# or the specified config is missing data points.
|
81
|
+
# @param timeout [Numeric]
|
82
|
+
# The default timeout, in seconds, for calls made through this client.
|
83
|
+
# @param metadata [Hash]
|
84
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
85
|
+
# @param exception_transformer [Proc]
|
86
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
87
|
+
# custom error handling.
|
88
|
+
def initialize \
|
89
|
+
credentials: nil,
|
90
|
+
scopes: ALL_SCOPES,
|
91
|
+
client_config: {},
|
92
|
+
timeout: DEFAULT_TIMEOUT,
|
93
|
+
metadata: nil,
|
94
|
+
exception_transformer: nil,
|
95
|
+
lib_name: nil,
|
96
|
+
lib_version: ""
|
97
|
+
# These require statements are intentionally placed here to initialize
|
98
|
+
# the gRPC module only when it's required.
|
99
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
100
|
+
require "google/gax/grpc"
|
101
|
+
require "google/ads/google_ads/v2/services/invoice_service_services_pb"
|
102
|
+
|
103
|
+
credentials ||= Google::Ads::GoogleAds::V2::Services::Credentials.default
|
104
|
+
|
105
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
106
|
+
updater_proc = Google::Ads::GoogleAds::V2::Services::Credentials.new(credentials).updater_proc
|
107
|
+
end
|
108
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
109
|
+
channel = credentials
|
110
|
+
end
|
111
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
112
|
+
chan_creds = credentials
|
113
|
+
end
|
114
|
+
if credentials.is_a?(Proc)
|
115
|
+
updater_proc = credentials
|
116
|
+
end
|
117
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
118
|
+
updater_proc = credentials.updater_proc
|
119
|
+
end
|
120
|
+
|
121
|
+
package_version = Gem.loaded_specs['google-ads-googleads'].version.version
|
122
|
+
|
123
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
124
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
125
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
126
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
127
|
+
google_api_client.freeze
|
128
|
+
|
129
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
130
|
+
headers.merge!(metadata) unless metadata.nil?
|
131
|
+
client_config_file = Pathname.new(__dir__).join(
|
132
|
+
"invoice_service_client_config.json"
|
133
|
+
)
|
134
|
+
defaults = client_config_file.open do |f|
|
135
|
+
Google::Gax.construct_settings(
|
136
|
+
"google.ads.googleads.v2.services.InvoiceService",
|
137
|
+
JSON.parse(f.read),
|
138
|
+
client_config,
|
139
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
140
|
+
timeout,
|
141
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
142
|
+
metadata: headers
|
143
|
+
)
|
144
|
+
end
|
145
|
+
|
146
|
+
# Allow overriding the service path/port in subclasses.
|
147
|
+
service_path = self.class::SERVICE_ADDRESS
|
148
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
149
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
150
|
+
@invoice_service_stub = Google::Gax::Grpc.create_stub(
|
151
|
+
service_path,
|
152
|
+
port,
|
153
|
+
chan_creds: chan_creds,
|
154
|
+
channel: channel,
|
155
|
+
updater_proc: updater_proc,
|
156
|
+
scopes: scopes,
|
157
|
+
interceptors: interceptors,
|
158
|
+
&Google::Ads::GoogleAds::V2::Services::InvoiceService::Stub.method(:new)
|
159
|
+
)
|
160
|
+
|
161
|
+
@list_invoices = Google::Gax.create_api_call(
|
162
|
+
@invoice_service_stub.method(:list_invoices),
|
163
|
+
defaults["list_invoices"],
|
164
|
+
exception_transformer: exception_transformer,
|
165
|
+
params_extractor: proc do |request|
|
166
|
+
{'customer_id' => request.customer_id}
|
167
|
+
end
|
168
|
+
)
|
169
|
+
end
|
170
|
+
|
171
|
+
# Service calls
|
172
|
+
|
173
|
+
# Returns all invoices associated with a billing setup, for a given month.
|
174
|
+
#
|
175
|
+
# @param customer_id [String]
|
176
|
+
# The ID of the customer to fetch invoices for.
|
177
|
+
# @param billing_setup [String]
|
178
|
+
# Required. The billing setup resource name of the requested invoices.
|
179
|
+
#
|
180
|
+
# `customers/{customer_id}/billingSetups/{billing_setup_id}`
|
181
|
+
# @param issue_year [String]
|
182
|
+
# Required. The issue year to retrieve invoices, in yyyy format. Only
|
183
|
+
# invoices issued in 2019 or later can be retrieved.
|
184
|
+
# @param issue_month [Google::Ads::GoogleAds::V2::Enums::MonthOfYearEnum::MonthOfYear]
|
185
|
+
# Required. The issue month to retrieve invoices.
|
186
|
+
# @param options [Google::Gax::CallOptions]
|
187
|
+
# Overrides the default settings for this call, e.g, timeout,
|
188
|
+
# retries, etc.
|
189
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
190
|
+
# @yieldparam result [Google::Ads::GoogleAds::V2::Services::ListInvoicesResponse]
|
191
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
192
|
+
# @return [Google::Ads::GoogleAds::V2::Services::ListInvoicesResponse]
|
193
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
194
|
+
# @example
|
195
|
+
# require "google/ads/google_ads"
|
196
|
+
#
|
197
|
+
# invoice_client = Google::Ads::GoogleAds::Invoice.new(version: :v2)
|
198
|
+
#
|
199
|
+
# # TODO: Initialize `customer_id`:
|
200
|
+
# customer_id = ''
|
201
|
+
#
|
202
|
+
# # TODO: Initialize `billing_setup`:
|
203
|
+
# billing_setup = ''
|
204
|
+
#
|
205
|
+
# # TODO: Initialize `issue_year`:
|
206
|
+
# issue_year = ''
|
207
|
+
#
|
208
|
+
# # TODO: Initialize `issue_month`:
|
209
|
+
# issue_month = :UNSPECIFIED
|
210
|
+
# response = invoice_client.list_invoices(customer_id, billing_setup, issue_year, issue_month)
|
211
|
+
|
212
|
+
def list_invoices \
|
213
|
+
customer_id,
|
214
|
+
billing_setup,
|
215
|
+
issue_year,
|
216
|
+
issue_month,
|
217
|
+
options: nil,
|
218
|
+
&block
|
219
|
+
req = {
|
220
|
+
customer_id: customer_id,
|
221
|
+
billing_setup: billing_setup,
|
222
|
+
issue_year: issue_year,
|
223
|
+
issue_month: issue_month
|
224
|
+
}.delete_if { |_, v| v.nil? }
|
225
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V2::Services::ListInvoicesRequest)
|
226
|
+
@list_invoices.call(req, options, &block)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|