-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathAccountSignals.java
More file actions
237 lines (210 loc) · 7.96 KB
/
AccountSignals.java
File metadata and controls
237 lines (210 loc) · 7.96 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// File generated from our OpenAPI spec
package com.stripe.model;
import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiRequest;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.AccountSignalsRetrieveParams;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* The Account Signals API provides risk related signals that can be used to better manage risks.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class AccountSignals extends ApiResource {
/** The account for which the signals belong to. */
@SerializedName("account")
String account;
/** The delinquency signal of the account. */
@SerializedName("delinquency")
Delinquency delinquency;
/** The fraud intent signal of the account. */
@SerializedName("fraud_intent")
FraudIntent fraudIntent;
/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
*/
@SerializedName("livemode")
Boolean livemode;
/**
* String representing the object's type. Objects of the same type share the same value.
*
* <p>Equal to {@code account_signals}.
*/
@SerializedName("object")
String object;
/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(String accountId) throws StripeException {
return retrieve(accountId, (Map<String, Object>) null, (RequestOptions) null);
}
/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(String accountId, RequestOptions options)
throws StripeException {
return retrieve(accountId, (Map<String, Object>) null, options);
}
/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(
String accountId, Map<String, Object> params, RequestOptions options) throws StripeException {
String path = String.format("/v1/accounts/%s/signals", ApiResource.urlEncodeId(accountId));
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
return getGlobalResponseGetter().request(request, AccountSignals.class);
}
/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(
String accountId, AccountSignalsRetrieveParams params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/accounts/%s/signals", ApiResource.urlEncodeId(accountId));
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
options);
return getGlobalResponseGetter().request(request, AccountSignals.class);
}
/**
* For more details about Delinquency, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Delinquency extends StripeObject {
/** Time at which the signal was evaluated, measured in seconds since the Unix epoch. */
@SerializedName("evaluated_at")
Long evaluatedAt;
/**
* Array of objects representing individual factors that contributed to the calculated
* probability of delinquency.
*/
@SerializedName("indicators")
List<AccountSignals.Delinquency.Indicator> indicators;
/** The probability of delinquency. Can be between 0.00 and 100.00 */
@SerializedName("probability")
BigDecimal probability;
/**
* Categorical assessment of the delinquency risk based on probability.
*
* <p>One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code
* not_assessed}, or {@code unknown}.
*/
@SerializedName("risk_level")
String riskLevel;
/** Unique identifier for the delinquency signal. */
@SerializedName("signal_id")
String signalId;
/**
* For more details about Indicator, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Indicator extends StripeObject {
/** A brief explanation of how this indicator contributed to the delinquency probability. */
@SerializedName("description")
String description;
/**
* The effect this indicator had on the overall risk level.
*
* <p>One of {@code decrease}, {@code neutral}, {@code slight_increase}, or {@code
* strong_increase}.
*/
@SerializedName("impact")
String impact;
/**
* The name of the specific indicator used in the risk assessment.
*
* <p>One of {@code account_balance}, {@code aov}, {@code charge_concentration}, {@code
* dispute_window}, {@code disputes}, {@code duplicates}, {@code exposure}, {@code
* firmographic}, {@code lifetime_metrics}, {@code payment_processing}, {@code
* payment_volume}, {@code payouts}, {@code refunds}, {@code related_accounts}, {@code
* tenure}, or {@code transfers}.
*/
@SerializedName("indicator")
String indicator;
}
}
/**
* For more details about FraudIntent, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FraudIntent extends StripeObject {
/** Time at which the signal was evaluated, measured in seconds since the Unix epoch. */
@SerializedName("evaluated_at")
Long evaluatedAt;
/**
* Array of objects representing individual factors that contributed to the calculated
* probability of fraud intent.
*/
@SerializedName("indicators")
List<AccountSignals.FraudIntent.Indicator> indicators;
/** The probability of fraud intent. Can be between 0.00 and 100.00 */
@SerializedName("probability")
BigDecimal probability;
/**
* Categorical assessment of the fraud intent risk based on probability.
*
* <p>One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code
* not_assessed}, or {@code unknown}.
*/
@SerializedName("risk_level")
String riskLevel;
/** Unique identifier for the fraud intent signal. */
@SerializedName("signal_id")
String signalId;
/**
* For more details about Indicator, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Indicator extends StripeObject {
/** A brief explanation of how this indicator contributed to the delinquency probability. */
@SerializedName("description")
String description;
/**
* The effect this indicator had on the overall risk level.
*
* <p>One of {@code decrease}, {@code neutral}, {@code slight_increase}, or {@code
* strong_increase}.
*/
@SerializedName("impact")
String impact;
/**
* The name of the specific indicator used in the risk assessment.
*
* <p>One of {@code bank_account}, {@code business_information_and_account_activity}, {@code
* disputes}, {@code failures}, {@code geo_location}, {@code other}, {@code
* other_related_accounts}, {@code other_transaction_activity}, {@code owner_email}, or {@code
* web_presence}.
*/
@SerializedName("indicator")
String indicator;
}
}
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(delinquency, responseGetter);
trySetResponseGetter(fraudIntent, responseGetter);
}
}