mybusinessverifications

package
v0.207.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package mybusinessverifications provides access to the My Business Verifications API.

For product documentation, see: https://developers.google.com/my-business/

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/mybusinessverifications/v1"
...
ctx := context.Background()
mybusinessverificationsService, err := mybusinessverifications.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressVerificationData

type AddressVerificationData struct {
	// Address: Address that a postcard can be sent to.
	Address *PostalAddress `json:"address,omitempty"`
	// Business: Merchant's business name.
	Business string `json:"business,omitempty"`
	// ExpectedDeliveryDaysRegion: Expected number of days it takes to deliver a
	// postcard to the address's region.
	ExpectedDeliveryDaysRegion int64 `json:"expectedDeliveryDaysRegion,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Address") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AddressVerificationData: Display data for verifications through postcard.

func (AddressVerificationData) MarshalJSON

func (s AddressVerificationData) MarshalJSON() ([]byte, error)

type CompleteVerificationRequest

type CompleteVerificationRequest struct {
	// Pin: Required. PIN code received by the merchant to complete the
	// verification.
	Pin string `json:"pin,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Pin") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Pin") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CompleteVerificationRequest: Request message for Verifications.CompleteVerificationAction.

func (CompleteVerificationRequest) MarshalJSON

func (s CompleteVerificationRequest) MarshalJSON() ([]byte, error)

type CompleteVerificationResponse

type CompleteVerificationResponse struct {
	// Verification: The completed verification.
	Verification *Verification `json:"verification,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Verification") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Verification") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CompleteVerificationResponse: Response message for Verifications.CompleteVerificationAction.

func (CompleteVerificationResponse) MarshalJSON

func (s CompleteVerificationResponse) MarshalJSON() ([]byte, error)

type ComplyWithGuidelines

type ComplyWithGuidelines struct {
	// RecommendationReason: The reason why the location is being recommended to
	// comply with guidelines.
	//
	// Possible values:
	//   "RECOMMENDATION_REASON_UNSPECIFIED" - Not specified.
	//   "BUSINESS_LOCATION_SUSPENDED" - The business location is suspended. To fix
	// this issue, consult the [Help Center
	// article](https://support.google.com/business/answer/4569145).
	//   "BUSINESS_LOCATION_DISABLED" - The business location is disabled. To fix
	// this issue, consult the [Help Center
	// article](https://support.google.com/business/answer/9334246).
	RecommendationReason string `json:"recommendationReason,omitempty"`
	// ForceSendFields is a list of field names (e.g. "RecommendationReason") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "RecommendationReason") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ComplyWithGuidelines: Indicates that the location fails to comply with our guidelines (https://support.google.com/business/answer/3038177).

func (ComplyWithGuidelines) MarshalJSON added in v0.72.0

func (s ComplyWithGuidelines) MarshalJSON() ([]byte, error)

type EmailVerificationData

type EmailVerificationData struct {
	// Domain: Domain name in the email address. e.g. "gmail.com" in foo@gmail.com
	Domain string `json:"domain,omitempty"`
	// IsUserNameEditable: Whether client is allowed to provide a different user
	// name.
	IsUserNameEditable bool `json:"isUserNameEditable,omitempty"`
	// User: User name in the email address. e.g. "foo" in foo@gmail.com
	User string `json:"user,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Domain") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Domain") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

EmailVerificationData: Display data for verifications through email.

func (EmailVerificationData) MarshalJSON

func (s EmailVerificationData) MarshalJSON() ([]byte, error)

type FetchVerificationOptionsRequest

