Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v5.8.1 (2026-03-10)

- Fixes the possibility for a panic when listing claims, reports, shipments, or trackers (closes #276)

## v5.8.0 (2026-02-25)

- Adds generic `MakeAPICall` function
Expand Down
4 changes: 3 additions & 1 deletion claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ func (c *Client) ListClaims(opts *ListClaimsParameters) (out *ListClaimsResult,
func (c *Client) ListClaimsWithContext(ctx context.Context, opts *ListClaimsParameters) (out *ListClaimsResult, err error) {
err = c.do(ctx, http.MethodGet, "claims", opts, &out)
// Store the original query parameters for reuse when getting the next page
out.Parameters = *opts
if err == nil && out != nil {
out.Parameters = *opts
}
return
}

Expand Down
4 changes: 3 additions & 1 deletion report.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ func (c *Client) ListReports(typ string, opts *ListOptions) (out *ListReportsRes
func (c *Client) ListReportsWithContext(ctx context.Context, typ string, opts *ListOptions) (out *ListReportsResult, err error) {
err = c.do(ctx, http.MethodGet, "reports/"+typ, opts, &out)
// Store the original query parameters for reuse when getting the next page
out.Type = typ
if err == nil && out != nil {
out.Type = typ
}
return
}

Expand Down
6 changes: 4 additions & 2 deletions shipment.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ func (c *Client) ListShipments(opts *ListShipmentsOptions) (out *ListShipmentsRe
func (c *Client) ListShipmentsWithContext(ctx context.Context, opts *ListShipmentsOptions) (out *ListShipmentsResult, err error) {
err = c.do(ctx, http.MethodGet, "shipments", opts, &out)
// Store the original query parameters for reuse when getting the next page
out.Purchased = opts.Purchased
out.IncludeChildren = opts.IncludeChildren
if err == nil && out != nil {
out.Purchased = opts.Purchased
out.IncludeChildren = opts.IncludeChildren
}
return
}

Expand Down
6 changes: 4 additions & 2 deletions tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ func (c *Client) ListTrackers(opts *ListTrackersOptions) (out *ListTrackersResul
func (c *Client) ListTrackersWithContext(ctx context.Context, opts *ListTrackersOptions) (out *ListTrackersResult, err error) {
err = c.do(ctx, http.MethodGet, "trackers", opts, &out)
// Store the original query parameters for reuse when getting the next page
out.TrackingCode = opts.TrackingCode
out.Carrier = opts.Carrier
if err == nil && out != nil {
out.TrackingCode = opts.TrackingCode
out.Carrier = opts.Carrier
}
return
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package easypost

const Version = "5.8.0"
const Version = "5.8.1"