Skip to content

Commit 4692eca

Browse files
Merge pull request #2214 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents a2abd1b + faa45a4 commit 4692eca

31 files changed

Lines changed: 2885 additions & 31 deletions

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1263d72c2687be8ce737cfb363690b8da0a0d552
1+
6b817716b60b32636770d4c1bd7863bbdb6f5f7a

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2254
1+
v2256

src/main/java/com/stripe/StripeClient.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,18 @@ public com.stripe.service.PaymentLinkService paymentLinks() {
750750
return new com.stripe.service.PaymentLinkService(this.getResponseGetter());
751751
}
752752

753+
/**
754+
* @deprecated StripeClient.paymentLocations() is deprecated, use
755+
* StripeClient.v1().paymentLocations() instead. All functionality under it has been copied
756+
* over to StripeClient.v1().paymentLocations(). See <a
757+
* href="https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient">migration
758+
* guide</a> for more on this and tips on migrating to the new v1 namespace.
759+
*/
760+
@Deprecated
761+
public com.stripe.service.PaymentLocationService paymentLocations() {
762+
return new com.stripe.service.PaymentLocationService(this.getResponseGetter());
763+
}
764+
753765
/**
754766
* @deprecated StripeClient.paymentMethodConfigurations() is deprecated, use
755767
* StripeClient.v1().paymentMethodConfigurations() instead. All functionality under it has

src/main/java/com/stripe/model/Capability.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public class Capability extends ApiResource implements HasId {
4848
@SerializedName("object")
4949
String object;
5050

51+
@SerializedName("protections")
52+
Protections protections;
53+
5154
/** Whether the capability has been requested. */
5255
@SerializedName("requested")
5356
Boolean requested;
@@ -326,6 +329,43 @@ public static class Errors extends StripeObject {
326329
}
327330
}
328331

332+
/**
333+
* For more details about Protections, please refer to the <a
334+
* href="https://docs.stripe.com/api">API Reference.</a>
335+
*/
336+
@Getter
337+
@Setter
338+
@EqualsAndHashCode(callSuper = false)
339+
public static class Protections extends StripeObject {
340+
@SerializedName("psp_migration")
341+
PspMigration pspMigration;
342+
343+
/**
344+
* For more details about PspMigration, please refer to the <a
345+
* href="https://docs.stripe.com/api">API Reference.</a>
346+
*/
347+
@Getter
348+
@Setter
349+
@EqualsAndHashCode(callSuper = false)
350+
public static class PspMigration extends StripeObject {
351+
/** Time at which the protection expires. Measured in seconds since the Unix epoch. */
352+
@SerializedName("expires_at")
353+
Long expiresAt;
354+
355+
/** Time at which the protection was requested. Measured in seconds since the Unix epoch. */
356+
@SerializedName("requested_at")
357+
Long requestedAt;
358+
359+
/**
360+
* The status of the capability protection.
361+
*
362+
* <p>One of {@code active}, {@code disrupted}, {@code expired}, or {@code inactive}.
363+
*/
364+
@SerializedName("status")
365+
String status;
366+
}
367+
}
368+
329369
/**
330370
* For more details about Requirements, please refer to the <a
331371
* href="https://docs.stripe.com/api">API Reference.</a>
@@ -520,6 +560,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
520560
super.setResponseGetter(responseGetter);
521561
trySetResponseGetter(account, responseGetter);
522562
trySetResponseGetter(futureRequirements, responseGetter);
563+
trySetResponseGetter(protections, responseGetter);
523564
trySetResponseGetter(requirements, responseGetter);
524565
}
525566
}

src/main/java/com/stripe/model/ConfirmationToken.java

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ public static class PaymentMethodPreview extends StripeObject {
350350
@SerializedName("fpx")
351351
Fpx fpx;
352352

353+
@SerializedName("gift_card")
354+
GiftCard giftCard;
355+
353356
@SerializedName("giropay")
354357
Giropay giropay;
355358

@@ -473,14 +476,14 @@ public static class PaymentMethodPreview extends StripeObject {
473476
* {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code
474477
* bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code
475478
* card_present}, {@code cashapp}, {@code crypto}, {@code custom}, {@code customer_balance},
476-
* {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, {@code grabpay}, {@code
477-
* id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna},
478-
* {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code
479-
* multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24}, {@code
480-
* pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto},
481-
* {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code
482-
* samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code
483-
* stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
479+
* {@code eps}, {@code fpx}, {@code gift_card}, {@code giropay}, {@code gopay}, {@code grabpay},
480+
* {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code
481+
* klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay},
482+
* {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24},
483+
* {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code
484+
* payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay},
485+
* {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort},
486+
* {@code stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
484487
* us_bank_account}, {@code wechat_pay}, or {@code zip}.
485488
*/
486489
@SerializedName("type")
@@ -1738,6 +1741,43 @@ public static class Fpx extends StripeObject {
17381741
String bank;
17391742
}
17401743

