Skip to content

Commit e59bfb6

Browse files
Remove sharing overrides and non-resource root models (#1455)
1 parent ac595c5 commit e59bfb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3370
-2236
lines changed

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

Lines changed: 330 additions & 256 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 16 deletions
This file was deleted.

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

Lines changed: 156 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ public class Balance extends ApiResource {
3838
* currency and payment type can be found in the {@code source_types} property.
3939
*/
4040
@SerializedName("available")
41-
List<Balance.Money> available;
41+
List<Balance.Available> available;
4242

4343
/**
4444
* Funds held due to negative balances on connected Custom accounts. The connect reserve balance
4545
* for each currency and payment type can be found in the {@code source_types} property.
4646
*/
4747
@SerializedName("connect_reserved")
48-
List<Balance.Money> connectReserved;
48+
List<Balance.ConnectReserved> connectReserved;
4949

5050
/** Funds that can be paid out using Instant Payouts. */
5151
@SerializedName("instant_available")
52-
List<Balance.Money> instantAvailable;
52+
List<Balance.InstantAvailable> instantAvailable;
5353

5454
@SerializedName("issuing")
55-
Details issuing;
55+
Issuing issuing;
5656

5757
/**
5858
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
@@ -75,7 +75,7 @@ public class Balance extends ApiResource {
7575
* source_types} property.
7676
*/
7777
@SerializedName("pending")
78-
List<Balance.Money> pending;
78+
List<Balance.Pending> pending;
7979

8080
/**
8181
* Retrieves the current account balance, based on the authentication that was used to make the
@@ -124,16 +124,164 @@ public static Balance retrieve(BalanceRetrieveParams params, RequestOptions opti
124124
@Getter
125125
@Setter
126126
@EqualsAndHashCode(callSuper = false)
127-
public static class Details extends StripeObject {
127+
public static class Available extends StripeObject {
128+
/** Balance amount. */
129+
@SerializedName("amount")
130+
Long amount;
131+
132+
/**
133+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
134+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
135+
* currency</a>.
136+
*/
137+
@SerializedName("currency")
138+
String currency;
139+
140+
@SerializedName("source_types")
141+
SourceTypes sourceTypes;
142+
143+
@Getter
144+
@Setter
145+
@EqualsAndHashCode(callSuper = false)
146+
public static class SourceTypes extends StripeObject {
147+
/** Amount for bank account. */
148+
@SerializedName("bank_account")
149+
Long bankAccount;
150+
151+
/** Amount for card. */
152+
@SerializedName("card")
153+
Long card;
154+
155+
/** Amount for FPX. */
156+
@SerializedName("fpx")
157+
Long fpx;
158+
}
159+
}
160+
161+
@Getter
162+
@Setter
163+
@EqualsAndHashCode(callSuper = false)
164+
public static class ConnectReserved extends StripeObject {
165+
/** Balance amount. */
166+
@SerializedName("amount")
167+
Long amount;
168+
169+
/**
170+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
171+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
172+
* currency</a>.
173+
*/
174+
@SerializedName("currency")
175+
String currency;
176+
177+
@SerializedName("source_types")
178+
SourceTypes sourceTypes;
179+
180+
@Getter
181+
@Setter
182+
@EqualsAndHashCode(callSuper = false)
183+
public static class SourceTypes extends StripeObject {
184+
/** Amount for bank account. */
185+
@SerializedName("bank_account")
186+
Long bankAccount;
187+
188+
/** Amount for card. */
189+
@SerializedName("card")
190+
Long card;
191+
192+
/** Amount for FPX. */
193+
@SerializedName("fpx")
194+
Long fpx;
195+
}
196+
}
197+
198+
@Getter
199+
@Setter
200+
@EqualsAndHashCode(callSuper = false)
201+
public static class InstantAvailable extends StripeObject {
202+
/** Balance amount. */
203+
@SerializedName("amount")
204+
Long amount;
205+
206+
/**
207+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
208+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
209+
* currency</a>.
210+
*/
211+
@SerializedName("currency")
212+
String currency;
213+
214+
@SerializedName("source_types")
215+
SourceTypes sourceTypes;
216+
217+
@Getter
218+
@Setter
219+
@EqualsAndHashCode(callSuper = false)
220+
public static class SourceTypes extends StripeObject {
221+
/** Amount for bank account. */
222+
@SerializedName("bank_account")
223+
Long bankAccount;
224+
225+
/** Amount for card. */
226+
@SerializedName("card")
227+
Long card;
228+
229+
/** Amount for FPX. */
230+
@SerializedName("fpx")
231+
Long fpx;
232+
}
233+
}
234+
235+
@Getter
236+
@Setter
237+
@EqualsAndHashCode(callSuper = false)
238+
public static class Issuing extends StripeObject {
128239
/** Funds that are available for use. */
129240
@SerializedName("available")
130-
List<Balance.Money> available;
241+
List<Balance.Issuing.Available> available;
242+
243+
@Getter
244+
@Setter
245+
@EqualsAndHashCode(callSuper = false)
246+
public static class Available extends StripeObject {
247+
/** Balance amount. */
248+
@SerializedName("amount")
249+
Long amount;
250+
251+
/**
252+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
253+
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
254+
* currency</a>.
255+
*/
256+
@SerializedName("currency")
257+
String currency;
258+
259+
@SerializedName("source_types")
260+
SourceTypes sourceTypes;
261+
262+
@Getter
263+
@Setter
264+
@EqualsAndHashCode(callSuper = false)
265+
public static class SourceTypes extends StripeObject {
266+
/** Amount for bank account. */
267+
@SerializedName("bank_account")
268+
Long bankAccount;
269+
270+
/** Amount for card. */
271+
@SerializedName("card")
272+
Long card;
273+
274+
/** Amount for FPX. */
275+
@SerializedName("fpx")
276+
Long fpx;
277+
}
278+
}
131279
}
132280

133281
@Getter
134282
@Setter
135283
@EqualsAndHashCode(callSuper = false)
136-
public static class Money extends StripeObject {
284+
public static class Pending extends StripeObject {
137285
/** Balance amount. */
138286
@SerializedName("amount")
139287
Long amount;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class BalanceTransaction extends ApiResource implements HasId {
6767

6868
/** Detailed breakdown of fees (in %s) paid for this transaction. */
6969
@SerializedName("fee_details")
70-
List<BalanceTransaction.Fee> feeDetails;
70+
List<BalanceTransaction.FeeDetail> feeDetails;
7171

7272
/** Unique identifier for the object. */
7373
@Getter(onMethod_ = {@Override})
@@ -264,7 +264,7 @@ public static BalanceTransaction retrieve(
264264
@Getter
265265
@Setter
266266
@EqualsAndHashCode(callSuper = false)
267-
public static class Fee extends StripeObject {
267+
public static class FeeDetail extends StripeObject {
268268
/** Amount of the fee, in cents. */
269269
@SerializedName("amount")
270270
Long amount;

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

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public static class Requirements extends StripeObject {
305305
* verification failed.
306306
*/
307307
@SerializedName("errors")
308-
List<Account.Requirements.Errors> errors;
308+
List<Capability.Requirements.Errors> errors;
309309

310310
/**
311311
* Fields that need to be collected assuming all volume thresholds are reached. As they become
@@ -345,5 +345,56 @@ public static class Alternative extends StripeObject {
345345
@SerializedName("original_fields_due")
346346
List<String> originalFieldsDue;
347347
}
348+
349+
@Getter
350+
@Setter
351+
@EqualsAndHashCode(callSuper = false)
352+
public static class Errors extends StripeObject {
353+
/**
354+
* The code for the type of error.
355+
*
356+
* <p>One of {@code invalid_address_city_state_postal_code}, {@code invalid_dob_age_under_18},
357+
* {@code invalid_street_address}, {@code invalid_tos_acceptance}, {@code
358+
* invalid_value_other}, {@code verification_document_address_mismatch}, {@code
359+
* verification_document_address_missing}, {@code verification_document_corrupt}, {@code
360+
* verification_document_country_not_supported}, {@code verification_document_dob_mismatch},
361+
* {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code
362+
* verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code
363+
* verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code
364+
* verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code
365+
* verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code
366+
* verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing},
367+
* {@code verification_document_manipulated}, {@code verification_document_missing_back},
368+
* {@code verification_document_missing_front}, {@code verification_document_name_mismatch},
369+
* {@code verification_document_name_missing}, {@code
370+
* verification_document_nationality_mismatch}, {@code verification_document_not_readable},
371+
* {@code verification_document_not_signed}, {@code verification_document_not_uploaded},
372+
* {@code verification_document_photo_mismatch}, {@code verification_document_too_large},
373+
* {@code verification_document_type_not_supported}, {@code
374+
* verification_failed_address_match}, {@code verification_failed_business_iec_number}, {@code
375+
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
376+
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
377+
* verification_failed_name_match}, {@code verification_failed_other}, {@code
378+
* verification_failed_tax_id_match}, {@code verification_failed_tax_id_not_issued}, {@code
379+
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
380+
* verification_requires_additional_memorandum_of_associations}.
381+
*/
382+
@SerializedName("code")
383+
String code;
384+
385+
/**
386+
* An informative message that indicates the error type and provides additional details about
387+
* the error.
388+
*/
389+
@SerializedName("reason")
390+
String reason;
391+
392+
/**
393+
* The specific user onboarding requirement field (in the requirements hash) that needs to be
394+
* resolved.
395+
*/
396+
@SerializedName("requirement")
397+
String requirement;
398+
}
348399
}
349400
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class CashBalance extends ApiResource {
5050
String object;
5151

5252
@SerializedName("settings")
53-
BalanceSettings settings;
53+
Settings settings;
5454

5555
/** Retrieves a customer’s cash balance. */
5656
public static CashBalance retrieve(String customer) throws StripeException {
@@ -127,7 +127,7 @@ public CashBalance update(CashBalanceUpdateParams params, RequestOptions options
127127
@Getter
128128
@Setter
129129
@EqualsAndHashCode(callSuper = false)
130-
public static class BalanceSettings extends StripeObject {
130+
public static class Settings extends StripeObject {
131131
/**
132132
* The configuration for how funds that land in the customer cash balance are reconciled.
133133
*

0 commit comments

Comments
 (0)