api

package
v0.0.0-...-99c94e3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COUPONS                   = "coupons"
	CUSTOMERS                 = "customers"
	ORDERS                    = "orders"
	ENDPOINT_PRODUCTS         = "products"
	PRODUCTS_ATTRIBUTES       = "products/attributes"
	PRODUCTS_CATEGORIES       = "products/categories"
	PRODUCTS_SHIPPING_CLASSES = "products/shipping_classes"
	PRODUCTS_TAGS             = "products/tags"
	REPORTS                   = "reports"
	REPORTS_SALES             = "reports/sales"
	REPORTS_TOP_SELLERS       = "reports/top_sellers"
	TAXES                     = "taxes"
	TAXES_CLASSES             = "taxes/classes"
	WEBHOOKS                  = "webhooks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductInterface

type ProductInterface interface {
	//Create()
	Get(ctx context.Context, params url.Values) (*[]models.Product, error)
	///FindBy(ctx context.Context, data interface{}) (*models.Product, error)
	FindBySKU(ctx context.Context, sku string) (*models.Product, error)
}

ProductInterface allows you to create, view, update, and delete individual, or a batch, of products https://woocommerce.github.io/woocommerce-rest-api-docs/#products

type WcClient

type WcClient struct {
	// contains filtered or unexported fields
}

func NewWoocommerceClient

func NewWoocommerceClient(store string, apiConfig *rest.ApiConfig) (*WcClient, error)

NewWoocommerceClient creates a new Client for the given api config, where httpClient was generated with rest.NewClient(store, apiConfig).

func (*WcClient) Products

func (c *WcClient) Products() ProductInterface

func (*WcClient) RESTClient

func (c *WcClient) RESTClient() rest.Interface

RESTClient returns interface that is used to communicate with API server by this client implementation.

type WcClientInterface

type WcClientInterface interface {
	RESTClient() rest.Interface
}

Jump to

Keyboard shortcuts

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