client

package
v0.0.0-...-e4c3402 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the Square API client.

func NewClient

func NewClient(token string) *Client

NewClient creates a new Square API client using the specified auth token.

func (*Client) DeleteCatalogObject

func (c *Client) DeleteCatalogObject(id string) ([]string, error)

DeleteCatalogObject deletes a Square CatalogObject with the specified ID.

func (*Client) RetrieveCatalogObject

func (c *Client) RetrieveCatalogObject(id string) (*squaremodel.CatalogObject, error)

RetrieveCatalogObject retrieves a Square CatalogObject.

func (*Client) UpsertCatalogObject

func (c *Client) UpsertCatalogObject(obj *squaremodel.CatalogObject) (*squaremodel.CatalogObject, error)

UpsertCatalogObject creates or updates a Square CatalogObject.

type SquareAPI

type SquareAPI interface {
	DeleteCatalogObject(id string) ([]string, error)
	RetrieveCatalogObject(id string) (*squaremodel.CatalogObject, error)
	UpsertCatalogObject(*squaremodel.CatalogObject) (*squaremodel.CatalogObject, error)
}

SquareAPI defines an interface for Square's REST API.

Jump to

Keyboard shortcuts

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