Documentation ¶
Index ¶
- type ActiveVariantProduct
- func (avp ActiveVariantProduct) ActiveVariationSelections() []ActiveVariationSelection
- func (avp ActiveVariantProduct) Attributes() productDomain.Attributes
- func (avp ActiveVariantProduct) AvailablePrices() []productDomain.PriceInfo
- func (avp ActiveVariantProduct) Badges() ProductBadges
- func (avp ActiveVariantProduct) Categories() ProductCategories
- func (avp ActiveVariantProduct) Description() string
- func (avp ActiveVariantProduct) Identifier() string
- func (avp ActiveVariantProduct) Loyalty() ProductLoyalty
- func (avp ActiveVariantProduct) MarketPlaceCode() string
- func (avp ActiveVariantProduct) Media() ProductMedia
- func (avp ActiveVariantProduct) Meta() ProductMeta
- func (avp ActiveVariantProduct) Price() productDomain.PriceInfo
- func (avp ActiveVariantProduct) Product() productDomain.BasicProduct
- func (avp ActiveVariantProduct) ShortDescription() string
- func (avp ActiveVariantProduct) Title() string
- func (avp ActiveVariantProduct) Type() string
- func (avp ActiveVariantProduct) VariantMarketPlaceCode() string
- func (avp ActiveVariantProduct) VariationSelections() []VariationSelection
- type ActiveVariationSelection
- type BundleProduct
- func (sp BundleProduct) Attributes() productDomain.Attributes
- func (sp BundleProduct) AvailablePrices() []productDomain.PriceInfo
- func (sp BundleProduct) Badges() ProductBadges
- func (sp BundleProduct) Categories() ProductCategories
- func (sp BundleProduct) Description() string
- func (sp BundleProduct) Identifier() string
- func (sp BundleProduct) Loyalty() ProductLoyalty
- func (sp BundleProduct) MarketPlaceCode() string
- func (sp BundleProduct) Media() ProductMedia
- func (sp BundleProduct) Meta() ProductMeta
- func (sp BundleProduct) Price() productDomain.PriceInfo
- func (sp BundleProduct) Product() productDomain.BasicProduct
- func (sp BundleProduct) ShortDescription() string
- func (sp BundleProduct) Title() string
- func (sp BundleProduct) Type() string
- type Choice
- type ChoiceConfiguration
- type ConfigurableProduct
- func (cp ConfigurableProduct) Attributes() productDomain.Attributes
- func (cp ConfigurableProduct) AvailablePrices() []productDomain.PriceInfo
- func (cp ConfigurableProduct) Badges() ProductBadges
- func (cp ConfigurableProduct) Categories() ProductCategories
- func (cp ConfigurableProduct) Description() string
- func (cp ConfigurableProduct) Identifier() string
- func (cp ConfigurableProduct) Loyalty() ProductLoyalty
- func (cp ConfigurableProduct) MarketPlaceCode() string
- func (cp ConfigurableProduct) Media() ProductMedia
- func (cp ConfigurableProduct) Meta() ProductMeta
- func (cp ConfigurableProduct) Price() productDomain.PriceInfo
- func (cp ConfigurableProduct) Product() productDomain.BasicProduct
- func (cp ConfigurableProduct) ShortDescription() string
- func (cp ConfigurableProduct) Title() string
- func (cp ConfigurableProduct) Type() string
- func (cp ConfigurableProduct) VariantSelection() VariantSelection
- type Option
- type OtherAttributesRestriction
- type Product
- type ProductBadges
- type ProductCategories
- type ProductLoyalty
- type ProductMedia
- type ProductMeta
- type SimpleProduct
- func (sp SimpleProduct) Attributes() productDomain.Attributes
- func (sp SimpleProduct) AvailablePrices() []productDomain.PriceInfo
- func (sp SimpleProduct) Badges() ProductBadges
- func (sp SimpleProduct) Categories() ProductCategories
- func (sp SimpleProduct) Description() string
- func (sp SimpleProduct) Identifier() string
- func (sp SimpleProduct) Loyalty() ProductLoyalty
- func (sp SimpleProduct) MarketPlaceCode() string
- func (sp SimpleProduct) Media() ProductMedia
- func (sp SimpleProduct) Meta() ProductMeta
- func (sp SimpleProduct) Price() productDomain.PriceInfo
- func (sp SimpleProduct) Product() productDomain.BasicProduct
- func (sp SimpleProduct) ShortDescription() string
- func (sp SimpleProduct) Title() string
- func (sp SimpleProduct) Type() string
- type VariantSelection
- type VariantSelectionAttribute
- type VariantSelectionAttributeOption
- type VariantSelectionMatch
- type VariantSelectionMatchAttributes
- type VariantSelectionMatchVariant
- type VariationSelection
- type VariationSelectionOption
- type VariationSelectionOptionState
- type VariationSelectionOptionVariant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveVariantProduct ¶
type ActiveVariantProduct struct {
// contains filtered or unexported fields
}
ActiveVariantProduct is a Product variant that reflects one possible configuration of a configurable
func (ActiveVariantProduct) ActiveVariationSelections ¶
func (avp ActiveVariantProduct) ActiveVariationSelections() []ActiveVariationSelection
ActiveVariationSelections helper to easily access active variant attributes
func (ActiveVariantProduct) Attributes ¶
func (avp ActiveVariantProduct) Attributes() productDomain.Attributes
Attributes of the active variant
func (ActiveVariantProduct) AvailablePrices ¶ added in v3.5.0
func (avp ActiveVariantProduct) AvailablePrices() []productDomain.PriceInfo
AvailablePrices of the active variant
func (ActiveVariantProduct) Badges ¶
func (avp ActiveVariantProduct) Badges() ProductBadges
Badges of the active variant
func (ActiveVariantProduct) Categories ¶
func (avp ActiveVariantProduct) Categories() ProductCategories
Categories of the active variant
func (ActiveVariantProduct) Description ¶
func (avp ActiveVariantProduct) Description() string
Description of the active variant
func (ActiveVariantProduct) Identifier ¶
func (avp ActiveVariantProduct) Identifier() string
Identifier of the active variant
func (ActiveVariantProduct) Loyalty ¶
func (avp ActiveVariantProduct) Loyalty() ProductLoyalty
Loyalty contains loyalty information of the active variant
func (ActiveVariantProduct) MarketPlaceCode ¶
func (avp ActiveVariantProduct) MarketPlaceCode() string
MarketPlaceCode of the active variant
func (ActiveVariantProduct) Media ¶
func (avp ActiveVariantProduct) Media() ProductMedia
Media of the active variant
func (ActiveVariantProduct) Meta ¶
func (avp ActiveVariantProduct) Meta() ProductMeta
Meta contains meta information from the active variant
func (ActiveVariantProduct) Price ¶
func (avp ActiveVariantProduct) Price() productDomain.PriceInfo
Price of the active variant
func (ActiveVariantProduct) Product ¶
func (avp ActiveVariantProduct) Product() productDomain.BasicProduct
Product the basic product domain object
func (ActiveVariantProduct) ShortDescription ¶
func (avp ActiveVariantProduct) ShortDescription() string
ShortDescription of the product
func (ActiveVariantProduct) Title ¶
func (avp ActiveVariantProduct) Title() string
Title of the active variant
func (ActiveVariantProduct) Type ¶
func (avp ActiveVariantProduct) Type() string
Type of the product
func (ActiveVariantProduct) VariantMarketPlaceCode ¶
func (avp ActiveVariantProduct) VariantMarketPlaceCode() string
VariantMarketPlaceCode of the active variant
func (ActiveVariantProduct) VariationSelections ¶
func (avp ActiveVariantProduct) VariationSelections() []VariationSelection
VariationSelections contains information about the available variations for the product
type ActiveVariationSelection ¶
ActiveVariationSelection The variation for the currently active variant
type BundleProduct ¶ added in v3.6.0
type BundleProduct struct { Choices []Choice // contains filtered or unexported fields }
BundleProduct A bundle Product with options
func (BundleProduct) Attributes ¶ added in v3.6.0
func (sp BundleProduct) Attributes() productDomain.Attributes
Attributes of the product
func (BundleProduct) AvailablePrices ¶ added in v3.6.0
func (sp BundleProduct) AvailablePrices() []productDomain.PriceInfo
AvailablePrices of the product
func (BundleProduct) Badges ¶ added in v3.6.0
func (sp BundleProduct) Badges() ProductBadges
Badges of the product
func (BundleProduct) Categories ¶ added in v3.6.0
func (sp BundleProduct) Categories() ProductCategories
Categories of the product
func (BundleProduct) Description ¶ added in v3.6.0
func (sp BundleProduct) Description() string
Description of the product
func (BundleProduct) Identifier ¶ added in v3.6.0
func (sp BundleProduct) Identifier() string
Identifier of the product
func (BundleProduct) Loyalty ¶ added in v3.6.0
func (sp BundleProduct) Loyalty() ProductLoyalty
Loyalty of the product
func (BundleProduct) MarketPlaceCode ¶ added in v3.6.0
func (sp BundleProduct) MarketPlaceCode() string
MarketPlaceCode of the product
func (BundleProduct) Media ¶ added in v3.6.0
func (sp BundleProduct) Media() ProductMedia
Media of the product
func (BundleProduct) Meta ¶ added in v3.6.0
func (sp BundleProduct) Meta() ProductMeta
Meta of the product
func (BundleProduct) Price ¶ added in v3.6.0
func (sp BundleProduct) Price() productDomain.PriceInfo
Price of the product
func (BundleProduct) Product ¶ added in v3.6.0
func (sp BundleProduct) Product() productDomain.BasicProduct
Product the bundle product information
func (BundleProduct) ShortDescription ¶ added in v3.6.0
func (sp BundleProduct) ShortDescription() string
ShortDescription of the product
func (BundleProduct) Title ¶ added in v3.6.0
func (sp BundleProduct) Title() string
Title of the product
func (BundleProduct) Type ¶ added in v3.6.0
func (sp BundleProduct) Type() string
Type the product type
type ChoiceConfiguration ¶ added in v3.6.0
type ChoiceConfiguration struct { Identifier string MarketplaceCode string VariantMarketplaceCode *string Qty int }
Product contains normalized Product information regardless of being a variant or simple Product
type ConfigurableProduct ¶
type ConfigurableProduct struct {
// contains filtered or unexported fields
}
ConfigurableProduct is a configurable without active variant
func (ConfigurableProduct) Attributes ¶
func (cp ConfigurableProduct) Attributes() productDomain.Attributes
Attributes of the configurable
func (ConfigurableProduct) AvailablePrices ¶ added in v3.5.0
func (cp ConfigurableProduct) AvailablePrices() []productDomain.PriceInfo
AvailablePrices of the configurable
func (ConfigurableProduct) Badges ¶
func (cp ConfigurableProduct) Badges() ProductBadges
Badges of the configurable product
func (ConfigurableProduct) Categories ¶
func (cp ConfigurableProduct) Categories() ProductCategories
Categories of the configurable
func (ConfigurableProduct) Description ¶
func (cp ConfigurableProduct) Description() string
Description of the configurable
func (ConfigurableProduct) Identifier ¶
func (cp ConfigurableProduct) Identifier() string
Identifier of the configurable
func (ConfigurableProduct) Loyalty ¶
func (cp ConfigurableProduct) Loyalty() ProductLoyalty
Loyalty information about the configurable
func (ConfigurableProduct) MarketPlaceCode ¶
func (cp ConfigurableProduct) MarketPlaceCode() string
MarketPlaceCode of the configurable
func (ConfigurableProduct) Media ¶
func (cp ConfigurableProduct) Media() ProductMedia
Media of the configurable
func (ConfigurableProduct) Meta ¶
func (cp ConfigurableProduct) Meta() ProductMeta
Meta metadata of the configurable
func (ConfigurableProduct) Price ¶
func (cp ConfigurableProduct) Price() productDomain.PriceInfo
Price of the configurable
func (ConfigurableProduct) Product ¶
func (cp ConfigurableProduct) Product() productDomain.BasicProduct
Product the base product
func (ConfigurableProduct) ShortDescription ¶
func (cp ConfigurableProduct) ShortDescription() string
ShortDescription of the product
func (ConfigurableProduct) Title ¶
func (cp ConfigurableProduct) Title() string
Title of the configurable
func (ConfigurableProduct) Type ¶
func (cp ConfigurableProduct) Type() string
Type of the configurable
func (ConfigurableProduct) VariantSelection ¶ added in v3.6.0
func (cp ConfigurableProduct) VariantSelection() VariantSelection
VariantSelection contains possible combinations of variation attributes
type OtherAttributesRestriction ¶ added in v3.6.0
Product contains normalized Product information regardless of being a variant or simple Product
type Product ¶
type Product interface { Product() productDomain.BasicProduct Type() string MarketPlaceCode() string Identifier() string Media() ProductMedia Price() productDomain.PriceInfo AvailablePrices() []productDomain.PriceInfo Title() string Categories() ProductCategories Description() string ShortDescription() string Meta() ProductMeta Loyalty() ProductLoyalty Attributes() productDomain.Attributes Badges() ProductBadges }
Product interface - needs to be implemented by SimpleProducts and ConfigurableProducts
func NewGraphqlProductDto ¶
func NewGraphqlProductDto(product productDomain.BasicProduct, preSelectedVariantSku *string, bundleConfiguration productDomain.BundleConfiguration) Product
NewGraphqlProductDto returns a new Product dto
type ProductBadges ¶
type ProductBadges struct {
All []productDomain.Badge
}
ProductBadges wrapper for badges of the product
func (*ProductBadges) First ¶
func (b *ProductBadges) First() *productDomain.Badge
First badge of all badges, returns nil if there is no first badge
type ProductCategories ¶
type ProductCategories struct { Main productDomain.CategoryTeaser All []productDomain.CategoryTeaser }
ProductCategories wrapper for categories
type ProductLoyalty ¶
type ProductLoyalty struct { Price *productDomain.LoyaltyPriceInfo AvailablePrices []productDomain.LoyaltyPriceInfo Earning *productDomain.LoyaltyEarningInfo }
ProductLoyalty contains all loyalty related information
type ProductMedia ¶
type ProductMedia struct {
All []productDomain.Media
}
ProductMedia returns media for the product
func (ProductMedia) GetMedia ¶
func (pm ProductMedia) GetMedia(usage string) *productDomain.Media
GetMedia returns the FIRST found Product media by usage
type ProductMeta ¶
type ProductMeta struct {
Keywords []string
}
ProductMeta contains meta information about the product
type SimpleProduct ¶
type SimpleProduct struct {
// contains filtered or unexported fields
}
SimpleProduct A simple Product without variants
func (SimpleProduct) Attributes ¶
func (sp SimpleProduct) Attributes() productDomain.Attributes
Attributes of the product
func (SimpleProduct) AvailablePrices ¶ added in v3.5.0
func (sp SimpleProduct) AvailablePrices() []productDomain.PriceInfo
AvailablePrices of the product
func (SimpleProduct) Categories ¶
func (sp SimpleProduct) Categories() ProductCategories
Categories of the product
func (SimpleProduct) Description ¶
func (sp SimpleProduct) Description() string
Description of the product
func (SimpleProduct) Identifier ¶
func (sp SimpleProduct) Identifier() string
Identifier of the product
func (SimpleProduct) Loyalty ¶
func (sp SimpleProduct) Loyalty() ProductLoyalty
Loyalty of the product
func (SimpleProduct) MarketPlaceCode ¶
func (sp SimpleProduct) MarketPlaceCode() string
MarketPlaceCode of the product
func (SimpleProduct) Price ¶
func (sp SimpleProduct) Price() productDomain.PriceInfo
Price of the product
func (SimpleProduct) Product ¶
func (sp SimpleProduct) Product() productDomain.BasicProduct
Product the basic product information
func (SimpleProduct) ShortDescription ¶
func (sp SimpleProduct) ShortDescription() string
ShortDescription of the product
type VariantSelection ¶ added in v3.6.0
type VariantSelection struct { Attributes []VariantSelectionAttribute Variants []VariantSelectionMatch }
VariantSelection contains information about all possible variant selections
func MapVariantSelections ¶ added in v3.6.0
func MapVariantSelections(configurable domain.ConfigurableProduct) VariantSelection
type VariantSelectionAttribute ¶ added in v3.6.0
type VariantSelectionAttribute struct { Label string Code string Options []VariantSelectionAttributeOption }
Product contains normalized Product information regardless of being a variant or simple Product
type VariantSelectionAttributeOption ¶ added in v3.6.0
type VariantSelectionAttributeOption struct { Label string UnitCode string OtherAttributesRestrictions []OtherAttributesRestriction }
Product contains normalized Product information regardless of being a variant or simple Product
type VariantSelectionMatch ¶ added in v3.6.0
type VariantSelectionMatch struct { Attributes []VariantSelectionMatchAttributes Variant VariantSelectionMatchVariant }
Product contains normalized Product information regardless of being a variant or simple Product
type VariantSelectionMatchAttributes ¶ added in v3.6.0
Product contains normalized Product information regardless of being a variant or simple Product
type VariantSelectionMatchVariant ¶ added in v3.6.0
type VariantSelectionMatchVariant struct { MarketplaceCode string VariantData productDomain.Variant }
Product contains normalized Product information regardless of being a variant or simple Product
type VariationSelection ¶
type VariationSelection struct { Code string Label string Options []VariationSelectionOption }
VariationSelection represents possible combinations for attached variants
func NewVariantsToVariationSelections ¶
func NewVariantsToVariationSelections(p domain.BasicProduct) []VariationSelection
NewVariantsToVariationSelections Converts a product to variation selections
type VariationSelectionOption ¶
type VariationSelectionOption struct { Label string UnitCode string State VariationSelectionOptionState Variant VariationSelectionOptionVariant }
VariationSelectionOption one possible variation option
type VariationSelectionOptionState ¶
type VariationSelectionOptionState string
VariationSelectionOptionState state of the option
const ( // VariationSelectionOptionStateActive signals, that option is currently active because the active product has this attribute VariationSelectionOptionStateActive VariationSelectionOptionState = "ACTIVE" // VariationSelectionOptionStateMatch signals, that product exists for this option but is not the active variant VariationSelectionOptionStateMatch VariationSelectionOptionState = "MATCH" // VariationSelectionOptionStateNoMatch signals, that product does not exists for this option, fallback is used VariationSelectionOptionStateNoMatch VariationSelectionOptionState = "NO_MATCH" )
type VariationSelectionOptionVariant ¶
type VariationSelectionOptionVariant struct {
// contains filtered or unexported fields
}
VariationSelectionOptionVariant Information about the underlying variant
func NewVariationSelectionOptionVariant ¶
func NewVariationSelectionOptionVariant(variant productDomain.Variant) VariationSelectionOptionVariant
NewVariationSelectionOptionVariant Creates a new option variant from the domain variant
func (*VariationSelectionOptionVariant) BaseData ¶
func (v *VariationSelectionOptionVariant) BaseData() productDomain.BasicProductData
BaseData of the variant
func (*VariationSelectionOptionVariant) MarketPlaceCode ¶
func (v *VariationSelectionOptionVariant) MarketPlaceCode() string
MarketPlaceCode returns the marketPlaceCode of the variant
func (*VariationSelectionOptionVariant) Variant ¶ added in v3.6.0
func (v *VariationSelectionOptionVariant) Variant() productDomain.BasicProductData
Variant of the variant