Skip to content

Commit

Permalink
Update generated code (#1803)
Browse files Browse the repository at this point in the history
* Update generated code for v1022

* Update generated code for v1023

* Update generated code for v1025

* Update generated code for v1027

* Update generated code for v1027

* Update generated code for v1028

* Update generated code for v1029

* Update generated code for v1030

* Update generated code for v1032

* Update generated code for v1033

* Update generated code for v1034

* Update generated code for v1035

* Update generated code for v1036

* Update generated code for v1037

* Update generated code for v1038

* Update generated code for v1039

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and prathmesh-stripe committed May 16, 2024
1 parent f1f582b commit 770f73e
Show file tree
Hide file tree
Showing 28 changed files with 1,098 additions and 31 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1021
v1039
29 changes: 29 additions & 0 deletions src/main/java/com/stripe/model/ApplicationFee.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ public class ApplicationFee extends ApiResource implements BalanceTransactionSou
@SerializedName("currency")
String currency;

/**
* Polymorphic source of the application fee. Includes the ID of the object the application fee
* was created from.
*/
@SerializedName("fee_source")
FeeSource feeSource;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
Expand Down Expand Up @@ -300,13 +307,35 @@ public static ApplicationFee retrieve(
return getGlobalResponseGetter().request(request, ApplicationFee.class);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FeeSource extends StripeObject {
/** Charge ID that created this application fee. */
@SerializedName("charge")
String charge;

/** Payout ID that created this application fee. */
@SerializedName("payout")
String payout;

/**
* Type of object that created the application fee, either {@code charge} or {@code payout}.
*
* <p>One of {@code charge}, or {@code payout}.
*/
@SerializedName("type")
String type;
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(account, responseGetter);
trySetResponseGetter(application, responseGetter);
trySetResponseGetter(balanceTransaction, responseGetter);
trySetResponseGetter(charge, responseGetter);
trySetResponseGetter(feeSource, responseGetter);
trySetResponseGetter(originatingTransaction, responseGetter);
trySetResponseGetter(refunds, responseGetter);
}
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/stripe/model/Balance.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,46 @@ public static class InstantAvailable extends StripeObject {
@SerializedName("currency")
String currency;

/** Breakdown of balance by destination. */
@SerializedName("net_available")
List<Balance.InstantAvailable.NetAvailable> netAvailable;

@SerializedName("source_types")
SourceTypes sourceTypes;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NetAvailable extends StripeObject {
/** Net balance amount, subtracting fees from platform-set pricing. */
@SerializedName("amount")
Long amount;

/** ID of the external account for this net balance (not expandable). */
@SerializedName("destination")
String destination;

@SerializedName("source_types")
SourceTypes sourceTypes;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
@SerializedName("card")
Long card;

/** Amount for FPX. */
@SerializedName("fpx")
Long fpx;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2147,6 +2147,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("overcapture_supported")
Boolean overcaptureSupported;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("networks")
Networks networks;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -807,13 +807,16 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("card")
Card card;

@SerializedName("klarna")
Klarna klarna;

@SerializedName("paypal")
Paypal paypal;

/**
* Payment method type.
*
* <p>One of {@code card}, or {@code paypal}.
* <p>One of {@code card}, {@code klarna}, or {@code paypal}.
*/
@SerializedName("type")
String type;
Expand All @@ -839,6 +842,15 @@ public static class Card extends StripeObject {
String networkReasonCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Klarna extends StripeObject {
/** The reason for the dispute as defined by Klarna. */
@SerializedName("reason_code")
String reasonCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
* Number of payment attempts made for this invoice, from the perspective of the payment retry
* schedule. Any payment attempt counts as the first attempt, and subsequently only automatic
* retries increment the attempt count. In other words, manual payment attempts after the first
* attempt do not affect the retry schedule.
* attempt do not affect the retry schedule. If a failure is returned with a non-retryable return
* code, the invoice can no longer be retried unless a new payment method is obtained. Retries
* will continue to be scheduled, and attempt_count will continue to increment, but retries will
* only be executed if a new payment method is obtained.
*/
@SerializedName("attempt_count")
Long attemptCount;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3014,6 +3014,22 @@ public static class CardPresent extends StripeObject {
*/
@SerializedName("request_incremental_authorization_support")
Boolean requestIncrementalAuthorizationSupport;

@SerializedName("routing")
Routing routing;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Routing extends StripeObject {
/**
* Requested routing priority
*
* <p>One of {@code domestic}, or {@code international}.
*/
@SerializedName("requested_priority")
String requestedPriority;
}
}

@Getter
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("networks")
Networks networks;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/stripe/model/Payout.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ public class Payout extends ApiResource implements MetadataStore<Payout>, Balanc
@SerializedName("amount")
Long amount;

/**
* The application fee (if any) for the payout. <a
* href="https://stripe.com/docs/connect/instant-payouts#monetization-and-fees">See the Connect
* documentation</a> for details.
*/
@SerializedName("application_fee")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<ApplicationFee> applicationFee;

/**
* The amount of the application fee (if any) requested for the payout. <a
* href="https://stripe.com/docs/connect/instant-payouts#monetization-and-fees">See the Connect
* documentation</a> for details.
*/
@SerializedName("application_fee_amount")
Long applicationFeeAmount;

/**
* Date that you can expect the payout to arrive in the bank. This factors in delays to account
* for weekends or bank holidays.
Expand Down Expand Up @@ -190,6 +208,25 @@ public class Payout extends ApiResource implements MetadataStore<Payout>, Balanc
@SerializedName("type")
String type;

/** Get ID of expandable {@code applicationFee} object. */
public String getApplicationFee() {
return (this.applicationFee != null) ? this.applicationFee.getId() : null;
}

public void setApplicationFee(String id) {
this.applicationFee = ApiResource.setExpandableFieldId(id, this.applicationFee);
}

/** Get expanded {@code applicationFee}. */
public ApplicationFee getApplicationFeeObject() {
return (this.applicationFee != null) ? this.applicationFee.getExpanded() : null;
}

public void setApplicationFeeObject(ApplicationFee expandableObject) {
this.applicationFee =
new ExpandableField<ApplicationFee>(expandableObject.getId(), expandableObject);
}

/** Get ID of expandable {@code balanceTransaction} object. */
public String getBalanceTransaction() {
return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
Expand Down Expand Up @@ -675,6 +712,7 @@ public Payout update(PayoutUpdateParams params, RequestOptions options) throws S
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(applicationFee, responseGetter);
trySetResponseGetter(balanceTransaction, responseGetter);
trySetResponseGetter(destination, responseGetter);
trySetResponseGetter(failureBalanceTransaction, responseGetter);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class Product extends ApiResource implements HasId, MetadataStore<Product
/**
* Extra information about a product which will appear on your customer's credit card statement.
* In the case that multiple products are billed at once, the first statement descriptor will be
* used.
* used. Only used for subscription payments.
*/
@SerializedName("statement_descriptor")
String statementDescriptor;
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -2470,8 +2470,9 @@ public static class PhoneNumberCollection extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class SavedPaymentMethodOptions extends StripeObject {
/**
* Controls which payment methods are eligible to be redisplayed to returning customers.
* Corresponds to {@code allow_redisplay} on the payment method.
* Uses the {@code allow_redisplay} value of each saved payment method to filter the set
* presented to a returning customer. By default, only saved payment methods with
* ’allow_redisplay: ‘always’ are shown in Checkout.
*/
@SerializedName("allow_redisplay_filters")
List<String> allowRedisplayFilters;
Expand Down
65 changes: 63 additions & 2 deletions src/main/java/com/stripe/model/issuing/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ public class Dispute extends ApiResource
@SerializedName("livemode")
Boolean livemode;

/**
* The enum that describes the dispute loss outcome. If the dispute is not lost, this field will
* be absent. New enum values may be added in the future, so be sure to handle unknown values.
*
* <p>One of {@code cardholder_authentication_issuer_liability}, {@code
* eci5_token_transaction_with_tavv}, {@code excess_disputes_in_timeframe}, {@code
* has_not_met_the_minimum_dispute_amount_requirements}, {@code invalid_duplicate_dispute}, {@code
* invalid_incorrect_amount_dispute}, {@code invalid_no_authorization}, {@code
* invalid_use_of_disputes}, {@code merchandise_delivered_or_shipped}, {@code
* merchandise_or_service_as_described}, {@code not_cancelled}, {@code other}, {@code
* refund_issued}, {@code submitted_beyond_allowable_time_limit}, {@code
* transaction_3ds_required}, {@code transaction_approved_after_prior_fraud_dispute}, {@code
* transaction_authorized}, {@code transaction_electronically_read}, {@code
* transaction_qualifies_for_visa_easy_payment_service}, or {@code transaction_unattended}.
*/
@SerializedName("loss_reason")
String lossReason;

/**
* Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
* to an object. This can be useful for storing additional information about the object in a
Expand Down Expand Up @@ -419,6 +437,9 @@ public static class Evidence extends StripeObject {
@SerializedName("merchandise_not_as_described")
MerchandiseNotAsDescribed merchandiseNotAsDescribed;

@SerializedName("no_valid_authorization")
NoValidAuthorization noValidAuthorization;

@SerializedName("not_received")
NotReceived notReceived;

Expand All @@ -429,8 +450,8 @@ public static class Evidence extends StripeObject {
* The reason for filing the dispute. Its value will match the field containing the evidence.
*
* <p>One of {@code canceled}, {@code duplicate}, {@code fraudulent}, {@code
* merchandise_not_as_described}, {@code not_received}, {@code other}, or {@code
* service_not_as_described}.
* merchandise_not_as_described}, {@code no_valid_authorization}, {@code not_received}, {@code
* other}, or {@code service_not_as_described}.
*/
@SerializedName("reason")
String reason;
Expand Down Expand Up @@ -746,6 +767,46 @@ public void setAdditionalDocumentationObject(File expandableObject) {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NoValidAuthorization extends StripeObject {
/**
* (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Additional
* documentation supporting the dispute.
*/
@SerializedName("additional_documentation")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<File> additionalDocumentation;

/** Explanation of why the cardholder is disputing this transaction. */
@SerializedName("explanation")
String explanation;

/** Get ID of expandable {@code additionalDocumentation} object. */
public String getAdditionalDocumentation() {
return (this.additionalDocumentation != null) ? this.additionalDocumentation.getId() : null;
}

public void setAdditionalDocumentation(String id) {
this.additionalDocumentation =
ApiResource.setExpandableFieldId(id, this.additionalDocumentation);
}

/** Get expanded {@code additionalDocumentation}. */
public File getAdditionalDocumentationObject() {
return (this.additionalDocumentation != null)
? this.additionalDocumentation.getExpanded()
: null;
}

public void setAdditionalDocumentationObject(File expandableObject) {
this.additionalDocumentation =
new ExpandableField<File>(expandableObject.getId(), expandableObject);
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down

0 comments on commit 770f73e

Please sign in to comment.