Skip to content

Commit eb68ddd

Browse files
committed
Codegen for openapi d412983
1 parent 563eb6b commit eb68ddd

29 files changed

+1347
-53
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,15 @@ public static class Capabilities extends StripeObject {
676676
@SerializedName("bancontact_payments")
677677
String bancontactPayments;
678678

679+
/**
680+
* The status of the customer_balance payments capability of the account, or whether the account
681+
* can directly process customer_balance charges.
682+
*
683+
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
684+
*/
685+
@SerializedName("bank_transfer_payments")
686+
String bankTransferPayments;
687+
679688
/**
680689
* The status of the boleto payments capability of the account, or whether the account can
681690
* directly process boleto charges.

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,13 @@ public static class CardPresent extends StripeObject {
17951795
@SerializedName("brand")
17961796
String brand;
17971797

1798+
/**
1799+
* When using manual capture, a future timestamp after which the charge will be automatically
1800+
* refunded if uncaptured.
1801+
*/
1802+
@SerializedName("capture_before")
1803+
Long captureBefore;
1804+
17981805
/**
17991806
* The cardholder name as read from the card, in <a
18001807
* href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,13 @@ public static class PaymentMethodOptions extends StripeObject {
16181618
@SerializedName("card")
16191619
Card card;
16201620

1621+
/**
1622+
* If paying by {@code customer_balance}, this sub-hash contains details about the Bank transfer
1623+
* payment method options to pass to the invoice’s PaymentIntent.
1624+
*/
1625+
@SerializedName("customer_balance")
1626+
CustomerBalance customerBalance;
1627+
16211628
/**
16221629
* If paying by {@code konbini}, this sub-hash contains details about the Konbini payment method
16231630
* options to pass to the invoice’s PaymentIntent.
@@ -1694,6 +1701,38 @@ public static class Card extends StripeObject {
16941701
String requestThreeDSecure;
16951702
}
16961703

1704+
@Getter
1705+
@Setter
1706+
@EqualsAndHashCode(callSuper = false)
1707+
public static class CustomerBalance extends StripeObject {
1708+
@SerializedName("bank_transfer")
1709+
BankTransfer bankTransfer;
1710+
1711+
/**
1712+
* The funding method type to be used when there are not enough funds in the customer balance.
1713+
* Permitted values include: {@code bank_transfer}.
1714+
*
1715+
* <p>Equal to {@code bank_transfer}.
1716+
*/
1717+
@SerializedName("funding_type")
1718+
String fundingType;
1719+
1720+
@Getter
1721+
@Setter
1722+
@EqualsAndHashCode(callSuper = false)
1723+
public static class BankTransfer extends StripeObject {
1724+
/**
1725+
* The bank transfer type that can be used for funding. Permitted values include: {@code
1726+
* us_bank_account}, {@code eu_bank_account}, {@code id_bank_account}, {@code
1727+
* gb_bank_account}, {@code jp_bank_account}, {@code mx_bank_account}, {@code
1728+
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code id_bank_transfer}, {@code
1729+
* jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
1730+
*/
1731+
@SerializedName("type")
1732+
String type;
1733+
}
1734+
}
1735+
16971736
@Getter
16981737
@Setter
16991738
@EqualsAndHashCode(callSuper = false)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
@Setter
1111
@EqualsAndHashCode(callSuper = false)
1212
public class InvoiceLineItemPeriod extends StripeObject {
13-
/** End of the line item's billing period. */
13+
/** The end of the period, which must be greater than or equal to the start. */
1414
@SerializedName("end")
1515
Long end;
1616

17-
/** Start of the line item's billing period. */
17+
/** The start of the period. */
1818
@SerializedName("start")
1919
Long start;
2020
}

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,15 @@ public static class MandateOptions extends StripeObject {
20732073
@Getter
20742074
@Setter
20752075
@EqualsAndHashCode(callSuper = false)
2076-
public static class CardPresent extends StripeObject {}
2076+
public static class CardPresent extends StripeObject {
2077+
/**
2078+
* Request ability to capture this payment beyond the standard <a
2079+
* href="https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity">authorization
2080+
* validity window.</a>
2081+
*/
2082+
@SerializedName("request_extended_authorization")
2083+
Boolean requestExtendedAuthorization;
2084+
}
20772085

20782086
@Getter
20792087
@Setter

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,13 @@ public static class PaymentMethodOptions extends StripeObject {
903903
@SerializedName("card")
904904
Card card;
905905

906+
/**
907+
* This sub-hash contains details about the Bank transfer payment method options to pass to
908+
* invoices created by the subscription.
909+
*/
910+
@SerializedName("customer_balance")
911+
Invoice.PaymentMethodOptions.CustomerBalance customerBalance;
912+
906913
/**
907914
* This sub-hash contains details about the Konbini payment method options to pass to invoices
908915
* created by the subscription.

src/main/java/com/stripe/model/checkout/Session.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.google.gson.annotations.SerializedName;
55
import com.stripe.Stripe;
66
import com.stripe.exception.StripeException;
7+
import com.stripe.model.Address;
78
import com.stripe.model.Customer;
89
import com.stripe.model.ExpandableField;
910
import com.stripe.model.HasId;
@@ -681,6 +682,13 @@ public static class ConsentCollection extends StripeObject {
681682
@Setter
682683
@EqualsAndHashCode(callSuper = false)
683684
public static class CustomerDetails extends StripeObject {
685+
/**
686+
* The customer's address at the time of checkout. Note: This property is populated only for
687+
* sessions on or after March 30, 2022.
688+
*/
689+
@SerializedName("address")
690+
Address address;
691+
684692
/**
685693
* The email associated with the Customer, if one exists, on the Checkout Session at the time of
686694
* checkout or at time of session expiry. Otherwise, if the customer has consented to
@@ -690,6 +698,13 @@ public static class CustomerDetails extends StripeObject {
690698
@SerializedName("email")
691699
String email;
692700

701+
/**
702+
* The customer's name at the time of checkout. Note: This property is populated only for
703+
* sessions on or after March 30, 2022.
704+
*/
705+
@SerializedName("name")
706+
String name;
707+
693708
/** The customer's phone number at the time of checkout. */
694709
@SerializedName("phone")
695710
String phone;

src/main/java/com/stripe/model/terminal/Reader.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,12 @@ public Reader cancelAction(ReaderCancelActionParams params, RequestOptions optio
386386
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
387387
}
388388

389-
/** Sets reader display. */
389+
/** Sets reader display to show cart details. */
390390
public Reader setReaderDisplay(Map<String, Object> params) throws StripeException {
391391
return setReaderDisplay(params, (RequestOptions) null);
392392
}
393393

394-
/** Sets reader display. */
394+
/** Sets reader display to show cart details. */
395395
public Reader setReaderDisplay(Map<String, Object> params, RequestOptions options)
396396
throws StripeException {
397397
String url =
@@ -404,12 +404,12 @@ public Reader setReaderDisplay(Map<String, Object> params, RequestOptions option
404404
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
405405
}
406406

407-
/** Sets reader display. */
407+
/** Sets reader display to show cart details. */
408408
public Reader setReaderDisplay(ReaderSetReaderDisplayParams params) throws StripeException {
409409
return setReaderDisplay(params, (RequestOptions) null);
410410
}
411411

412-
/** Sets reader display. */
412+
/** Sets reader display to show cart details. */
413413
public Reader setReaderDisplay(ReaderSetReaderDisplayParams params, RequestOptions options)
414414
throws StripeException {
415415
String url =
@@ -602,31 +602,31 @@ public TestHelpers getTestHelpers() {
602602
public class TestHelpers {
603603
/**
604604
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
605-
* saving a card or refunding a transaction
605+
* saving a card or refunding a transaction.
606606
*/
607607
public Reader presentPaymentMethod() throws StripeException {
608608
return presentPaymentMethod((Map<String, Object>) null, (RequestOptions) null);
609609
}
610610

611611
/**
612612
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
613-
* saving a card or refunding a transaction
613+
* saving a card or refunding a transaction.
614614
*/
615615
public Reader presentPaymentMethod(RequestOptions options) throws StripeException {
616616
return presentPaymentMethod((Map<String, Object>) null, options);
617617
}
618618

619619
/**
620620
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
621-
* saving a card or refunding a transaction
621+
* saving a card or refunding a transaction.
622622
*/
623623
public Reader presentPaymentMethod(Map<String, Object> params) throws StripeException {
624624
return presentPaymentMethod(params, (RequestOptions) null);
625625
}
626626

627627
/**
628628
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
629-
* saving a card or refunding a transaction
629+
* saving a card or refunding a transaction.
630630
*/
631631
public Reader presentPaymentMethod(Map<String, Object> params, RequestOptions options)
632632
throws StripeException {
@@ -643,7 +643,7 @@ public Reader presentPaymentMethod(Map<String, Object> params, RequestOptions op
643643

644644
/**
645645
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
646-
* saving a card or refunding a transaction
646+
* saving a card or refunding a transaction.
647647
*/
648648
public Reader presentPaymentMethod(ReaderPresentPaymentMethodParams params)
649649
throws StripeException {
@@ -652,7 +652,7 @@ public Reader presentPaymentMethod(ReaderPresentPaymentMethodParams params)
652652

653653
/**
654654
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment,
655-
* saving a card or refunding a transaction
655+
* saving a card or refunding a transaction.
656656
*/
657657
public Reader presentPaymentMethod(
658658
ReaderPresentPaymentMethodParams params, RequestOptions options) throws StripeException {

src/main/java/com/stripe/param/AccountCreateParams.java

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ public static class Capabilities {
844844
@SerializedName("bancontact_payments")
845845
BancontactPayments bancontactPayments;
846846

847+
/** The bank_transfer_payments capability. */
848+
@SerializedName("bank_transfer_payments")
849+
BankTransferPayments bankTransferPayments;
850+
847851
/** The boleto_payments capability. */
848852
@SerializedName("boleto_payments")
849853
BoletoPayments boletoPayments;
@@ -947,6 +951,7 @@ private Capabilities(
947951
AuBecsDebitPayments auBecsDebitPayments,
948952
BacsDebitPayments bacsDebitPayments,
949953
BancontactPayments bancontactPayments,
954+
BankTransferPayments bankTransferPayments,
950955
BoletoPayments boletoPayments,
951956
CardIssuing cardIssuing,
952957
CardPayments cardPayments,
@@ -975,6 +980,7 @@ private Capabilities(
975980
this.auBecsDebitPayments = auBecsDebitPayments;
976981
this.bacsDebitPayments = bacsDebitPayments;
977982
this.bancontactPayments = bancontactPayments;
983+
this.bankTransferPayments = bankTransferPayments;
978984
this.boletoPayments = boletoPayments;
979985
this.cardIssuing = cardIssuing;
980986
this.cardPayments = cardPayments;
@@ -1015,6 +1021,8 @@ public static class Builder {
10151021

10161022
private BancontactPayments bancontactPayments;
10171023

1024+
private BankTransferPayments bankTransferPayments;
1025+
10181026
private BoletoPayments boletoPayments;
10191027

10201028
private CardIssuing cardIssuing;
@@ -1069,6 +1077,7 @@ public Capabilities build() {
10691077
this.auBecsDebitPayments,
10701078
this.bacsDebitPayments,
10711079
this.bancontactPayments,
1080+
this.bankTransferPayments,
10721081
this.boletoPayments,
10731082
this.cardIssuing,
10741083
this.cardPayments,
@@ -1125,6 +1134,12 @@ public Builder setBancontactPayments(BancontactPayments bancontactPayments) {
11251134
return this;
11261135
}
11271136

1137+
/** The bank_transfer_payments capability. */
1138+
public Builder setBankTransferPayments(BankTransferPayments bankTransferPayments) {
1139+
this.bankTransferPayments = bankTransferPayments;
1140+
return this;
1141+
}
1142+
11281143
/** The boleto_payments capability. */
11291144
public Builder setBoletoPayments(BoletoPayments boletoPayments) {
11301145
this.boletoPayments = boletoPayments;
@@ -1675,6 +1690,84 @@ public Builder setRequested(Boolean requested) {
16751690
}
16761691
}
16771692

1693+
@Getter
1694+
public static class BankTransferPayments {
1695+
/**
1696+
* Map of extra parameters for custom features not available in this client library. The
1697+
* content in this map is not serialized under this field's {@code @SerializedName} value.
1698+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1699+
* name in this param object. Effectively, this map is flattened to its parent instance.
1700+
*/
1701+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1702+
Map<String, Object> extraParams;
1703+
1704+
/**
1705+
* Passing true requests the capability for the account, if it is not already requested. A
1706+
* requested capability may not immediately become active. Any requirements to activate the
1707+
* capability are returned in the {@code requirements} arrays.
1708+
*/
1709+
@SerializedName("requested")
1710+
Boolean requested;
1711+
1712+
private BankTransferPayments(Map<String, Object> extraParams, Boolean requested) {
1713+
this.extraParams = extraParams;
1714+
this.requested = requested;
1715+
}
1716+
1717+
public static Builder builder() {
1718+
return new Builder();
1719+
}
1720+
1721+
public static class Builder {
1722+
private Map<String, Object> extraParams;
1723+
1724+
private Boolean requested;
1725+
1726+
/** Finalize and obtain parameter instance from this builder. */
1727+
public BankTransferPayments build() {
1728+
return new BankTransferPayments(this.extraParams, this.requested);
1729+
}
1730+
1731+
/**
1732+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
1733+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1734+
* map. See {@link AccountCreateParams.Capabilities.BankTransferPayments#extraParams} for
1735+
* the field documentation.
1736+
*/
1737+
public Builder putExtraParam(String key, Object value) {
1738+
if (this.extraParams == null) {
1739+
this.extraParams = new HashMap<>();
1740+
}
1741+
this.extraParams.put(key, value);
1742+
return this;
1743+
}
1744+
1745+
/**
1746+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1747+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1748+
* map. See {@link AccountCreateParams.Capabilities.BankTransferPayments#extraParams} for
1749+
* the field documentation.
1750+
*/
1751+
public Builder putAllExtraParam(Map<String, Object> map) {
1752+
if (this.extraParams == null) {
1753+
this.extraParams = new HashMap<>();
1754+
}
1755+
this.extraParams.putAll(map);
1756+
return this;
1757+
}
1758+
1759+
/**
1760+
* Passing true requests the capability for the account, if it is not already requested. A
1761+
* requested capability may not immediately become active. Any requirements to activate the
1762+
* capability are returned in the {@code requirements} arrays.
1763+
*/
1764+
public Builder setRequested(Boolean requested) {
1765+
this.requested = requested;
1766+
return this;
1767+
}
1768+
}
1769+
}
1770+
16781771
@Getter
16791772
public static class BoletoPayments {
16801773
/**

0 commit comments

Comments
 (0)