parcel

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 11 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
}

func New

func New(apiKey string, apiSecret string) *Client

func (*Client) Get

func (c *Client) Get(parcelID int64) (*sendcloud.Parcel, error)

Return a single parcel

func (*Client) GetDocument added in v0.4.5

func (c *Client) GetDocument(ctx context.Context, parcelID int64, docTyp string, fmt sendcloud.DocumentFormat, dpi int) (*sendcloud.Document, error)

GetDocument retrieves the parcel document of parcelID with type docType from the api. https://api.sendcloud.dev/docs/sendcloud-public-api/parcel-documents/operations/get-a-parcel-document

func (*Client) GetLabel

func (c *Client) GetLabel(labelURL string) ([]byte, error)

Get a label as bytes based on the url that references the PDF

func (*Client) New

func (c *Client) New(params *sendcloud.ParcelParams) (*sendcloud.Parcel, error)

Create a new parcel

func (*Client) ReadParcelWebhook

func (c *Client) ReadParcelWebhook(payload []byte, signature string) (*sendcloud.Parcel, error)

Validate and read the incoming webhook

Jump to

Keyboard shortcuts

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