Skip to content

Commit 4dcfd38

Browse files
Update generated code for v2276 and 9e9ef9ec9df30a59ccafb74c27b81311fa2896d5
1 parent edb2e6c commit 4dcfd38

34 files changed

Lines changed: 1794 additions & 97 deletions

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2e266cdaf4a7328b80cf9bc2448dfca91811415c
1+
9e9ef9ec9df30a59ccafb74c27b81311fa2896d5

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2274
1+
v2276

src/main/java/com/stripe/param/v2/core/BatchJobCreateParams.java

Lines changed: 230 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,38 +275,267 @@ public enum Path implements ApiRequestParams.EnumParam {
275275
@SerializedName("/v1/accounts/:account")
276276
V1_ACCOUNT_UPDATE("/v1/accounts/:account"),
277277

278+
@SerializedName("/v1/accounts")
279+
V1_ACCOUNT_CREATE("/v1/accounts"),
280+
281+
@SerializedName("/v1/accounts/:account")
282+
V1_ACCOUNT_DELETE("/v1/accounts/:account"),
283+
284+
@SerializedName("/v1/coupons")
285+
V1_COUPON_CREATE("/v1/coupons"),
286+
287+
@SerializedName("/v1/coupons/:coupon")
288+
V1_COUPON_UPDATE("/v1/coupons/:coupon"),
289+
290+
@SerializedName("/v1/coupons/:coupon")
291+
V1_COUPON_DELETE("/v1/coupons/:coupon"),
292+
278293
@SerializedName("/v1/credit_notes")
279294
V1_CREDIT_NOTE_CREATE("/v1/credit_notes"),
280295

281296
@SerializedName("/v1/customers/:customer")
282297
V1_CUSTOMER_UPDATE("/v1/customers/:customer"),
283298

299+
@SerializedName("/v1/customers/:customer")
300+
V1_CUSTOMER_DELETE("/v1/customers/:customer"),
301+
302+
@SerializedName("/v1/customers")
303+
V1_CUSTOMER_CREATE("/v1/customers"),
304+
305+
@SerializedName("/v1/customers/:customer/discount")
306+
V1_CUSTOMER_DELETE_DISCOUNT("/v1/customers/:customer/discount"),
307+
308+
@SerializedName("/v1/customers/:customer/funding_instructions")
309+
V1_CUSTOMER_CREATE_FUNDING_INSTRUCTIONS("/v1/customers/:customer/funding_instructions"),
310+
311+
@SerializedName("/v1/customers/:customer/subscriptions")
312+
V1_CUSTOMER_CREATE_SUBSCRIPTION("/v1/customers/:customer/subscriptions"),
313+
314+
@SerializedName("/v1/customers/:customer/subscriptions")
315+
V1_CUSTOMER_DELETE_SUBSCRIPTION("/v1/customers/:customer/subscriptions"),
316+
317+
@SerializedName("/v1/customers/:customer/subscriptions/:subscription_exposed_id")
318+
V1_CUSTOMER_UPDATE_SUBSCRIPTION(
319+
"/v1/customers/:customer/subscriptions/:subscription_exposed_id"),
320+
321+
@SerializedName("/v1/customers/:customer/subscriptions/:subscription_exposed_id/discount")
322+
V1_CUSTOMER_DELETE_SUBSCRIPTION_DISCOUNT(
323+
"/v1/customers/:customer/subscriptions/:subscription_exposed_id/discount"),
324+
325+
@SerializedName("/v1/customers/:customer/bank_accounts")
326+
V1_CUSTOMER_CREATE_BANK_ACCOUNT("/v1/customers/:customer/bank_accounts"),
327+
328+
@SerializedName("/v1/customers/:customer/bank_accounts/:id")
329+
V1_CUSTOMER_UPDATE_BANK_ACCOUNT("/v1/customers/:customer/bank_accounts/:id"),
330+
331+
@SerializedName("/v1/customers/:customer/bank_accounts/:id")
332+
V1_CUSTOMER_DELETE_BANK_ACCOUNT("/v1/customers/:customer/bank_accounts/:id"),
333+
334+
@SerializedName("/v1/customers/:customer/bank_accounts/:id/verify")
335+
V1_CUSTOMER_VERIFY_BANK_ACCOUNT("/v1/customers/:customer/bank_accounts/:id/verify"),
336+
337+
@SerializedName("/v1/customers/:customer/cards")
338+
V1_CUSTOMER_CREATE_CARD("/v1/customers/:customer/cards"),
339+
340+
@SerializedName("/v1/customers/:customer/cards/:id")
341+
V1_CUSTOMER_UPDATE_CARD("/v1/customers/:customer/cards/:id"),
342+
343+
@SerializedName("/v1/customers/:customer/cards/:id")
344+
V1_CUSTOMER_DELETE_CARD("/v1/customers/:customer/cards/:id"),
345+
346+
@SerializedName("/v1/customers/:customer/tax_ids")
347+
V1_CUSTOMER_DELETE_TAX_IDS("/v1/customers/:customer/tax_ids"),
348+
349+
@SerializedName("/v1/customers/:customer/sources")
350+
V1_PAYMENT_SOURCE_CREATE("/v1/customers/:customer/sources"),
351+
352+
@SerializedName("/v1/customers/:customer/sources/:id")
353+
V1_BANK_ACCOUNT_UPDATE("/v1/customers/:customer/sources/:id"),
354+
355+
@SerializedName("/v1/customers/:customer/sources/:id")
356+
V1_BANK_ACCOUNT_DELETE("/v1/customers/:customer/sources/:id"),
357+
358+
@SerializedName("/v1/customers/:customer/sources/:id/verify")
359+
V1_BANK_ACCOUNT_VERIFY("/v1/customers/:customer/sources/:id/verify"),
360+
361+
@SerializedName("/v1/customers/:customer/balance_transactions")
362+
V1_CUSTOMER_BALANCE_TRANSACTION_CREATE("/v1/customers/:customer/balance_transactions"),
363+
364+
@SerializedName("/v1/customers/:customer/balance_transactions/:transaction")
365+
V1_CUSTOMER_BALANCE_TRANSACTION_UPDATE(
366+
"/v1/customers/:customer/balance_transactions/:transaction"),
367+
368+
@SerializedName("/v1/customers/:customer/cash_balance")
369+
V1_CASH_BALANCE_UPDATE("/v1/customers/:customer/cash_balance"),
370+
371+
@SerializedName("/v1/customer_sessions")
372+
V1_CUSTOMER_SESSION_CREATE("/v1/customer_sessions"),
373+
374+
@SerializedName("/v1/disputes/:dispute/close")
375+
V1_DISPUTE_CLOSE("/v1/disputes/:dispute/close"),
376+
377+
@SerializedName("/v1/invoices")
378+
V1_INVOICE_CREATE("/v1/invoices"),
379+
284380
@SerializedName("/v1/invoices/:invoice")
285381
V1_INVOICE_UPDATE("/v1/invoices/:invoice"),
286382

383+
@SerializedName("/v1/invoices/:invoice")
384+
V1_INVOICE_DELETE("/v1/invoices/:invoice"),
385+
287386
@SerializedName("/v1/invoices/:invoice/pay")
288387
V1_INVOICE_PAY("/v1/invoices/:invoice/pay"),
289388

389+
@SerializedName("/v1/invoices/:invoice/send")
390+
V1_INVOICE_SEND_INVOICE("/v1/invoices/:invoice/send"),
391+
392+
@SerializedName("/v1/invoices/:invoice/void")
393+
V1_INVOICE_VOID_INVOICE("/v1/invoices/:invoice/void"),
394+
395+
@SerializedName("/v1/invoices/:invoice/finalize")
396+
V1_INVOICE_FINALIZE_INVOICE("/v1/invoices/:invoice/finalize"),
397+
398+
@SerializedName("/v1/invoices/:invoice/mark_uncollectible")
399+
V1_INVOICE_MARK_UNCOLLECTIBLE("/v1/invoices/:invoice/mark_uncollectible"),
400+
401+
@SerializedName("/v1/invoices/:invoice/update_lines")
402+
V1_INVOICE_UPDATE_LINES("/v1/invoices/:invoice/update_lines"),
403+
404+
@SerializedName("/v1/invoices/:invoice/add_lines")
405+
V1_INVOICE_ADD_LINES("/v1/invoices/:invoice/add_lines"),
406+
407+
@SerializedName("/v1/invoices/:invoice/remove_lines")
408+
V1_INVOICE_REMOVE_LINES("/v1/invoices/:invoice/remove_lines"),
409+
410+
@SerializedName("/v1/invoices/create_preview")
411+
V1_INVOICE_CREATE_PREVIEW("/v1/invoices/create_preview"),
412+
413+
@SerializedName("/v1/invoices/:invoice/lines/:line_item_id")
414+
V1_LINE_ITEM_UPDATE("/v1/invoices/:invoice/lines/:line_item_id"),
415+
416+
@SerializedName("/v1/invoiceitems")
417+
V1_INVOICEITEM_CREATE("/v1/invoiceitems"),
418+
419+
@SerializedName("/v1/invoiceitems/:invoiceitem")
420+
V1_INVOICEITEM_UPDATE("/v1/invoiceitems/:invoiceitem"),
421+
422+
@SerializedName("/v1/invoiceitems/:invoiceitem")
423+
V1_INVOICEITEM_DELETE("/v1/invoiceitems/:invoiceitem"),
424+
425+
@SerializedName("/v1/invoice_rendering_templates/:template/archive")
426+
V1_INVOICE_RENDERING_TEMPLATE_ARCHIVE("/v1/invoice_rendering_templates/:template/archive"),
427+
428+
@SerializedName("/v1/invoice_rendering_templates/:template/unarchive")
429+
V1_INVOICE_RENDERING_TEMPLATE_UNARCHIVE(
430+
"/v1/invoice_rendering_templates/:template/unarchive"),
431+
432+
@SerializedName("/v1/payment_methods/:payment_method/attach")
433+
V1_PAYMENT_METHOD_ATTACH("/v1/payment_methods/:payment_method/attach"),
434+
435+
@SerializedName("/v1/prices")
436+
V1_PRICE_CREATE("/v1/prices"),
437+
438+
@SerializedName("/v1/prices/:price")
439+
V1_PRICE_UPDATE("/v1/prices/:price"),
440+
441+
@SerializedName("/v1/products")
442+
V1_PRODUCT_CREATE("/v1/products"),
443+
444+
@SerializedName("/v1/products/:id")
445+
V1_PRODUCT_UPDATE("/v1/products/:id"),
446+
447+
@SerializedName("/v1/products/:id")
448+
V1_PRODUCT_DELETE("/v1/products/:id"),
449+
450+
@SerializedName("/v1/products/:product/features")
451+
V1_PRODUCT_FEATURE_CREATE("/v1/products/:product/features"),
452+
453+
@SerializedName("/v1/products/:product/features/:id")
454+
V1_PRODUCT_FEATURE_DELETE("/v1/products/:product/features/:id"),
455+
290456
@SerializedName("/v1/promotion_codes")
291457
V1_PROMOTION_CODE_CREATE("/v1/promotion_codes"),
292458

293459
@SerializedName("/v1/promotion_codes/:promotion_code")
294460
V1_PROMOTION_CODE_UPDATE("/v1/promotion_codes/:promotion_code"),
295461

462+
@SerializedName("/v1/radar/value_list_items")
463+
V1_RADAR_VALUE_LIST_ITEM_CREATE("/v1/radar/value_list_items"),
464+
465+
@SerializedName("/v1/refunds")
466+
V1_REFUND_CREATE("/v1/refunds"),
467+
468+
@SerializedName("/v1/refunds/:refund/cancel")
469+
V1_REFUND_CANCEL("/v1/refunds/:refund/cancel"),
470+
296471
@SerializedName("/v1/subscriptions/:subscription_exposed_id")
297472
V1_SUBSCRIPTION_UPDATE("/v1/subscriptions/:subscription_exposed_id"),
298473

474+
@SerializedName("/v1/subscriptions/:subscription_exposed_id")
475+
V1_SUBSCRIPTION_CANCEL("/v1/subscriptions/:subscription_exposed_id"),
476+
299477
@SerializedName("/v1/subscriptions/:subscription/migrate")
300478
V1_SUBSCRIPTION_MIGRATE("/v1/subscriptions/:subscription/migrate"),
301479

480+
@SerializedName("/v1/subscriptions")
481+
V1_SUBSCRIPTION_CREATE("/v1/subscriptions"),
482+
483+
@SerializedName("/v1/subscriptions/:subscription/resume")
484+
V1_SUBSCRIPTION_RESUME("/v1/subscriptions/:subscription/resume"),
485+
486+
@SerializedName("/v1/subscriptions/:subscription/pause")
487+
V1_SUBSCRIPTION_PAUSE("/v1/subscriptions/:subscription/pause"),
488+
489+
@SerializedName("/v1/subscription_items")
490+
V1_SUBSCRIPTION_ITEM_CREATE("/v1/subscription_items"),
491+
492+
@SerializedName("/v1/subscription_items/:item")
493+
V1_SUBSCRIPTION_ITEM_UPDATE("/v1/subscription_items/:item"),
494+
495+
@SerializedName("/v1/subscription_items/:item")
496+
V1_SUBSCRIPTION_ITEM_DELETE("/v1/subscription_items/:item"),
497+
302498
@SerializedName("/v1/subscription_schedules")
303499
V1_SUBSCRIPTION_SCHEDULE_CREATE("/v1/subscription_schedules"),
304500

305501
@SerializedName("/v1/subscription_schedules/:schedule")
306502
V1_SUBSCRIPTION_SCHEDULE_UPDATE("/v1/subscription_schedules/:schedule"),
307503

308504
@SerializedName("/v1/subscription_schedules/:schedule/cancel")
309-
V1_SUBSCRIPTION_SCHEDULE_CANCEL("/v1/subscription_schedules/:schedule/cancel");
505+
V1_SUBSCRIPTION_SCHEDULE_CANCEL("/v1/subscription_schedules/:schedule/cancel"),
506+
507+
@SerializedName("/v1/subscription_schedules/:schedule/release")
508+
V1_SUBSCRIPTION_SCHEDULE_RELEASE("/v1/subscription_schedules/:schedule/release"),
509+
510+
@SerializedName("/v1/tax/registrations")
511+
V1_TAX_REGISTRATION_CREATE("/v1/tax/registrations"),
512+
513+
@SerializedName("/v1/tax/registrations/:id")
514+
V1_TAX_REGISTRATION_UPDATE("/v1/tax/registrations/:id"),
515+
516+
@SerializedName("/v1/tax/settings")
517+
V1_TAX_SETTINGS_UPDATE("/v1/tax/settings"),
518+
519+
@SerializedName("/v1/tax/transactions/create_reversal")
520+
V1_TAX_TRANSACTION_CREATE_REVERSAL("/v1/tax/transactions/create_reversal"),
521+
522+
@SerializedName("/v1/tax_ids")
523+
V1_TAX_ID_CREATE("/v1/tax_ids"),
524+
525+
@SerializedName("/v1/tax_ids/:id")
526+
V1_TAX_ID_UPDATE("/v1/tax_ids/:id"),
527+
528+
@SerializedName("/v1/customers/:customer/tax_ids")
529+
V1_TAX_ID_CREATE_FOR_CUSTOMER("/v1/customers/:customer/tax_ids"),
530+
531+
@SerializedName("/v1/customers/:customer/tax_ids/:id")
532+
V1_TAX_ID_DELETE("/v1/customers/:customer/tax_ids/:id"),
533+
534+
@SerializedName("/v1/tax_rates")
535+
V1_TAX_RATE_CREATE("/v1/tax_rates"),
536+
537+
@SerializedName("/v1/tax_rates/:tax_rate")
538+
V1_TAX_RATE_UPDATE("/v1/tax_rates/:tax_rate");
310539

311540
@Getter(onMethod_ = {@Override})
312541
private final String value;

src/main/java/com/stripe/service/AccountService.java

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,29 @@ public Account reject(String account, AccountRejectParams params, RequestOptions
349349
options);
350350
return this.request(request, Account.class);
351351
}
352+
/** Serializes an Account delete request into a batch job JSONL line. */
353+
public String serializeBatchDelete(String account) throws StripeException {
354+
return serializeBatchDelete(account, (RequestOptions) null);
355+
}
356+
/** Serializes an Account delete request into a batch job JSONL line. */
357+
public String serializeBatchDelete(String account, RequestOptions options)
358+
throws StripeException {
359+
String requestId = java.util.UUID.randomUUID().toString();
360+
String stripeVersion = Stripe.API_VERSION;
361+
String stripeContext = (options != null) ? options.getStripeContext() : null;
362+
363+
java.util.Map<String, String> pathParams = new java.util.LinkedHashMap<String, String>();
364+
pathParams.put("account", account);
365+
java.util.Map<String, Object> requestBody = new java.util.LinkedHashMap<>();
366+
requestBody.put("id", requestId);
367+
requestBody.put("path_params", pathParams);
368+
requestBody.put("params", null);
369+
requestBody.put("stripe_version", stripeVersion);
370+
if (stripeContext != null) {
371+
requestBody.put("context", stripeContext);
372+
}
373+
return ApiResource.GSON.toJson(requestBody);
374+
}
352375
/** Serializes an Account update request into a batch job JSONL line. */
353376
public String serializeBatchUpdate(String account, AccountUpdateParams params)
354377
throws StripeException {
@@ -357,21 +380,41 @@ public String serializeBatchUpdate(String account, AccountUpdateParams params)
357380
/** Serializes an Account update request into a batch job JSONL line. */
358381
public String serializeBatchUpdate(
359382
String account, AccountUpdateParams params, RequestOptions options) throws StripeException {
360-
String itemId = java.util.UUID.randomUUID().toString();
383+
String requestId = java.util.UUID.randomUUID().toString();
361384
String stripeVersion = Stripe.API_VERSION;
362385
String stripeContext = (options != null) ? options.getStripeContext() : null;
363386

364387
java.util.Map<String, String> pathParams = new java.util.LinkedHashMap<String, String>();
365388
pathParams.put("account", account);
366-
java.util.Map<String, Object> item = new java.util.LinkedHashMap<>();
367-
item.put("id", itemId);
368-
item.put("path_params", pathParams);
369-
item.put("params", (params != null) ? params.toMap() : null);
370-
item.put("stripe_version", stripeVersion);
389+
java.util.Map<String, Object> requestBody = new java.util.LinkedHashMap<>();
390+
requestBody.put("id", requestId);
391+
requestBody.put("path_params", pathParams);
392+
requestBody.put("params", (params != null) ? params.toMap() : null);
393+
requestBody.put("stripe_version", stripeVersion);
394+
if (stripeContext != null) {
395+
requestBody.put("context", stripeContext);
396+
}
397+
return ApiResource.GSON.toJson(requestBody);
398+
}
399+
/** Serializes an Account create request into a batch job JSONL line. */
400+
public String serializeBatchCreate(AccountCreateParams params) throws StripeException {
401+
return serializeBatchCreate(params, (RequestOptions) null);
402+
}
403+
/** Serializes an Account create request into a batch job JSONL line. */
404+
public String serializeBatchCreate(AccountCreateParams params, RequestOptions options)
405+
throws StripeException {
406+
String requestId = java.util.UUID.randomUUID().toString();
407+
String stripeVersion = Stripe.API_VERSION;
408+
String stripeContext = (options != null) ? options.getStripeContext() : null;
409+
410+
java.util.Map<String, Object> requestBody = new java.util.LinkedHashMap<>();
411+
requestBody.put("id", requestId);
412+
requestBody.put("params", (params != null) ? params.toMap() : null);
413+
requestBody.put("stripe_version", stripeVersion);
371414
if (stripeContext != null) {
372-
item.put("context", stripeContext);
415+
requestBody.put("context", stripeContext);
373416
}
374-
return ApiResource.GSON.toJson(item);
417+
return ApiResource.GSON.toJson(requestBody);
375418
}
376419

377420
public com.stripe.service.AccountCapabilityService capabilities() {

0 commit comments

Comments
 (0)