Versions in this module Expand all Collapse all v0 v0.0.3 Mar 13, 2024 Changes in this version + const ACRE + const AMPERE + const AMPEREHOUR + const ARE + const ARPENT + const ATM + const BAR + const BARREL + const BIT + const BYTE + const CALORIE + const CELSIUS + const CENTIAMPERE + const CENTIARE + const CENTICOULOMB + const CENTILITER + const CENTIMETER + const CENTIOHM + const CENTIVOLT + const CHAIN + const COULOMB + const CUBIC_CENTIMETER + const CUBIC_DECIMETER + const CUBIC_FOOT + const CUBIC_INCH + const CUBIC_METER + const CUBIC_MILLIMETER + const CUBIC_YARD + const DAY + const DECIAMPERE + const DECIBEL + const DECICOULOMB + const DECILITER + const DECIMETER + const DECIOHM + const DECIVOLT + const DEKACOULOMB + const DEKAMETER + const DEKAMPERE + const DEKAOHM + const DEKAVOLT + const DENIER + const DOZEN + const FAHRENHEIT + const FEET + const FOOT_PER_HOUR + const FOOT_PER_SECOND + const FURLONG + const GALLON + const GIGABYTE + const GIGAHERTZ + const GIGAWATT + const GRAIN + const GRAM + const HECTARE + const HECTOAMPERE + const HECTOCOULOMB + const HECTOHM + const HECTOMETER + const HECTOPASCAL + const HECTOVOLT + const HERTZ + const HOUR + const INCH + const JOULE + const KELVIN + const KILOAMPERE + const KILOBYTE + const KILOCALORIE + const KILOCOULOMB + const KILOGRAM + const KILOHERTZ + const KILOHM + const KILOJOULE + const KILOMETER + const KILOMETER_PER_HOUR + const KILOVOLT + const KILOWATT + const LITER + const LIVRE + const MARC + const MEGABYTE + const MEGAHERTZ + const MEGAWATT + const MEGOHM + const METER + const METER_PER_HOUR + const METER_PER_MINUTE + const METER_PER_SECOND + const MIL + const MILE + const MILE_PER_HOUR + const MILLIAMPERE + const MILLIAMPEREHOUR + const MILLIBAR + const MILLICOULOMB + const MILLIGRAM + const MILLILITER + const MILLIMETER + const MILLIOHM + const MILLISECOND + const MILLIVOLT + const MINUTE + const MMHG + const MONTH + const MediaUsageDetail + const MediaUsageList + const MediaUsageThumbnail + const OHM + const OUNCE + const PASCAL + const PCS + const PIECE + const PINT + const POUND + const PSI + const RANKINE + const REAUMUR + const SECOND + const SQUARE_CENTIMETER + const SQUARE_DECIMETER + const SQUARE_DEKAMETER + const SQUARE_FOOT + const SQUARE_FURLONG + const SQUARE_HECTOMETER + const SQUARE_INCH + const SQUARE_KILOMETER + const SQUARE_METER + const SQUARE_MIL + const SQUARE_MILE + const SQUARE_MILLIMETER + const SQUARE_YARD + const StockLevelInStock + const StockLevelLowStock + const StockLevelOutOfStock + const TERABYTE + const TERAHERTZ + const TERAWATT + const TON + const TORR + const TypeBundle + const TypeBundleWithActiveChoices + const TypeConfigurable + const TypeConfigurableWithActiveVariant + const TypeSimple + const VOLT + const WATT + const WEEK + const YARD + const YARD_PER_HOUR + const YEAR + var ErrMarketplaceCodeDoNotExists = errors.New("selected marketplace code does not exist") + var ErrRequiredChoicesAreNotSelected = errors.New("required choices are not selected") + var ErrSelectedQuantityOutOfRange = errors.New("selected quantity is out of range") + var Units = map[string]Unit + type ActiveChoice struct + Identifier string + Label string + Product BasicProduct + Qty int + Required bool + type Attribute struct + Code string + CodeLabel string + Label string + RawValue interface{} + UnitCode string + func (at Attribute) GetUnit() Unit + func (at Attribute) HasMultipleValues() bool + func (at Attribute) HasUnitCode() bool + func (at Attribute) IsDisabledValue() bool + func (at Attribute) IsEnabledValue() bool + func (at Attribute) Labels() []string + func (at Attribute) Value() string + func (at Attribute) Values() []string + type Attributes map[string]Attribute + func (a Attributes) Attribute(key string) Attribute + func (a Attributes) AttributeKeys() []string + func (a Attributes) Attributes() []Attribute + func (a Attributes) AttributesByKey(keys []string) []Attribute + func (a Attributes) HasAttribute(key string) bool + type Badge struct + Code string + Label string + type Badges []Badge + func (b Badges) First() *Badge + type BasicProduct interface + BaseData func() BasicProductData + GetIdentifier func() string + GetMedia func(group string, usage string) Media + GetSpecifications func() Specifications + HasMedia func(group string, usage string) bool + IsSaleable func() bool + SaleableData func() Saleable + TeaserData func() TeaserData + Type func() string + type BasicProductData struct + Attributes Attributes + Badges Badges + Categories []CategoryTeaser + CategoryToCodeMapping []string + CreatedAt time.Time + Description string + IsNew bool + Keywords []string + MainCategory CategoryTeaser + MarketPlaceCode string + Media []Media + RetailerCode string + RetailerName string + RetailerSku string + ShortDescription string + Stock []Stock + StockLevel string + Title string + UpdatedAt time.Time + VisibleFrom time.Time + VisibleTo time.Time + func (bpd BasicProductData) Attribute(key string) Attribute + func (bpd BasicProductData) GetListMedia() Media + func (bpd BasicProductData) GetMedia(usage string) Media + func (bpd BasicProductData) GetSpecifications() Specifications + func (bpd BasicProductData) HasAllAttributes(keys []string) bool + func (bpd BasicProductData) HasAttribute(key string) bool + func (bpd BasicProductData) IsInStock() bool + func (bpd BasicProductData) IsInStockForDeliveryCode(deliveryCode string) bool + type BundleConfiguration map[Identifier]ChoiceConfiguration + func (bc BundleConfiguration) Equals(other BundleConfiguration) bool + type BundleProduct struct + Choices []Choice + Identifier string + Teaser TeaserData + func (b BundleProduct) BaseData() BasicProductData + func (b BundleProduct) GetBundleProductWithActiveChoices(bundleConfiguration BundleConfiguration) (BundleProductWithActiveChoices, error) + func (b BundleProduct) GetIdentifier() string + func (b BundleProduct) GetMedia(group string, usage string) Media + func (b BundleProduct) HasMedia(group string, usage string) bool + func (b BundleProduct) IsSaleable() bool + func (b BundleProduct) SaleableData() Saleable + func (b BundleProduct) TeaserData() TeaserData + func (b BundleProduct) Type() string + type BundleProductWithActiveChoices struct + ActiveChoices map[Identifier]ActiveChoice + func (b BundleProductWithActiveChoices) ExtractBundleConfig() BundleConfiguration + func (b BundleProductWithActiveChoices) Type() string + type CategoryTeaser struct + Code string + Name string + Parent *CategoryTeaser + Path string + func (c *CategoryTeaser) CPath() string + type Choice struct + Identifier string + Label string + Options []Option + Required bool + type ChoiceConfiguration struct + MarketplaceCode string + Qty int + VariantMarketplaceCode string + type Configurable interface + GetConfigurableWithActiveVariant func(variantMarketplaceCode string) (ConfigurableProductWithActiveVariant, error) + GetDefaultVariant func() (*Variant, error) + HasVariant func(variantMarketplaceCode string) bool + Variant func(variantMarketplaceCode string) (*Variant, error) + type ConfigurableProduct struct + Identifier string + Teaser TeaserData + VariantVariationAttributes []string + VariantVariationAttributesSorting map[string][]string + Variants []Variant + func (p ConfigurableProduct) BaseData() BasicProductData + func (p ConfigurableProduct) GetConfigurableWithActiveVariant(variantMarketplaceCode string) (ConfigurableProductWithActiveVariant, error) + func (p ConfigurableProduct) GetDefaultVariant() (*Variant, error) + func (p ConfigurableProduct) GetIdentifier() string + func (p ConfigurableProduct) GetMedia(group string, usage string) Media + func (p ConfigurableProduct) HasMedia(group string, usage string) bool + func (p ConfigurableProduct) HasVariant(variantMarketplaceCode string) bool + func (p ConfigurableProduct) IsSaleable() bool + func (p ConfigurableProduct) SaleableData() Saleable + func (p ConfigurableProduct) TeaserData() TeaserData + func (p ConfigurableProduct) Type() string + func (p ConfigurableProduct) Variant(variantMarketplaceCode string) (*Variant, error) + type ConfigurableProductWithActiveVariant struct + ActiveVariant Variant + Identifier string + Teaser TeaserData + VariantVariationAttributes []string + VariantVariationAttributesSorting map[string][]string + Variants []Variant + func (p ConfigurableProductWithActiveVariant) BaseData() BasicProductData + func (p ConfigurableProductWithActiveVariant) ConfigurableBaseData() BasicProductData + func (p ConfigurableProductWithActiveVariant) GetConfigurableWithActiveVariant(variantMarketplaceCode string) (ConfigurableProductWithActiveVariant, error) + func (p ConfigurableProductWithActiveVariant) GetDefaultVariant() (*Variant, error) + func (p ConfigurableProductWithActiveVariant) GetIdentifier() string + func (p ConfigurableProductWithActiveVariant) GetMedia(group string, usage string) Media + func (p ConfigurableProductWithActiveVariant) HasMedia(group string, usage string) bool + func (p ConfigurableProductWithActiveVariant) HasVariant(variantMarketplaceCode string) bool + func (p ConfigurableProductWithActiveVariant) IsSaleable() bool + func (p ConfigurableProductWithActiveVariant) SaleableData() Saleable + func (p ConfigurableProductWithActiveVariant) TeaserData() TeaserData + func (p ConfigurableProductWithActiveVariant) Type() string + func (p ConfigurableProductWithActiveVariant) Variant(variantMarketplaceCode string) (*Variant, error) + type Identifier string + type LoyaltyEarningInfo struct + Default priceDomain.Price + Type string + type LoyaltyPriceInfo struct + Context PriceContext + Default priceDomain.Price + DiscountText string + Discounted priceDomain.Price + IsDiscounted bool + MaxPointsToSpent *big.Float + MinPointsToSpent big.Float + Type string + func (l LoyaltyPriceInfo) GetFinalPrice() priceDomain.Price + func (l LoyaltyPriceInfo) GetRate(valuedPrice priceDomain.Price) big.Float + func (l LoyaltyPriceInfo) HasMax() bool + type Media struct + MimeType string + Reference string + Title string + Type string + Usage string + type Option struct + MaxQty int + MinQty int + Product BasicProduct + func (o *Option) UnmarshalJSON(optionData []byte) error + type PriceContext struct + ChannelCode string + CustomerGroup string + DeliveryCode string + Locale string + type PriceInfo struct + ActiveBase big.Float + ActiveBaseAmount big.Float + ActiveBaseUnit string + CampaignRules []string + Context PriceContext + Default priceDomain.Price + DenyMoreDiscounts bool + DiscountText string + Discounted priceDomain.Price + IsDiscounted bool + TaxClass string + func (p PriceInfo) GetFinalPrice() priceDomain.Price + type ProductNotFound struct + MarketplaceCode string + func (err ProductNotFound) Error() string + type ProductService interface + Get func(ctx context.Context, marketplaceCode string) (BasicProduct, error) + type Saleable struct + ActivePrice PriceInfo + AvailablePrices []PriceInfo + IsSaleable bool + LoyaltyEarnings []LoyaltyEarningInfo + LoyaltyPrices []LoyaltyPriceInfo + SaleableFrom time.Time + SaleableTo time.Time + func (p Saleable) GetLoyaltyChargeSplit(valuedPriceToPay *priceDomain.Price, loyaltyPointsWishedToPay *WishedToPay, ...) priceDomain.Charges + func (p Saleable) GetLoyaltyChargeSplitIgnoreMin(valuedPriceToPay *priceDomain.Price, loyaltyPointsWishedToPay *WishedToPay, ...) priceDomain.Charges + func (p Saleable) GetLoyaltyEarningByType(ltype string) (*LoyaltyEarningInfo, bool) + func (p Saleable) GetLoyaltyPriceByType(ltype string) (*LoyaltyPriceInfo, bool) + func (p Saleable) IsSaleableNow() bool + type SearchResult struct + Hits []BasicProduct + type SearchService interface + Search func(ctx context.Context, filter ...searchDomain.Filter) (*SearchResult, error) + SearchBy func(ctx context.Context, attribute string, values []string, ...) (*SearchResult, error) + type SimpleProduct struct + Identifier string + Teaser TeaserData + func (p SimpleProduct) BaseData() BasicProductData + func (p SimpleProduct) GetIdentifier() string + func (p SimpleProduct) GetMedia(group string, usage string) Media + func (p SimpleProduct) HasMedia(group string, usage string) bool + func (p SimpleProduct) IsSaleable() bool + func (p SimpleProduct) SaleableData() Saleable + func (p SimpleProduct) TeaserData() TeaserData + func (p SimpleProduct) Type() string + type SpecificationEntry struct + Label string + Values []string + type SpecificationGroup struct + Entries []SpecificationEntry + Title string + type Specifications struct + Groups []SpecificationGroup + type Stock struct + Amount int + DeliveryCode string + InStock bool + Level string + type TeaserData struct + Badges Badges + MarketPlaceCode string + Media []Media + PreSelectedVariantSku string + ShortDescription string + ShortTitle string + TeaserAvailablePrices []PriceInfo + TeaserLoyaltyEarningInfo *LoyaltyEarningInfo + TeaserLoyaltyPriceInfo *LoyaltyPriceInfo + TeaserPrice PriceInfo + TeaserPriceIsFromPrice bool + URLSlug string + type Unit struct + Code string + Symbol string + type Variant struct + func (v Variant) BaseData() BasicProductData + func (v Variant) SaleableData() Saleable + type WishedToPay struct + func NewWishedToPay() WishedToPay + func (w WishedToPay) Add(ctype string, price priceDomain.Price) WishedToPay + func (w WishedToPay) GetByType(ctype string) *priceDomain.Price + func (w WishedToPay) Split(count int) []WishedToPay