type FetchVerificationOptionsRequest struct {
	// Context: Optional. Extra context information for the verification of service
	// businesses. Can only be applied to the locations whose business type is
	// CUSTOMER_LOCATION_ONLY. Specifying an accurate address could enable more
	// options. INVALID_ARGUMENT will be thrown if it is set for other business
	// types of locations.
	Context *ServiceBusinessContext `json:"context,omitempty"`
	// LanguageCode: Required. The BCP 47 language code representing the language
	// that is to be used for the verification process. Available options vary by
	// language.
	LanguageCode string `json:"languageCode,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Context") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

FetchVerificationOptionsRequest: Request message for Verifications.FetchVerificationOptions.

func (FetchVerificationOptionsRequest) MarshalJSON

func (s FetchVerificationOptionsRequest) MarshalJSON() ([]byte, error)

type FetchVerificationOptionsResponse

type FetchVerificationOptionsResponse struct {
	// Options: The available verification options.
	Options []*VerificationOption `json:"options,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Options") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

FetchVerificationOptionsResponse: Response message for Verifications.FetchVerificationOptions.

func (FetchVerificationOptionsResponse) MarshalJSON

func (s FetchVerificationOptionsResponse) MarshalJSON() ([]byte, error)

type ListVerificationsResponse

type ListVerificationsResponse struct {
	// NextPageToken: If the number of verifications exceeded the requested page
	// size, this field will be populated with a token to fetch the next page of
	// verification on a subsequent call. If there are no more attributes, this
	// field will not be present in the response.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Verifications: List of the verifications.
	Verifications []*Verification `json:"verifications,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListVerificationsResponse: Response message for Verifications.ListVerifications.

func (ListVerificationsResponse) MarshalJSON

func (s ListVerificationsResponse) MarshalJSON() ([]byte, error)

type LocationsFetchVerificationOptionsCall

type LocationsFetchVerificationOptionsCall struct {
	// contains filtered or unexported fields
}

func (*LocationsFetchVerificationOptionsCall) Context

Context sets the context to be used in this call's Do method.

func (*LocationsFetchVerificationOptionsCall) Do

Do executes the "mybusinessverifications.locations.fetchVerificationOptions" call. Any non-2xx status code is an error. Response headers are in either *FetchVerificationOptionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationsFetchVerificationOptionsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*LocationsFetchVerificationOptionsCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type LocationsGetVoiceOfMerchantStateCall

type LocationsGetVoiceOfMerchantStateCall struct {
	// contains filtered or unexported fields
}

func (*LocationsGetVoiceOfMerchantStateCall) Context

Context sets the context to be used in this call's Do method.

func (*LocationsGetVoiceOfMerchantStateCall) Do

Do executes the "mybusinessverifications.locations.getVoiceOfMerchantState" call. Any non-2xx status code is an error. Response headers are in either *VoiceOfMerchantState.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationsGetVoiceOfMerchantStateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*LocationsGetVoiceOfMerchantStateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*LocationsGetVoiceOfMerchantStateCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type LocationsService

type LocationsService struct {
	Verifications *LocationsVerificationsService
	// contains filtered or unexported fields
}

func NewLocationsService

func NewLocationsService(s *Service) *LocationsService

func (*LocationsService) FetchVerificationOptions

func (r *LocationsService) FetchVerificationOptions(location string, fetchverificationoptionsrequest *FetchVerificationOptionsRequest) *LocationsFetchVerificationOptionsCall

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

- location: The location to verify.

func (*LocationsService) GetVoiceOfMerchantState

func (r *LocationsService) GetVoiceOfMerchantState(name string) *LocationsGetVoiceOfMerchantStateCall

GetVoiceOfMerchantState: Gets the VoiceOfMerchant state.

- name: Resource name of the location.

func (*LocationsService) Verify

func (r *LocationsService) Verify(name string, verifylocationrequest *VerifyLocationRequest) *LocationsVerifyCall

Verify: Starts the verification process for a location.

- name: Resource name of the location to verify.

type LocationsVerificationsCompleteCall

type LocationsVerificationsCompleteCall struct {
	// contains filtered or unexported fields
}

func (*LocationsVerificationsCompleteCall) Context

Context sets the context to be used in this call's Do method.

func (*LocationsVerificationsCompleteCall) Do

Do executes the "mybusinessverifications.locations.verifications.complete" call. Any non-2xx status code is an error. Response headers are in either *CompleteVerificationResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationsVerificationsCompleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*LocationsVerificationsCompleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type LocationsVerificationsListCall

type LocationsVerificationsListCall struct {
	// contains filtered or unexported fields
}

func (*LocationsVerificationsListCall) Context

Context sets the context to be used in this call's Do method.

func (*LocationsVerificationsListCall) Do

Do executes the "mybusinessverifications.locations.verifications.list" call. Any non-2xx status code is an error. Response headers are in either *ListVerificationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationsVerificationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*LocationsVerificationsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*LocationsVerificationsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*LocationsVerificationsListCall) PageSize

PageSize sets the optional parameter "pageSize": How many verification to include per page. Minimum is 1, and the default and maximum page size is 100.

func (*LocationsVerificationsListCall) PageToken

PageToken sets the optional parameter "pageToken": If specified, returns the next page of verifications.

func (*LocationsVerificationsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type LocationsVerificationsService

type LocationsVerificationsService struct {
	// contains filtered or unexported fields
}

func NewLocationsVerificationsService

func NewLocationsVerificationsService(s *Service) *LocationsVerificationsService

func (*LocationsVerificationsService) Complete

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

- name: Resource name of the verification to complete.

func (*LocationsVerificationsService) List

List: List verifications of a location, ordered by create time.

  • parent: Resource name of the location that verification requests belong to.

type LocationsVerifyCall

type LocationsVerifyCall struct {
	// contains filtered or unexported fields
}

func (*LocationsVerifyCall) Context

Context sets the context to be used in this call's Do method.

func (*LocationsVerifyCall) Do

Do executes the "mybusinessverifications.locations.verify" call. Any non-2xx status code is an error. Response headers are in either *VerifyLocationResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationsVerifyCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*LocationsVerifyCall) Header

func (c *LocationsVerifyCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type PostalAddress

type PostalAddress struct {
	// AddressLines: Unstructured address lines describing the lower levels of an
	// address. Because values in address_lines do not have type information and
	// may sometimes contain multiple values in a single field (e.g. "Austin, TX"),
	// it is important that the line order is clear. The order of address lines
	// should be "envelope order" for the country/region of the address. In places
	// where this can vary (e.g. Japan), address_language is used to make it
	// explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for
	// small-to-large). This way, the most specific line of an address can be
	// selected based on the language. The minimum permitted structural
	// representation of an address consists of a region_code with all remaining
	// information placed in the address_lines. It would be possible to format such
	// an address very approximately without geocoding, but no semantic reasoning
	// could be made about any of the address components until it was at least
	// partially resolved. Creating an address only containing a region_code and
	// address_lines, and then geocoding is the recommended way to handle
	// completely unstructured addresses (as opposed to guessing which parts of the
	// address should be localities or administrative areas).
	AddressLines []string `json:"addressLines,omitempty"`
	// AdministrativeArea: Optional. Highest administrative subdivision which is
	// used for postal addresses of a country or region. For example, this can be a
	// state, a province, an oblast, or a prefecture. Specifically, for Spain this
	// is the province and not the autonomous community (e.g. "Barcelona" and not
	// "Catalonia"). Many countries don't use an administrative area in postal
	// addresses. E.g. in Switzerland this should be left unpopulated.
	AdministrativeArea string `json:"administrativeArea,omitempty"`
	// LanguageCode: Optional. BCP-47 language code of the contents of this address
	// (if known). This is often the UI language of the input form or is expected
	// to match one of the languages used in the address' country/region, or their
	// transliterated equivalents. This can affect formatting in certain countries,
	// but is not critical to the correctness of the data and will never affect any
	// validation or other non-formatting related operations. If this value is not
	// known, it should be omitted (rather than specifying a possibly incorrect
	// default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
	LanguageCode string `json:"languageCode,omitempty"`
	// Locality: Optional. Generally refers to the city/town portion of the
	// address. Examples: US city, IT comune, UK post town. In regions of the world
	// where localities are not well defined or do not fit into this structure
	// well, leave locality empty and use address_lines.
	Locality string `json:"locality,omitempty"`
	// Organization: Optional. The name of the organization at the address.
	Organization string `json:"organization,omitempty"`
	// PostalCode: Optional. Postal code of the address. Not all countries use or
	// require postal codes to be present, but where they are used, they may
	// trigger additional validation with other parts of the address (e.g.
	// state/zip validation in the U.S.A.).
	PostalCode string `json:"postalCode,omitempty"`
	// Recipients: Optional. The recipient at the address. This field may, under
	// certain circumstances, contain multiline information. For example, it might
	// contain "care of" information.
	Recipients []string `json:"recipients,omitempty"`
	// RegionCode: Required. CLDR region code of the country/region of the address.
	// This is never inferred and it is up to the user to ensure the value is
	// correct. See https://cldr.unicode.org/ and
	// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
	// for details. Example: "CH" for Switzerland.
	RegionCode string `json:"regionCode,omitempty"`
	// Revision: The schema revision of the `PostalAddress`. This must be set to 0,
	// which is the latest revision. All new revisions **must** be backward
	// compatible with old revisions.
	Revision int64 `json:"revision,omitempty"`
	// SortingCode: Optional. Additional, country-specific, sorting code. This is
	// not used in most regions. Where it is used, the value is either a string
	// like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a
	// number alone, representing the "sector code" (Jamaica), "delivery area
	// indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
	SortingCode string `json:"sortingCode,omitempty"`
	// Sublocality: Optional. Sublocality of the address. For example, this can be
	// neighborhoods, boroughs, districts.
	Sublocality string `json:"sublocality,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AddressLines") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AddressLines") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PostalAddress: Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478

