2015-12-03 01:10:07 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
require 'google/apis/core/base_service'
|
|
|
|
require 'google/apis/core/json_representation'
|
|
|
|
require 'google/apis/core/hashable'
|
|
|
|
require 'google/apis/errors'
|
|
|
|
|
|
|
|
module Google
|
|
|
|
module Apis
|
|
|
|
module PartnersV2
|
|
|
|
# Google Partners API
|
|
|
|
#
|
2017-03-10 21:11:09 +00:00
|
|
|
# Searches certified companies and creates contact leads with them, and also
|
|
|
|
# audits the usage of clients.
|
2015-12-03 01:10:07 +00:00
|
|
|
#
|
|
|
|
# @example
|
|
|
|
# require 'google/apis/partners_v2'
|
|
|
|
#
|
|
|
|
# Partners = Google::Apis::PartnersV2 # Alias the module
|
|
|
|
# service = Partners::PartnersService.new
|
|
|
|
#
|
|
|
|
# @see https://developers.google.com/partners/
|
|
|
|
class PartnersService < Google::Apis::Core::BaseService
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [String]
|
|
|
|
# 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.
|
|
|
|
attr_accessor :key
|
|
|
|
|
2017-06-02 06:11:31 +00:00
|
|
|
# @return [String]
|
|
|
|
# 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.
|
|
|
|
attr_accessor :quota_user
|
|
|
|
|
2015-12-03 01:10:07 +00:00
|
|
|
def initialize
|
|
|
|
super('https://partners.googleapis.com/', '')
|
2017-04-03 20:18:48 +00:00
|
|
|
@batch_path = 'batch'
|
2015-12-03 01:10:07 +00:00
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Logs a generic message from the client, such as
|
|
|
|
# `Failed to render component`, `Profile page is running slow`,
|
|
|
|
# `More than 500 users have accessed this result.`, etc.
|
|
|
|
# @param [Google::Apis::PartnersV2::LogMessageRequest] log_message_request_object
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::LogMessageResponse] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::PartnersV2::LogMessageResponse]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def log_client_message_message(log_message_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:post, 'v2/clientMessages:log', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::LogMessageRequest::Representation
|
|
|
|
command.request_object = log_message_request_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::LogMessageResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::LogMessageResponse
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Gets an Exam Token for a Partner's user to take an exam in the Exams System
|
|
|
|
# @param [String] exam_type
|
|
|
|
# The exam type we are requesting a token for.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-03-31 19:53:27 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ExamToken] parsed result object
|
2017-03-10 21:11:09 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ExamToken]
|
2017-03-10 21:11:09 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def get_exam_token(exam_type, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/exams/{examType}/token', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ExamToken::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ExamToken
|
|
|
|
command.params['examType'] = exam_type unless exam_type.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists advertiser leads for a user's associated company.
|
|
|
|
# Should only be called within the context of an authorized logged in user.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] order_by
|
|
|
|
# How to order Leads. Currently, only `create_time`
|
|
|
|
# and `create_time desc` are supported
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] page_token
|
|
|
|
# A token identifying a page of results that the server returns.
|
|
|
|
# Typically, this is the value of `ListLeadsResponse.next_page_token`
|
|
|
|
# returned from the previous call to
|
|
|
|
# ListLeads.
|
|
|
|
# @param [Fixnum] page_size
|
|
|
|
# Requested page size. Server may return fewer leads than requested.
|
|
|
|
# If unspecified, server picks an appropriate default.
|
2017-03-30 22:30:51 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-03-31 19:53:27 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListLeadsResponse] parsed result object
|
2017-06-02 06:11:31 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListLeadsResponse]
|
2017-06-02 06:11:31 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_leads(request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, order_by: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/leads', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListLeadsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListLeadsResponse
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['pageSize'] = page_size unless page_size.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists the Offers available for the current user
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-05-04 19:35:56 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListOffersResponse] parsed result object
|
2017-03-10 21:11:09 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListOffersResponse]
|
2017-03-10 21:11:09 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_offers(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/offers', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListOffersResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListOffersResponse
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-04-03 20:18:48 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists the Historical Offers for the current user (or user's entire company)
|
2017-03-27 22:14:47 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-03-30 22:30:51 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
2017-03-31 19:53:27 +00:00
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [Boolean] entire_company
|
|
|
|
# if true, show history for the entire company. Requires user to be admin.
|
|
|
|
# @param [String] order_by
|
|
|
|
# Comma-separated list of fields to order by, e.g.: "foo,bar,baz".
|
|
|
|
# Use "foo desc" to sort descending.
|
|
|
|
# List of valid field names is: name, offer_code, expiration_time, status,
|
|
|
|
# last_modified_time, sender_name, creation_time, country_code,
|
|
|
|
# offer_type.
|
2017-03-31 19:53:27 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
|
|
|
# @param [String] page_token
|
|
|
|
# Token to retrieve a specific page.
|
|
|
|
# @param [Fixnum] page_size
|
|
|
|
# Maximum number of rows to return per page.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListOffersHistoryResponse] parsed result object
|
2017-03-10 21:11:09 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListOffersHistoryResponse]
|
2017-03-10 21:11:09 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_offer_histories(request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, entire_company: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/offers/history', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListOffersHistoryResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListOffersHistoryResponse
|
2017-03-31 19:53:27 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['entireCompany'] = entire_company unless entire_company.nil?
|
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists states for current user.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-05-04 19:35:56 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-05-04 19:35:56 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-05-04 19:35:56 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListUserStatesResponse] parsed result object
|
2017-05-04 19:35:56 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListUserStatesResponse]
|
2017-05-04 19:35:56 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_user_states(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/userStates', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListUserStatesResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListUserStatesResponse
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists analytics data for a user's associated company.
|
|
|
|
# Should only be called within the context of an authorized logged in user.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] page_token
|
|
|
|
# A token identifying a page of results that the server returns.
|
|
|
|
# Typically, this is the value of `ListAnalyticsResponse.next_page_token`
|
|
|
|
# returned from the previous call to
|
|
|
|
# ListAnalytics.
|
|
|
|
# Will be a date string in `YYYY-MM-DD` format representing the end date
|
|
|
|
# of the date range of results to return.
|
|
|
|
# If unspecified or set to "", default value is the current date.
|
|
|
|
# @param [Fixnum] page_size
|
|
|
|
# Requested page size. Server may return fewer analytics than requested.
|
|
|
|
# If unspecified or set to 0, default value is 30.
|
|
|
|
# Specifies the number of days in the date range when querying analytics.
|
|
|
|
# The `page_token` represents the end date of the date range
|
|
|
|
# and the start date is calculated using the `page_size` as the number
|
|
|
|
# of days BEFORE the end date.
|
|
|
|
# Must be a non-negative integer.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListAnalyticsResponse] parsed result object
|
2017-05-26 16:44:32 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListAnalyticsResponse]
|
2017-05-26 16:44:32 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_analytics(request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/analytics', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListAnalyticsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListAnalyticsResponse
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['pageSize'] = page_size unless page_size.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Gets Partners Status of the logged in user's agency.
|
|
|
|
# Should only be called if the logged in user is the admin of the agency.
|
2017-04-03 20:18:48 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
2017-03-27 22:14:47 +00:00
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::GetPartnersStatusResponse] parsed result object
|
2015-12-03 01:10:07 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::GetPartnersStatusResponse]
|
2015-12-03 01:10:07 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def get_partnersstatus(request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/partnersstatus', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::GetPartnersStatusResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::GetPartnersStatusResponse
|
2017-03-31 19:53:27 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-04-03 20:18:48 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-03-27 22:14:47 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-04-03 20:18:48 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Updates the specified lead.
|
|
|
|
# @param [Google::Apis::PartnersV2::Lead] lead_object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] update_mask
|
|
|
|
# Standard field mask for the set of fields to be updated.
|
|
|
|
# Required with at least 1 value in FieldMask's paths.
|
|
|
|
# Only `state` and `adwords_customer_id` are currently supported.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::Lead] parsed result object
|
2015-12-03 01:10:07 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::Lead]
|
2015-12-03 01:10:07 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def update_leads(lead_object = nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:patch, 'v2/leads', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::Lead::Representation
|
|
|
|
command.request_object = lead_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::Lead::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::Lead
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['updateMask'] = update_mask unless update_mask.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update company.
|
|
|
|
# Should only be called within the context of an authorized logged in user.
|
|
|
|
# @param [Google::Apis::PartnersV2::Company] company_object
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-05-26 16:44:32 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
2017-05-26 16:44:32 +00:00
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [String] update_mask
|
|
|
|
# Standard field mask for the set of fields to be updated.
|
|
|
|
# Required with at least 1 value in FieldMask's paths.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2015-12-03 01:10:07 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::Company] parsed result object
|
2015-12-03 01:10:07 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::Company]
|
2015-12-03 01:10:07 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def update_companies(company_object = nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:patch, 'v2/companies', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::Company::Representation
|
|
|
|
command.request_object = company_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::Company::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::Company
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['updateMask'] = update_mask unless update_mask.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Deletes a user's company relation. Unaffiliaites the user from a company.
|
|
|
|
# @param [String] user_id
|
|
|
|
# The ID of the user. Can be set to <code>me</code> to mean
|
|
|
|
# the currently authenticated user.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-03-30 22:30:51 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-03-10 21:11:09 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::Empty] parsed result object
|
2017-03-10 21:11:09 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::Empty]
|
2017-03-10 21:11:09 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def delete_user_company_relation(user_id, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:delete, 'v2/users/{userId}/companyRelation', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::Empty::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::Empty
|
|
|
|
command.params['userId'] = user_id unless user_id.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Creates a user's company relation. Affiliates the user to a company.
|
|
|
|
# @param [String] user_id
|
|
|
|
# The ID of the user. Can be set to <code>me</code> to mean
|
|
|
|
# the currently authenticated user.
|
|
|
|
# @param [Google::Apis::PartnersV2::CompanyRelation] company_relation_object
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-02 06:11:31 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::CompanyRelation] parsed result object
|
2017-06-02 06:11:31 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::CompanyRelation]
|
2017-06-02 06:11:31 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def create_user_company_relation(user_id, company_relation_object = nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:put, 'v2/users/{userId}/companyRelation', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::CompanyRelation::Representation
|
|
|
|
command.request_object = company_relation_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::CompanyRelation::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::CompanyRelation
|
|
|
|
command.params['userId'] = user_id unless user_id.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-03-30 22:30:51 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Gets a user.
|
|
|
|
# @param [String] user_id
|
|
|
|
# Identifier of the user. Can be set to <code>me</code> to mean the currently
|
|
|
|
# authenticated user.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
|
|
|
# @param [String] user_view
|
|
|
|
# Specifies what parts of the user information to return.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::User] parsed result object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::User]
|
2017-06-14 17:02:03 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def get_user(user_id, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, user_view: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/users/{userId}', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::User::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::User
|
|
|
|
command.params['userId'] = user_id unless user_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['userView'] = user_view unless user_view.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Updates a user's profile. A user can only update their own profile and
|
|
|
|
# should only be called within the context of a logged in user.
|
|
|
|
# @param [Google::Apis::PartnersV2::UserProfile] user_profile_object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::UserProfile] parsed result object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::UserProfile]
|
2017-06-14 17:02:03 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def update_user_profile(user_profile_object = nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:patch, 'v2/users/profile', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::UserProfile::Representation
|
|
|
|
command.request_object = user_profile_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::UserProfile::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::UserProfile
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
2017-03-30 22:30:51 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Lists companies.
|
|
|
|
# @param [String] max_monthly_budget_currency_code
|
|
|
|
# The 3-letter currency code defined in ISO 4217.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] min_monthly_budget_currency_code
|
|
|
|
# The 3-letter currency code defined in ISO 4217.
|
|
|
|
# @param [String] view
|
|
|
|
# The view of the `Company` resource to be returned. This must not be
|
|
|
|
# `COMPANY_VIEW_UNSPECIFIED`.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
|
|
|
# @param [String] address
|
|
|
|
# The address to use when searching for companies.
|
|
|
|
# If not given, the geo-located address of the request is used.
|
|
|
|
# @param [Fixnum] min_monthly_budget_units
|
|
|
|
# The whole units of the amount.
|
|
|
|
# For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
|
|
|
|
# @param [Fixnum] max_monthly_budget_nanos
|
|
|
|
# Number of nano (10^-9) units of the amount.
|
|
|
|
# The value must be between -999,999,999 and +999,999,999 inclusive.
|
|
|
|
# If `units` is positive, `nanos` must be positive or zero.
|
|
|
|
# If `units` is zero, `nanos` can be positive, zero, or negative.
|
|
|
|
# If `units` is negative, `nanos` must be negative or zero.
|
|
|
|
# For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
|
|
|
|
# @param [Array<String>, String] services
|
|
|
|
# List of services that the returned agencies should provide. If this is
|
|
|
|
# not empty, any returned agency must have at least one of these services,
|
|
|
|
# or one of the specializations in the "specializations" field.
|
|
|
|
# @param [Fixnum] max_monthly_budget_units
|
|
|
|
# The whole units of the amount.
|
|
|
|
# For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [Fixnum] min_monthly_budget_nanos
|
|
|
|
# Number of nano (10^-9) units of the amount.
|
|
|
|
# The value must be between -999,999,999 and +999,999,999 inclusive.
|
|
|
|
# If `units` is positive, `nanos` must be positive or zero.
|
|
|
|
# If `units` is zero, `nanos` can be positive, zero, or negative.
|
|
|
|
# If `units` is negative, `nanos` must be negative or zero.
|
|
|
|
# For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
|
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
|
|
|
# @param [String] page_token
|
|
|
|
# A token identifying a page of results that the server returns.
|
|
|
|
# Typically, this is the value of `ListCompaniesResponse.next_page_token`
|
|
|
|
# returned from the previous call to
|
|
|
|
# ListCompanies.
|
|
|
|
# @param [String] company_name
|
|
|
|
# Company name to search for.
|
|
|
|
# @param [Array<String>, String] industries
|
|
|
|
# List of industries the company can help with.
|
|
|
|
# @param [String] website_url
|
|
|
|
# Website URL that will help to find a better matched company.
|
|
|
|
# .
|
|
|
|
# @param [Array<String>, String] gps_motivations
|
|
|
|
# List of reasons for using Google Partner Search to get companies.
|
|
|
|
# @param [Array<String>, String] language_codes
|
|
|
|
# List of language codes that company can support. Only primary language
|
|
|
|
# subtags are accepted as defined by
|
|
|
|
# <a href="https://tools.ietf.org/html/bcp47">BCP 47</a>
|
|
|
|
# (IETF BCP 47, "Tags for Identifying Languages").
|
|
|
|
# @param [Fixnum] page_size
|
|
|
|
# Requested page size. Server may return fewer companies than requested.
|
|
|
|
# If unspecified, server picks an appropriate default.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
|
|
|
# @param [String] order_by
|
|
|
|
# How to order addresses within the returned companies. Currently, only
|
|
|
|
# `address` and `address desc` is supported which will sorted by closest to
|
|
|
|
# farthest in distance from given address and farthest to closest distance
|
|
|
|
# from given address respectively.
|
|
|
|
# @param [Array<String>, String] specializations
|
|
|
|
# List of specializations that the returned agencies should provide. If this
|
|
|
|
# is not empty, any returned agency must have at least one of these
|
|
|
|
# specializations, or one of the services in the "services" field.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::ListCompaniesResponse] parsed result object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::ListCompaniesResponse]
|
2017-06-14 17:02:03 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def list_companies(max_monthly_budget_currency_code: nil, request_metadata_user_overrides_user_id: nil, min_monthly_budget_currency_code: nil, view: nil, request_metadata_locale: nil, address: nil, min_monthly_budget_units: nil, max_monthly_budget_nanos: nil, services: nil, max_monthly_budget_units: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_traffic_source_traffic_sub_id: nil, min_monthly_budget_nanos: nil, request_metadata_partners_session_id: nil, page_token: nil, company_name: nil, industries: nil, website_url: nil, gps_motivations: nil, language_codes: nil, page_size: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, specializations: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/companies', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::ListCompaniesResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::ListCompaniesResponse
|
|
|
|
command.query['maxMonthlyBudget.currencyCode'] = max_monthly_budget_currency_code unless max_monthly_budget_currency_code.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['minMonthlyBudget.currencyCode'] = min_monthly_budget_currency_code unless min_monthly_budget_currency_code.nil?
|
|
|
|
command.query['view'] = view unless view.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['address'] = address unless address.nil?
|
|
|
|
command.query['minMonthlyBudget.units'] = min_monthly_budget_units unless min_monthly_budget_units.nil?
|
|
|
|
command.query['maxMonthlyBudget.nanos'] = max_monthly_budget_nanos unless max_monthly_budget_nanos.nil?
|
|
|
|
command.query['services'] = services unless services.nil?
|
|
|
|
command.query['maxMonthlyBudget.units'] = max_monthly_budget_units unless max_monthly_budget_units.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
|
|
|
command.query['minMonthlyBudget.nanos'] = min_monthly_budget_nanos unless min_monthly_budget_nanos.nil?
|
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['companyName'] = company_name unless company_name.nil?
|
|
|
|
command.query['industries'] = industries unless industries.nil?
|
|
|
|
command.query['websiteUrl'] = website_url unless website_url.nil?
|
|
|
|
command.query['gpsMotivations'] = gps_motivations unless gps_motivations.nil?
|
|
|
|
command.query['languageCodes'] = language_codes unless language_codes.nil?
|
|
|
|
command.query['pageSize'] = page_size unless page_size.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
|
|
|
command.query['specializations'] = specializations unless specializations.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Gets a company.
|
|
|
|
# @param [String] company_id
|
|
|
|
# The ID of the company to retrieve.
|
|
|
|
# @param [String] view
|
|
|
|
# The view of `Company` resource to be returned. This must not be
|
|
|
|
# `COMPANY_VIEW_UNSPECIFIED`.
|
|
|
|
# @param [String] address
|
|
|
|
# The address to use for sorting the company's addresses by proximity.
|
|
|
|
# If not given, the geo-located address of the request is used.
|
|
|
|
# Used when order_by is set.
|
|
|
|
# @param [String] request_metadata_locale
|
|
|
|
# Locale to use for the current request.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_source_id
|
|
|
|
# Identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
|
|
|
# @param [String] request_metadata_user_overrides_ip_address
|
|
|
|
# IP address to use instead of the user's geo-located IP address.
|
|
|
|
# @param [Array<String>, String] request_metadata_experiment_ids
|
|
|
|
# Experiment IDs the current request belongs to.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] currency_code
|
|
|
|
# If the company's budget is in a different currency code than this one, then
|
|
|
|
# the converted budget is converted to this currency code.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_traffic_source_traffic_sub_id
|
|
|
|
# Second level identifier to indicate where the traffic comes from.
|
|
|
|
# An identifier has multiple letters created by a team which redirected the
|
|
|
|
# traffic to us.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] order_by
|
|
|
|
# How to order addresses within the returned company. Currently, only
|
|
|
|
# `address` and `address desc` is supported which will sorted by closest to
|
|
|
|
# farthest in distance from given address and farthest to closest distance
|
|
|
|
# from given address respectively.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] request_metadata_partners_session_id
|
|
|
|
# Google Partners session ID.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] request_metadata_user_overrides_user_id
|
|
|
|
# Logged-in user ID to impersonate instead of the user's ID.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
2017-07-12 20:10:42 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
2017-06-14 17:02:03 +00:00
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2017-07-12 20:10:42 +00:00
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::GetCompanyResponse] parsed result object
|
2017-06-14 17:02:03 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::PartnersV2::GetCompanyResponse]
|
2017-06-14 17:02:03 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2017-07-12 20:10:42 +00:00
|
|
|
def get_company(company_id, view: nil, address: nil, request_metadata_locale: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, currency_code: nil, request_metadata_traffic_source_traffic_sub_id: nil, order_by: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'v2/companies/{companyId}', options)
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::GetCompanyResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::GetCompanyResponse
|
|
|
|
command.params['companyId'] = company_id unless company_id.nil?
|
|
|
|
command.query['view'] = view unless view.nil?
|
|
|
|
command.query['address'] = address unless address.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil?
|
|
|
|
command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['currencyCode'] = currency_code unless currency_code.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Creates an advertiser lead for the given company ID.
|
|
|
|
# @param [String] company_id
|
|
|
|
# The ID of the company to contact.
|
|
|
|
# @param [Google::Apis::PartnersV2::CreateLeadRequest] create_lead_request_object
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::CreateLeadResponse] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::PartnersV2::CreateLeadResponse]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def create_lead(company_id, create_lead_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:post, 'v2/companies/{companyId}/leads', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::CreateLeadRequest::Representation
|
|
|
|
command.request_object = create_lead_request_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::CreateLeadResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::CreateLeadResponse
|
|
|
|
command.params['companyId'] = company_id unless company_id.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-05-04 19:35:56 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Logs a user event.
|
|
|
|
# @param [Google::Apis::PartnersV2::LogUserEventRequest] log_user_event_request_object
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
|
|
|
# @yieldparam result [Google::Apis::PartnersV2::LogUserEventResponse] parsed result object
|
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
|
|
|
# @return [Google::Apis::PartnersV2::LogUserEventResponse]
|
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def log_user_event(log_user_event_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:post, 'v2/userEvents:log', options)
|
|
|
|
command.request_representation = Google::Apis::PartnersV2::LogUserEventRequest::Representation
|
|
|
|
command.request_object = log_user_event_request_object
|
|
|
|
command.response_representation = Google::Apis::PartnersV2::LogUserEventResponse::Representation
|
|
|
|
command.response_class = Google::Apis::PartnersV2::LogUserEventResponse
|
2017-06-14 17:02:03 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2017-07-12 20:10:42 +00:00
|
|
|
command.query['fields'] = fields unless fields.nil?
|
2017-03-10 21:11:09 +00:00
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
2015-12-03 01:10:07 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def apply_command_defaults(command)
|
2017-05-26 16:44:32 +00:00
|
|
|
command.query['key'] = key unless key.nil?
|
2017-06-02 06:11:31 +00:00
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2015-12-03 01:10:07 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|