-
Notifications
You must be signed in to change notification settings - Fork 400
Expand file tree
/
Copy pathBlockedByStripeException.java
More file actions
32 lines (27 loc) · 1.27 KB
/
BlockedByStripeException.java
File metadata and controls
32 lines (27 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// File generated from our OpenAPI spec
package com.stripe.exception;
import com.google.gson.JsonObject;
import com.stripe.model.StripeError;
import com.stripe.model.StripeObject;
import com.stripe.net.StripeResponseGetter;
/** Returned when the bank account cannot be added due to previous suspicious activity. */
public final class BlockedByStripeException extends ApiException {
private static final long serialVersionUID = 2L;
private BlockedByStripeException(
String message, String requestId, String code, Integer statusCode, Throwable e) {
super(message, requestId, code, statusCode, e);
}
static BlockedByStripeException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
BlockedByStripeException.BlockedByStripeError error =
(BlockedByStripeException.BlockedByStripeError)
StripeObject.deserializeStripeObject(
body, BlockedByStripeException.BlockedByStripeError.class, responseGetter);
BlockedByStripeException exception =
new BlockedByStripeException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
exception.setStripeError(error);
return exception;
}
public static class BlockedByStripeError extends StripeError {}
}