|
11 | 11 | import com.stripe.net.StripeResponseGetter; |
12 | 12 | import com.stripe.param.PaymentAttemptRecordListParams; |
13 | 13 | import com.stripe.param.PaymentAttemptRecordReportAuthenticatedParams; |
| 14 | +import com.stripe.param.PaymentAttemptRecordReportAuthorizedParams; |
14 | 15 | import com.stripe.param.PaymentAttemptRecordReportCanceledParams; |
15 | 16 | import com.stripe.param.PaymentAttemptRecordReportFailedParams; |
16 | 17 | import com.stripe.param.PaymentAttemptRecordReportGuaranteedParams; |
@@ -226,6 +227,58 @@ public PaymentAttemptRecord reportAuthenticated( |
226 | 227 | return getResponseGetter().request(request, PaymentAttemptRecord.class); |
227 | 228 | } |
228 | 229 |
|
| 230 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 231 | + public PaymentAttemptRecord reportAuthorized() throws StripeException { |
| 232 | + return reportAuthorized((Map<String, Object>) null, (RequestOptions) null); |
| 233 | + } |
| 234 | + |
| 235 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 236 | + public PaymentAttemptRecord reportAuthorized(RequestOptions options) throws StripeException { |
| 237 | + return reportAuthorized((Map<String, Object>) null, options); |
| 238 | + } |
| 239 | + |
| 240 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 241 | + public PaymentAttemptRecord reportAuthorized(Map<String, Object> params) throws StripeException { |
| 242 | + return reportAuthorized(params, (RequestOptions) null); |
| 243 | + } |
| 244 | + |
| 245 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 246 | + public PaymentAttemptRecord reportAuthorized(Map<String, Object> params, RequestOptions options) |
| 247 | + throws StripeException { |
| 248 | + String path = |
| 249 | + String.format( |
| 250 | + "/v1/payment_attempt_records/%s/report_authorized", |
| 251 | + ApiResource.urlEncodeId(this.getId())); |
| 252 | + ApiRequest request = |
| 253 | + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); |
| 254 | + return getResponseGetter().request(request, PaymentAttemptRecord.class); |
| 255 | + } |
| 256 | + |
| 257 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 258 | + public PaymentAttemptRecord reportAuthorized(PaymentAttemptRecordReportAuthorizedParams params) |
| 259 | + throws StripeException { |
| 260 | + return reportAuthorized(params, (RequestOptions) null); |
| 261 | + } |
| 262 | + |
| 263 | + /** Report that the specified Payment Attempt Record was authorized. */ |
| 264 | + public PaymentAttemptRecord reportAuthorized( |
| 265 | + PaymentAttemptRecordReportAuthorizedParams params, RequestOptions options) |
| 266 | + throws StripeException { |
| 267 | + String path = |
| 268 | + String.format( |
| 269 | + "/v1/payment_attempt_records/%s/report_authorized", |
| 270 | + ApiResource.urlEncodeId(this.getId())); |
| 271 | + ApiResource.checkNullTypedParams(path, params); |
| 272 | + ApiRequest request = |
| 273 | + new ApiRequest( |
| 274 | + BaseAddress.API, |
| 275 | + ApiResource.RequestMethod.POST, |
| 276 | + path, |
| 277 | + ApiRequestParams.paramsToMap(params), |
| 278 | + options); |
| 279 | + return getResponseGetter().request(request, PaymentAttemptRecord.class); |
| 280 | + } |
| 281 | + |
229 | 282 | /** Report that the specified Payment Attempt Record was canceled. */ |
230 | 283 | public PaymentAttemptRecord reportCanceled() throws StripeException { |
231 | 284 | return reportCanceled((Map<String, Object>) null, (RequestOptions) null); |
|
0 commit comments