Skip to content

Commit c7aa50d

Browse files
author
Andrew Farries
committed
Rename method in sugar.ts
1 parent 8d0f0b7 commit c7aa50d

File tree

1 file changed

+7
-7
lines changed
  • components/usage-api/typescript/src/usage/v1

1 file changed

+7
-7
lines changed

components/usage-api/typescript/src/usage/v1/sugar.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { UsageServiceClient } from "./usage_grpc_pb";
88
import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing";
99
import * as opentracing from "opentracing";
1010
import { Metadata } from "@grpc/grpc-js";
11-
import { GetBilledUsageRequest, GetBilledUsageResponse } from "./usage_pb";
11+
import { ListBilledUsageRequest, ListBilledUsageResponse } from "./usage_pb";
1212
import { injectable, inject } from "inversify";
1313
import * as grpc from "@grpc/grpc-js";
1414

@@ -89,18 +89,18 @@ export class PromisifiedUsageServiceClient {
8989
);
9090
}
9191

92-
public async getBilledUsage(_ctx: TraceContext, attributionId: string): Promise<GetBilledUsageResponse> {
93-
const ctx = TraceContext.childContext(`/usage-service/getBilledUsage`, _ctx);
92+
public async listBilledUsage(_ctx: TraceContext, attributionId: string): Promise<ListBilledUsageResponse> {
93+
const ctx = TraceContext.childContext(`/usage-service/listBilledUsage`, _ctx);
9494

9595
try {
96-
const req = new GetBilledUsageRequest();
96+
const req = new ListBilledUsageRequest();
9797
req.setAttributionId(attributionId);
9898

99-
const response = await new Promise<GetBilledUsageResponse>((resolve, reject) => {
100-
this.client.getBilledUsage(
99+
const response = await new Promise<ListBilledUsageResponse>((resolve, reject) => {
100+
this.client.listBilledUsage(
101101
req,
102102
withTracing(ctx),
103-
(err: grpc.ServiceError | null, response: GetBilledUsageResponse) => {
103+
(err: grpc.ServiceError | null, response: ListBilledUsageResponse) => {
104104
if (err) {
105105
reject(err);
106106
return;

0 commit comments

Comments
 (0)