Versions in this module Expand all Collapse all v0 v0.1.0 Dec 11, 2019 Changes in this version + var ErrorsSeparator = ";" + func ParsePrice(strPrice string) (float64, error) + func TransformPrice(price float64) string + type Classification struct + Position int + Taxon *Taxon + TaxonID int + type Error struct + Err string + Errors map[string][]string + func (err *Error) Error() string + type Image struct + Alt string + AttachmentContentType string + AttachmentFileName string + AttachmentHeight int + AttachmentUpdatedAt time.Time + AttachmentWidth int + Id ImageId + LargeURL string + MiniURL string + Position int + ProductURL string + SmallURL string + Type string + ViewableId int + ViewableType string + type ImageId int + type OptionType struct + Id int + Name string + Position int + Presentation string + type OptionValue struct + Id int + Name string + OptionTypeID int + OptionTypeName string + OptionTypePresentation string + Presentation string + type Product struct + AvailableOn time.Time + Description string + DisplayPrice string + Id ProductId + Master *Variant + Name string + OptionTypes []*OptionType + Price string + ProductProperties []*Property + ShippingCategoryId ShippingCategoryId + Slug string + TaxonIds []int + TotalOnHand int + Variants []*Variant + func NewProduct(name string, price float64, shippingCategoryId ShippingCategoryId) (*Product, error) + func (p *Product) VariantsIncludingMaster() []*Variant + type ProductId int + type ProductsEdge struct + Count int + CurrentPage int + Pages int + PerPage int + Products []*Product + TotalCount int + type Property struct + Id PropertyId + ProductId ProductId + PropertyId int + PropertyName string + Value string + type PropertyId int + type Resource struct + Id int + Name string + type ShippingCategoryId int + type Spree struct + Key token + Site string + func (s *Spree) Delete(url string) (resp *http.Response, err error) + func (s *Spree) DeleteProduct(id ProductId) error + func (s *Spree) FetchProducts() ([]*Product, error) + func (s *Spree) Get(url string) (resp *http.Response, err error) + func (s *Spree) GetProduct(id ProductId) (*Product, error) + func (s *Spree) GetProducts(page int) (*ProductsEdge, error) + func (s *Spree) GetVariant(id VariantId, prodId ProductId) (*Variant, error) + func (s *Spree) Post(url string, body io.Reader) (resp *http.Response, err error) + func (s *Spree) Put(url string, body io.Reader) (resp *http.Response, err error) + func (s *Spree) RouteTo(path string, params url.Values, ids ...interface{}) (string, error) + func (s *Spree) SetAndValidateCredentials(ctx context.Context, apiKey string) error + func (s *Spree) SetClient(c http.Client) + func (s *Spree) SetCredentials(ctx context.Context, apiKey string) error + func (s *Spree) SetProduct(prod *Product) (newProd *Product, err error) + func (s *Spree) SetVariant(v *Variant, prodId ProductId) (newVar *Variant, err error) + func (s *Spree) UpdateStock(id VariantId, prodId ProductId, stockLocationId StockLocationId, count int) (*StockItem, error) + type StockItem struct + Available bool + Backorderable bool + CountOnHand int + Force bool + Id StockItemId + StockLocationId StockLocationId + StockLocationName string + type StockItemId int + type StockLocationId int + type Taxon struct + Id int + Name string + ParentId int + Permalink string + PrettyName string + TaxonomyId int + Taxons []*Taxon + type Variant struct + CostPrice string + Depth string + Description string + DisplayPrice string + Height string + Id VariantId + Images []*Image + InStock bool + IsBackorderable bool + IsDestroyed bool + IsMaster bool + Name string + OptionValues []*OptionValue + OptionsText string + Price string + SKU string + Slug string + StockItems []*StockItem + TotalOnHand int + TrackInventory bool + Weight string + Width string + func NewVariant(name string, price float64, optionValues []*OptionValue, picsSrc []string) *Variant + func (v *Variant) StockItemByLocation(stockLocationId StockLocationId) (*StockItem, error) + type VariantId int + type Webhook struct + Parent *Resource + Resource *Resource + Site string