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:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMyBusinessVerificationsService

Returns a new instance of MyBusinessVerificationsService.



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

def initialize
  super('https://mybusinessverifications.googleapis.com/', '',
        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.



39
40
41
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 39

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.



44
45
46
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 44

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



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

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



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

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

#generate_verification_token(generate_verification_token_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessverificationsV1::GenerateVerificationTokenResponse

Generates a token for the provided location data as a vetted partner. Throws PERMISSION_DENIED if the caller is not a vetted partner account. Throws FAILED_PRECONDITION if the caller's VettedStatus is INVALID.

Parameters:

  • generate_verification_token_request_object (Google::Apis::MybusinessverificationsV1::GenerateVerificationTokenRequest) (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



244
245
246
247
248
249
250
251
252
253
# File 'lib/google/apis/mybusinessverifications_v1/service.rb', line 244

def generate_verification_token(generate_verification_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/verificationTokens:generate', options)
  command.request_representation = Google::Apis::MybusinessverificationsV1::GenerateVerificationTokenRequest::Representation
  command.request_object = generate_verification_token_request_object
  command.response_representation = Google::Apis::MybusinessverificationsV1::GenerateVerificationTokenResponse::Representation
  command.response_class = Google::Apis::MybusinessverificationsV1::GenerateVerificationTokenResponse
  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



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

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



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

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



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

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