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/notifications_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 AccountsNotificationsubscriptionsCreateCall
- func (c *AccountsNotificationsubscriptionsCreateCall) Context(ctx context.Context) *AccountsNotificationsubscriptionsCreateCall
- func (c *AccountsNotificationsubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription, error)
- func (c *AccountsNotificationsubscriptionsCreateCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsCreateCall
- func (c *AccountsNotificationsubscriptionsCreateCall) Header() http.Header
- type AccountsNotificationsubscriptionsDeleteCall
- func (c *AccountsNotificationsubscriptionsDeleteCall) Context(ctx context.Context) *AccountsNotificationsubscriptionsDeleteCall
- func (c *AccountsNotificationsubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsNotificationsubscriptionsDeleteCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsDeleteCall
- func (c *AccountsNotificationsubscriptionsDeleteCall) Header() http.Header
- type AccountsNotificationsubscriptionsGetCall
- func (c *AccountsNotificationsubscriptionsGetCall) Context(ctx context.Context) *AccountsNotificationsubscriptionsGetCall
- func (c *AccountsNotificationsubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription, error)
- func (c *AccountsNotificationsubscriptionsGetCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsGetCall
- func (c *AccountsNotificationsubscriptionsGetCall) Header() http.Header
- func (c *AccountsNotificationsubscriptionsGetCall) IfNoneMatch(entityTag string) *AccountsNotificationsubscriptionsGetCall
- type AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) Context(ctx context.Context) *AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationSubscriptionsResponse, error)
- func (c *AccountsNotificationsubscriptionsListCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) Header() http.Header
- func (c *AccountsNotificationsubscriptionsListCall) IfNoneMatch(entityTag string) *AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) PageSize(pageSize int64) *AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) PageToken(pageToken string) *AccountsNotificationsubscriptionsListCall
- func (c *AccountsNotificationsubscriptionsListCall) Pages(ctx context.Context, f func(*ListNotificationSubscriptionsResponse) error) error
- type AccountsNotificationsubscriptionsPatchCall
- func (c *AccountsNotificationsubscriptionsPatchCall) Context(ctx context.Context) *AccountsNotificationsubscriptionsPatchCall
- func (c *AccountsNotificationsubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription, error)
- func (c *AccountsNotificationsubscriptionsPatchCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsPatchCall
- func (c *AccountsNotificationsubscriptionsPatchCall) Header() http.Header
- func (c *AccountsNotificationsubscriptionsPatchCall) UpdateMask(updateMask string) *AccountsNotificationsubscriptionsPatchCall
- type AccountsNotificationsubscriptionsService
- func (r *AccountsNotificationsubscriptionsService) Create(parent string, notificationsubscription *NotificationSubscription) *AccountsNotificationsubscriptionsCreateCall
- func (r *AccountsNotificationsubscriptionsService) Delete(name string) *AccountsNotificationsubscriptionsDeleteCall
- func (r *AccountsNotificationsubscriptionsService) Get(name string) *AccountsNotificationsubscriptionsGetCall
- func (r *AccountsNotificationsubscriptionsService) List(parent string) *AccountsNotificationsubscriptionsListCall
- func (r *AccountsNotificationsubscriptionsService) Patch(name string, notificationsubscription *NotificationSubscription) *AccountsNotificationsubscriptionsPatchCall
- type AccountsService
- type Empty
- type ListNotificationSubscriptionsResponse
- type NotificationSubscription
- type ProductChange
- type ProductStatusChangeMessage
- 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¶
typeAccountsNotificationsubscriptionsCreateCall¶
type AccountsNotificationsubscriptionsCreateCall struct {// contains filtered or unexported fields}func (*AccountsNotificationsubscriptionsCreateCall)Context¶
func (c *AccountsNotificationsubscriptionsCreateCall) Context(ctxcontext.Context) *AccountsNotificationsubscriptionsCreateCall
Context sets the context to be used in this call's Do method.
func (*AccountsNotificationsubscriptionsCreateCall)Do¶
func (c *AccountsNotificationsubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription,error)
Do executes the "merchantapi.accounts.notificationsubscriptions.create" call.Any non-2xx status code is an error. Response headers are in either*NotificationSubscription.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 (*AccountsNotificationsubscriptionsCreateCall)Fields¶
func (c *AccountsNotificationsubscriptionsCreateCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsNotificationsubscriptionsCreateCall)Header¶
func (c *AccountsNotificationsubscriptionsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsNotificationsubscriptionsDeleteCall¶
type AccountsNotificationsubscriptionsDeleteCall struct {// contains filtered or unexported fields}func (*AccountsNotificationsubscriptionsDeleteCall)Context¶
func (c *AccountsNotificationsubscriptionsDeleteCall) Context(ctxcontext.Context) *AccountsNotificationsubscriptionsDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsNotificationsubscriptionsDeleteCall)Do¶
func (c *AccountsNotificationsubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "merchantapi.accounts.notificationsubscriptions.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 (*AccountsNotificationsubscriptionsDeleteCall)Fields¶
func (c *AccountsNotificationsubscriptionsDeleteCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsNotificationsubscriptionsDeleteCall)Header¶
func (c *AccountsNotificationsubscriptionsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeAccountsNotificationsubscriptionsGetCall¶
type AccountsNotificationsubscriptionsGetCall struct {// contains filtered or unexported fields}func (*AccountsNotificationsubscriptionsGetCall)Context¶
func (c *AccountsNotificationsubscriptionsGetCall) Context(ctxcontext.Context) *AccountsNotificationsubscriptionsGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsNotificationsubscriptionsGetCall)Do¶
func (c *AccountsNotificationsubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription,error)
Do executes the "merchantapi.accounts.notificationsubscriptions.get" call.Any non-2xx status code is an error. Response headers are in either*NotificationSubscription.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 (*AccountsNotificationsubscriptionsGetCall)Fields¶
func (c *AccountsNotificationsubscriptionsGetCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsNotificationsubscriptionsGetCall)Header¶
func (c *AccountsNotificationsubscriptionsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsNotificationsubscriptionsGetCall)IfNoneMatch¶
func (c *AccountsNotificationsubscriptionsGetCall) IfNoneMatch(entityTagstring) *AccountsNotificationsubscriptionsGetCall
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.
typeAccountsNotificationsubscriptionsListCall¶
type AccountsNotificationsubscriptionsListCall struct {// contains filtered or unexported fields}func (*AccountsNotificationsubscriptionsListCall)Context¶
func (c *AccountsNotificationsubscriptionsListCall) Context(ctxcontext.Context) *AccountsNotificationsubscriptionsListCall
Context sets the context to be used in this call's Do method.
func (*AccountsNotificationsubscriptionsListCall)Do¶
func (c *AccountsNotificationsubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationSubscriptionsResponse,error)
Do executes the "merchantapi.accounts.notificationsubscriptions.list" call.Any non-2xx status code is an error. Response headers are in either*ListNotificationSubscriptionsResponse.ServerResponse.Header or (if aresponse was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*AccountsNotificationsubscriptionsListCall)Fields¶
func (c *AccountsNotificationsubscriptionsListCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsNotificationsubscriptionsListCall)Header¶
func (c *AccountsNotificationsubscriptionsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsNotificationsubscriptionsListCall)IfNoneMatch¶
func (c *AccountsNotificationsubscriptionsListCall) IfNoneMatch(entityTagstring) *AccountsNotificationsubscriptionsListCall
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 (*AccountsNotificationsubscriptionsListCall)PageSize¶
func (c *AccountsNotificationsubscriptionsListCall) PageSize(pageSizeint64) *AccountsNotificationsubscriptionsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofnotification subscriptions to return in a page. The default value for`page_size` is 100. The maximum value is `200`. Values above `200` will becoerced to `200`.
func (*AccountsNotificationsubscriptionsListCall)PageToken¶
func (c *AccountsNotificationsubscriptionsListCall) PageToken(pageTokenstring) *AccountsNotificationsubscriptionsListCall
PageToken sets the optional parameter "pageToken": Token (if provided) toretrieve the subsequent page. All other parameters must match the originalcall that provided the page token.
func (*AccountsNotificationsubscriptionsListCall)Pages¶
func (c *AccountsNotificationsubscriptionsListCall) Pages(ctxcontext.Context, f func(*ListNotificationSubscriptionsResponse)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.
typeAccountsNotificationsubscriptionsPatchCall¶
type AccountsNotificationsubscriptionsPatchCall struct {// contains filtered or unexported fields}func (*AccountsNotificationsubscriptionsPatchCall)Context¶
func (c *AccountsNotificationsubscriptionsPatchCall) Context(ctxcontext.Context) *AccountsNotificationsubscriptionsPatchCall
Context sets the context to be used in this call's Do method.
func (*AccountsNotificationsubscriptionsPatchCall)Do¶
func (c *AccountsNotificationsubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationSubscription,error)
Do executes the "merchantapi.accounts.notificationsubscriptions.patch" call.Any non-2xx status code is an error. Response headers are in either*NotificationSubscription.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 (*AccountsNotificationsubscriptionsPatchCall)Fields¶
func (c *AccountsNotificationsubscriptionsPatchCall) Fields(s ...googleapi.Field) *AccountsNotificationsubscriptionsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AccountsNotificationsubscriptionsPatchCall)Header¶
func (c *AccountsNotificationsubscriptionsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AccountsNotificationsubscriptionsPatchCall)UpdateMask¶
func (c *AccountsNotificationsubscriptionsPatchCall) UpdateMask(updateMaskstring) *AccountsNotificationsubscriptionsPatchCall
UpdateMask sets the optional parameter "updateMask": List of fields beingupdated.
typeAccountsNotificationsubscriptionsService¶
type AccountsNotificationsubscriptionsService struct {// contains filtered or unexported fields}funcNewAccountsNotificationsubscriptionsService¶
func NewAccountsNotificationsubscriptionsService(s *Service) *AccountsNotificationsubscriptionsService
func (*AccountsNotificationsubscriptionsService)Create¶
func (r *AccountsNotificationsubscriptionsService) Create(parentstring, notificationsubscription *NotificationSubscription) *AccountsNotificationsubscriptionsCreateCall
Create: Creates a notification subscription for a business. For standaloneor subaccounts accounts, the business can create a subscription for self.For MCAs, the business can create a subscription for all managed accounts orfor a specific subaccount. We will allow the following types of notificationsubscriptions to exist together (per business as a subscriber per eventtype): 1. Subscription for all managed accounts + subscription for self. 2.Multiple "partial" subscriptions for managed accounts + subscription forself. we will not allow (per business as a subscriber per event type): 1.Multiple self subscriptions. 2. Multiple "all managed accounts"subscriptions. 3. "All managed accounts" subscription and partialsubscriptions at the same time. 4. Multiple partial subscriptions for thesame target account.
- parent: The merchant account that owns the new notification subscription.Format: `accounts/{account}`.
func (*AccountsNotificationsubscriptionsService)Delete¶
func (r *AccountsNotificationsubscriptionsService) Delete(namestring) *AccountsNotificationsubscriptionsDeleteCall
Delete: Deletes a notification subscription for a merchant.
- name: The name of the notification subscription to be deleted.
func (*AccountsNotificationsubscriptionsService)Get¶
func (r *AccountsNotificationsubscriptionsService) Get(namestring) *AccountsNotificationsubscriptionsGetCall
Get: Gets notification subscriptions for an account.
- name: The `name` of the notification subscription.
func (*AccountsNotificationsubscriptionsService)List¶
func (r *AccountsNotificationsubscriptionsService) List(parentstring) *AccountsNotificationsubscriptionsListCall
List: Gets all the notification subscriptions for a merchant.
- parent: The merchant account who owns the notification subscriptions.Format: `accounts/{account}`.
func (*AccountsNotificationsubscriptionsService)Patch¶
func (r *AccountsNotificationsubscriptionsService) Patch(namestring, notificationsubscription *NotificationSubscription) *AccountsNotificationsubscriptionsPatchCall
Patch: Updates an existing notification subscription for a merchant.
- name: Output only. The `name` of the notification configuration. Generatedby the Content API upon creation of a new `NotificationSubscription`. The`account` represents the merchant ID of the merchant that owns theconfiguration. Format:`accounts/{account}/notificationsubscriptions/{notification_subscription}`.
typeAccountsService¶
type AccountsService struct {Notificationsubscriptions *AccountsNotificationsubscriptionsService// contains filtered or unexported fields}funcNewAccountsService¶
func NewAccountsService(s *Service) *AccountsService
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); }
typeListNotificationSubscriptionsResponse¶
type ListNotificationSubscriptionsResponse 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"`// NotificationSubscriptions: The list of notification subscriptions requested// by the merchant.NotificationSubscriptions []*NotificationSubscription `json:"notificationSubscriptions,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:"-"`}ListNotificationSubscriptionsResponse: Response message for theListNotificationSubscription method.
func (ListNotificationSubscriptionsResponse)MarshalJSON¶
func (sListNotificationSubscriptionsResponse) MarshalJSON() ([]byte,error)
typeNotificationSubscription¶
type NotificationSubscription struct {// AllManagedAccounts: If this value is true, the requesting account is// notified of the specified event for all managed accounts (can be subaccounts// or other linked accounts) including newly added accounts on a daily basis.AllManagedAccountsbool `json:"allManagedAccounts,omitempty"`// CallBackUri: URL to be used to push the notification to the merchant.CallBackUristring `json:"callBackUri,omitempty"`// Name: Output only. The `name` of the notification configuration. Generated// by the Content API upon creation of a new `NotificationSubscription`. The// `account` represents the merchant ID of the merchant that owns the// configuration. Format:// `accounts/{account}/notificationsubscriptions/{notification_subscription}`Namestring `json:"name,omitempty"`// RegisteredEvent: The event that the merchant wants to be notified about.//// Possible values:// "NOTIFICATION_EVENT_TYPE_UNSPECIFIED" - Notifications event type is// unspecified.// "PRODUCT_STATUS_CHANGE" - Notification of product status changes, for// example when product becomes disapproved.RegisteredEventstring `json:"registeredEvent,omitempty"`// TargetAccount: The `name` of the account you want to receive notifications// for. Format: `accounts/{account}`TargetAccountstring `json:"targetAccount,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AllManagedAccounts") 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. "AllManagedAccounts") 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:"-"`}NotificationSubscription: Represents a notification subscription owned by aMerchant account.
func (NotificationSubscription)MarshalJSON¶
func (sNotificationSubscription) 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)
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)
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.