Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc service method to get all webhook endpoints #790

Merged
merged 4 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
etsai2-stripe committed Nov 29, 2021
commit 913c61111c4350ab56972968a919ee4ce30d2acb
2 changes: 1 addition & 1 deletion pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ func getEndpointsFromAPI(ctx context.Context, secretKey, apiBaseURL string) requ
apiBaseURL = stripe.DefaultAPIBaseURL
}

return requests.WebhookEndpointsList(ctx, apiBaseURL, stripe.ApiVersion, secretKey, &config.Profile{})
return requests.WebhookEndpointsList(ctx, apiBaseURL, stripe.APIVersion, secretKey, &config.Profile{})
}

func buildEndpointRoutes(endpoints requests.WebhookEndpointList, forwardURL, forwardConnectURL string, forwardHeaders []string, forwardConnectHeaders []string) ([]EndpointRoute, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpcservice/webhook_endpoints_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (srv *RPCService) WebhookEndpointsList(ctx context.Context, req *rpc.Webhoo
return nil, err
}

endpoints := requests.WebhookEndpointsList(ctx, stripe.DefaultAPIBaseURL, stripe.ApiVersion, key, &userConfig.Profile)
endpoints := requests.WebhookEndpointsList(ctx, stripe.DefaultAPIBaseURL, stripe.APIVersion, key, &userConfig.Profile)

formattedEndpoints := make([]*rpc.WebhookEndpointsListResponse_WebhookEndpointData, 0, len(endpoints.Data))
for _, v := range endpoints.Data {
Expand Down
2 changes: 1 addition & 1 deletion pkg/stripe/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DefaultAPIBaseURL = "https://api.stripe.com"
const DefaultDashboardBaseURL = "https://dashboard.stripe.com"

// ApiVersion is API version used in CLI
const ApiVersion = "2019-03-14"
const APIVersion = "2019-03-14"

// Client is the API client used to sent requests to Stripe.
type Client struct {
Expand Down