1744+
/**
1745+
* For more details about GiftCard, please refer to the <a
1746+
* href="https://docs.stripe.com/api">API Reference.</a>
1747+
*/
1748+
@Getter
1749+
@Setter
1750+
@EqualsAndHashCode(callSuper = false)
1751+
public static class GiftCard extends StripeObject {
1752+
/**
1753+
* The brand of the gift card.
1754+
*
1755+
* <p>One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}.
1756+
*/
1757+
@SerializedName("brand")
1758+
String brand;
1759+
1760+
/** The expiration month of the gift card. */
1761+
@SerializedName("exp_month")
1762+
Long expMonth;
1763+
1764+
/** The expiration year of the gift card. */
1765+
@SerializedName("exp_year")
1766+
Long expYear;
1767+
1768+
/** Uniquely identifies the gift card. */
1769+
@SerializedName("fingerprint")
1770+
String fingerprint;
1771+
1772+
/** The first six digits of the gift card number. */
1773+
@SerializedName("first6")
1774+
String first6;
1775+
1776+
/** The last four digits of the gift card number. */
1777+
@SerializedName("last4")
1778+
String last4;
1779+
}
1780+
17411781
/**
17421782
* For more details about Giropay, please refer to the <a href="https://docs.stripe.com/api">API
17431783
* Reference.</a>

src/main/java/com/stripe/model/EventDataClassLookup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public final class EventDataClassLookup {
7171
"payment_intent_amount_details_line_item",
7272
com.stripe.model.PaymentIntentAmountDetailsLineItem.class);
7373
classLookup.put("payment_link", com.stripe.model.PaymentLink.class);
74+
classLookup.put("payment_location", com.stripe.model.PaymentLocation.class);
7475
classLookup.put("payment_method", com.stripe.model.PaymentMethod.class);
7576
classLookup.put("payment_method_balance", com.stripe.model.PaymentMethodBalance.class);
7677
classLookup.put(

src/main/java/com/stripe/model/InvoiceItem.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,10 +818,61 @@ public static class RateCardRateDetails extends StripeObject {
818818
@Setter
819819
@EqualsAndHashCode(callSuper = false)
820820
public static class ProrationDetails extends StripeObject {
821+
@SerializedName("credited_items")
822+
CreditedItems creditedItems;
823+
821824
/** Discount amounts applied when the proration was created. */
822825
@SerializedName("discount_amounts")
823826
List<InvoiceItem.ProrationDetails.DiscountAmount> discountAmounts;
824827

828+
/**
829+
* For more details about CreditedItems, please refer to the <a
830+
* href="https://docs.stripe.com/api">API Reference.</a>
831+
*/
832+
@Getter
833+
@Setter
834+
@EqualsAndHashCode(callSuper = false)
835+
public static class CreditedItems extends StripeObject {
836+
/**
837+
* When {@code type} is {@code invoice_item}, the invoice item id for the debited invoice item
838+
* corresponding to this credit proration.
839+
*/
840+
@SerializedName("invoice_item")
841+
String invoiceItem;
842+
843+
@SerializedName("invoice_line_items")
844+
InvoiceLineItems invoiceLineItems;
845+
846+
/**
847+
* Whether the credit references a pending invoice item or one or more invoice line items on
848+
* an invoice.
849+
*
850+
* <p>One of {@code invoice_item}, or {@code invoice_line_items}.
851+
*/
852+
@SerializedName("type")
853+
String type;
854+
855+
/**
856+
* For more details about InvoiceLineItems, please refer to the <a
857+
* href="https://docs.stripe.com/api">API Reference.</a>
858+
*/
859+
@Getter
860+
@Setter
861+
@EqualsAndHashCode(callSuper = false)
862+
public static class InvoiceLineItems extends StripeObject {
863+
/** The invoice id for the debited line item(s). */
864+
@SerializedName("invoice")
865+
String invoice;
866+
867+
/**
868+
* IDs of the debited invoice line item(s) on the invoice that correspond to the credit
869+
* proration.
870+
*/
871+
@SerializedName("invoice_line_items")
872+
List<String> invoiceLineItems;
873+
}
874+
}
875+
825876
/**
826877
* For more details about DiscountAmount, please refer to the <a
827878
* href="https://docs.stripe.com/api">API Reference.</a>

0 commit comments

Comments
 (0)