Class: Google::Apis::MybusinessverificationsV1::MyBusinessVerificationsService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/mybusinessverifications_v1/service.rb

Overview

My Business Verifications API

The My Business Verifications API provides an interface for taking verifications related actions for locations.

Examples:

require 'google/apis/mybusinessverifications_v1'

Mybusinessverifications = Google::Apis::MybusinessverificationsV1 # Alias the module
service = Mybusinessverifications::MyBusinessVerificationsService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessverifications.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMyBusinessVerificationsService

Returns a new instance of MyBusinessVerificationsService.



48
49
50
51
52
53
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-mybusinessverifications_v1',
        client_version: Google::Apis::MybusinessverificationsV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (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.



41
42
43
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 41

def key
  @key
end

#quota_userString

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.

Returns:

  • (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.



46
47
48
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

#complete_verification(name, complete_verification_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::CompleteVerificationResponse

Completes a PENDING verification. It is only necessary for non AUTO verification methods. AUTO verification request is instantly VERIFIED upon creation.

Parameters:

  • name (String)

    Required. Resource name of the verification to complete.

  • complete_verification_request_object (Google::Apis::MybusinessverificationsV1::CompleteVerificationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



175
176
177
178
179
180
181
182
183
184
185
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 175

def complete_verification(name, complete_verification_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:complete', options)
  command.request_representation = Google::Apis::MybusinessverificationsV1::CompleteVerificationRequest::Representation
  command.request_object = complete_verification_request_object
  command.response_representation = Google::Apis::MybusinessverificationsV1::CompleteVerificationResponse::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::CompleteVerificationResponse
  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

#fetch_location_verification_options(location, fetch_verification_options_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::FetchVerificationOptionsResponse

Reports all eligible verification options for a location in a specific language.

Parameters:

  • location (String)

    Required. The location to verify.

  • fetch_verification_options_request_object (Google::Apis::MybusinessverificationsV1::FetchVerificationOptionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 77

def fetch_location_verification_options(location, fetch_verification_options_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+location}:fetchVerificationOptions', options)
  command.request_representation = Google::Apis::MybusinessverificationsV1::FetchVerificationOptionsRequest::Representation
  command.request_object = fetch_verification_options_request_object
  command.response_representation = Google::Apis::MybusinessverificationsV1::FetchVerificationOptionsResponse::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::FetchVerificationOptionsResponse
  command.params['location'] = location unless location.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_location_voice_of_merchant_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::VoiceOfMerchantState

Gets the VoiceOfMerchant state.

Parameters:

  • name (String)

    Required. Resource name of the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



109
110
111
112
113
114
115
116
117
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 109

def get_location_voice_of_merchant_state(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}/VoiceOfMerchantState', options)
  command.response_representation = Google::Apis::MybusinessverificationsV1::VoiceOfMerchantState::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::VoiceOfMerchantState
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_location_verifications(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::ListVerificationsResponse

List verifications of a location, ordered by create time.

Parameters:

  • parent (String)

    Required. Resource name of the location that verification requests belong to.

  • page_size (Fixnum) (defaults to: nil)

    How many verification to include per page. Minimum is 1, and the default and maximum page size is 100.

  • page_token (String) (defaults to: nil)

    If specified, returns the next page of verifications.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



212
213
214
215
216
217
218
219
220
221
222
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 212

def list_location_verifications(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/verifications', options)
  command.response_representation = Google::Apis::MybusinessverificationsV1::ListVerificationsResponse::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::ListVerificationsResponse
  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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#verify_location(name, verify_location_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::VerifyLocationResponse

Starts the verification process for a location.

Parameters:

  • name (String)

    Required. Resource name of the location to verify.

  • verify_location_request_object (Google::Apis::MybusinessverificationsV1::VerifyLocationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



140
141
142
143
144
145
146
147
148
149
150
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 140

def verify_location(name, verify_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:verify', options)
  command.request_representation = Google::Apis::MybusinessverificationsV1::VerifyLocationRequest::Representation
  command.request_object = verify_location_request_object
  command.response_representation = Google::Apis::MybusinessverificationsV1::VerifyLocationResponse::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::VerifyLocationResponse
  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