func (PostalAddress) MarshalJSON

func (s PostalAddress) MarshalJSON() ([]byte, error)

type ResolveOwnershipConflict

type ResolveOwnershipConflict struct {
}

ResolveOwnershipConflict: Indicates that the location duplicates another location that is in good standing.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Locations *LocationsService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type ServiceBusinessContext

type ServiceBusinessContext struct {
	// Address: The verification address of the location. It is used to either
	// enable more verification options or send a postcard.
	Address *PostalAddress `json:"address,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Address") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ServiceBusinessContext: Additional data for service business verification.

func (ServiceBusinessContext) MarshalJSON

func (s ServiceBusinessContext) MarshalJSON() ([]byte, error)

type Verification

type Verification struct {
	// Announcement: Optional. Response announcement set only if the method is
	// VETTED_PARTNER.
	Announcement string `json:"announcement,omitempty"`
	// CreateTime: The timestamp when the verification is requested.
	CreateTime string `json:"createTime,omitempty"`
	// Method: The method of the verification.
	//
	// Possible values:
	//   "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in errors.
	//   "ADDRESS" - Send a postcard with a verification PIN to a specific mailing
	// address. The PIN is used to complete verification with Google.
	//   "EMAIL" - Send an email with a verification PIN to a specific email
	// address. The PIN is used to complete verification with Google.
	//   "PHONE_CALL" - Make a phone call with a verification PIN to a specific
	// phone number. The PIN is used to complete verification with Google.
	//   "SMS" - Send an SMS with a verification PIN to a specific phone number.
	// The PIN is used to complete verification with Google.
	//   "AUTO" - Verify the location without additional user action. This option
	// may not be available for all locations.
	//   "VETTED_PARTNER" - This option may not be available for all locations.
	Method string `json:"method,omitempty"`
	// Name: Resource name of the verification.
	Name string `json:"name,omitempty"`
	// State: The state of the verification.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - Default value, will result in errors.
	//   "PENDING" - The verification is pending.
	//   "COMPLETED" - The verification is completed.
	//   "FAILED" - The verification is failed.
	State string `json:"state,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Announcement") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Announcement") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Verification: A verification represents a verification attempt on a location.

