Skip to content

Commit

Permalink
Sorted out some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSharpe committed Apr 25, 2024
1 parent cd66837 commit 5001eb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/fixed/plans/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ func NewAPI(client HttpClient, logger Log) *API {
return &API{client: client, logger: logger}
}

// List will list all the plans available to the current account
func (a *API) List(ctx context.Context) ([]*GetPlanResponse, error) {
return a.list(ctx, root)
}

// ListWithProvider will list all the plans available to the current account, filtered by provider
func (a *API) ListWithProvider(ctx context.Context, provider string) ([]*GetPlanResponse, error) {
address := fmt.Sprintf("%s?provider=%s", root, provider)
return a.list(ctx, address)
}

// List will list all the plans available to the current account (filtered by provider if given).
func (a *API) list(ctx context.Context, address string) ([]*GetPlanResponse, error) {
var response ListPlansResponse

Expand Down

0 comments on commit 5001eb7

Please sign in to comment.