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/products_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 AccountsProductInputsDeleteCall
- func (c *AccountsProductInputsDeleteCall) Context(ctx context.Context) *AccountsProductInputsDeleteCall
- func (c *AccountsProductInputsDeleteCall) DataSource(dataSource string) *AccountsProductInputsDeleteCall
- func (c *AccountsProductInputsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsProductInputsDeleteCall) Fields(s ...googleapi.Field) *AccountsProductInputsDeleteCall
- func (c *AccountsProductInputsDeleteCall) Header() http.Header
- type AccountsProductInputsInsertCall
- func (c *AccountsProductInputsInsertCall) Context(ctx context.Context) *AccountsProductInputsInsertCall
- func (c *AccountsProductInputsInsertCall) DataSource(dataSource string) *AccountsProductInputsInsertCall
- func (c *AccountsProductInputsInsertCall) Do(opts ...googleapi.CallOption) (*ProductInput, error)
- func (c *AccountsProductInputsInsertCall) Fields(s ...googleapi.Field) *AccountsProductInputsInsertCall
- func (c *AccountsProductInputsInsertCall) Header() http.Header
- type AccountsProductInputsService
- type AccountsProductsGetCall
- func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall
- func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error)
- func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall
- func (c *AccountsProductsGetCall) Header() http.Header
- func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall
- type AccountsProductsListCall
- func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall
- func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error)
- func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall
- func (c *AccountsProductsListCall) Header() http.Header
- func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall
- func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall
- func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall
- func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error
- type AccountsProductsService
- type AccountsService
- type Attributes
- type Certification
- type CloudExportAdditionalProperties
- type CustomAttribute
- type DestinationStatus
- type Empty
- type FreeShippingThreshold
- type Installment
- type Interval
- type ItemLevelIssue
- type ListProductsResponse
- type LoyaltyPoints
- type LoyaltyProgram
- type Price
- type Product
- type ProductChange
- type ProductDetail
- type ProductDimension
- type ProductInput
- type ProductStatus
- type ProductStatusChangeMessage
- type ProductStructuredDescription
- type ProductStructuredTitle
- type ProductWeight
- type Service
- type Shipping
- type ShippingDimension
- type ShippingWeight
- type SubscriptionCost
- type Tax
- type UnitPricingBaseMeasure
- type UnitPricingMeasure
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 AccountsProductInputsDeleteCall ¶
type AccountsProductInputsDeleteCall struct {
// contains filtered or unexported fields
}
func (*AccountsProductInputsDeleteCall) Context ¶
func (c *AccountsProductInputsDeleteCall) Context(ctx context.Context) *AccountsProductInputsDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductInputsDeleteCall) DataSource ¶
func (c *AccountsProductInputsDeleteCall) DataSource(dataSource string) *AccountsProductInputsDeleteCall
DataSource sets the optional parameter "dataSource": Required. The primary or supplemental data source from which the product input should be deleted. Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsProductInputsDeleteCall) Do ¶
func (c *AccountsProductInputsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "merchantapi.accounts.productInputs.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 (*AccountsProductInputsDeleteCall) Fields ¶
func (c *AccountsProductInputsDeleteCall) Fields(s ...googleapi.Field) *AccountsProductInputsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsProductInputsDeleteCall) Header ¶
func (c *AccountsProductInputsDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsProductInputsInsertCall ¶
type AccountsProductInputsInsertCall struct {
// contains filtered or unexported fields
}
func (*AccountsProductInputsInsertCall) Context ¶
func (c *AccountsProductInputsInsertCall) Context(ctx context.Context) *AccountsProductInputsInsertCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductInputsInsertCall) DataSource ¶
func (c *AccountsProductInputsInsertCall) DataSource(dataSource string) *AccountsProductInputsInsertCall
DataSource sets the optional parameter "dataSource": Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsProductInputsInsertCall) Do ¶
func (c *AccountsProductInputsInsertCall) Do(opts ...googleapi.CallOption) (*ProductInput, error)
Do executes the "merchantapi.accounts.productInputs.insert" call. Any non-2xx status code is an error. Response headers are in either *ProductInput.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 (*AccountsProductInputsInsertCall) Fields ¶
func (c *AccountsProductInputsInsertCall) Fields(s ...googleapi.Field) *AccountsProductInputsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsProductInputsInsertCall) Header ¶
func (c *AccountsProductInputsInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsProductInputsService ¶
type AccountsProductInputsService struct {
// contains filtered or unexported fields
}
func NewAccountsProductInputsService ¶
func NewAccountsProductInputsService(s *Service) *AccountsProductInputsService
func (*AccountsProductInputsService) Delete ¶
func (r *AccountsProductInputsService) Delete(name string) *AccountsProductInputsDeleteCall
Delete: Deletes a product input from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
- name: The name of the product input resource to delete. Format: accounts/{account}/productInputs/{product}.
func (*AccountsProductInputsService) Insert ¶
func (r *AccountsProductInputsService) Insert(parent string, productinput *ProductInput) *AccountsProductInputsInsertCall
Insert: Uploads a product input to your Merchant Center account. If an input with the same contentLanguage, offerId, and dataSource already exists, this method replaces that entry. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
- parent: The account where this product will be inserted. Format: accounts/{account}.
type AccountsProductsGetCall ¶
type AccountsProductsGetCall struct {
// contains filtered or unexported fields
}
func (*AccountsProductsGetCall) Context ¶
func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductsGetCall) Do ¶
func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error)
Do executes the "merchantapi.accounts.products.get" call. Any non-2xx status code is an error. Response headers are in either *Product.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 (*AccountsProductsGetCall) Fields ¶
func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsProductsGetCall) Header ¶
func (c *AccountsProductsGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsProductsGetCall) IfNoneMatch ¶
func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall
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 AccountsProductsListCall ¶
type AccountsProductsListCall struct {
// contains filtered or unexported fields
}
func (*AccountsProductsListCall) Context ¶
func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall
Context sets the context to be used in this call's Do method.
func (*AccountsProductsListCall) Do ¶
func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error)
Do executes the "merchantapi.accounts.products.list" call. Any non-2xx status code is an error. Response headers are in either *ListProductsResponse.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 (*AccountsProductsListCall) Fields ¶
func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsProductsListCall) Header ¶
func (c *AccountsProductsListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsProductsListCall) IfNoneMatch ¶
func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall
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 (*AccountsProductsListCall) PageSize ¶
func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall
PageSize sets the optional parameter "pageSize": The maximum number of products to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of products will be returned.
func (*AccountsProductsListCall) PageToken ¶
func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall
PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListProducts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProducts` must match the call that provided the page token.
func (*AccountsProductsListCall) Pages ¶
func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) 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.
type AccountsProductsService ¶
type AccountsProductsService struct {
// contains filtered or unexported fields
}
func NewAccountsProductsService ¶
func NewAccountsProductsService(s *Service) *AccountsProductsService
func (*AccountsProductsService) Get ¶
func (r *AccountsProductsService) Get(name string) *AccountsProductsGetCall
Get: Retrieves the processed product from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the updated final product can be retrieved.
- name: The name of the product to retrieve. Format: `accounts/{account}/products/{product}`.
func (*AccountsProductsService) List ¶
func (r *AccountsProductsService) List(parent string) *AccountsProductsListCall
List: Lists the processed products in your Merchant Center account. The response might contain fewer items than specified by pageSize. Rely on pageToken to determine if there are more items to be requested. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.
- parent: The account to list processed products for. Format: accounts/{account}.
type AccountsService ¶
type AccountsService struct { ProductInputs *AccountsProductInputsService Products *AccountsProductsService // contains filtered or unexported fields }
func NewAccountsService ¶
func NewAccountsService(s *Service) *AccountsService
type Attributes ¶
type Attributes struct { // AdditionalImageLinks: Additional URLs of images of the item. AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%, // discouraged otherwise. AdsGrouping string `json:"adsGrouping,omitempty"` // AdsLabels: Similar to ads_grouping, but only works on CPC. AdsLabels []string `json:"adsLabels,omitempty"` // AdsRedirect: Allows advertisers to override the item URL when the product is // shown within the context of Product ads. AdsRedirect string `json:"adsRedirect,omitempty"` // Adult: Set to true if the item is targeted towards adults. Adult bool `json:"adult,omitempty"` // AgeGroup: Target age group // (https://support.google.com/merchants/answer/6324463) of the item. AgeGroup string `json:"ageGroup,omitempty"` // AutoPricingMinPrice: A safeguard in the "Automated Discounts" // (https://support.google.com/merchants/answer/10295759) and "Dynamic // Promotions" (https://support.google.com/merchants/answer/13949249) projects, // ensuring that discounts on merchants' offers do not fall below this value, // thereby preserving the offer's value and profitability. AutoPricingMinPrice *Price `json:"autoPricingMinPrice,omitempty"` // Availability: Availability status of the item. Availability string `json:"availability,omitempty"` // AvailabilityDate: The day a pre-ordered product becomes available for // delivery, in ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format. AvailabilityDate string `json:"availabilityDate,omitempty"` // Brand: Brand of the item. Brand string `json:"brand,omitempty"` // CanonicalLink: URL for the canonical version of your item's landing page. CanonicalLink string `json:"canonicalLink,omitempty"` // Certifications: Product Certifications, for example for energy efficiency // labeling of products recorded in the EU EPREL // (https://eprel.ec.europa.eu/screen/home) database. See the Help Center // (https://support.google.com/merchants/answer/13528839) article for more // information. Certifications []*Certification `json:"certifications,omitempty"` // CloudExportAdditionalProperties: Extra fields to export to the Cloud Retail // program. CloudExportAdditionalProperties []*CloudExportAdditionalProperties `json:"cloudExportAdditionalProperties,omitempty"` // Color: Color of the item. Color string `json:"color,omitempty"` // Condition: Condition or state of the item. Condition string `json:"condition,omitempty"` // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` // CustomLabel0: Custom label 0 for custom grouping of items in a Shopping // campaign. CustomLabel0 string `json:"customLabel0,omitempty"` // CustomLabel1: Custom label 1 for custom grouping of items in a Shopping // campaign. CustomLabel1 string `json:"customLabel1,omitempty"` // CustomLabel2: Custom label 2 for custom grouping of items in a Shopping // campaign. CustomLabel2 string `json:"customLabel2,omitempty"` // CustomLabel3: Custom label 3 for custom grouping of items in a Shopping // campaign. CustomLabel3 string `json:"customLabel3,omitempty"` // CustomLabel4: Custom label 4 for custom grouping of items in a Shopping // campaign. CustomLabel4 string `json:"customLabel4,omitempty"` // Description: Description of the item. Description string `json:"description,omitempty"` // DisclosureDate: The date time when an offer becomes visible in search // results across Google’s YouTube surfaces, in ISO 8601 // (http://en.wikipedia.org/wiki/ISO_8601) format. See Disclosure date ( // https://support.google.com/merchants/answer/13034208) for more information. DisclosureDate string `json:"disclosureDate,omitempty"` // DisplayAdsId: An identifier for an item for dynamic remarketing campaigns. DisplayAdsId string `json:"displayAdsId,omitempty"` // DisplayAdsLink: URL directly to your item's landing page for dynamic // remarketing campaigns. DisplayAdsLink string `json:"displayAdsLink,omitempty"` // DisplayAdsSimilarIds: Advertiser-specified recommendations. DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` // EnergyEfficiencyClass: The energy efficiency class as defined in EU // directive 2010/30/EU. EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` // ExcludedDestinations: The list of destinations to exclude for this target // (corresponds to unchecked check boxes in Merchant Center). ExcludedDestinations []string `json:"excludedDestinations,omitempty"` // ExpirationDate: Date on which the item should expire, as specified upon // insertion, in ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format. The // actual expiration date is exposed in `productstatuses` as // googleExpirationDate (https://support.google.com/merchants/answer/6324499) // and might be earlier if `expirationDate` is too far in the future. ExpirationDate string `json:"expirationDate,omitempty"` // ExternalSellerId: Required for multi-seller accounts. Use this attribute if // you're a marketplace uploading products for various sellers to your // multi-seller account. ExternalSellerId string `json:"externalSellerId,omitempty"` // FreeShippingThreshold: Conditions to be met for a product to have free // shipping. FreeShippingThreshold []*FreeShippingThreshold `json:"freeShippingThreshold,omitempty"` // Gender: Target gender of the item. Gender string `json:"gender,omitempty"` // GoogleProductCategory: Google's category of the item (see Google product // taxonomy (https://support.google.com/merchants/answer/1705911)). When // querying products, this field will contain the user provided value. There is // currently no way to get back the auto assigned google product categories // through the API. GoogleProductCategory string `json:"googleProductCategory,omitempty"` // Gtin: Global Trade Item Number (GTIN // (https://support.google.com/merchants/answer/188494#gtin)) of the item. Gtin string `json:"gtin,omitempty"` // IdentifierExists: Set this value to false when the item does not have unique // product identifiers appropriate to its category, such as GTIN, MPN, and // brand. Defaults to true, if not provided. IdentifierExists bool `json:"identifierExists,omitempty"` // ImageLink: URL of an image of the item. ImageLink string `json:"imageLink,omitempty"` // IncludedDestinations: The list of destinations to include for this target // (corresponds to checked check boxes in Merchant Center). Default // destinations are always included unless provided in `excludedDestinations`. IncludedDestinations []string `json:"includedDestinations,omitempty"` // Installment: Number and amount of installments to pay for an item. Installment *Installment `json:"installment,omitempty"` // IsBundle: Whether the item is a merchant-defined bundle. A bundle is a // custom grouping of different products sold by a merchant for a single price. IsBundle bool `json:"isBundle,omitempty"` // ItemGroupId: Shared identifier for all variants of the same product. ItemGroupId string `json:"itemGroupId,omitempty"` // LifestyleImageLinks: Additional URLs of lifestyle images of the item, used // to explicitly identify images that showcase your item in a real-world // context. See the Help Center article // (https://support.google.com/merchants/answer/9103186) for more information. LifestyleImageLinks []string `json:"lifestyleImageLinks,omitempty"` // Link: URL directly linking to your item's page on your online store. Link string `json:"link,omitempty"` // LinkTemplate: Link template for merchant hosted local storefront. LinkTemplate string `json:"linkTemplate,omitempty"` // LoyaltyPoints: Loyalty points that users receive after purchasing the item. // Japan only. LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` // LoyaltyPrograms: A list of loyalty program information that is used to // surface loyalty benefits (for example, better pricing, points, etc) to the // user of this item. LoyaltyPrograms []*LoyaltyProgram `json:"loyaltyPrograms,omitempty"` // Material: The material of which the item is made. Material string `json:"material,omitempty"` // MaxEnergyEfficiencyClass: The energy efficiency class as defined in EU // directive 2010/30/EU. MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` // MaxHandlingTime: Maximal product handling time (in business days). MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` // MinEnergyEfficiencyClass: The energy efficiency class as defined in EU // directive 2010/30/EU. MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` // MinHandlingTime: Minimal product handling time (in business days). MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` // MobileLink: URL for the mobile-optimized version of your item's landing // page. MobileLink string `json:"mobileLink,omitempty"` // MobileLinkTemplate: Link template for merchant hosted local storefront // optimized for mobile devices. MobileLinkTemplate string `json:"mobileLinkTemplate,omitempty"` // Mpn: Manufacturer Part Number (MPN // (https://support.google.com/merchants/answer/188494#mpn)) of the item. Mpn string `json:"mpn,omitempty"` // Multipack: The number of identical products in a merchant-defined multipack. Multipack int64 `json:"multipack,omitempty,string"` // Pattern: The item's pattern (for example, polka dots). Pattern string `json:"pattern,omitempty"` // Pause: Publication of this item will be temporarily paused // (https://support.google.com/merchants/answer/11909930). Pause string `json:"pause,omitempty"` // PickupMethod: The pick up option for the item. PickupMethod string `json:"pickupMethod,omitempty"` // PickupSla: Item store pickup timeline. PickupSla string `json:"pickupSla,omitempty"` // Price: Price of the item. Price *Price `json:"price,omitempty"` // ProductDetails: Technical specification or additional product details. ProductDetails []*ProductDetail `json:"productDetails,omitempty"` // ProductHeight: The height of the product in the units provided. The value // must be between 0 (exclusive) and 3000 (inclusive). ProductHeight *ProductDimension `json:"productHeight,omitempty"` // ProductHighlights: Bullet points describing the most relevant highlights of // a product. ProductHighlights []string `json:"productHighlights,omitempty"` // ProductLength: The length of the product in the units provided. The value // must be between 0 (exclusive) and 3000 (inclusive). ProductLength *ProductDimension `json:"productLength,omitempty"` // ProductTypes: Categories of the item (formatted as in product data // specification // (https://support.google.com/merchants/answer/188494#product_type)). ProductTypes []string `json:"productTypes,omitempty"` // ProductWeight: The weight of the product in the units provided. The value // must be between 0 (exclusive) and 2000 (inclusive). ProductWeight *ProductWeight `json:"productWeight,omitempty"` // ProductWidth: The width of the product in the units provided. The value must // be between 0 (exclusive) and 3000 (inclusive). ProductWidth *ProductDimension `json:"productWidth,omitempty"` // PromotionIds: The unique ID of a promotion. PromotionIds []string `json:"promotionIds,omitempty"` // SalePrice: Advertised sale price of the item. SalePrice *Price `json:"salePrice,omitempty"` // SalePriceEffectiveDate: Date range during which the item is on sale (see // product data specification // (https://support.google.com/merchants/answer/188494#sale_price_effective_date)). SalePriceEffectiveDate *Interval `json:"salePriceEffectiveDate,omitempty"` // SellOnGoogleQuantity: The quantity of the product that is available for // selling on Google. Supported only for online products. SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` // Shipping: Shipping rules. Shipping []*Shipping `json:"shipping,omitempty"` // ShippingHeight: Height of the item for shipping. ShippingHeight *ShippingDimension `json:"shippingHeight,omitempty"` // ShippingLabel: The shipping label of the product, used to group product in // account-level shipping rules. ShippingLabel string `json:"shippingLabel,omitempty"` // ShippingLength: Length of the item for shipping. ShippingLength *ShippingDimension `json:"shippingLength,omitempty"` // ShippingWeight: Weight of the item for shipping. ShippingWeight *ShippingWeight `json:"shippingWeight,omitempty"` // ShippingWidth: Width of the item for shipping. ShippingWidth *ShippingDimension `json:"shippingWidth,omitempty"` // ShoppingAdsExcludedCountries: List of country codes (ISO 3166-1 alpha-2) to // exclude the offer from Shopping Ads destination. Countries from this list // are removed from countries configured in data source settings. ShoppingAdsExcludedCountries []string `json:"shoppingAdsExcludedCountries,omitempty"` // Size: Size of the item. Only one value is allowed. For variants with // different sizes, insert a separate product for each size with the same // `itemGroupId` value (see https://support.google.com/merchants/answer/6324492 // (size definition)). Size string `json:"size,omitempty"` // SizeSystem: System in which the size is specified. Recommended for apparel // items. SizeSystem string `json:"sizeSystem,omitempty"` // SizeTypes: The cut of the item. It can be used to represent combined size // types for apparel items. Maximum two of size types can be provided (see // https://support.google.com/merchants/answer/6324497 (size type)). SizeTypes []string `json:"sizeTypes,omitempty"` // StructuredDescription: Structured description, for algorithmically // (AI)-generated descriptions. StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` // StructuredTitle: Structured title, for algorithmically (AI)-generated // titles. StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` // SubscriptionCost: Number of periods (months or years) and amount of payment // per period for an item with an associated subscription contract. SubscriptionCost *SubscriptionCost `json:"subscriptionCost,omitempty"` // TaxCategory: The tax category of the product, used to configure detailed tax // nexus in account-level tax settings. TaxCategory string `json:"taxCategory,omitempty"` // Taxes: Tax information. Taxes []*Tax `json:"taxes,omitempty"` // Title: Title of the item. Title string `json:"title,omitempty"` // TransitTimeLabel: The transit time label of the product, used to group // product in account-level transit time tables. TransitTimeLabel string `json:"transitTimeLabel,omitempty"` // UnitPricingBaseMeasure: The preference of the denominator of the unit price. UnitPricingBaseMeasure *UnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` // UnitPricingMeasure: The measure and dimension of an item. UnitPricingMeasure *UnitPricingMeasure `json:"unitPricingMeasure,omitempty"` // VirtualModelLink: URL of the 3D image of the item. See the Help Center // article (https://support.google.com/merchants/answer/13674896) for more // information. VirtualModelLink string `json:"virtualModelLink,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalImageLinks") 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. "AdditionalImageLinks") 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:"-"` }
Attributes: Attributes.
func (Attributes) MarshalJSON ¶
func (s Attributes) MarshalJSON() ([]byte, error)
func (*Attributes) UnmarshalJSON ¶
func (s *Attributes) UnmarshalJSON(data []byte) error
type Certification ¶
type Certification struct { // CertificationAuthority: The certification authority, for example // "European_Commission". Maximum length is 2000 characters. CertificationAuthority string `json:"certificationAuthority,omitempty"` // CertificationCode: The certification code. Maximum length is 2000 // characters. CertificationCode string `json:"certificationCode,omitempty"` // CertificationName: The name of the certification, for example "EPREL". // Maximum length is 2000 characters. CertificationName string `json:"certificationName,omitempty"` // CertificationValue: The certification value (also known as class, level or // grade), for example "A+", "C", "gold". Maximum length is 2000 characters. CertificationValue string `json:"certificationValue,omitempty"` // ForceSendFields is a list of field names (e.g. "CertificationAuthority") 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. "CertificationAuthority") 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:"-"` }
Certification: Product certification (https://support.google.com/merchants/answer/13528839), initially introduced for EU energy efficiency labeling compliance using the EU EPREL database.
func (Certification) MarshalJSON ¶
func (s Certification) MarshalJSON() ([]byte, error)
type CloudExportAdditionalProperties ¶
type CloudExportAdditionalProperties struct { // BoolValue: Boolean value of the given property. For example for a TV // product, "True" or "False" if the screen is UHD. BoolValue bool `json:"boolValue,omitempty"` // FloatValue: Float values of the given property. For example for a TV product // 1.2345. Maximum repeatedness of this value is 400. Values are stored in an // arbitrary but consistent order. FloatValue []float64 `json:"floatValue,omitempty"` // IntValue: Integer values of the given property. For example, 1080 for a TV // product's Screen Resolution. Maximum repeatedness of this value is 400. // Values are stored in an arbitrary but consistent order. IntValue googleapi.Int64s `json:"intValue,omitempty"` // MaxValue: Maximum float value of the given property. For example for a TV // product 100.00. MaxValue float64 `json:"maxValue,omitempty"` // MinValue: Minimum float value of the given property. For example for a TV // product 1.00. MinValue float64 `json:"minValue,omitempty"` // PropertyName: Name of the given property. For example, "Screen-Resolution" // for a TV product. Maximum string size is 256 characters. PropertyName string `json:"propertyName,omitempty"` // TextValue: Text value of the given property. For example, "8K(UHD)" could be // a text value for a TV product. Maximum repeatedness of this value is 400. // Values are stored in an arbitrary but consistent order. Maximum string size // is 256 characters. TextValue []string `json:"textValue,omitempty"` // UnitCode: Unit of the given property. For example, "Pixels" for a TV // product. Maximum string size is 256B. UnitCode string `json:"unitCode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoolValue") 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. "BoolValue") 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:"-"` }
CloudExportAdditionalProperties: Product property for the Cloud Retail API. For example, properties for a TV product could be "Screen-Resolution" or "Screen-Size".
func (CloudExportAdditionalProperties) MarshalJSON ¶
func (s CloudExportAdditionalProperties) MarshalJSON() ([]byte, error)
func (*CloudExportAdditionalProperties) UnmarshalJSON ¶
func (s *CloudExportAdditionalProperties) UnmarshalJSON(data []byte) error
type CustomAttribute ¶
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. Name string `json:"name,omitempty"` // Value: The value of the attribute. If `value` is not empty, `group_values` // must be empty. Value string `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 (s CustomAttribute) MarshalJSON() ([]byte, error)
type DestinationStatus ¶
type DestinationStatus struct { // ApprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the // offer is approved. ApprovedCountries []string `json:"approvedCountries,omitempty"` // DisapprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the // offer is disapproved. DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` // PendingCountries: List of country codes (ISO 3166-1 alpha-2) where the offer // is pending approval. PendingCountries []string `json:"pendingCountries,omitempty"` // ReportingContext: 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_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. "ApprovedCountries") 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. "ApprovedCountries") 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:"-"` }
DestinationStatus: The destination status of the product status.
func (DestinationStatus) MarshalJSON ¶
func (s DestinationStatus) MarshalJSON() ([]byte, error)
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 FreeShippingThreshold ¶
type FreeShippingThreshold struct { // Country: The CLDR territory code // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the // country to which an item will ship. Country string `json:"country,omitempty"` // PriceThreshold: The minimum product price for the shipping cost to become // free. Represented as a number. PriceThreshold *Price `json:"priceThreshold,omitempty"` // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` }
FreeShippingThreshold: Conditions to be met for a product to have free shipping.
func (FreeShippingThreshold) MarshalJSON ¶
func (s FreeShippingThreshold) MarshalJSON() ([]byte, error)
type Installment ¶
type Installment struct { // Amount: The amount the buyer has to pay per month. Amount *Price `json:"amount,omitempty"` // CreditType: Type of installment payments. Supported values are: * // "finance" * "lease" CreditType string `json:"creditType,omitempty"` // Downpayment: The up-front down payment amount the buyer has to pay. Downpayment *Price `json:"downpayment,omitempty"` // Months: The number of installments the buyer has to pay. Months int64 `json:"months,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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:"-"` }
Installment: A message that represents installment.
func (Installment) MarshalJSON ¶
func (s Installment) MarshalJSON() ([]byte, error)
type Interval ¶
type Interval struct { // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp // matching this interval will have to be before the end. EndTime string `json:"endTime,omitempty"` // StartTime: Optional. Inclusive start of the interval. If specified, a // Timestamp matching this interval will have to be the same or after the // start. StartTime string `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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:"-"` }
Interval: Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
func (Interval) MarshalJSON ¶
type ItemLevelIssue ¶
type ItemLevelIssue struct { // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue // applies to the offer. ApplicableCountries []string `json:"applicableCountries,omitempty"` // Attribute: The attribute's name, if the issue is caused by a single // attribute. Attribute string `json:"attribute,omitempty"` // Code: The error code of the issue. Code string `json:"code,omitempty"` // Description: A short issue description in English. Description string `json:"description,omitempty"` // Detail: A detailed issue description in English. Detail string `json:"detail,omitempty"` // Documentation: The URL of a web page to help with resolving this issue. Documentation string `json:"documentation,omitempty"` // ReportingContext: 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_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"` // Resolution: Whether the issue can be resolved by the merchant. Resolution string `json:"resolution,omitempty"` // Severity: How this issue affects serving of the offer. // // Possible values: // "SEVERITY_UNSPECIFIED" - Not specified. // "NOT_IMPACTED" - This issue represents a warning and does not have a // direct affect on the product. // "DEMOTED" - The product is demoted and most likely have limited // performance in search results // "DISAPPROVED" - Issue disapproves the product. Severity string `json:"severity,omitempty"` // ForceSendFields is a list of field names (e.g. "ApplicableCountries") 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. "ApplicableCountries") 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:"-"` }
ItemLevelIssue: The ItemLevelIssue of the product status.
func (ItemLevelIssue) MarshalJSON ¶
func (s ItemLevelIssue) MarshalJSON() ([]byte, error)
type ListProductsResponse ¶
type ListProductsResponse 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. NextPageToken string `json:"nextPageToken,omitempty"` // Products: The processed products from the specified account. These are your // processed products after applying rules and supplemental data sources. Products []*Product `json:"products,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:"-"` }
ListProductsResponse: Response message for the ListProducts method.
func (ListProductsResponse) MarshalJSON ¶
func (s ListProductsResponse) MarshalJSON() ([]byte, error)
type LoyaltyPoints ¶
type LoyaltyPoints struct { // Name: Name of loyalty points program. It is recommended to limit the name to // 12 full-width characters or 24 Roman characters. Name string `json:"name,omitempty"` // PointsValue: The retailer's loyalty points in absolute value. PointsValue int64 `json:"pointsValue,omitempty,string"` // Ratio: The ratio of a point when converted to currency. Google assumes // currency based on Merchant Center settings. If ratio is left out, it // defaults to 1.0. Ratio float64 `json:"ratio,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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:"-"` }
LoyaltyPoints: A message that represents loyalty points.
func (LoyaltyPoints) MarshalJSON ¶
func (s LoyaltyPoints) MarshalJSON() ([]byte, error)
func (*LoyaltyPoints) UnmarshalJSON ¶
func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error
type LoyaltyProgram ¶
type LoyaltyProgram struct { // CashbackForFutureUse: The cashback that can be used for future purchases. CashbackForFutureUse *Price `json:"cashbackForFutureUse,omitempty"` // LoyaltyPoints: The amount of loyalty points earned on a purchase. LoyaltyPoints int64 `json:"loyaltyPoints,omitempty,string"` // Price: The price for members of the given tier, that is, the instant // discount price. Must be smaller or equal to the regular price. Price *Price `json:"price,omitempty"` // ProgramLabel: The label of the loyalty program. This is an internal label // that uniquely identifies the relationship between a merchant entity and a // loyalty program entity. The label must be provided so that the system can // associate the assets below (for example, price and points) with a merchant. // The corresponding program must be linked to the merchant account. ProgramLabel string `json:"programLabel,omitempty"` // TierLabel: The label of the tier within the loyalty program. Must match one // of the labels within the program. TierLabel string `json:"tierLabel,omitempty"` // ForceSendFields is a list of field names (e.g. "CashbackForFutureUse") 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. "CashbackForFutureUse") 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:"-"` }
LoyaltyProgram: A message that represents loyalty program.
func (LoyaltyProgram) MarshalJSON ¶
func (s LoyaltyProgram) 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 Product ¶
type Product struct { // Attributes: Output only. A list of product attributes. Attributes *Attributes `json:"attributes,omitempty"` // Channel: Output only. The channel // (https://support.google.com/merchants/answer/7361332) of the product. // // Possible values: // "CHANNEL_ENUM_UNSPECIFIED" - Not specified. // "ONLINE" - Online product. // "LOCAL" - Local product. Channel string `json:"channel,omitempty"` // ContentLanguage: Output only. The two-letter ISO 639-1 // (http://en.wikipedia.org/wiki/ISO_639-1) language code for the product. ContentLanguage string `json:"contentLanguage,omitempty"` // CustomAttributes: Output only. A list of custom (merchant-provided) // attributes. It can also be used to submit 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 additional attributes used for Buy on // Google. CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` // DataSource: Output only. The primary data source of the product. DataSource string `json:"dataSource,omitempty"` // FeedLabel: Output only. The feed label for the product. FeedLabel string `json:"feedLabel,omitempty"` // Name: The name of the product. Format: // "{product.name=accounts/{account}/products/{product}}" Name string `json:"name,omitempty"` // OfferId: Output only. Your unique identifier for the product. This is the // same for the product input and processed product. Leading and trailing // whitespaces are stripped and multiple whitespaces are replaced by a single // whitespace upon submission. See the product data specification // (https://support.google.com/merchants/answer/188494#id) for details. OfferId string `json:"offerId,omitempty"` // ProductStatus: Output only. The status of a product, data validation issues, // that is, information about a product computed asynchronously. ProductStatus *ProductStatus `json:"productStatus,omitempty"` // VersionNumber: Output only. Represents the existing version (freshness) of // the product, which can be used to preserve the right order when multiple // updates are done at the same time. If set, the insertion is prevented when // version number is lower than the current version number of the existing // product. Re-insertion (for example, product refresh after 30 days) can be // performed with the current `version_number`. Only supported for insertions // into primary data sources. If the operation is prevented, the aborted // exception will be thrown. VersionNumber int64 `json:"versionNumber,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. "Attributes") 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. "Attributes") 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:"-"` }
Product: The processed product, built from multiple product inputs after applying rules and supplemental data sources. This processed product matches what is shown in your Merchant Center account and in Shopping ads and other surfaces across Google. Each product is built from exactly one primary data source product input, and multiple supplemental data source inputs. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved. All fields in the processed product and its sub-messages match the name of their corresponding attribute in the Product data specification (https://support.google.com/merchants/answer/7052112) with some exceptions.
func (Product) 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 ProductDetail ¶
type ProductDetail struct { // AttributeName: The name of the product detail. AttributeName string `json:"attributeName,omitempty"` // AttributeValue: The value of the product detail. AttributeValue string `json:"attributeValue,omitempty"` // SectionName: The section header used to group a set of product details. SectionName string `json:"sectionName,omitempty"` // ForceSendFields is a list of field names (e.g. "AttributeName") 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. "AttributeName") 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:"-"` }
ProductDetail: The product details.
func (ProductDetail) MarshalJSON ¶
func (s ProductDetail) MarshalJSON() ([]byte, error)
type ProductDimension ¶
type ProductDimension struct { // Unit: Required. The dimension units. Acceptable values are: * "in" * // "cm" Unit string `json:"unit,omitempty"` // Value: Required. The dimension value represented as a number. The value can // have a maximum precision of four decimal places. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
ProductDimension: The dimension of the product.
func (ProductDimension) MarshalJSON ¶
func (s ProductDimension) MarshalJSON() ([]byte, error)
func (*ProductDimension) UnmarshalJSON ¶
func (s *ProductDimension) UnmarshalJSON(data []byte) error
type ProductInput ¶
type ProductInput struct { // Attributes: Optional. A list of product attributes. Attributes *Attributes `json:"attributes,omitempty"` // Channel: Required. Immutable. The channel // (https://support.google.com/merchants/answer/7361332) of the product. // // Possible values: // "CHANNEL_ENUM_UNSPECIFIED" - Not specified. // "ONLINE" - Online product. // "LOCAL" - Local product. Channel string `json:"channel,omitempty"` // ContentLanguage: Required. Immutable. The two-letter ISO 639-1 // (http://en.wikipedia.org/wiki/ISO_639-1) language code for the product. ContentLanguage string `json:"contentLanguage,omitempty"` // 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 additional attributes used for Buy on Google. 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"` // FeedLabel: Required. Immutable. The feed label // (https://developers.google.com/shopping-content/guides/products/feed-labels) // for the product. FeedLabel string `json:"feedLabel,omitempty"` // Name: Identifier. The name of the product input. Format: // "{productinput.name=accounts/{account}/productInputs/{productinput}}" Name string `json:"name,omitempty"` // OfferId: Required. Immutable. Your unique identifier for the product. This // is the same for the product input and processed product. Leading and // trailing whitespaces are stripped and multiple whitespaces are replaced by a // single whitespace upon submission. See the products data specification // (https://support.google.com/merchants/answer/188494#id) for details. OfferId string `json:"offerId,omitempty"` // Product: Output only. The name of the processed product. Format: // "{product.name=accounts/{account}/products/{product}}" Product string `json:"product,omitempty"` // VersionNumber: Optional. Represents the existing version (freshness) of the // product, which can be used to preserve the right order when multiple updates // are done at the same time. If set, the insertion is prevented when version // number is lower than the current version number of the existing product. // Re-insertion (for example, product refresh after 30 days) can be performed // with the current `version_number`. Only supported for insertions into // primary data sources. If the operation is prevented, the aborted exception // will be thrown. VersionNumber int64 `json:"versionNumber,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. "Attributes") 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. "Attributes") 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:"-"` }
ProductInput: This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed product. Required product input attributes to pass data validation checks are primarily defined in the Products Data Specification (https://support.google.com/merchants/answer/188494). The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with some exceptions (https://support.google.com/merchants/answer/7052112).
func (ProductInput) MarshalJSON ¶
func (s ProductInput) MarshalJSON() ([]byte, error)
type ProductStatus ¶
type ProductStatus struct { // CreationDate: Date on which the item has been created, in ISO 8601 // (http://en.wikipedia.org/wiki/ISO_8601) format. CreationDate string `json:"creationDate,omitempty"` // DestinationStatuses: The intended destinations for the product. DestinationStatuses []*DestinationStatus `json:"destinationStatuses,omitempty"` // GoogleExpirationDate: Date on which the item expires, in ISO 8601 // (http://en.wikipedia.org/wiki/ISO_8601) format. GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` // ItemLevelIssues: A list of all issues associated with the product. ItemLevelIssues []*ItemLevelIssue `json:"itemLevelIssues,omitempty"` // LastUpdateDate: Date on which the item has been last updated, in ISO 8601 // (http://en.wikipedia.org/wiki/ISO_8601) format. LastUpdateDate string `json:"lastUpdateDate,omitempty"` // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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:"-"` }
ProductStatus: The status of a product, data validation issues, that is, information about a product computed asynchronously.
func (ProductStatus) MarshalJSON ¶
func (s ProductStatus) 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 ProductStructuredDescription ¶
type ProductStructuredDescription struct { // Content: The description text Maximum length is 5000 characters Content string `json:"content,omitempty"` // DigitalSourceType: The digital source type, for example // "trained_algorithmic_media". Following IPTC // (https://cv.iptc.org/newscodes/digitalsourcetype). Maximum length is 40 // characters. DigitalSourceType string `json:"digitalSourceType,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"` }
ProductStructuredDescription: Structured description, for algorithmically (AI)-generated descriptions.
func (ProductStructuredDescription) MarshalJSON ¶
func (s ProductStructuredDescription) MarshalJSON() ([]byte, error)
type ProductStructuredTitle ¶
type ProductStructuredTitle struct { // Content: The title text Maximum length is 150 characters Content string `json:"content,omitempty"` // DigitalSourceType: The digital source type, for example // "trained_algorithmic_media". Following IPTC // (https://cv.iptc.org/newscodes/digitalsourcetype). Maximum length is 40 // characters. DigitalSourceType string `json:"digitalSourceType,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"` }
ProductStructuredTitle: Structured title, for algorithmically (AI)-generated titles.
func (ProductStructuredTitle) MarshalJSON ¶
func (s ProductStructuredTitle) MarshalJSON() ([]byte, error)
type ProductWeight ¶
type ProductWeight struct { // Unit: Required. The weight unit. Acceptable values are: * "g" * "kg" * // "oz" * "lb" Unit string `json:"unit,omitempty"` // Value: Required. The weight represented as a number. The weight can have a // maximum precision of four decimal places. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
ProductWeight: The weight of the product.
func (ProductWeight) MarshalJSON ¶
func (s ProductWeight) MarshalJSON() ([]byte, error)
func (*ProductWeight) UnmarshalJSON ¶
func (s *ProductWeight) UnmarshalJSON(data []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.
type Shipping ¶
type Shipping struct { // Country: The CLDR territory code // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the // country to which an item will ship. Country string `json:"country,omitempty"` // LocationGroupName: The location where the shipping is applicable, // represented by a location group name. LocationGroupName string `json:"locationGroupName,omitempty"` // LocationId: The numeric ID of a location that the shipping rate applies to // as defined in the AdWords API // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). LocationId int64 `json:"locationId,omitempty,string"` // MaxHandlingTime: Maximum handling time (inclusive) between when the order is // received and shipped in business days. 0 means that the order is shipped on // the same day as it is received if it happens before the cut-off time. Both // maxHandlingTime and maxTransitTime are required if providing shipping // speeds. minHandlingTime is optional if maxHandlingTime is present. MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` // MaxTransitTime: Maximum transit time (inclusive) between when the order has // shipped and when it is delivered in business days. 0 means that the order is // delivered on the same day as it ships. Both maxHandlingTime and // maxTransitTime are required if providing shipping speeds. minTransitTime is // optional if maxTransitTime is present. MaxTransitTime int64 `json:"maxTransitTime,omitempty,string"` // MinHandlingTime: Minimum handling time (inclusive) between when the order is // received and shipped in business days. 0 means that the order is shipped on // the same day as it is received if it happens before the cut-off time. // minHandlingTime can only be present together with maxHandlingTime; but it is // not required if maxHandlingTime is present. MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` // MinTransitTime: Minimum transit time (inclusive) between when the order has // shipped and when it is delivered in business days. 0 means that the order is // delivered on the same day as it ships. minTransitTime can only be present // together with maxTransitTime; but it is not required if maxTransitTime is // present. MinTransitTime int64 `json:"minTransitTime,omitempty,string"` // PostalCode: The postal code range that the shipping rate applies to, // represented by a postal code, a postal code prefix followed by a * wildcard, // a range between two postal codes or two postal code prefixes of equal // length. PostalCode string `json:"postalCode,omitempty"` // Price: Fixed shipping price, represented as a number. Price *Price `json:"price,omitempty"` // Region: The geographic region to which a shipping rate applies. See region // (https://support.google.com/merchants/answer/6324484) for more information. Region string `json:"region,omitempty"` // Service: A free-form description of the service class or delivery speed. Service string `json:"service,omitempty"` // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` }
Shipping: The Shipping of the product.
func (Shipping) MarshalJSON ¶
type ShippingDimension ¶
type ShippingDimension struct { // Unit: The unit of value. Unit string `json:"unit,omitempty"` // Value: The dimension of the product used to calculate the shipping cost of // the item. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
ShippingDimension: The ShippingDimension of the product.
func (ShippingDimension) MarshalJSON ¶
func (s ShippingDimension) MarshalJSON() ([]byte, error)
func (*ShippingDimension) UnmarshalJSON ¶
func (s *ShippingDimension) UnmarshalJSON(data []byte) error
type ShippingWeight ¶
type ShippingWeight struct { // Unit: The unit of value. Unit string `json:"unit,omitempty"` // Value: The weight of the product used to calculate the shipping cost of the // item. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
ShippingWeight: The ShippingWeight of the product.
func (ShippingWeight) MarshalJSON ¶
func (s ShippingWeight) MarshalJSON() ([]byte, error)
func (*ShippingWeight) UnmarshalJSON ¶
func (s *ShippingWeight) UnmarshalJSON(data []byte) error
type SubscriptionCost ¶
type SubscriptionCost struct { // Amount: The amount the buyer has to pay per subscription period. Amount *Price `json:"amount,omitempty"` // Period: The type of subscription period. Supported values are: * "month" * // "year" // // Possible values: // "SUBSCRIPTION_PERIOD_UNSPECIFIED" - Indicates that the subscription period // is unspecified. // "MONTH" - Indicates that the subscription period is month. // "YEAR" - Indicates that the subscription period is year. Period string `json:"period,omitempty"` // PeriodLength: The number of subscription periods the buyer has to pay. PeriodLength int64 `json:"periodLength,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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:"-"` }
SubscriptionCost: The SubscriptionCost of the product.
func (SubscriptionCost) MarshalJSON ¶
func (s SubscriptionCost) MarshalJSON() ([]byte, error)
type Tax ¶
type Tax struct { // Country: The country within which the item is taxed, specified as a CLDR // territory code // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml). Country string `json:"country,omitempty"` // LocationId: The numeric ID of a location that the tax rate applies to as // defined in the AdWords API // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). LocationId int64 `json:"locationId,omitempty,string"` // PostalCode: The postal code range that the tax rate applies to, represented // by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP // codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, // 94002-95460, 94*-95*. PostalCode string `json:"postalCode,omitempty"` // Rate: The percentage of tax rate that applies to the item price. Rate float64 `json:"rate,omitempty"` // Region: The geographic region to which the tax rate applies. Region string `json:"region,omitempty"` // TaxShip: Set to true if tax is charged on shipping. TaxShip bool `json:"taxShip,omitempty"` // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` }
Tax: The Tax of the product.
func (Tax) MarshalJSON ¶
func (*Tax) UnmarshalJSON ¶
type UnitPricingBaseMeasure ¶
type UnitPricingBaseMeasure struct { // Unit: The unit of the denominator. Unit string `json:"unit,omitempty"` // Value: The denominator of the unit price. Value int64 `json:"value,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
UnitPricingBaseMeasure: The UnitPricingBaseMeasure of the product.
func (UnitPricingBaseMeasure) MarshalJSON ¶
func (s UnitPricingBaseMeasure) MarshalJSON() ([]byte, error)
type UnitPricingMeasure ¶
type UnitPricingMeasure struct { // Unit: The unit of the measure. Unit string `json:"unit,omitempty"` // Value: The measure of an item. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` }
UnitPricingMeasure: The UnitPricingMeasure of the product.
func (UnitPricingMeasure) MarshalJSON ¶
func (s UnitPricingMeasure) MarshalJSON() ([]byte, error)
func (*UnitPricingMeasure) UnmarshalJSON ¶
func (s *UnitPricingMeasure) UnmarshalJSON(data []byte) error