func (Verification) MarshalJSON

func (s Verification) MarshalJSON() ([]byte, error)

type VerificationOption

type VerificationOption struct {
	// AddressData: Set only if the method is MAIL.
	AddressData *AddressVerificationData `json:"addressData,omitempty"`
	// Announcement: Set only if the method is VETTED_PARTNER.
	Announcement string `json:"announcement,omitempty"`
	// EmailData: Set only if the method is EMAIL.
	EmailData *EmailVerificationData `json:"emailData,omitempty"`
	// PhoneNumber: Set only if the method is PHONE_CALL or SMS. Phone number that
	// the PIN will be sent to.
	PhoneNumber string `json:"phoneNumber,omitempty"`
	// VerificationMethod: Method to verify the location.
	//
	// Possible values:
	//   "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in errors.
	//   "ADDRESS" - Send a postcard with a verification PIN to a specific mailing
	// address. The PIN is used to complete verification with Google.
	//   "EMAIL" - Send an email with a verification PIN to a specific email
	// address. The PIN is used to complete verification with Google.
	//   "PHONE_CALL" - Make a phone call with a verification PIN to a specific
	// phone number. The PIN is used to complete verification with Google.
	//   "SMS" - Send an SMS with a verification PIN to a specific phone number.
	// The PIN is used to complete verification with Google.
	//   "AUTO" - Verify the location without additional user action. This option
	// may not be available for all locations.
	//   "VETTED_PARTNER" - This option may not be available for all locations.
	VerificationMethod string `json:"verificationMethod,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AddressData") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AddressData") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

VerificationOption: The verification option represents how to verify the location (indicated by verification method) and where the verification will be sent to (indicated by display data).

func (VerificationOption) MarshalJSON

func (s VerificationOption) MarshalJSON() ([]byte, error)

type VerificationToken

type VerificationToken struct {
	// TokenString: The token string.
	TokenString string `json:"tokenString,omitempty"`
	// ForceSendFields is a list of field names (e.g. "TokenString") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "TokenString") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

VerificationToken: Token generated by a vetted partner (https://support.google.com/business/answer/7674102).

func (VerificationToken) MarshalJSON

func (s VerificationToken) MarshalJSON() ([]byte, error)

type Verify

type Verify struct {
	// HasPendingVerification: Indicates whether a verification process has already
	// started, and can be completed by the location.
	HasPendingVerification bool `json:"hasPendingVerification,omitempty"`
	// ForceSendFields is a list of field names (e.g. "HasPendingVerification") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "HasPendingVerification") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Verify: Indicates that the location requires verification. Contains information about the current verification actions performed on the location.

func (Verify) MarshalJSON

func (s Verify) MarshalJSON() ([]byte, error)

type VerifyLocationRequest

type VerifyLocationRequest struct {
	// Context: Optional. Extra context information for the verification of service
	// businesses. It is only required for the locations whose business type is
	// CUSTOMER_LOCATION_ONLY. For ADDRESS verification, the address will be used
	// to send out postcard. For other methods, it should be the same as the one
	// that is passed to GetVerificationOptions. INVALID_ARGUMENT will be thrown if
	// it is set for other types of business locations.
	Context *ServiceBusinessContext `json:"context,omitempty"`
	// EmailAddress: Optional. The input for EMAIL method. Email address where the
	// PIN should be sent to. An email address is accepted only if it is one of the
	// addresses provided by FetchVerificationOptions. If the EmailVerificationData
	// has is_user_name_editable set to true, the client may specify a different
	// user name (local-part) but must match the domain name.
	EmailAddress string `json:"emailAddress,omitempty"`
	// LanguageCode: Optional. The BCP 47 language code representing the language
	// that is to be used for the verification process.
	LanguageCode string `json:"languageCode,omitempty"`
	// MailerContact: Optional. The input for ADDRESS method. Contact name the mail
	// should be sent to.
	MailerContact string `json:"mailerContact,omitempty"`
	// Method: Required. Verification method.
	//
	// Possible values:
	//   "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in errors.
	//   "ADDRESS" - Send a postcard with a verification PIN to a specific mailing
	// address. The PIN is used to complete verification with Google.
	//   "EMAIL" - Send an email with a verification PIN to a specific email
	// address. The PIN is used to complete verification with Google.
	//   "PHONE_CALL" - Make a phone call with a verification PIN to a specific
	// phone number. The PIN is used to complete verification with Google.
	//   "SMS" - Send an SMS with a verification PIN to a specific phone number.
	// The PIN is used to complete verification with Google.
	//   "AUTO" - Verify the location without additional user action. This option
	// may not be available for all locations.
	//   "VETTED_PARTNER" - This option may not be available for all locations.
	Method string `json:"method,omitempty"`
	// PhoneNumber: Optional. The input for PHONE_CALL/SMS method The phone number
	// that should be called or be sent SMS to. It must be one of the phone numbers
	// in the eligible options.
	PhoneNumber string `json:"phoneNumber,omitempty"`
	// Token: Optional. The input for VETTED_PARTNER method available to select
	// partners. (https://support.google.com/business/answer/7674102) The input is
	// not needed for a vetted account. Token that is associated to the location.
	// Token that is associated to the location.
	Token *VerificationToken `json:"token,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Context") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

