mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:06:50 +00:00
Drop level from SetSubscriptionLevelResponse
This commit is contained in:
1 parent
92b903c639
commit
db00752f3d
3 files changed
+2
-8
No files matched your search
+1
-2
@@ -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
|
||||
|
||||
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user