client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMethodNotAllowed = errors.New("method not allowed")

Functions

This section is empty.

Types

type Client

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

func New

func New(url string) *Client

New returns a new checkout server http client.

func (*Client) AddAuthorizationHeader

func (c *Client) AddAuthorizationHeader(psswd string)

func (*Client) AddItems

func (client *Client) AddItems(ctx context.Context, addItemReq *model.AddItemsRequest) error

func (*Client) GetItemPrice

func (client *Client) GetItemPrice(ctx context.Context, key string) (*model.PriceResponse, error)

func (*Client) GetItemsPrice

func (client *Client) GetItemsPrice(ctx context.Context, itemsPriceReq *model.ItemsPriceRequest) (*model.PriceResponse, error)

func (*Client) GetOrders

func (client *Client) GetOrders(ctx context.Context) (*model.Orders, error)

func (*Client) Health

func (client *Client) Health(ctx context.Context) (*model.HealthResponse, error)

func (*Client) PurchaseItems

func (client *Client) PurchaseItems(ctx context.Context, itemsPriceReq *model.PurchaseItemsRequest) (*model.PurchaseItemsResponse, error)

func (*Client) Status

func (client *Client) Status(ctx context.Context) (*model.StatusResponse, error)

Jump to

Keyboard shortcuts

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