VerifyLocationRequest: Request message for Verifications.VerifyLocation.

func (VerifyLocationRequest) MarshalJSON

func (s VerifyLocationRequest) MarshalJSON() ([]byte, error)

type VerifyLocationResponse

type VerifyLocationResponse struct {
	// Verification: The created verification request.
	Verification *Verification `json:"verification,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Verification") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Verification") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

VerifyLocationResponse: Response message for Verifications.VerifyLocation.

func (VerifyLocationResponse) MarshalJSON

func (s VerifyLocationResponse) MarshalJSON() ([]byte, error)

type VoiceOfMerchantState

type VoiceOfMerchantState struct {
	// ComplyWithGuidelines: The location fails to comply with our guidelines
	// (https://support.google.com/business/answer/3038177) and requires additional
	// steps for reinstatement. To fix this issue, consult the Help Center Article
	// (https://support.google.com/business/answer/4569145).
	ComplyWithGuidelines *ComplyWithGuidelines `json:"complyWithGuidelines,omitempty"`
	// HasBusinessAuthority: Indicates whether the location has the authority
	// (ownership) over the business on Google. If true, another location cannot
	// take over and become the dominant listing on Maps. However, edits will not
	// become live unless Voice of Merchant is gained (i.e. has_voice_of_merchant
	// is true).
	HasBusinessAuthority bool `json:"hasBusinessAuthority,omitempty"`
	// HasVoiceOfMerchant: Indicates whether the location is in good standing and
	// has control over the business on Google. Any edits made to the location will
	// propagate to Maps after passing the review phase.
	HasVoiceOfMerchant bool `json:"hasVoiceOfMerchant,omitempty"`
	// ResolveOwnershipConflict: This location duplicates another location that is
	// in good standing. If you have access to the location in good standing, use
	// that location's id to perform operations. Otherwise, request access from the
	// current owner.
	ResolveOwnershipConflict *ResolveOwnershipConflict `json:"resolveOwnershipConflict,omitempty"`
	// Verify: Start or continue the verification process.
	Verify *Verify `json:"verify,omitempty"`
	// WaitForVoiceOfMerchant: Wait to gain Voice of Merchant. The location is
	// under review for quality purposes.
	WaitForVoiceOfMerchant *WaitForVoiceOfMerchant `json:"waitForVoiceOfMerchant,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "ComplyWithGuidelines") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ComplyWithGuidelines") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

VoiceOfMerchantState: Response message for VoiceOfMerchant.GetVoiceOfMerchantState.

func (VoiceOfMerchantState) MarshalJSON

func (s VoiceOfMerchantState) MarshalJSON() ([]byte, error)

type WaitForVoiceOfMerchant

type WaitForVoiceOfMerchant struct {
}

WaitForVoiceOfMerchant: Indicates that the location will gain voice of merchant after passing review.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL