Skip to content

Commit

Permalink
Merge pull request #1667 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
pakrym-stripe committed Oct 11, 2023
2 parents 3641dee + 9517f8c commit da5a9ec
Show file tree
Hide file tree
Showing 47 changed files with 7,383 additions and 137 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,29 @@
* Add support for new value `quote.accept_failed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
* [#1633](https://github.com/stripe/stripe-java/pull/1633) Merge master

## 23.9.0 - 2023-10-11
* [#1668](https://github.com/stripe/stripe-java/pull/1668) Update generated code
* Add support for `redirect_on_completion`, `return_url`, and `ui_mode` on `Checkout.Session` and `checkout.SessionCreateParams`
* Change `checkout.SessionCreateParams.success_url` to be optional
* Add support for `client_secret` on `Checkout.Session`
* Add support for `postal_code` on `Issuing.Authorization.verification_data`
* Add support for `offline` on `Terminal.Configuration`, `terminal.ConfigurationCreateParams`, and `terminal.ConfigurationUpdateParams`

## 23.8.0 - 2023-10-05
* [#1663](https://github.com/stripe/stripe-java/pull/1663) Flow type information further into autopagination requests
* [#1662](https://github.com/stripe/stripe-java/pull/1662) Update generated code
* Add support for new resource `Issuing.Token`
* Add support for `list`, `retrieve`, and `update` methods on resource `Token`
* Add support for `amount_authorized`, `extended_authorization`, `incremental_authorization`, `multicapture`, and `overcapture` on `Charge.payment_method_details.card`
* Add support for `token` on `Issuing.Authorization` and `Issuing.Transaction`
* Add support for `authorization_code` on `Issuing.Authorization.request_history[]`
* Add support for `request_extended_authorization`, `request_multicapture`, and `request_overcapture` on `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, and `PaymentIntentUpdateParams.payment_method_options.card`
* Add support for `request_incremental_authorization` on `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card_present`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card_present`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card_present`, and `PaymentIntentUpdateParams.payment_method_options.card`
* Add support for `final_capture` on `PaymentIntentCaptureParams`
* Add support for `metadata` on `PaymentLink.payment_intent_data`, `PaymentLink.subscription_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkCreateParams.subscription_data`
* Add support for `statement_descriptor_suffix` and `statement_descriptor` on `PaymentLink.payment_intent_data` and `PaymentLinkCreateParams.payment_intent_data`
* Add support for `payment_intent_data` and `subscription_data` on `PaymentLinkUpdateParams`

## 23.7.0 - 2023-09-28
* [#1657](https://github.com/stripe/stripe-java/pull/1657) Update generated code
* Add support for `rendering` on `InvoiceCreateParams`, `InvoiceUpdateParams`, and `Invoice`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v582
v597
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public com.stripe.service.AccountLinkService accountLinks() {
return new com.stripe.service.AccountLinkService(this.getResponseGetter());
}

public com.stripe.service.AccountNoticeService accountNotices() {
return new com.stripe.service.AccountNoticeService(this.getResponseGetter());
}

public com.stripe.service.AccountSessionService accountSessions() {
return new com.stripe.service.AccountSessionService(this.getResponseGetter());
}
Expand Down
289 changes: 289 additions & 0 deletions src/main/java/com/stripe/model/AccountNotice.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
// 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.ApiMode;
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.AccountNoticeListParams;
import com.stripe.param.AccountNoticeRetrieveParams;
import com.stripe.param.AccountNoticeUpdateParams;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
* A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to
* send the notices yourself.
*
* <p>See the <a
* href="https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices">guide to
* send notices</a> to your connected accounts.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class AccountNotice extends ApiResource implements HasId, MetadataStore<AccountNotice> {
/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("created")
Long created;

/** When present, the deadline for sending the notice to meet the relevant regulations. */
@SerializedName("deadline")
Long deadline;

/** Information about the email when sent. */
@SerializedName("email")
Email email;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

/** Information about objects related to the notice. */
@SerializedName("linked_objects")
LinkedObjects linkedObjects;

/**
* 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;

/**
* Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format.
*/
@Getter(onMethod_ = {@Override})
@SerializedName("metadata")
Map<String, String> metadata;

/**
* String representing the object's type. Objects of the same type share the same value.
*
* <p>Equal to {@code account_notice}.
*/
@SerializedName("object")
String object;

/**
* Reason the notice is being sent. The reason determines what copy the notice must contain. See
* the <a
* href="https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices">regulated
* customer notices</a> guide. All reasons might not apply to your integration, and Stripe might
* add new reasons in the future, so we recommend an internal warning when you receive an unknown
* reason.
*
* <p>One of {@code issuing.account_closed_for_inactivity}, {@code
* issuing.account_closed_for_terms_of_service_violation}, {@code
* issuing.application_rejected_for_failure_to_verify}, {@code
* issuing.credit_application_rejected}, {@code issuing.credit_increase_application_rejected},
* {@code issuing.credit_limit_decreased}, {@code issuing.credit_line_closed}, {@code
* issuing.dispute_lost}, {@code issuing.dispute_submitted}, or {@code issuing.dispute_won}.
*/
@SerializedName("reason")
String reason;

/**
* Date when the notice was sent. When absent, you must send the notice, update the content of the
* email and date when it was sent.
*/
@SerializedName("sent_at")
Long sentAt;

/**
* Retrieves a list of {@code AccountNotice} objects. The objects are sorted in descending order
* by creation date, with the most-recently-created object appearing first.
*/
public static AccountNoticeCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Retrieves a list of {@code AccountNotice} objects. The objects are sorted in descending order
* by creation date, with the most-recently-created object appearing first.
*/
public static AccountNoticeCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path = "/v1/account_notices";
return getGlobalResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
params,
AccountNoticeCollection.class,
options,
ApiMode.V1);
}

/**
* Retrieves a list of {@code AccountNotice} objects. The objects are sorted in descending order
* by creation date, with the most-recently-created object appearing first.
*/
public static AccountNoticeCollection list(AccountNoticeListParams params)
throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Retrieves a list of {@code AccountNotice} objects. The objects are sorted in descending order
* by creation date, with the most-recently-created object appearing first.
*/
public static AccountNoticeCollection list(AccountNoticeListParams params, RequestOptions options)
throws StripeException {
String path = "/v1/account_notices";
ApiResource.checkNullTypedParams(path, params);
return getGlobalResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
AccountNoticeCollection.class,
options,
ApiMode.V1);
}

/** Retrieves an {@code AccountNotice} object. */
public static AccountNotice retrieve(String accountNotice) throws StripeException {
return retrieve(accountNotice, (Map<String, Object>) null, (RequestOptions) null);
}

/** Retrieves an {@code AccountNotice} object. */
public static AccountNotice retrieve(String accountNotice, RequestOptions options)
throws StripeException {
return retrieve(accountNotice, (Map<String, Object>) null, options);
}

/** Retrieves an {@code AccountNotice} object. */
public static AccountNotice retrieve(
String accountNotice, Map<String, Object> params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/account_notices/%s", ApiResource.urlEncodeId(accountNotice));
return getGlobalResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
params,
AccountNotice.class,
options,
ApiMode.V1);
}

/** Retrieves an {@code AccountNotice} object. */
public static AccountNotice retrieve(
String accountNotice, AccountNoticeRetrieveParams params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/account_notices/%s", ApiResource.urlEncodeId(accountNotice));
ApiResource.checkNullTypedParams(path, params);
return getGlobalResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
AccountNotice.class,
options,
ApiMode.V1);
}

/** Updates an {@code AccountNotice} object. */
@Override
public AccountNotice update(Map<String, Object> params) throws StripeException {
return update(params, (RequestOptions) null);
}

/** Updates an {@code AccountNotice} object. */
@Override
public AccountNotice update(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/account_notices/%s", ApiResource.urlEncodeId(this.getId()));
return getResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
params,
AccountNotice.class,
options,
ApiMode.V1);
}

/** Updates an {@code AccountNotice} object. */
public AccountNotice update(AccountNoticeUpdateParams params) throws StripeException {
return update(params, (RequestOptions) null);
}

/** Updates an {@code AccountNotice} object. */
public AccountNotice update(AccountNoticeUpdateParams params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/account_notices/%s", ApiResource.urlEncodeId(this.getId()));
ApiResource.checkNullTypedParams(path, params);
return getResponseGetter()
.request(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
ApiRequestParams.paramsToMap(params),
AccountNotice.class,
options,
ApiMode.V1);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Email extends StripeObject {
/**
* Content of the email in plain text. The copy must match exactly the language that Stripe
* Compliance has approved for use.
*/
@SerializedName("plain_text")
String plainText;

/** Email address of the recipient. */
@SerializedName("recipient")
String recipient;

/** Subject of the email. */
@SerializedName("subject")
String subject;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class LinkedObjects extends StripeObject {
/** Associated <a href="https://stripe.com/docs/api/capabilities">Capability.</a> */
@SerializedName("capability")
String capability;

/**
* Associated <a href="https://stripe.com/docs/api/issuing/credit_underwriting_record">Credit
* Underwriting Record.</a>
*/
@SerializedName("issuing_credit_underwriting_record")
String issuingCreditUnderwritingRecord;

/** Associated <a href="https://stripe.com/docs/api/issuing/disputes">Issuing Dispute.</a> */
@SerializedName("issuing_dispute")
String issuingDispute;
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(email, responseGetter);
trySetResponseGetter(linkedObjects, responseGetter);
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/AccountNoticeCollection.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec
package com.stripe.model;

public class AccountNoticeCollection extends StripeCollection<AccountNotice> {}
5 changes: 2 additions & 3 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ public class BalanceTransaction extends ApiResource implements HasId {
String object;

/**
* Learn more about how [reporting categories]
* (https://stripe.com/docs/reports/reporting-categories) can help you understand balance
* transactions from an accounting perspective.
* Learn more about how <a href="https://stripe.com/docs/reports/reporting-categories">reporting
* categories</a> can help you understand balance transactions from an accounting perspective.
*/
@SerializedName("reporting_category")
String reportingCategory;
Expand Down
39 changes: 20 additions & 19 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,26 @@ public class Event extends ApiResource implements HasId {
*
* <p>One of {@code account.application.authorized}, {@code account.application.deauthorized},
* {@code account.external_account.created}, {@code account.external_account.deleted}, {@code
* account.external_account.updated}, {@code account.updated}, {@code application_fee.created},
* {@code application_fee.refund.updated}, {@code application_fee.refunded}, {@code
* balance.available}, {@code billing_portal.configuration.created}, {@code
* billing_portal.configuration.updated}, {@code billing_portal.session.created}, {@code
* capability.updated}, {@code capital.financing_offer.accepted}, {@code
* capital.financing_offer.canceled}, {@code capital.financing_offer.created}, {@code
* capital.financing_offer.expired}, {@code capital.financing_offer.fully_repaid}, {@code
* capital.financing_offer.paid_out}, {@code capital.financing_offer.rejected}, {@code
* capital.financing_offer.replacement_created}, {@code capital.financing_transaction.created},
* {@code cash_balance.funds_available}, {@code charge.captured}, {@code charge.dispute.closed},
* {@code charge.dispute.created}, {@code charge.dispute.funds_reinstated}, {@code
* charge.dispute.funds_withdrawn}, {@code charge.dispute.updated}, {@code charge.expired}, {@code
* charge.failed}, {@code charge.pending}, {@code charge.refund.updated}, {@code charge.refunded},
* {@code charge.succeeded}, {@code charge.updated}, {@code
* checkout.session.async_payment_failed}, {@code checkout.session.async_payment_succeeded},
* {@code checkout.session.completed}, {@code checkout.session.expired}, {@code coupon.created},
* {@code coupon.deleted}, {@code coupon.updated}, {@code credit_note.created}, {@code
* credit_note.updated}, {@code credit_note.voided}, {@code customer.created}, {@code
* customer.deleted}, {@code customer.discount.created}, {@code customer.discount.deleted}, {@code
* account.external_account.updated}, {@code account.updated}, {@code account_notice.created},
* {@code account_notice.updated}, {@code application_fee.created}, {@code
* application_fee.refund.updated}, {@code application_fee.refunded}, {@code balance.available},
* {@code billing_portal.configuration.created}, {@code billing_portal.configuration.updated},
* {@code billing_portal.session.created}, {@code capability.updated}, {@code
* capital.financing_offer.accepted}, {@code capital.financing_offer.canceled}, {@code
* capital.financing_offer.created}, {@code capital.financing_offer.expired}, {@code
* capital.financing_offer.fully_repaid}, {@code capital.financing_offer.paid_out}, {@code
* capital.financing_offer.rejected}, {@code capital.financing_offer.replacement_created}, {@code
* capital.financing_transaction.created}, {@code cash_balance.funds_available}, {@code
* charge.captured}, {@code charge.dispute.closed}, {@code charge.dispute.created}, {@code
* charge.dispute.funds_reinstated}, {@code charge.dispute.funds_withdrawn}, {@code
* charge.dispute.updated}, {@code charge.expired}, {@code charge.failed}, {@code charge.pending},
* {@code charge.refund.updated}, {@code charge.refunded}, {@code charge.succeeded}, {@code
* charge.updated}, {@code checkout.session.async_payment_failed}, {@code
* checkout.session.async_payment_succeeded}, {@code checkout.session.completed}, {@code
* checkout.session.expired}, {@code coupon.created}, {@code coupon.deleted}, {@code
* coupon.updated}, {@code credit_note.created}, {@code credit_note.updated}, {@code
* credit_note.voided}, {@code customer.created}, {@code customer.deleted}, {@code
* customer.discount.created}, {@code customer.discount.deleted}, {@code
* customer.discount.updated}, {@code customer.source.created}, {@code customer.source.deleted},
* {@code customer.source.expiring}, {@code customer.source.updated}, {@code
* customer.subscription.collection_paused}, {@code customer.subscription.collection_resumed},
Expand Down

0 comments on commit da5a9ec

Please sign in to comment.