Class: Google::Apis::MerchantapiConversionsV1beta::MerchantService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MerchantapiConversionsV1beta::MerchantService
- Defined in:
- lib/google/apis/merchantapi_conversions_v1beta/service.rb
Overview
Merchant API
Programmatically manage your Merchant Center Accounts.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://merchantapi.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_account_conversion_source(parent, conversion_source_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Creates a new conversion source.
-
#delete_account_conversion_source(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::Empty
Archives an existing conversion source.
-
#get_account_conversion_source(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Fetches a conversion source.
-
#initialize ⇒ MerchantService
constructor
A new instance of MerchantService.
-
#list_account_conversion_sources(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ListConversionSourcesResponse
Retrieves the list of conversion sources the caller has access to.
-
#patch_account_conversion_source(name, conversion_source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Updates information of an existing conversion source.
-
#undelete_conversion_source(name, undelete_conversion_source_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Re-enables an archived conversion source.
Constructor Details
#initialize ⇒ MerchantService
Returns a new instance of MerchantService.
47 48 49 50 51 52 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-merchantapi_conversions_v1beta', client_version: Google::Apis::MerchantapiConversionsV1beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#create_account_conversion_source(parent, conversion_source_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Creates a new conversion source.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 76 def create_account_conversion_source(parent, conversion_source_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'conversions/v1beta/{+parent}/conversionSources', ) command.request_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.request_object = conversion_source_object command.response_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::ConversionSource command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_account_conversion_source(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::Empty
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
112 113 114 115 116 117 118 119 120 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 112 def delete_account_conversion_source(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'conversions/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiConversionsV1beta::Empty::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account_conversion_source(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Fetches a conversion source.
143 144 145 146 147 148 149 150 151 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 143 def get_account_conversion_source(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'conversions/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::ConversionSource command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_conversion_sources(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ListConversionSourcesResponse
Retrieves the list of conversion sources the caller has access to.
183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 183 def list_account_conversion_sources(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'conversions/v1beta/{+parent}/conversionSources', ) command.response_representation = Google::Apis::MerchantapiConversionsV1beta::ListConversionSourcesResponse::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::ListConversionSourcesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['showDeleted'] = show_deleted unless show_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_account_conversion_source(name, conversion_source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 226 def patch_account_conversion_source(name, conversion_source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'conversions/v1beta/{+name}', ) command.request_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.request_object = conversion_source_object command.response_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::ConversionSource command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#undelete_conversion_source(name, undelete_conversion_source_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiConversionsV1beta::ConversionSource
Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/google/apis/merchantapi_conversions_v1beta/service.rb', line 262 def undelete_conversion_source(name, undelete_conversion_source_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'conversions/v1beta/{+name}:undelete', ) command.request_representation = Google::Apis::MerchantapiConversionsV1beta::UndeleteConversionSourceRequest::Representation command.request_object = undelete_conversion_source_request_object command.response_representation = Google::Apis::MerchantapiConversionsV1beta::ConversionSource::Representation command.response_class = Google::Apis::MerchantapiConversionsV1beta::ConversionSource command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |