Skip to content

Commit

Permalink
Merge pull request #1682 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Nov 17, 2023
2 parents 82fbbce + 2cef405 commit 6c3f1b8
Show file tree
Hide file tree
Showing 23 changed files with 20,421 additions and 4,799 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
* Change type of `tax.RegistrationCreateParams.active_from` to `DateTime | 'now'`
* Add support for new value `invoice.payment.overpaid` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 24.3.0 - 2023-11-16
* [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code
* Add support for `status` on `checkout.SessionListParams`
* [#1683](https://github.com/stripe/stripe-java/pull/1683) Update generated code
* Add support for `bacs_debit_payments` on `AccountCreateParams.settings` and `AccountUpdateParams.settings`
* Add support for `service_user_number` on `Account.settings.bacs_debit_payments`
* Add support for `capture_before` on `Charge.payment_method_details.card`
* Add support for `paypal` on `Checkout.Session.payment_method_options`
* Add support for `tax_amounts` on `CreditNoteCreateParams.lines[]`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
* Add support for `network_data` on `Issuing.Transaction`

## 24.2.0 - 2023-11-09
* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code
* Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v655
v669
16 changes: 14 additions & 2 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1857,11 +1857,23 @@ public static class Settings extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class BacsDebitPayments extends StripeObject {
/**
* The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct
* Debit, this will appear on the mandate, and as the statement descriptor.
* The Bacs Direct Debit display name for this account. For payments made with Bacs Direct
* Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps
* display it as the name of the business. To use custom branding, set the Bacs Direct Debit
* Display Name during or right after creation. Custom branding incurs an additional monthly
* fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't
* set the display name before requesting Bacs capability, it's automatically set as
* "Stripe" and the account is onboarded to Stripe branding, which is free.
*/
@SerializedName("display_name")
String displayName;

/**
* The Bacs Direct Debit Service user number for this account. For payments made with Bacs
* Direct Debit, this number is a unique identifier of the account with our banking partners.
*/
@SerializedName("service_user_number")
String serviceUserNumber;
}

@Getter
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,13 @@ public static class Card extends StripeObject {
@SerializedName("brand")
String brand;

/**
* When using manual capture, a future timestamp at which the charge will be automatically
* refunded if uncaptured.
*/
@SerializedName("capture_before")
Long captureBefore;

/** Check results by Card networks on Card address and CVC at time of payment. */
@SerializedName("checks")
Checks checks;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public class CustomerSession extends ApiResource {
@SerializedName("client_secret")
String clientSecret;

/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("created")
Long created;

/** The customer the customer session was created for. */
@SerializedName("customer")
@Getter(lombok.AccessLevel.NONE)
Expand Down
204 changes: 204 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2292,10 +2292,19 @@ public static class PaymentDetails extends StripeObject {
@SerializedName("car_rental")
CarRental carRental;

@SerializedName("event_details")
EventDetails eventDetails;

@SerializedName("subscription")
Subscription subscription;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CarRental extends StripeObject {
@SerializedName("affiliate")
Affiliate affiliate;

/** The booking number associated with the car rental. */
@SerializedName("booking_number")
String bookingNumber;
Expand Down Expand Up @@ -2324,6 +2333,13 @@ public static class CarRental extends StripeObject {
@SerializedName("days_rented")
Long daysRented;

@SerializedName("delivery")
Delivery delivery;

/** The details of the drivers associated with the trip. */
@SerializedName("drivers")
List<PaymentIntent.PaymentDetails.CarRental.Driver> drivers;

/** List of additional charges being billed. */
@SerializedName("extra_charges")
List<String> extraCharges;
Expand Down Expand Up @@ -2364,6 +2380,194 @@ public static class CarRental extends StripeObject {
/** Indicates whether the goods or services are tax-exempt or tax is not collected. */
@SerializedName("tax_exempt")
Boolean taxExempt;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Affiliate extends StripeObject {
/** The name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Delivery extends StripeObject {
/**
* The delivery method for the payment
*
* <p>One of {@code email}, {@code phone}, {@code pickup}, or {@code post}.
*/
@SerializedName("mode")
String mode;

@SerializedName("receipient")
Receipient receipient;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Receipient extends StripeObject {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String email;

/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;

/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Driver extends StripeObject {
/** Full name of the driver on the reservation. */
@SerializedName("name")
String name;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class EventDetails extends StripeObject {
/** Indicates if the tickets are digitally checked when entering the venue. */
@SerializedName("access_controlled_venue")
Boolean accessControlledVenue;

@SerializedName("address")
com.stripe.model.Address address;

@SerializedName("affiliate")
Affiliate affiliate;

/** The name of the company. */
@SerializedName("company")
String company;

@SerializedName("delivery")
Delivery delivery;

/** Event end time. Measured in seconds since the Unix epoch. */
@SerializedName("ends_at")
Long endsAt;

/** Type of the event entertainment (concert, sports event etc). */
@SerializedName("genre")
String genre;

/** The name of the event. */
@SerializedName("name")
String name;

/** Event start time. Measured in seconds since the Unix epoch. */
@SerializedName("starts_at")
Long startsAt;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Affiliate extends StripeObject {
/** The name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Delivery extends StripeObject {
/**
* The delivery method for the payment
*
* <p>One of {@code email}, {@code phone}, {@code pickup}, or {@code post}.
*/
@SerializedName("mode")
String mode;

@SerializedName("receipient")
Receipient receipient;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Receipient extends StripeObject {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String email;

/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;

/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
}
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Subscription extends StripeObject {
@SerializedName("affiliate")
Affiliate affiliate;

/** Info whether the subscription will be auto renewed upon expiry. */
@SerializedName("auto_renewal")
Boolean autoRenewal;

@SerializedName("billing_interval")
BillingInterval billingInterval;

/** Subscription end time. Measured in seconds since the Unix epoch. */
@SerializedName("ends_at")
Long endsAt;

/** Name of the product on subscription. e.g. Apple Music Subscription. */
@SerializedName("name")
String name;

/** Subscription start time. Measured in seconds since the Unix epoch. */
@SerializedName("starts_at")
Long startsAt;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Affiliate extends StripeObject {
/** The name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BillingInterval extends StripeObject {
/**
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the
* interval type to get the overall duration.
*/
@SerializedName("count")
Long count;

/**
* Specifies a type of interval unit. Either {@code day}, {@code week}, {@code month} or
* {@code year}.
*
* <p>One of {@code day}, {@code month}, {@code week}, or {@code year}.
*/
@SerializedName("interval")
String interval;
}
}
}

Expand Down
20 changes: 16 additions & 4 deletions src/main/java/com/stripe/model/Price.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,18 @@ public static Price create(PriceCreateParams params, RequestOptions options)
ApiMode.V1);
}

/** Returns a list of your prices. */
/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
*/
public static PriceCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/** Returns a list of your prices. */
/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
*/
public static PriceCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path = "/v1/prices";
Expand All @@ -278,12 +284,18 @@ public static PriceCollection list(Map<String, Object> params, RequestOptions op
ApiMode.V1);
}

/** Returns a list of your prices. */
/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
*/
public static PriceCollection list(PriceListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}

/** Returns a list of your prices. */
/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
*/
public static PriceCollection list(PriceListParams params, RequestOptions options)
throws StripeException {
String path = "/v1/prices";
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/com/stripe/model/Topup.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ public class Topup extends ApiResource implements MetadataStore<Topup>, BalanceT
@SerializedName("object")
String object;

/**
* For most Stripe users, the source of every top-up is a bank account. This hash is then the <a
* href="https://stripe.com/docs/api#source_object">source object</a> describing that bank
* account.
*/
/** The source field is deprecated. It might not always be present in the API response. */
@SerializedName("source")
Source source;

Expand Down
Loading

0 comments on commit 6c3f1b8

Please sign in to comment.