configurableproducts

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MConfigurableProduct

type MConfigurableProduct struct {
	Route     string
	Options   *[]Option
	APIClient *api.Client
}

func GetConfigurableProductBySKU

func GetConfigurableProductBySKU(sku string, apiClient *api.Client) (*MConfigurableProduct, error)

func SetOptionForExistingConfigurableProduct

func SetOptionForExistingConfigurableProduct(sku string, o *Option, apiClient *api.Client) (*MConfigurableProduct, error)

func (*MConfigurableProduct) AddChildBySKU

func (mConfigurableProduct *MConfigurableProduct) AddChildBySKU(sku string) error

func (*MConfigurableProduct) UpdateOptionByID

func (mConfigurableProduct *MConfigurableProduct) UpdateOptionByID(o *Option) error

func (*MConfigurableProduct) UpdateOptionsFromRemote

func (mConfigurableProduct *MConfigurableProduct) UpdateOptionsFromRemote() error

type Option

type Option struct {
	ID                  int         `json:"id,omitempty"`
	AttributeID         string      `json:"attribute_id"`
	Label               string      `json:"label"`
	Position            int         `json:"position"`
	IsUseDefault        bool        `json:"is_use_default"`
	Values              []Value     `json:"values"`
	ExtensionAttributes interface{} `json:"extension_attributes,omitempty"`
	ProductID           int         `json:"product_id,omitempty"`
}

type Value

type Value struct {
	ValueIndex          int         `json:"value_index,omitempty"`
	ExtensionAttributes interface{} `json:"extension_attributes,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL