Class: Google::Apis::MybusinessbusinesscallsV1::MyBusinessBusinessCallsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MybusinessbusinesscallsV1::MyBusinessBusinessCallsService
- Defined in:
- lib/google/apis/mybusinessbusinesscalls_v1/service.rb
Overview
My Business Business Calls API
The My Business Business Calls API manages business calls information of a
location on Google and collect insights like the number of missed calls to
their location. Additional information about Business calls can be found at
https://support.google.com/business/answer/9688285?p=call_history. If the
Google Business Profile links to a Google Ads account and call history is
turned on, calls that last longer than a specific time, and that can be
attributed to an ad interaction, will show in the linked Google Ads account
under the "Calls from Ads" conversion. If smart bidding and call conversions
are used in the optimization strategy, there could be a change in ad spend.
Learn more about smart bidding. To view and perform actions on a location's
calls, you need to be a OWNER
, CO_OWNER
or MANAGER
of the location. Note
- If you have a quota of 0 after enabling the API, please request for GBP API access.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#get_location_businesscallssettings(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings
Returns the Business calls settings resource for the given location.
-
#initialize ⇒ MyBusinessBusinessCallsService
constructor
A new instance of MyBusinessBusinessCallsService.
-
#list_location_businesscallsinsights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::ListBusinessCallsInsightsResponse
Returns insights for Business calls for a location.
-
#update_location_businesscallssettings(name, business_calls_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings
Updates the Business call settings for the specified location.
Constructor Details
#initialize ⇒ MyBusinessBusinessCallsService
Returns a new instance of MyBusinessBusinessCallsService.
57 58 59 60 61 62 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 57 def initialize super('https://mybusinessbusinesscalls.googleapis.com/', '', client_name: 'google-apis-mybusinessbusinesscalls_v1', client_version: Google::Apis::MybusinessbusinesscallsV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
50 51 52 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 50 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
55 56 57 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 55 def quota_user @quota_user end |
Instance Method Details
#get_location_businesscallssettings(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings
Returns the Business calls settings resource for the given location.
86 87 88 89 90 91 92 93 94 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 86 def get_location_businesscallssettings(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings::Representation command.response_class = Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_location_businesscallsinsights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::ListBusinessCallsInsightsResponse
Returns insights for Business calls for a location.
178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 178 def list_location_businesscallsinsights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/businesscallsinsights', ) command.response_representation = Google::Apis::MybusinessbusinesscallsV1::ListBusinessCallsInsightsResponse::Representation command.response_class = Google::Apis::MybusinessbusinesscallsV1::ListBusinessCallsInsightsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_location_businesscallssettings(name, business_calls_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings
Updates the Business call settings for the specified location.
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/google/apis/mybusinessbusinesscalls_v1/service.rb', line 120 def update_location_businesscallssettings(name, business_calls_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings::Representation command.request_object = business_calls_settings_object command.response_representation = Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings::Representation command.response_class = Google::Apis::MybusinessbusinesscallsV1::BusinessCallsSettings command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |