Skip to content

Commit 3ace088

Browse files
authored
fix: remove duplicate e2e credit grant helper (#4596)
1 parent 33cf406 commit 3ace088

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

e2e/v3helpers_test.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,6 @@ func (c *v3Client) GetCustomerEntitlementAccess(customerID string) (int, *apiv3.
324324
return decodeTyped[apiv3.ListCustomerEntitlementAccessResponseData](c, status, raw, problem, http.StatusOK)
325325
}
326326

327-
// CreateCreditGrant posts a credit grant for the given customer. customerID is
328-
// the customer's ULID. Returns the decoded grant on 201, or (status, nil,
329-
// problem) otherwise so error-path tests can assert the status and problem body.
330-
func (c *v3Client) CreateCreditGrant(customerID string, body apiv3.CreateCreditGrantRequest) (int, *apiv3.BillingCreditGrant, *v3Problem) {
331-
status, raw, problem := c.do(http.MethodPost, "/customers/"+customerID+"/credits/grants", body)
332-
return decodeTyped[apiv3.BillingCreditGrant](c, status, raw, problem, http.StatusCreated)
333-
}
334-
335327
// --- Subscriptions ---
336328

337329
func (c *v3Client) CreateSubscription(body apiv3.BillingSubscriptionCreate) (int, *apiv3.BillingSubscription, *v3Problem) {
@@ -365,6 +357,9 @@ func (c *v3Client) GetBillingInvoice(invoiceID string) (int, *apiv3.BillingInvoi
365357

366358
// --- Credits ---
367359

360+
// CreateCreditGrant posts a credit grant for the given customer. customerID is
361+
// the customer's ULID. Returns the decoded grant on 201, or (status, nil,
362+
// problem) otherwise so error-path tests can assert the status and problem body.
368363
func (c *v3Client) CreateCreditGrant(customerID string, body apiv3.CreateCreditGrantRequest) (int, *apiv3.BillingCreditGrant, *v3Problem) {
369364
status, raw, problem := c.do(http.MethodPost, "/customers/"+customerID+"/credits/grants", body)
370365
return decodeTyped[apiv3.BillingCreditGrant](c, status, raw, problem, http.StatusCreated)

0 commit comments

Comments
 (0)