Documentation ¶
Overview ¶
Package merchantapi provides access to the Merchant API.
For product documentation, see: https://developers.devsite.corp.google.com/merchant/api
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/merchantapi/lfp_v1beta" ... ctx := context.Background() merchantapiService, err := merchantapi.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
merchantapiService, err := merchantapi.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) merchantapiService, err := merchantapi.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type AccountsLfpInventoriesInsertCall
- func (c *AccountsLfpInventoriesInsertCall) Context(ctx context.Context) *AccountsLfpInventoriesInsertCall
- func (c *AccountsLfpInventoriesInsertCall) Do(opts ...googleapi.CallOption) (*LfpInventory, error)
- func (c *AccountsLfpInventoriesInsertCall) Fields(s ...googleapi.Field) *AccountsLfpInventoriesInsertCall
- func (c *AccountsLfpInventoriesInsertCall) Header() http.Header
- type AccountsLfpInventoriesService
- type AccountsLfpSalesInsertCall
- func (c *AccountsLfpSalesInsertCall) Context(ctx context.Context) *AccountsLfpSalesInsertCall
- func (c *AccountsLfpSalesInsertCall) Do(opts ...googleapi.CallOption) (*LfpSale, error)
- func (c *AccountsLfpSalesInsertCall) Fields(s ...googleapi.Field) *AccountsLfpSalesInsertCall
- func (c *AccountsLfpSalesInsertCall) Header() http.Header
- type AccountsLfpSalesService
- type AccountsLfpStoresDeleteCall
- func (c *AccountsLfpStoresDeleteCall) Context(ctx context.Context) *AccountsLfpStoresDeleteCall
- func (c *AccountsLfpStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsLfpStoresDeleteCall) Fields(s ...googleapi.Field) *AccountsLfpStoresDeleteCall
- func (c *AccountsLfpStoresDeleteCall) Header() http.Header
- type AccountsLfpStoresGetCall
- func (c *AccountsLfpStoresGetCall) Context(ctx context.Context) *AccountsLfpStoresGetCall
- func (c *AccountsLfpStoresGetCall) Do(opts ...googleapi.CallOption) (*LfpStore, error)
- func (c *AccountsLfpStoresGetCall) Fields(s ...googleapi.Field) *AccountsLfpStoresGetCall
- func (c *AccountsLfpStoresGetCall) Header() http.Header
- func (c *AccountsLfpStoresGetCall) IfNoneMatch(entityTag string) *AccountsLfpStoresGetCall
- type AccountsLfpStoresInsertCall
- func (c *AccountsLfpStoresInsertCall) Context(ctx context.Context) *AccountsLfpStoresInsertCall
- func (c *AccountsLfpStoresInsertCall) Do(opts ...googleapi.CallOption) (*LfpStore, error)
- func (c *AccountsLfpStoresInsertCall) Fields(s ...googleapi.Field) *AccountsLfpStoresInsertCall
- func (c *AccountsLfpStoresInsertCall) Header() http.Header
- type AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) Context(ctx context.Context) *AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) Do(opts ...googleapi.CallOption) (*ListLfpStoresResponse, error)
- func (c *AccountsLfpStoresListCall) Fields(s ...googleapi.Field) *AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) Header() http.Header
- func (c *AccountsLfpStoresListCall) IfNoneMatch(entityTag string) *AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) PageSize(pageSize int64) *AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) PageToken(pageToken string) *AccountsLfpStoresListCall
- func (c *AccountsLfpStoresListCall) Pages(ctx context.Context, f func(*ListLfpStoresResponse) error) error
- func (c *AccountsLfpStoresListCall) TargetAccount(targetAccount int64) *AccountsLfpStoresListCall
- type AccountsLfpStoresService
- func (r *AccountsLfpStoresService) Delete(name string) *AccountsLfpStoresDeleteCall
- func (r *AccountsLfpStoresService) Get(name string) *AccountsLfpStoresGetCall
- func (r *AccountsLfpStoresService) Insert(parent string, lfpstore *LfpStore) *AccountsLfpStoresInsertCall
- func (r *AccountsLfpStoresService) List(parent string) *AccountsLfpStoresListCall
- type AccountsService
- type Empty
- type LfpInventory
- type LfpSale
- type LfpStore
- type ListLfpStoresResponse
- type Price
- type ProductChange
- type ProductStatusChangeMessage
- type Service
Constants ¶
const (
// Manage your product listings and accounts for Google Shopping
ContentScope = "https://www.googleapis.com/auth/content"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsLfpInventoriesInsertCall ¶
type AccountsLfpInventoriesInsertCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpInventoriesInsertCall) Context ¶
func (c *AccountsLfpInventoriesInsertCall) Context(ctx context.Context) *AccountsLfpInventoriesInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpInventoriesInsertCall) Do ¶
func (c *AccountsLfpInventoriesInsertCall) Do(opts ...googleapi.CallOption) (*LfpInventory, error)
Do executes the "merchantapi.accounts.lfpInventories.insert" call. Any non-2xx status code is an error. Response headers are in either *LfpInventory.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpInventoriesInsertCall) Fields ¶
func (c *AccountsLfpInventoriesInsertCall) Fields(s ...googleapi.Field) *AccountsLfpInventoriesInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpInventoriesInsertCall) Header ¶
func (c *AccountsLfpInventoriesInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsLfpInventoriesService ¶
type AccountsLfpInventoriesService struct {
// contains filtered or unexported fields
}
func NewAccountsLfpInventoriesService ¶
func NewAccountsLfpInventoriesService(s *Service) *AccountsLfpInventoriesService
func (*AccountsLfpInventoriesService) Insert ¶
func (r *AccountsLfpInventoriesService) Insert(parent string, lfpinventory *LfpInventory) *AccountsLfpInventoriesInsertCall
Insert: Inserts a `LfpInventory` resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days.
- parent: The LFP provider account. Format: `accounts/{account}`.
type AccountsLfpSalesInsertCall ¶
type AccountsLfpSalesInsertCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpSalesInsertCall) Context ¶
func (c *AccountsLfpSalesInsertCall) Context(ctx context.Context) *AccountsLfpSalesInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpSalesInsertCall) Do ¶
func (c *AccountsLfpSalesInsertCall) Do(opts ...googleapi.CallOption) (*LfpSale, error)
Do executes the "merchantapi.accounts.lfpSales.insert" call. Any non-2xx status code is an error. Response headers are in either *LfpSale.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpSalesInsertCall) Fields ¶
func (c *AccountsLfpSalesInsertCall) Fields(s ...googleapi.Field) *AccountsLfpSalesInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpSalesInsertCall) Header ¶
func (c *AccountsLfpSalesInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsLfpSalesService ¶
type AccountsLfpSalesService struct {
// contains filtered or unexported fields
}
func NewAccountsLfpSalesService ¶
func NewAccountsLfpSalesService(s *Service) *AccountsLfpSalesService
func (*AccountsLfpSalesService) Insert ¶
func (r *AccountsLfpSalesService) Insert(parent string, lfpsale *LfpSale) *AccountsLfpSalesInsertCall
Insert: Inserts a `LfpSale` for the given merchant.
- parent: The LFP provider account. Format: `accounts/{lfp_partner}`.
type AccountsLfpStoresDeleteCall ¶
type AccountsLfpStoresDeleteCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpStoresDeleteCall) Context ¶
func (c *AccountsLfpStoresDeleteCall) Context(ctx context.Context) *AccountsLfpStoresDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpStoresDeleteCall) Do ¶
func (c *AccountsLfpStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "merchantapi.accounts.lfpStores.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) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpStoresDeleteCall) Fields ¶
func (c *AccountsLfpStoresDeleteCall) Fields(s ...googleapi.Field) *AccountsLfpStoresDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpStoresDeleteCall) Header ¶
func (c *AccountsLfpStoresDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsLfpStoresGetCall ¶
type AccountsLfpStoresGetCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpStoresGetCall) Context ¶
func (c *AccountsLfpStoresGetCall) Context(ctx context.Context) *AccountsLfpStoresGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpStoresGetCall) Do ¶
func (c *AccountsLfpStoresGetCall) Do(opts ...googleapi.CallOption) (*LfpStore, error)
Do executes the "merchantapi.accounts.lfpStores.get" call. Any non-2xx status code is an error. Response headers are in either *LfpStore.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpStoresGetCall) Fields ¶
func (c *AccountsLfpStoresGetCall) Fields(s ...googleapi.Field) *AccountsLfpStoresGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpStoresGetCall) Header ¶
func (c *AccountsLfpStoresGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsLfpStoresGetCall) IfNoneMatch ¶
func (c *AccountsLfpStoresGetCall) IfNoneMatch(entityTag string) *AccountsLfpStoresGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type AccountsLfpStoresInsertCall ¶
type AccountsLfpStoresInsertCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpStoresInsertCall) Context ¶
func (c *AccountsLfpStoresInsertCall) Context(ctx context.Context) *AccountsLfpStoresInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpStoresInsertCall) Do ¶
func (c *AccountsLfpStoresInsertCall) Do(opts ...googleapi.CallOption) (*LfpStore, error)
Do executes the "merchantapi.accounts.lfpStores.insert" call. Any non-2xx status code is an error. Response headers are in either *LfpStore.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpStoresInsertCall) Fields ¶
func (c *AccountsLfpStoresInsertCall) Fields(s ...googleapi.Field) *AccountsLfpStoresInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpStoresInsertCall) Header ¶
func (c *AccountsLfpStoresInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsLfpStoresListCall ¶
type AccountsLfpStoresListCall struct {
// contains filtered or unexported fields
}
func (*AccountsLfpStoresListCall) Context ¶
func (c *AccountsLfpStoresListCall) Context(ctx context.Context) *AccountsLfpStoresListCall
Context sets the context to be used in this call's Do method.
func (*AccountsLfpStoresListCall) Do ¶
func (c *AccountsLfpStoresListCall) Do(opts ...googleapi.CallOption) (*ListLfpStoresResponse, error)
Do executes the "merchantapi.accounts.lfpStores.list" call. Any non-2xx status code is an error. Response headers are in either *ListLfpStoresResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsLfpStoresListCall) Fields ¶
func (c *AccountsLfpStoresListCall) Fields(s ...googleapi.Field) *AccountsLfpStoresListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsLfpStoresListCall) Header ¶
func (c *AccountsLfpStoresListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsLfpStoresListCall) IfNoneMatch ¶
func (c *AccountsLfpStoresListCall) IfNoneMatch(entityTag string) *AccountsLfpStoresListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*AccountsLfpStoresListCall) PageSize ¶
func (c *AccountsLfpStoresListCall) PageSize(pageSize int64) *AccountsLfpStoresListCall
PageSize sets the optional parameter "pageSize": The maximum number of `LfpStore` resources for the given account to return. The service returns fewer than this value if the number of stores for the given account is less than the `pageSize`. The default value is 250. The maximum value is 1000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum.
func (*AccountsLfpStoresListCall) PageToken ¶
func (c *AccountsLfpStoresListCall) PageToken(pageToken string) *AccountsLfpStoresListCall
PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListLfpStoresRequest` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLfpStoresRequest` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
func (*AccountsLfpStoresListCall) Pages ¶
func (c *AccountsLfpStoresListCall) Pages(ctx context.Context, f func(*ListLfpStoresResponse) 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.
func (*AccountsLfpStoresListCall) TargetAccount ¶
func (c *AccountsLfpStoresListCall) TargetAccount(targetAccount int64) *AccountsLfpStoresListCall
TargetAccount sets the optional parameter "targetAccount": Required. The Merchant Center id of the merchant to list stores for.
type AccountsLfpStoresService ¶
type AccountsLfpStoresService struct {
// contains filtered or unexported fields
}
func NewAccountsLfpStoresService ¶
func NewAccountsLfpStoresService(s *Service) *AccountsLfpStoresService
func (*AccountsLfpStoresService) Delete ¶
func (r *AccountsLfpStoresService) Delete(name string) *AccountsLfpStoresDeleteCall
Delete: Deletes a store for a target merchant.
- name: The name of the store to delete for the target merchant account. Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}`.
func (*AccountsLfpStoresService) Get ¶
func (r *AccountsLfpStoresService) Get(name string) *AccountsLfpStoresGetCall
Get: Retrieves information about a store.
- name: The name of the store to retrieve. Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}`.
func (*AccountsLfpStoresService) Insert ¶
func (r *AccountsLfpStoresService) Insert(parent string, lfpstore *LfpStore) *AccountsLfpStoresInsertCall
Insert: Inserts a store for the target merchant. If the store with the same store code already exists, it will be replaced.
- parent: The LFP provider account Format: `accounts/{account}`.
func (*AccountsLfpStoresService) List ¶
func (r *AccountsLfpStoresService) List(parent string) *AccountsLfpStoresListCall
List: Lists the stores of the target merchant, specified by the filter in `ListLfpStoresRequest`.
- parent: The LFP partner. Format: `accounts/{account}`.
type AccountsService ¶
type AccountsService struct { LfpInventories *AccountsLfpInventoriesService LfpSales *AccountsLfpSalesService LfpStores *AccountsLfpStoresService // contains filtered or unexported fields }
func NewAccountsService ¶
func NewAccountsService(s *Service) *AccountsService
type Empty ¶
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 defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
type LfpInventory ¶
type LfpInventory struct { // Availability: Required. Availability of the product at this store. For // accepted attribute values, see the local product inventory data // specification (https://support.google.com/merchants/answer/3061342) Availability string `json:"availability,omitempty"` // CollectionTime: Optional. The time when the inventory is collected. If not // set, it will be set to the time when the inventory is submitted. CollectionTime string `json:"collectionTime,omitempty"` // ContentLanguage: Required. The two-letter ISO 639-1 language code for the // item. ContentLanguage string `json:"contentLanguage,omitempty"` // FeedLabel: Optional. The feed label // (https://developers.google.com/shopping-content/guides/products/feed-labels) // for the product. If this is not set, it will default to `regionCode`. FeedLabel string `json:"feedLabel,omitempty"` // Gtin: Optional. The Global Trade Item Number of the product. Gtin string `json:"gtin,omitempty"` // Name: Output only. Identifier. The name for the `LfpInventory` resource. // Format: // `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` Name string `json:"name,omitempty"` // OfferId: Required. Immutable. A unique identifier for the product. If both // inventories and sales are submitted for a merchant, this id should match for // the same product. **Note**: if the merchant sells the same product new and // used, they should have different IDs. OfferId string `json:"offerId,omitempty"` // PickupMethod: Optional. Supported pickup method for this offer. Unless the // value is "not supported", this field must be submitted together with // `pickupSla`. For accepted attribute values, see the local product inventory // data specification (https://support.google.com/merchants/answer/3061342). PickupMethod string `json:"pickupMethod,omitempty"` // PickupSla: Optional. Expected date that an order will be ready for pickup // relative to the order date. Must be submitted together with `pickupMethod`. // For accepted attribute values, see the local product inventory data // specification (https://support.google.com/merchants/answer/3061342). PickupSla string `json:"pickupSla,omitempty"` // Price: Optional. The current price of the product. Price *Price `json:"price,omitempty"` // Quantity: Optional. Quantity of the product available at this store. Must be // greater than or equal to zero. Quantity int64 `json:"quantity,omitempty,string"` // RegionCode: Required. The CLDR territory code // (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the // country where the product is sold. RegionCode string `json:"regionCode,omitempty"` // StoreCode: Required. The identifier of the merchant's store. Either the // store code inserted through `InsertLfpStore` or the store code in the // Business Profile. StoreCode string `json:"storeCode,omitempty"` // TargetAccount: Required. The Merchant Center ID of the merchant to submit // the inventory for. TargetAccount int64 `json:"targetAccount,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Availability") 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. "Availability") 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:"-"` }
LfpInventory: Local Inventory for the merchant.
func (*LfpInventory) MarshalJSON ¶
func (s *LfpInventory) MarshalJSON() ([]byte, error)
type LfpSale ¶
type LfpSale struct { // ContentLanguage: Required. The two-letter ISO 639-1 language code for the // item. ContentLanguage string `json:"contentLanguage,omitempty"` // FeedLabel: Optional. The feed label // (https://developers.google.com/shopping-content/guides/products/feed-labels) // for the product. If this is not set, it will default to `regionCode`. FeedLabel string `json:"feedLabel,omitempty"` // Gtin: Required. The Global Trade Item Number of the sold product. Gtin string `json:"gtin,omitempty"` // Name: Output only. Identifier. The name of the `LfpSale` resource. Format: // `accounts/{account}/lfpSales/{sale}` Name string `json:"name,omitempty"` // OfferId: Required. A unique identifier for the product. If both inventories // and sales are submitted for a merchant, this id should match for the same // product. **Note**: if the merchant sells the same product new and used, they // should have different IDs. OfferId string `json:"offerId,omitempty"` // Price: Required. The unit price of the product. Price *Price `json:"price,omitempty"` // Quantity: Required. The relative change of the available quantity. Negative // for items returned. Quantity int64 `json:"quantity,omitempty,string"` // RegionCode: Required. The CLDR territory code // (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the // country where the product is sold. RegionCode string `json:"regionCode,omitempty"` // SaleTime: Required. The timestamp for the sale. SaleTime string `json:"saleTime,omitempty"` // StoreCode: Required. The identifier of the merchant's store. Either a // `storeCode` inserted through the API or the code of the store in the // Business Profile. StoreCode string `json:"storeCode,omitempty"` // TargetAccount: Required. The Merchant Center ID of the merchant to submit // the sale for. TargetAccount int64 `json:"targetAccount,omitempty,string"` // Uid: Output only. System generated globally unique ID for the `LfpSale`. Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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:"-"` }
LfpSale: A sale for the merchant.
func (*LfpSale) MarshalJSON ¶
type LfpStore ¶
type LfpStore struct { // GcidCategory: Optional. Google My Business category id // (https://gcid-explorer.corp.google.com/static/gcid.html). GcidCategory []string `json:"gcidCategory,omitempty"` // MatchingState: Optional. Output only. The state of matching to a Google // Business Profile. See matchingStateHint for further details if no match is // found. // // Possible values: // "STORE_MATCHING_STATE_UNSPECIFIED" - Store matching state unspecified. // "STORE_MATCHING_STATE_MATCHED" - The `LfpStore` is successfully matched // with a Google Business Profile store. // "STORE_MATCHING_STATE_FAILED" - The `LfpStore` is not matched with a // Google Business Profile store. MatchingState string `json:"matchingState,omitempty"` // MatchingStateHint: Optional. Output only. The hint of why the matching has // failed. This is only set when matchingState=`STORE_MATCHING_STATE_FAILED`. // Possible values are: - "linked-store-not-found": There aren't any Google // Business Profile stores available for matching. - "store-match-not-found": // The provided `LfpStore` couldn't be matched to any of the connected Google // Business Profile stores. Merchant Center account is connected correctly and // stores are available on Google Business Profile, but the `LfpStore` location // address does not match with Google Business Profile stores' addresses. // Update the `LfpStore` address or Google Business Profile store address to // match correctly. - "store-match-unverified": The provided `LfpStore` // couldn't be matched to any of the connected Google Business Profile stores, // as the matched Google Business Profile store is unverified. Go through the // Google Business Profile verification process to match correctly. MatchingStateHint string `json:"matchingStateHint,omitempty"` // Name: Output only. Identifier. The name of the `LfpStore` resource. Format: // `accounts/{account}/lfpStores/{target_merchant}~{store_code}` Name string `json:"name,omitempty"` // PhoneNumber: Optional. The store phone number in E.164 // (https://en.wikipedia.org/wiki/E.164) format. Example: `+15556767888` PhoneNumber string `json:"phoneNumber,omitempty"` // PlaceId: Optional. The Google Place Id // (https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) // of the store location. PlaceId string `json:"placeId,omitempty"` // StoreAddress: Required. The street address of the store. Example: 1600 // Amphitheatre Pkwy, Mountain View, CA 94043, USA. StoreAddress string `json:"storeAddress,omitempty"` // StoreCode: Required. Immutable. A store identifier that is unique for the // target merchant. StoreCode string `json:"storeCode,omitempty"` // StoreName: Optional. The merchant or store name. StoreName string `json:"storeName,omitempty"` // TargetAccount: Required. The Merchant Center id of the merchant to submit // the store for. TargetAccount int64 `json:"targetAccount,omitempty,string"` // WebsiteUri: Optional. The website URL for the store or merchant. WebsiteUri string `json:"websiteUri,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "GcidCategory") 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. "GcidCategory") 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:"-"` }
LfpStore: A store for the merchant. This will be used to match to a store under the Google Business Profile of the target merchant. If a matching store can't be found, the inventories or sales submitted with the store code will not be used.
func (*LfpStore) MarshalJSON ¶
type ListLfpStoresResponse ¶
type ListLfpStoresResponse struct { // LfpStores: The stores from the specified merchant. LfpStores []*LfpStore `json:"lfpStores,omitempty"` // NextPageToken: A token, which can be sent as `pageToken` to retrieve the // next page. If this field is omitted, there are no subsequent pages. NextPageToken string `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. "LfpStores") 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. "LfpStores") 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:"-"` }
ListLfpStoresResponse: Response message for the ListLfpStores method.
func (*ListLfpStoresResponse) MarshalJSON ¶
func (s *ListLfpStoresResponse) MarshalJSON() ([]byte, error)
type Price ¶
type Price struct { // AmountMicros: The price represented as a number in micros (1 million micros // is an equivalent to one's currency standard unit, for example, 1 USD = // 1000000 micros). AmountMicros int64 `json:"amountMicros,omitempty,string"` // CurrencyCode: The currency of the price using three-letter acronyms // according to ISO 4217 (http://en.wikipedia.org/wiki/ISO_4217). CurrencyCode string `json:"currencyCode,omitempty"` // ForceSendFields is a list of field names (e.g. "AmountMicros") 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. "AmountMicros") 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:"-"` }
Price: The price represented as a number and currency.
func (*Price) MarshalJSON ¶
type ProductChange ¶
type ProductChange struct { // NewValue: The new value of the changed resource or attribute. NewValue string `json:"newValue,omitempty"` // OldValue: The old value of the changed resource or attribute. OldValue string `json:"oldValue,omitempty"` // RegionCode: Countries that have the change (if applicable) RegionCode string `json:"regionCode,omitempty"` // ReportingContext: Reporting contexts that have the change (if applicable) // // 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_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). ReportingContext string `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 (s *ProductChange) MarshalJSON() ([]byte, error)
type ProductStatusChangeMessage ¶
type ProductStatusChangeMessage struct { // Account: The target account that owns the entity that changed. Format : // `accounts/{merchant_id}` Account string `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 entity Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,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}` ManagingAccount string `json:"managingAccount,omitempty"` // Resource: The product name. Format: // `{product.name=accounts/{account}/products/{product}}` Resource string `json:"resource,omitempty"` // ResourceId: The product id. ResourceId string `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 : product ResourceType string `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 to notify about product status change event
func (*ProductStatusChangeMessage) MarshalJSON ¶
func (s *ProductStatusChangeMessage) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Accounts *AccountsService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.