Skip to content

Commit

Permalink
Removed unpaginated endpoints (#18)
Browse files Browse the repository at this point in the history
Remove ListCustomsInfo, ListCustomsItem, ListPickups and ListOrders methods.
  • Loading branch information
Justintime50 authored Jun 10, 2020
1 parent 1f06d65 commit e2ae694
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
27 changes: 0 additions & 27 deletions customs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package easypost

import (
"context"
"net/http"
"time"
)

Expand Down Expand Up @@ -80,19 +79,6 @@ func (c *Client) CreateCustomsInfoWithContext(ctx context.Context, in *CustomsIn
return
}

// ListCustomsInfos provides a paginated result of CustomsInfo objects.
func (c *Client) ListCustomsInfos() (out []*CustomsInfo, err error) {
err = c.do(nil, http.MethodGet, "customs_infos", nil, &out)
return
}

// ListCustomsInfosWithContext performs the same operation as ListCustomsInfos,
// but allows specifying a context that can interrupt the request.
func (c *Client) ListCustomsInfosWithContext(ctx context.Context) (out []*CustomsInfo, err error) {
err = c.do(ctx, http.MethodGet, "customs_infos", nil, &out)
return
}

// GetCustomsInfo returns the CustomsInfo object with the given ID or reference.
func (c *Client) GetCustomsInfo(customsInfoID string) (out *CustomsInfo, err error) {
err = c.get(nil, "customs_infos/"+customsInfoID, &out)
Expand Down Expand Up @@ -137,19 +123,6 @@ func (c *Client) CreateCustomsItemWithContext(ctx context.Context, in *CustomsIt
return
}

// ListCustomsItems provides a paginated result of CustomsItem objects.
func (c *Client) ListCustomsItems() (out []*CustomsItem, err error) {
err = c.do(nil, http.MethodGet, "customs_items", nil, &out)
return
}

// ListCustomsItemsWithContext performs the same operation as ListCustomsItems,
// but allows specifying a context that can interrupt the request.
func (c *Client) ListCustomsItemsWithContext(ctx context.Context) (out []*CustomsItem, err error) {
err = c.do(ctx, http.MethodGet, "customs_items", nil, &out)
return
}

// GetCustomsItem returns the CustomsInfo object with the given ID or reference.
func (c *Client) GetCustomsItem(customsItemID string) (out *CustomsItem, err error) {
err = c.get(nil, "customs_items/"+customsItemID, &out)
Expand Down
14 changes: 0 additions & 14 deletions order.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package easypost

import (
"context"
"net/http"
"net/url"
"time"
)
Expand Down Expand Up @@ -75,19 +74,6 @@ func (c *Client) CreateOrderWithContext(ctx context.Context, in *Order, accounts
return
}

// ListOrders provides a paginated result of Order objects.
func (c *Client) ListOrders() (out []*Order, err error) {
err = c.do(nil, http.MethodGet, "orders", nil, &out)
return
}

// ListOrdersWithContext performs the same operation as ListOrders,
// but allows specifying a context that can interrupt the request.
func (c *Client) ListOrdersWithContext(ctx context.Context) (out []*Order, err error) {
err = c.do(ctx, http.MethodGet, "orders", nil, &out)
return
}

// GetOrder retrieves an existing Order object by ID.
func (c *Client) GetOrder(orderID string) (out *Order, err error) {
err = c.get(nil, "orders/"+orderID, &out)
Expand Down
14 changes: 0 additions & 14 deletions pickup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package easypost

import (
"context"
"net/http"
"net/url"
"time"
)
Expand Down Expand Up @@ -74,19 +73,6 @@ func (c *Client) CreatePickupWithContext(ctx context.Context, in *Pickup) (out *
return
}

// ListPickups provides a paginated result of Pickup objects.
func (c *Client) ListPickups() (out []*Pickup, err error) {
err = c.do(nil, http.MethodGet, "pickups", nil, &out)
return
}

// ListPickupsWithContext performs the same operation as ListPickups,
// but allows specifying a context that can interrupt the request.
func (c *Client) ListPickupsWithContext(ctx context.Context) (out []*Pickup, err error) {
err = c.do(ctx, http.MethodGet, "pickups", nil, &out)
return
}

// GetPickup retrieves an existing Pickup object by ID.
func (c *Client) GetPickup(pickupID string) (out *Pickup, err error) {
err = c.get(nil, "pickups/"+pickupID, &out)
Expand Down

0 comments on commit e2ae694

Please sign in to comment.