merchantapi
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package merchantapi provides access to the Merchant API.
For product documentation, see:https://developers.google.com/merchant/api
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany 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/merchantapi/reviews_v1beta"...ctx := context.Background()merchantapiService, err := merchantapi.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
merchantapiService, err := merchantapi.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)merchantapiService, err := merchantapi.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type AccountsMerchantReviewsDeleteCall
- func (c *AccountsMerchantReviewsDeleteCall) Context(ctx context.Context) *AccountsMerchantReviewsDeleteCall
- func (c *AccountsMerchantReviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsMerchantReviewsDeleteCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsDeleteCall
- func (c *AccountsMerchantReviewsDeleteCall) Header() http.Header
- type AccountsMerchantReviewsGetCall
- func (c *AccountsMerchantReviewsGetCall) Context(ctx context.Context) *AccountsMerchantReviewsGetCall
- func (c *AccountsMerchantReviewsGetCall) Do(opts ...googleapi.CallOption) (*MerchantReview, error)
- func (c *AccountsMerchantReviewsGetCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsGetCall
- func (c *AccountsMerchantReviewsGetCall) Header() http.Header
- func (c *AccountsMerchantReviewsGetCall) IfNoneMatch(entityTag string) *AccountsMerchantReviewsGetCall
- type AccountsMerchantReviewsInsertCall
- func (c *AccountsMerchantReviewsInsertCall) Context(ctx context.Context) *AccountsMerchantReviewsInsertCall
- func (c *AccountsMerchantReviewsInsertCall) DataSource(dataSource string) *AccountsMerchantReviewsInsertCall
- func (c *AccountsMerchantReviewsInsertCall) Do(opts ...googleapi.CallOption) (*MerchantReview, error)
- func (c *AccountsMerchantReviewsInsertCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsInsertCall
- func (c *AccountsMerchantReviewsInsertCall) Header() http.Header
- type AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) Context(ctx context.Context) *AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) Do(opts ...googleapi.CallOption) (*ListMerchantReviewsResponse, error)
- func (c *AccountsMerchantReviewsListCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) Header() http.Header
- func (c *AccountsMerchantReviewsListCall) IfNoneMatch(entityTag string) *AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) PageSize(pageSize int64) *AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) PageToken(pageToken string) *AccountsMerchantReviewsListCall
- func (c *AccountsMerchantReviewsListCall) Pages(ctx context.Context, f func(*ListMerchantReviewsResponse) error) error
- type AccountsMerchantReviewsService
- func (r *AccountsMerchantReviewsService) Delete(name string) *AccountsMerchantReviewsDeleteCall
- func (r *AccountsMerchantReviewsService) Get(name string) *AccountsMerchantReviewsGetCall
- func (r *AccountsMerchantReviewsService) Insert(parent string, merchantreview *MerchantReview) *AccountsMerchantReviewsInsertCall
- func (r *AccountsMerchantReviewsService) List(parent string) *AccountsMerchantReviewsListCall
- type AccountsProductReviewsDeleteCall
- func (c *AccountsProductReviewsDeleteCall) Context(ctx context.Context) *AccountsProductReviewsDeleteCall
- func (c *AccountsProductReviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsProductReviewsDeleteCall) Fields(s ...googleapi.Field) *AccountsProductReviewsDeleteCall
- func (c *AccountsProductReviewsDeleteCall) Header() http.Header
- type AccountsProductReviewsGetCall
- func (c *AccountsProductReviewsGetCall) Context(ctx context.Context) *AccountsProductReviewsGetCall
- func (c *AccountsProductReviewsGetCall) Do(opts ...googleapi.CallOption) (*ProductReview, error)
- func (c *AccountsProductReviewsGetCall) Fields(s ...googleapi.Field) *AccountsProductReviewsGetCall
- func (c *AccountsProductReviewsGetCall) Header() http.Header
- func (c *AccountsProductReviewsGetCall) IfNoneMatch(entityTag string) *AccountsProductReviewsGetCall
- type AccountsProductReviewsInsertCall
- func (c *AccountsProductReviewsInsertCall) Context(ctx context.Context) *AccountsProductReviewsInsertCall
- func (c *AccountsProductReviewsInsertCall) DataSource(dataSource string) *AccountsProductReviewsInsertCall
- func (c *AccountsProductReviewsInsertCall) Do(opts ...googleapi.CallOption) (*ProductReview, error)
- func (c *AccountsProductReviewsInsertCall) Fields(s ...googleapi.Field) *AccountsProductReviewsInsertCall
- func (c *AccountsProductReviewsInsertCall) Header() http.Header
- type AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) Context(ctx context.Context) *AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) Do(opts ...googleapi.CallOption) (*ListProductReviewsResponse, error)
- func (c *AccountsProductReviewsListCall) Fields(s ...googleapi.Field) *AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) Header() http.Header
- func (c *AccountsProductReviewsListCall) IfNoneMatch(entityTag string) *AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) PageSize(pageSize int64) *AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) PageToken(pageToken string) *AccountsProductReviewsListCall
- func (c *AccountsProductReviewsListCall) Pages(ctx context.Context, f func(*ListProductReviewsResponse) error) error
- type AccountsProductReviewsService
- func (r *AccountsProductReviewsService) Delete(name string) *AccountsProductReviewsDeleteCall
- func (r *AccountsProductReviewsService) Get(name string) *AccountsProductReviewsGetCall
- func (r *AccountsProductReviewsService) Insert(parent string, productreview *ProductReview) *AccountsProductReviewsInsertCall
- func (r *AccountsProductReviewsService) List(parent string) *AccountsProductReviewsListCall
- type AccountsService
- type CustomAttribute
- type Empty
- type ListMerchantReviewsResponse
- type ListProductReviewsResponse
- type MerchantReview
- type MerchantReviewAttributes
- type MerchantReviewDestinationStatus
- type MerchantReviewItemLevelIssue
- type MerchantReviewStatus
- type ProductChange
- type ProductReview
- type ProductReviewAttributes
- type ProductReviewDestinationStatus
- type ProductReviewItemLevelIssue
- type ProductReviewStatus
- type ProductStatusChangeMessage
- type ReviewLink
- type Service
Constants¶
const (// Manage your product listings and accounts for Google ShoppingContentScope = "https://www.googleapis.com/auth/content")OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAccountsMerchantReviewsDeleteCall¶
type AccountsMerchantReviewsDeleteCall struct {// contains filtered or unexported fields}func (*AccountsMerchantReviewsDeleteCall)Context¶
func (c *AccountsMerchantReviewsDeleteCall) Context(ctxcontext.Context) *AccountsMerchantReviewsDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsMerchantReviewsDeleteCall)Do¶
func (c *AccountsMerchantReviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "merchantapi.accounts.merchantReviews.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsMerchantReviewsDeleteCall)Fields¶
func (c *AccountsMerchantReviewsDeleteCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsMerchantReviewsDeleteCall)Header¶
func (c *AccountsMerchantReviewsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsMerchantReviewsGetCall¶
type AccountsMerchantReviewsGetCall struct {// contains filtered or unexported fields}func (*AccountsMerchantReviewsGetCall)Context¶
func (c *AccountsMerchantReviewsGetCall) Context(ctxcontext.Context) *AccountsMerchantReviewsGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsMerchantReviewsGetCall)Do¶
func (c *AccountsMerchantReviewsGetCall) Do(opts ...googleapi.CallOption) (*MerchantReview,error)
Do executes the "merchantapi.accounts.merchantReviews.get" call.Any non-2xx status code is an error. Response headers are in either*MerchantReview.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsMerchantReviewsGetCall)Fields¶
func (c *AccountsMerchantReviewsGetCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsMerchantReviewsGetCall)Header¶
func (c *AccountsMerchantReviewsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsMerchantReviewsGetCall)IfNoneMatch¶
func (c *AccountsMerchantReviewsGetCall) IfNoneMatch(entityTagstring) *AccountsMerchantReviewsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeAccountsMerchantReviewsInsertCall¶
type AccountsMerchantReviewsInsertCall struct {// contains filtered or unexported fields}func (*AccountsMerchantReviewsInsertCall)Context¶
func (c *AccountsMerchantReviewsInsertCall) Context(ctxcontext.Context) *AccountsMerchantReviewsInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsMerchantReviewsInsertCall)DataSource¶
func (c *AccountsMerchantReviewsInsertCall) DataSource(dataSourcestring) *AccountsMerchantReviewsInsertCall
DataSource sets the optional parameter "dataSource": Required. The datasource of the merchantreview(https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU)Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsMerchantReviewsInsertCall)Do¶
func (c *AccountsMerchantReviewsInsertCall) Do(opts ...googleapi.CallOption) (*MerchantReview,error)
Do executes the "merchantapi.accounts.merchantReviews.insert" call.Any non-2xx status code is an error. Response headers are in either*MerchantReview.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsMerchantReviewsInsertCall)Fields¶
func (c *AccountsMerchantReviewsInsertCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsMerchantReviewsInsertCall)Header¶
func (c *AccountsMerchantReviewsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsMerchantReviewsListCall¶
type AccountsMerchantReviewsListCall struct {// contains filtered or unexported fields}func (*AccountsMerchantReviewsListCall)Context¶
func (c *AccountsMerchantReviewsListCall) Context(ctxcontext.Context) *AccountsMerchantReviewsListCall
Context sets the context to be used in this call's Do method.
func (*AccountsMerchantReviewsListCall)Do¶
func (c *AccountsMerchantReviewsListCall) Do(opts ...googleapi.CallOption) (*ListMerchantReviewsResponse,error)
Do executes the "merchantapi.accounts.merchantReviews.list" call.Any non-2xx status code is an error. Response headers are in either*ListMerchantReviewsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*AccountsMerchantReviewsListCall)Fields¶
func (c *AccountsMerchantReviewsListCall) Fields(s ...googleapi.Field) *AccountsMerchantReviewsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsMerchantReviewsListCall)Header¶
func (c *AccountsMerchantReviewsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsMerchantReviewsListCall)IfNoneMatch¶
func (c *AccountsMerchantReviewsListCall) IfNoneMatch(entityTagstring) *AccountsMerchantReviewsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*AccountsMerchantReviewsListCall)PageSize¶
func (c *AccountsMerchantReviewsListCall) PageSize(pageSizeint64) *AccountsMerchantReviewsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofmerchant reviews to return. The service can return fewer than this value.The maximum value is 1000; values above 1000 are coerced to 1000. Ifunspecified, the maximum number of reviews is returned.
func (*AccountsMerchantReviewsListCall)PageToken¶
func (c *AccountsMerchantReviewsListCall) PageToken(pageTokenstring) *AccountsMerchantReviewsListCall
PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListMerchantReviews` call. Provide this to retrieve thesubsequent page. When paginating, all other parameters provided to`ListMerchantReviews` must match the call that provided the page token.
func (*AccountsMerchantReviewsListCall)Pages¶
func (c *AccountsMerchantReviewsListCall) Pages(ctxcontext.Context, f func(*ListMerchantReviewsResponse)error)error
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.
typeAccountsMerchantReviewsService¶
type AccountsMerchantReviewsService struct {// contains filtered or unexported fields}funcNewAccountsMerchantReviewsService¶
func NewAccountsMerchantReviewsService(s *Service) *AccountsMerchantReviewsService
func (*AccountsMerchantReviewsService)Delete¶
func (r *AccountsMerchantReviewsService) Delete(namestring) *AccountsMerchantReviewsDeleteCall
Delete: Deletes merchant review.
- name: The ID of the merchant review. Format:accounts/{account}/merchantReviews/{merchantReview}.
func (*AccountsMerchantReviewsService)Get¶
func (r *AccountsMerchantReviewsService) Get(namestring) *AccountsMerchantReviewsGetCall
Get: Gets a merchant review.
- name: The ID of the merchant review. Format:accounts/{account}/merchantReviews/{merchantReview}.
func (*AccountsMerchantReviewsService)Insert¶
func (r *AccountsMerchantReviewsService) Insert(parentstring, merchantreview *MerchantReview) *AccountsMerchantReviewsInsertCall
Insert: Inserts a review for your Merchant Center account. If the reviewalready exists, then the review is replaced with the new instance.
- parent: The account where the merchant review will be inserted. Format:accounts/{account}.
func (*AccountsMerchantReviewsService)List¶
func (r *AccountsMerchantReviewsService) List(parentstring) *AccountsMerchantReviewsListCall
List: Lists merchant reviews.
- parent: The account to list merchant reviews for. Format:accounts/{account}.
typeAccountsProductReviewsDeleteCall¶
type AccountsProductReviewsDeleteCall struct {// contains filtered or unexported fields}func (*AccountsProductReviewsDeleteCall)Context¶
func (c *AccountsProductReviewsDeleteCall) Context(ctxcontext.Context) *AccountsProductReviewsDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductReviewsDeleteCall)Do¶
func (c *AccountsProductReviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "merchantapi.accounts.productReviews.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsProductReviewsDeleteCall)Fields¶
func (c *AccountsProductReviewsDeleteCall) Fields(s ...googleapi.Field) *AccountsProductReviewsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsProductReviewsDeleteCall)Header¶
func (c *AccountsProductReviewsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsProductReviewsGetCall¶
type AccountsProductReviewsGetCall struct {// contains filtered or unexported fields}func (*AccountsProductReviewsGetCall)Context¶
func (c *AccountsProductReviewsGetCall) Context(ctxcontext.Context) *AccountsProductReviewsGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductReviewsGetCall)Do¶
func (c *AccountsProductReviewsGetCall) Do(opts ...googleapi.CallOption) (*ProductReview,error)
Do executes the "merchantapi.accounts.productReviews.get" call.Any non-2xx status code is an error. Response headers are in either*ProductReview.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsProductReviewsGetCall)Fields¶
func (c *AccountsProductReviewsGetCall) Fields(s ...googleapi.Field) *AccountsProductReviewsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsProductReviewsGetCall)Header¶
func (c *AccountsProductReviewsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsProductReviewsGetCall)IfNoneMatch¶
func (c *AccountsProductReviewsGetCall) IfNoneMatch(entityTagstring) *AccountsProductReviewsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeAccountsProductReviewsInsertCall¶
type AccountsProductReviewsInsertCall struct {// contains filtered or unexported fields}func (*AccountsProductReviewsInsertCall)Context¶
func (c *AccountsProductReviewsInsertCall) Context(ctxcontext.Context) *AccountsProductReviewsInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductReviewsInsertCall)DataSource¶
func (c *AccountsProductReviewsInsertCall) DataSource(dataSourcestring) *AccountsProductReviewsInsertCall
DataSource sets the optional parameter "dataSource": Required. Format:`accounts/{account}/dataSources/{datasource}`.
func (*AccountsProductReviewsInsertCall)Do¶
func (c *AccountsProductReviewsInsertCall) Do(opts ...googleapi.CallOption) (*ProductReview,error)
Do executes the "merchantapi.accounts.productReviews.insert" call.Any non-2xx status code is an error. Response headers are in either*ProductReview.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AccountsProductReviewsInsertCall)Fields¶
func (c *AccountsProductReviewsInsertCall) Fields(s ...googleapi.Field) *AccountsProductReviewsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsProductReviewsInsertCall)Header¶
func (c *AccountsProductReviewsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsProductReviewsListCall¶
type AccountsProductReviewsListCall struct {// contains filtered or unexported fields}func (*AccountsProductReviewsListCall)Context¶
func (c *AccountsProductReviewsListCall) Context(ctxcontext.Context) *AccountsProductReviewsListCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductReviewsListCall)Do¶
func (c *AccountsProductReviewsListCall) Do(opts ...googleapi.CallOption) (*ListProductReviewsResponse,error)
Do executes the "merchantapi.accounts.productReviews.list" call.Any non-2xx status code is an error. Response headers are in either*ListProductReviewsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*AccountsProductReviewsListCall)Fields¶
func (c *AccountsProductReviewsListCall) Fields(s ...googleapi.Field) *AccountsProductReviewsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsProductReviewsListCall)Header¶
func (c *AccountsProductReviewsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsProductReviewsListCall)IfNoneMatch¶
func (c *AccountsProductReviewsListCall) IfNoneMatch(entityTagstring) *AccountsProductReviewsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*AccountsProductReviewsListCall)PageSize¶
func (c *AccountsProductReviewsListCall) PageSize(pageSizeint64) *AccountsProductReviewsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofproducts to return. The service may return fewer than this value.
func (*AccountsProductReviewsListCall)PageToken¶
func (c *AccountsProductReviewsListCall) PageToken(pageTokenstring) *AccountsProductReviewsListCall
PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListProductReviews` call. Provide this to retrieve thesubsequent page. When paginating, all other parameters provided to`ListProductReviews` must match the call that provided the page token.
func (*AccountsProductReviewsListCall)Pages¶
func (c *AccountsProductReviewsListCall) Pages(ctxcontext.Context, f func(*ListProductReviewsResponse)error)error
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.
typeAccountsProductReviewsService¶
type AccountsProductReviewsService struct {// contains filtered or unexported fields}funcNewAccountsProductReviewsService¶
func NewAccountsProductReviewsService(s *Service) *AccountsProductReviewsService
func (*AccountsProductReviewsService)Delete¶
func (r *AccountsProductReviewsService) Delete(namestring) *AccountsProductReviewsDeleteCall
Delete: Deletes a product review.
- name: The ID of the Product review. Format:accounts/{account}/productReviews/{productReview}.
func (*AccountsProductReviewsService)Get¶
func (r *AccountsProductReviewsService) Get(namestring) *AccountsProductReviewsGetCall
Get: Gets a product review.
- name: The ID of the merchant review. Format:accounts/{account}/productReviews/{productReview}.
func (*AccountsProductReviewsService)Insert¶
func (r *AccountsProductReviewsService) Insert(parentstring, productreview *ProductReview) *AccountsProductReviewsInsertCall
Insert: Inserts a product review.
- parent: The account where the product review will be inserted. Format:accounts/{account}.
func (*AccountsProductReviewsService)List¶
func (r *AccountsProductReviewsService) List(parentstring) *AccountsProductReviewsListCall
List: Lists product reviews.
- parent: The account to list product reviews for. Format:accounts/{account}.
typeAccountsService¶
type AccountsService struct {MerchantReviews *AccountsMerchantReviewsServiceProductReviews *AccountsProductReviewsService// contains filtered or unexported fields}funcNewAccountsService¶
func NewAccountsService(s *Service) *AccountsService
typeCustomAttribute¶
type CustomAttribute struct {// GroupValues: Subattributes within this attribute group. If `group_values` is// not empty, `value` must be empty.GroupValues []*CustomAttribute `json:"groupValues,omitempty"`// Name: The name of the attribute.Namestring `json:"name,omitempty"`// Value: The value of the attribute. If `value` is not empty, `group_values`// must be empty.Valuestring `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "GroupValues") 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. "GroupValues") 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:"-"`}CustomAttribute: A message that represents custom attributes. Exactly one of`value` or `group_values` must not be empty.
func (CustomAttribute)MarshalJSON¶
func (sCustomAttribute) MarshalJSON() ([]byte,error)
typeEmpty¶
type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
typeListMerchantReviewsResponse¶
type ListMerchantReviewsResponse struct {// MerchantReviews: The merchant review.MerchantReviews []*MerchantReview `json:"merchantReviews,omitempty"`// NextPageToken: The token to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "MerchantReviews") 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. "MerchantReviews") 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:"-"`}ListMerchantReviewsResponse: Response message for the `ListMerchantsReview`method.
func (ListMerchantReviewsResponse)MarshalJSON¶
func (sListMerchantReviewsResponse) MarshalJSON() ([]byte,error)
typeListProductReviewsResponse¶
type ListProductReviewsResponse struct {// NextPageToken: A token, which can be sent as `page_token` to retrieve the// next page. If this field is omitted, there are no subsequent pages.NextPageTokenstring `json:"nextPageToken,omitempty"`// ProductReviews: The product review.ProductReviews []*ProductReview `json:"productReviews,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:"-"`}ListProductReviewsResponse: response message for the ListProductReviewsmethod.
func (ListProductReviewsResponse)MarshalJSON¶
func (sListProductReviewsResponse) MarshalJSON() ([]byte,error)
typeMerchantReview¶
type MerchantReview struct {// CustomAttributes: Optional. A list of custom (merchant-provided) attributes.// It can also be used for submitting any attribute of the data specification// in its generic form (for example, `{ "name": "size type", "value": "regular"// }`). This is useful for submitting attributes not explicitly exposed by the// API, such as experimental attributes. Maximum allowed number of characters// for each custom attribute is 10240 (represents sum of characters for name// and value). Maximum 2500 custom attributes can be set per product, with// total size of 102.4kB. Underscores in custom attribute names are replaced by// spaces upon insertion.CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"`// DataSource: Output only. The primary data source of the merchant review.DataSourcestring `json:"dataSource,omitempty"`// MerchantReviewAttributes: Optional. A list of merchant review attributes.MerchantReviewAttributes *MerchantReviewAttributes `json:"merchantReviewAttributes,omitempty"`// MerchantReviewId: Required. The user provided merchant review ID to uniquely// identify the merchant review.MerchantReviewIdstring `json:"merchantReviewId,omitempty"`// MerchantReviewStatus: Output only. The status of a merchant review, data// validation issues, that is, information about a merchant review computed// asynchronously.MerchantReviewStatus *MerchantReviewStatus `json:"merchantReviewStatus,omitempty"`// Name: Identifier. The name of the merchant review. Format:// "{merchantreview.name=accounts/{account}/merchantReviews/{merchantReview}}"Namestring `json:"name,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CustomAttributes") 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. "CustomAttributes") 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:"-"`}MerchantReview: A review for a merchant. For more information, seeIntroduction to Merchant Review Feeds(https://developers.google.com/merchant-review-feeds)
func (MerchantReview)MarshalJSON¶
func (sMerchantReview) MarshalJSON() ([]byte,error)
typeMerchantReviewAttributes¶
type MerchantReviewAttributes struct {// CollectionMethod: Optional. The method used to collect the review.//// Possible values:// "COLLECTION_METHOD_UNSPECIFIED" - Collection method unspecified.// "MERCHANT_UNSOLICITED" - The user was not responding to a specific// solicitation when they submitted the review.// "POINT_OF_SALE" - The user submitted the review in response to a// solicitation when the user placed an order.// "AFTER_FULFILLMENT" - The user submitted the review in response to a// solicitation after fulfillment of the user's order.CollectionMethodstring `json:"collectionMethod,omitempty"`// Content: Required. This should be any freeform text provided by the user and// should not be truncated. If multiple responses to different questions are// provided, all responses should be included, with the minimal context for the// responses to make sense. Context should not be provided if questions were// left unanswered.Contentstring `json:"content,omitempty"`// IsAnonymous: Optional. Set to true if the reviewer should remain anonymous.IsAnonymousbool `json:"isAnonymous,omitempty"`// MaxRating: Optional. The maximum possible number for the rating. The value// of the max rating must be greater than the value of the min rating.MaxRatingint64 `json:"maxRating,omitempty,string"`// MerchantDisplayName: Optional. Human-readable display name for the merchant.MerchantDisplayNamestring `json:"merchantDisplayName,omitempty"`// MerchantId: Required. Must be unique and stable across all requests. In// other words, if a request today and another 90 days ago refer to the same// merchant, they must have the same id.MerchantIdstring `json:"merchantId,omitempty"`// MerchantLink: Optional. URL to the merchant's main website. Do not use a// redirect URL for this value. In other words, the value should point directly// to the merchant's site.MerchantLinkstring `json:"merchantLink,omitempty"`// MerchantRatingLink: Optional. URL to the landing page that hosts the reviews// for this merchant. Do not use a redirect URL.MerchantRatingLinkstring `json:"merchantRatingLink,omitempty"`// MinRating: Optional. The minimum possible number for the rating. This should// be the worst possible rating and should not be a value for no rating.MinRatingint64 `json:"minRating,omitempty,string"`// Rating: Optional. The reviewer's overall rating of the merchant.Ratingfloat64 `json:"rating,omitempty"`// ReviewCountry: Optional. The country where the reviewer made the order// defined by ISO 3166-1 Alpha-2 Country Code.ReviewCountrystring `json:"reviewCountry,omitempty"`// ReviewLanguage: Optional. The language of the review defined by BCP-47// language code.ReviewLanguagestring `json:"reviewLanguage,omitempty"`// ReviewTime: Required. The timestamp indicating when the review was written.ReviewTimestring `json:"reviewTime,omitempty"`// ReviewerId: Optional. A permanent, unique identifier for the author of the// review in the publisher's system.ReviewerIdstring `json:"reviewerId,omitempty"`// ReviewerUsername: Optional. Display name of the review author.ReviewerUsernamestring `json:"reviewerUsername,omitempty"`// Title: Optional. The title of the review.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "CollectionMethod") 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. "CollectionMethod") 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:"-"`}MerchantReviewAttributes: Attributes.
func (MerchantReviewAttributes)MarshalJSON¶
func (sMerchantReviewAttributes) MarshalJSON() ([]byte,error)
func (*MerchantReviewAttributes)UnmarshalJSON¶
func (s *MerchantReviewAttributes) UnmarshalJSON(data []byte)error
typeMerchantReviewDestinationStatus¶
type MerchantReviewDestinationStatus struct {// ReportingContext: Output only. The name of the reporting context.//// Possible values:// "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.// "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).// "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).// "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).// "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).// "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).// "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).// "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).// "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).// "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).// "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).// "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).// "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).// "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).// "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).// "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).// "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "ReportingContext") 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. "ReportingContext") 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:"-"`}MerchantReviewDestinationStatus: The destination status of the merchantreview status.
func (MerchantReviewDestinationStatus)MarshalJSON¶
func (sMerchantReviewDestinationStatus) MarshalJSON() ([]byte,error)
typeMerchantReviewItemLevelIssue¶
type MerchantReviewItemLevelIssue struct {// Attribute: Output only. The attribute's name, if the issue is caused by a// single attribute.Attributestring `json:"attribute,omitempty"`// Code: Output only. The error code of the issue.Codestring `json:"code,omitempty"`// Description: Output only. A short issue description in English.Descriptionstring `json:"description,omitempty"`// Detail: Output only. A detailed issue description in English.Detailstring `json:"detail,omitempty"`// Documentation: Output only. The URL of a web page to help with resolving// this issue.Documentationstring `json:"documentation,omitempty"`// ReportingContext: Output only. The reporting context the issue applies to.//// Possible values:// "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.// "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).// "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).// "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).// "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).// "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).// "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).// "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).// "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).// "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).// "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).// "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).// "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).// "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).// "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).// "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).// "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// Resolution: Output only. Whether the issue can be resolved by the merchant.Resolutionstring `json:"resolution,omitempty"`// Severity: Output only. How this issue affects serving of the merchant// review.//// Possible values:// "SEVERITY_UNSPECIFIED" - Not specified.// "NOT_IMPACTED" - This issue represents a warning and does not have a// direct affect on the merchant review.// "DISAPPROVED" - Issue disapproves the merchant review.Severitystring `json:"severity,omitempty"`// ForceSendFields is a list of field names (e.g. "Attribute") 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. "Attribute") 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:"-"`}MerchantReviewItemLevelIssue: The ItemLevelIssue of the merchant reviewstatus.
func (MerchantReviewItemLevelIssue)MarshalJSON¶
func (sMerchantReviewItemLevelIssue) MarshalJSON() ([]byte,error)
typeMerchantReviewStatus¶
type MerchantReviewStatus struct {// CreateTime: Output only. Date on which the item has been created, in ISO// 8601 (http://en.wikipedia.org/wiki/ISO_8601) format.CreateTimestring `json:"createTime,omitempty"`// DestinationStatuses: Output only. The intended destinations for the merchant// review.DestinationStatuses []*MerchantReviewDestinationStatus `json:"destinationStatuses,omitempty"`// ItemLevelIssues: Output only. A list of all issues associated with the// merchant review.ItemLevelIssues []*MerchantReviewItemLevelIssue `json:"itemLevelIssues,omitempty"`// LastUpdateTime: Output only. Date on which the item has been last updated,// in ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format.LastUpdateTimestring `json:"lastUpdateTime,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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:"-"`}MerchantReviewStatus: The status of a merchant review, data validationissues, that is, information about a merchant review computedasynchronously.
func (MerchantReviewStatus)MarshalJSON¶
func (sMerchantReviewStatus) MarshalJSON() ([]byte,error)
typeProductChange¶
type ProductChange struct {// NewValue: The new value of the changed resource or attribute. If empty, it// means that the product was deleted. Will have one of these values :// (`approved`, `pending`, `disapproved`, “)NewValuestring `json:"newValue,omitempty"`// OldValue: The old value of the changed resource or attribute. If empty, it// means that the product was created. Will have one of these values :// (`approved`, `pending`, `disapproved`, “)OldValuestring `json:"oldValue,omitempty"`// RegionCode: Countries that have the change (if applicable). Represented in// the ISO 3166 format.RegionCodestring `json:"regionCode,omitempty"`// ReportingContext: Reporting contexts that have the change (if applicable).// Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`,// `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum// value ReportingContextEnum// (/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)//// Possible values:// "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.// "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).// "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).// "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).// "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).// "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).// "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).// "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).// "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).// "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).// "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).// "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).// "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).// "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).// "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).// "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).// "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "NewValue") 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. "NewValue") 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:"-"`}ProductChange: The change that happened to the product including old value,new value, country code as the region code and reporting context.
func (ProductChange)MarshalJSON¶
func (sProductChange) MarshalJSON() ([]byte,error)
typeProductReview¶
type ProductReview struct {// CustomAttributes: Optional. A list of custom (merchant-provided) attributes.CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"`// DataSource: Output only. The primary data source of the product review.DataSourcestring `json:"dataSource,omitempty"`// Name: Identifier. The name of the product review. Format:// "{productreview.name=accounts/{account}/productReviews/{productReview}}"Namestring `json:"name,omitempty"`// ProductReviewAttributes: Optional. A list of product review attributes.ProductReviewAttributes *ProductReviewAttributes `json:"productReviewAttributes,omitempty"`// ProductReviewId: Required. The permanent, unique identifier for the product// review in the publisher’s system.ProductReviewIdstring `json:"productReviewId,omitempty"`// ProductReviewStatus: Output only. The status of a product review, data// validation issues, that is, information about a product review computed// asynchronously.ProductReviewStatus *ProductReviewStatus `json:"productReviewStatus,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CustomAttributes") 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. "CustomAttributes") 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:"-"`}ProductReview: A review for a product. For more information, seeIntroduction to Product Review Feeds(https://developers.google.com/product-review-feeds)
func (ProductReview)MarshalJSON¶
func (sProductReview) MarshalJSON() ([]byte,error)
typeProductReviewAttributes¶
type ProductReviewAttributes struct {// AggregatorName: Optional. The name of the aggregator of the product reviews.// A publisher may use a reviews aggregator to manage reviews and provide the// feeds. This element indicates the use of an aggregator and contains// information about the aggregator.AggregatorNamestring `json:"aggregatorName,omitempty"`// Asins: Optional. Contains ASINs (Amazon Standard Identification Numbers)// associated with a product.Asins []string `json:"asins,omitempty"`// Brands: Optional. Contains brand names associated with a product.Brands []string `json:"brands,omitempty"`// CollectionMethod: Optional. The method used to collect the review.//// Possible values:// "COLLECTION_METHOD_UNSPECIFIED" - Collection method unspecified.// "UNSOLICITED" - The user was not responding to a specific solicitation// when they submitted the review.// "POST_FULFILLMENT" - The user submitted the review in response to a// solicitation after fulfillment of the user's order.CollectionMethodstring `json:"collectionMethod,omitempty"`// Cons: Optional. Contains the disadvantages based on the opinion of the// reviewer. Omit boilerplate text like "con:" unless it was written by the// reviewer.Cons []string `json:"cons,omitempty"`// Content: Optional. The content of the review. If empty, the content might// still get populated from pros and cons.Contentstring `json:"content,omitempty"`// Gtins: Optional. Contains GTINs (global trade item numbers) associated with// a product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.Gtins []string `json:"gtins,omitempty"`// IsIncentivizedReview: Optional. Indicates whether the review is// incentivized.IsIncentivizedReviewbool `json:"isIncentivizedReview,omitempty"`// IsSpam: Optional. Indicates whether the review is marked as spam in the// publisher's system.IsSpambool `json:"isSpam,omitempty"`// IsVerifiedPurchase: Optional. Indicates whether the reviewer's purchase is// verified.IsVerifiedPurchasebool `json:"isVerifiedPurchase,omitempty"`// MaxRating: Optional. The maximum possible number for the rating. The value// of the max rating must be greater than the value of the min attribute.MaxRatingint64 `json:"maxRating,omitempty,string"`// MinRating: Optional. Contains the ratings associated with the review. The// minimum possible number for the rating. This should be the worst possible// rating and should not be a value for no rating.MinRatingint64 `json:"minRating,omitempty,string"`// Mpns: Optional. Contains MPNs (manufacturer part numbers) associated with a// product.Mpns []string `json:"mpns,omitempty"`// ProductLinks: Optional. The URI of the product. This URI can have the same// value as the `review_link` element, if the review URI and the product URI// are the same.ProductLinks []string `json:"productLinks,omitempty"`// ProductNames: Optional. Descriptive name of a product.ProductNames []string `json:"productNames,omitempty"`// Pros: Optional. Contains the advantages based on the opinion of the// reviewer. Omit boilerplate text like "pro:" unless it was written by the// reviewer.Pros []string `json:"pros,omitempty"`// PublisherFavicon: Optional. A link to the company favicon of the publisher.// The image dimensions should be favicon size: 16x16 pixels. The image format// should be GIF, JPG or PNG.PublisherFaviconstring `json:"publisherFavicon,omitempty"`// PublisherName: Optional. The name of the publisher of the product reviews.// The information about the publisher, which may be a retailer, manufacturer,// reviews service company, or any entity that publishes product reviews.PublisherNamestring `json:"publisherName,omitempty"`// Rating: Optional. The reviewer's overall rating of the product.Ratingfloat64 `json:"rating,omitempty"`// ReviewCountry: Optional. The country of the review defined by ISO 3166-1// Alpha-2 Country Code.ReviewCountrystring `json:"reviewCountry,omitempty"`// ReviewLanguage: Optional. The language of the review defined by BCP-47// language code.ReviewLanguagestring `json:"reviewLanguage,omitempty"`// ReviewLink: Optional. The URI of the review landing page.ReviewLink *ReviewLink `json:"reviewLink,omitempty"`// ReviewTime: Required. The timestamp indicating when the review was written.ReviewTimestring `json:"reviewTime,omitempty"`// ReviewerId: Optional. The author of the product review. A permanent, unique// identifier for the author of the review in the publisher's system.ReviewerIdstring `json:"reviewerId,omitempty"`// ReviewerImageLinks: Optional. A URI to an image of the reviewed product// created by the review author. The URI does not have to end with an image// file extension.ReviewerImageLinks []string `json:"reviewerImageLinks,omitempty"`// ReviewerIsAnonymous: Optional. Set to true if the reviewer should remain// anonymous.ReviewerIsAnonymousbool `json:"reviewerIsAnonymous,omitempty"`// ReviewerUsername: Optional. The name of the reviewer of the product review.ReviewerUsernamestring `json:"reviewerUsername,omitempty"`// Skus: Optional. Contains SKUs (stock keeping units) associated with a// product. Often this matches the product Offer Id in the product feed.Skus []string `json:"skus,omitempty"`// SubclientName: Optional. The name of the subclient of the product reviews.// The subclient is an identifier of the product review source. It should be// equivalent to the directory provided in the file data source path.SubclientNamestring `json:"subclientName,omitempty"`// Title: Optional. The title of the review.Titlestring `json:"title,omitempty"`// TransactionId: Optional. A permanent, unique identifier for the transaction// associated with the review in the publisher's system. This ID can be used to// indicate that multiple reviews are associated with the same transaction.TransactionIdstring `json:"transactionId,omitempty"`// ForceSendFields is a list of field names (e.g. "AggregatorName") 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. "AggregatorName") 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:"-"`}ProductReviewAttributes: Attributes.
func (ProductReviewAttributes)MarshalJSON¶
func (sProductReviewAttributes) MarshalJSON() ([]byte,error)
func (*ProductReviewAttributes)UnmarshalJSON¶
func (s *ProductReviewAttributes) UnmarshalJSON(data []byte)error
typeProductReviewDestinationStatus¶
type ProductReviewDestinationStatus struct {// ReportingContext: Output only. The name of the reporting context.//// Possible values:// "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.// "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).// "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).// "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).// "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).// "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).// "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).// "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).// "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).// "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).// "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).// "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).// "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).// "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).// "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).// "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).// "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "ReportingContext") 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. "ReportingContext") 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:"-"`}ProductReviewDestinationStatus: The destination status of the product reviewstatus.
func (ProductReviewDestinationStatus)MarshalJSON¶
func (sProductReviewDestinationStatus) MarshalJSON() ([]byte,error)
typeProductReviewItemLevelIssue¶
type ProductReviewItemLevelIssue struct {// Attribute: Output only. The attribute's name, if the issue is caused by a// single attribute.Attributestring `json:"attribute,omitempty"`// Code: Output only. The error code of the issue.Codestring `json:"code,omitempty"`// Description: Output only. A short issue description in English.Descriptionstring `json:"description,omitempty"`// Detail: Output only. A detailed issue description in English.Detailstring `json:"detail,omitempty"`// Documentation: Output only. The URL of a web page to help with resolving// this issue.Documentationstring `json:"documentation,omitempty"`// ReportingContext: Output only. The reporting context the issue applies to.//// Possible values:// "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.// "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).// "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).// "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).// "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).// "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).// "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).// "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).// "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).// "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).// "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).// "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).// "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).// "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).// "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).// "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).// "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).// "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// Resolution: Output only. Whether the issue can be resolved by the merchant.Resolutionstring `json:"resolution,omitempty"`// Severity: Output only. How this issue affects serving of the product review.//// Possible values:// "SEVERITY_UNSPECIFIED" - Not specified.// "NOT_IMPACTED" - This issue represents a warning and does not have a// direct affect on the product review.// "DISAPPROVED" - Issue disapproves the product review.Severitystring `json:"severity,omitempty"`// ForceSendFields is a list of field names (e.g. "Attribute") 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. "Attribute") 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:"-"`}ProductReviewItemLevelIssue: The ItemLevelIssue of the product reviewstatus.
func (ProductReviewItemLevelIssue)MarshalJSON¶
func (sProductReviewItemLevelIssue) MarshalJSON() ([]byte,error)
typeProductReviewStatus¶
type ProductReviewStatus struct {// CreateTime: Output only. Date on which the item has been created, in ISO// 8601 (http://en.wikipedia.org/wiki/ISO_8601) format.CreateTimestring `json:"createTime,omitempty"`// DestinationStatuses: Output only. The intended destinations for the product// review.DestinationStatuses []*ProductReviewDestinationStatus `json:"destinationStatuses,omitempty"`// ItemLevelIssues: Output only. A list of all issues associated with the// product review.ItemLevelIssues []*ProductReviewItemLevelIssue `json:"itemLevelIssues,omitempty"`// LastUpdateTime: Output only. Date on which the item has been last updated,// in ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format.LastUpdateTimestring `json:"lastUpdateTime,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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:"-"`}ProductReviewStatus: Product review status.
func (ProductReviewStatus)MarshalJSON¶
func (sProductReviewStatus) MarshalJSON() ([]byte,error)
typeProductStatusChangeMessage¶
type ProductStatusChangeMessage struct {// Account: The target account that owns the entity that changed. Format :// `accounts/{merchant_id}`Accountstring `json:"account,omitempty"`// Attribute: The attribute in the resource that changed, in this case it will// be always `Status`.//// Possible values:// "ATTRIBUTE_UNSPECIFIED" - Unspecified attribute// "STATUS" - Status of the changed entityAttributestring `json:"attribute,omitempty"`// Changes: A message to describe the change that happened to the productChanges []*ProductChange `json:"changes,omitempty"`// EventTime: The time at which the event was generated. If you want to order// the notification messages you receive you should rely on this field not on// the order of receiving the notifications.EventTimestring `json:"eventTime,omitempty"`// ExpirationTime: Optional. The product expiration time. This field will not// be set if the notification is sent for a product deletion event.ExpirationTimestring `json:"expirationTime,omitempty"`// ManagingAccount: The account that manages the merchant's account. can be the// same as merchant id if it is standalone account. Format :// `accounts/{service_provider_id}`ManagingAccountstring `json:"managingAccount,omitempty"`// Resource: The product name. Format: `accounts/{account}/products/{product}`Resourcestring `json:"resource,omitempty"`// ResourceId: The product id.ResourceIdstring `json:"resourceId,omitempty"`// ResourceType: The resource that changed, in this case it will always be// `Product`.//// Possible values:// "RESOURCE_UNSPECIFIED" - Unspecified resource// "PRODUCT" - Resource type : productResourceTypestring `json:"resourceType,omitempty"`// ForceSendFields is a list of field names (e.g. "Account") 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. "Account") 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:"-"`}ProductStatusChangeMessage: The message that the merchant will receive tonotify about product status change event
func (ProductStatusChangeMessage)MarshalJSON¶
func (sProductStatusChangeMessage) MarshalJSON() ([]byte,error)
typeReviewLink¶
type ReviewLink struct {// Link: Optional. The URI of the review landing page. For example:// `http://www.example.com/review_5.html`.Linkstring `json:"link,omitempty"`// Type: Optional. Type of the review URI.//// Possible values:// "TYPE_UNSPECIFIED" - Type unspecified.// "SINGLETON" - The review page contains only this single review.// "GROUP" - The review page contains a group of reviews including this// review.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Link") 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. "Link") 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:"-"`}ReviewLink: The URI of the review landing page.
func (ReviewLink)MarshalJSON¶
func (sReviewLink) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentAccounts *AccountsService// contains filtered or unexported fields} funcNewdeprecated
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.
funcNewService¶
NewService creates a new Service.