Drop level from SetSubscriptionLevelResponse

This commit is contained in:
Ravi Khadiwala authored and ravi-signal committed 2026-10-07 14:52:47 -05:00
1 parent 92b903c639
commit db00752f3d
3 files changed
+2 -8

No files matched your search

@@ -341,8 +341,7 @@ public class SubscriptionsGrpcService extends SimpleSubscriptionsGrpc.Subscripti
subscriptionManager.updateSubscriptionLevelForCustomer(subscriberCredentials, subscriptionRecord, manager,
request.getLevel(), request.getCurrency(), request.getIdempotencyKey(), templateId.get(),
(l1, l2) -> SubscriptionsUtil.subscriptionsAreSameType(subscriptionConfiguration, l1, l2));
return SetSubscriptionLevelResponse.newBuilder().setSuccess(
SetSubscriptionLevelResponse.SetSubscriptionLevelResult.newBuilder().setLevel(request.getLevel()).build())
return SetSubscriptionLevelResponse.newBuilder().setSuccess(Empty.getDefaultInstance())
.build();
} catch (final PurchaseInvalidIdempotencyKeyException e) {
return SetSubscriptionLevelResponse.newBuilder()
@@ -308,12 +308,8 @@ message PaymentRequired {
}
message SetSubscriptionLevelResponse {
message SetSubscriptionLevelResult {
uint64 level = 1;
}
oneof response {
SetSubscriptionLevelResult success = 1;
google.protobuf.Empty success = 1;
// The subscriber did not exist
errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"];
// New payment processor does not match existing processor associated with
@@ -419,7 +419,6 @@ public class SubscriptionsGrpcServiceTest extends
.setIdempotencyKey("test-idempotency-key")
.build());
assertEquals(SetSubscriptionLevelResponse.ResponseCase.SUCCESS, response.getResponseCase());
assertEquals(LEVEL, response.getSuccess().getLevel());
}
@Test