Skip to content

Commit 455f91b

Browse files
Update generated code for v2104 and
1 parent da1fe78 commit 455f91b

File tree

12 files changed

+471
-234
lines changed

12 files changed

+471
-234
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5a9ac40aabbc00a67ae2a186633fc8dd64b25c56
1+
847d2ef0de9626eec25973097d37b61f67e343ee

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2103
1+
v2104

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,14 @@ public static class FeeSource extends StripeObject {
318318
@SerializedName("payout")
319319
String payout;
320320

321+
/** Transfer ID that created this application fee. */
322+
@SerializedName("transfer")
323+
String transfer;
324+
321325
/**
322326
* Type of object that created the application fee.
323327
*
324-
* <p>One of {@code charge}, or {@code payout}.
328+
* <p>One of {@code charge}, {@code payout}, or {@code transfer}.
325329
*/
326330
@SerializedName("type")
327331
String type;

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

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public class Balance extends ApiResource {
8181
@SerializedName("refund_and_dispute_prefunding")
8282
RefundAndDisputePrefunding refundAndDisputePrefunding;
8383

84+
@SerializedName("transit_balances_total")
85+
TransitBalancesTotal transitBalancesTotal;
86+
8487
/**
8588
* Retrieves the current account balance, based on the authentication that was used to make the
8689
* request. For a sample request, see <a
@@ -597,10 +600,136 @@ public static class SourceTypes extends StripeObject {
597600
}
598601
}
599602

603+
/**
604+
* For more details about TransitBalancesTotal, please refer to the <a
605+
* href="https://docs.stripe.com/api">API Reference.</a>
606+
*/
607+
@Getter
608+
@Setter
609+
@EqualsAndHashCode(callSuper = false)
610+
public static class TransitBalancesTotal extends StripeObject {
611+
/** Funds that are available for use. */
612+
@SerializedName("available")
613+
List<Balance.TransitBalancesTotal.Available> available;
614+
615+
/** Funds that are pending. */
616+
@SerializedName("pending")
617+
List<Balance.TransitBalancesTotal.Pending> pending;
618+
619+
/**
620+
* For more details about Available, please refer to the <a
621+
* href="https://docs.stripe.com/api">API Reference.</a>
622+
*/
623+
@Getter
624+
@Setter
625+
@EqualsAndHashCode(callSuper = false)
626+
public static class Available extends StripeObject {
627+
/** Balance amount. */
628+
@SerializedName("amount")
629+
Long amount;
630+
631+
/**
632+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
633+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
634+
* currency</a>.
635+
*/
636+
@SerializedName("currency")
637+
String currency;
638+
639+
@SerializedName("source_types")
640+
SourceTypes sourceTypes;
641+
642+
/**
643+
* For more details about SourceTypes, please refer to the <a
644+
* href="https://docs.stripe.com/api">API Reference.</a>
645+
*/
646+
@Getter
647+
@Setter
648+
@EqualsAndHashCode(callSuper = false)
649+
public static class SourceTypes extends StripeObject {
650+
/**
651+
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
652+
* payments</a>.
653+
*/
654+
@SerializedName("bank_account")
655+
Long bankAccount;
656+
657+
/**
658+
* Amount coming from most payment methods, including cards as well as <a
659+
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
660+
*/
661+
@SerializedName("card")
662+
Long card;
663+
664+
/**
665+
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
666+
* payment method.
667+
*/
668+
@SerializedName("fpx")
669+
Long fpx;
670+
}
671+
}
672+
673+
/**
674+
* For more details about Pending, please refer to the <a href="https://docs.stripe.com/api">API
675+
* Reference.</a>
676+
*/
677+
@Getter
678+
@Setter
679+
@EqualsAndHashCode(callSuper = false)
680+
public static class Pending extends StripeObject {
681+
/** Balance amount. */
682+
@SerializedName("amount")
683+
Long amount;
684+
685+
/**
686+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
687+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
688+
* currency</a>.
689+
*/
690+
@SerializedName("currency")
691+
String currency;
692+
693+
@SerializedName("source_types")
694+
SourceTypes sourceTypes;
695+
696+
/**
697+
* For more details about SourceTypes, please refer to the <a
698+
* href="https://docs.stripe.com/api">API Reference.</a>
699+
*/
700+
@Getter
701+
@Setter
702+
@EqualsAndHashCode(callSuper = false)
703+
public static class SourceTypes extends StripeObject {
704+
/**
705+
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
706+
* payments</a>.
707+
*/
708+
@SerializedName("bank_account")
709+
Long bankAccount;
710+
711+
/**
712+
* Amount coming from most payment methods, including cards as well as <a
713+
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
714+
*/
715+
@SerializedName("card")
716+
Long card;
717+
718+
/**
719+
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
720+
* payment method.
721+
*/
722+
@SerializedName("fpx")
723+
Long fpx;
724+
}
725+
}
726+
}
727+
600728
@Override
601729
public void setResponseGetter(StripeResponseGetter responseGetter) {
602730
super.setResponseGetter(responseGetter);
603731
trySetResponseGetter(issuing, responseGetter);
604732
trySetResponseGetter(refundAndDisputePrefunding, responseGetter);
733+
trySetResponseGetter(transitBalancesTotal, responseGetter);
605734
}
606735
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId {
4343
/**
4444
* The balance that this transaction impacts.
4545
*
46-
* <p>One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}.
46+
* <p>One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code
47+
* transit}.
4748
*/
4849
@SerializedName("balance_type")
4950
String balanceType;

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
@Setter
4747
@EqualsAndHashCode(callSuper = false)
4848
public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent> {
49+
/** Allocated Funds configuration for this PaymentIntent. */
50+
@SerializedName("allocated_funds")
51+
AllocatedFunds allocatedFunds;
52+
4953
/**
5054
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much
5155
* to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency
@@ -1701,6 +1705,19 @@ public PaymentIntent verifyMicrodeposits(
17011705
return getResponseGetter().request(request, PaymentIntent.class);
17021706
}
17031707

1708+
/**
1709+
* For more details about AllocatedFunds, please refer to the <a
1710+
* href="https://docs.stripe.com/api">API Reference.</a>
1711+
*/
1712+
@Getter
1713+
@Setter
1714+
@EqualsAndHashCode(callSuper = false)
1715+
public static class AllocatedFunds extends StripeObject {
1716+
/** Allocated Funds configuration for this PaymentIntent. */
1717+
@SerializedName("enabled")
1718+
Boolean enabled;
1719+
}
1720+
17041721
/**
17051722
* For more details about AmountDetails, please refer to the <a
17061723
* href="https://docs.stripe.com/api">API Reference.</a>
@@ -6399,6 +6416,7 @@ public void setDestinationObject(Account expandableObject) {
63996416
@Override
64006417
public void setResponseGetter(StripeResponseGetter responseGetter) {
64016418
super.setResponseGetter(responseGetter);
6419+
trySetResponseGetter(allocatedFunds, responseGetter);
64026420
trySetResponseGetter(amountDetails, responseGetter);
64036421
trySetResponseGetter(application, responseGetter);
64046422
trySetResponseGetter(automaticPaymentMethods, responseGetter);

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public class Transfer extends ApiResource
4848
@SerializedName("amount_reversed")
4949
Long amountReversed;
5050

51+
@SerializedName("application_fee")
52+
@Getter(lombok.AccessLevel.NONE)
53+
@Setter(lombok.AccessLevel.NONE)
54+
ExpandableField<ApplicationFee> applicationFee;
55+
56+
@SerializedName("application_fee_amount")
57+
Long applicationFeeAmount;
58+
5159
/** Balance transaction that describes the impact of this transfer on your account balance. */
5260
@SerializedName("balance_transaction")
5361
@Getter(lombok.AccessLevel.NONE)
@@ -152,6 +160,25 @@ public class Transfer extends ApiResource
152160
@SerializedName("transfer_group")
153161
String transferGroup;
154162

163+
/** Get ID of expandable {@code applicationFee} object. */
164+
public String getApplicationFee() {
165+
return (this.applicationFee != null) ? this.applicationFee.getId() : null;
166+
}
167+
168+
public void setApplicationFee(String id) {
169+
this.applicationFee = ApiResource.setExpandableFieldId(id, this.applicationFee);
170+
}
171+
172+
/** Get expanded {@code applicationFee}. */
173+
public ApplicationFee getApplicationFeeObject() {
174+
return (this.applicationFee != null) ? this.applicationFee.getExpanded() : null;
175+
}
176+
177+
public void setApplicationFeeObject(ApplicationFee expandableObject) {
178+
this.applicationFee =
179+
new ExpandableField<ApplicationFee>(expandableObject.getId(), expandableObject);
180+
}
181+
155182
/** Get ID of expandable {@code balanceTransaction} object. */
156183
public String getBalanceTransaction() {
157184
return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
@@ -433,6 +460,7 @@ public Transfer update(TransferUpdateParams params, RequestOptions options)
433460
@Override
434461
public void setResponseGetter(StripeResponseGetter responseGetter) {
435462
super.setResponseGetter(responseGetter);
463+
trySetResponseGetter(applicationFee, responseGetter);
436464
trySetResponseGetter(balanceTransaction, responseGetter);
437465
trySetResponseGetter(destination, responseGetter);
438466
trySetResponseGetter(destinationPayment, responseGetter);

src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public class MeterUsageRow extends StripeObject implements HasId {
4646
@SerializedName("starts_at")
4747
Long startsAt;
4848

49+
/** A set of key-value pairs representing the tenants of the meter usage. */
50+
@SerializedName("tenants")
51+
Map<String, String> tenants;
52+
4953
/** The aggregated meter usage value for the specified bucket. */
5054
@SerializedName("value")
5155
BigDecimal value;

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class TransferCreateParams extends ApiRequestParams {
1717
@SerializedName("amount")
1818
Long amount;
1919

20+
@SerializedName("application_fee_amount")
21+
Long applicationFeeAmount;
22+
2023
/**
2124
* <strong>Required.</strong> Three-letter <a
2225
* href="https://www.iso.org/iso-4217-currency-codes.html">ISO code for currency</a> in lowercase.
@@ -93,6 +96,7 @@ public class TransferCreateParams extends ApiRequestParams {
9396

9497
private TransferCreateParams(
9598
Long amount,
99+
Long applicationFeeAmount,
96100
String currency,
97101
String description,
98102
String destination,
@@ -104,6 +108,7 @@ private TransferCreateParams(
104108
SourceType sourceType,
105109
String transferGroup) {
106110
this.amount = amount;
111+
this.applicationFeeAmount = applicationFeeAmount;
107112
this.currency = currency;
108113
this.description = description;
109114
this.destination = destination;
@@ -123,6 +128,8 @@ public static Builder builder() {
123128
public static class Builder {
124129
private Long amount;
125130

131+
private Long applicationFeeAmount;
132+
126133
private String currency;
127134

128135
private String description;
@@ -147,6 +154,7 @@ public static class Builder {
147154
public TransferCreateParams build() {
148155
return new TransferCreateParams(
149156
this.amount,
157+
this.applicationFeeAmount,
150158
this.currency,
151159
this.description,
152160
this.destination,
@@ -165,6 +173,11 @@ public Builder setAmount(Long amount) {
165173
return this;
166174
}
167175

176+
public Builder setApplicationFeeAmount(Long applicationFeeAmount) {
177+
this.applicationFeeAmount = applicationFeeAmount;
178+
return this;
179+
}
180+
168181
/**
169182
* <strong>Required.</strong> Three-letter <a
170183
* href="https://www.iso.org/iso-4217-currency-codes.html">ISO code for currency</a> in

0 commit comments

Comments
 (0)