Skip to content
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9e950cbf7b5a814a98f27d1a94b72cd6f1df2078
19704d8af6f1949f2d8f646ca37978ad12f936a4
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2203
v2204
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jar {
"Implementation-Vendor": VENDOR_NAME,
"Bundle-SymbolicName": POM_ARTIFACT_ID,
"Export-Package": "com.stripe.*",
"Automatic-Module-Name": "stripe.java")
"Automatic-Module-Name": "com.stripe")

archiveVersion = VERSION_NAME
}
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import? '../sdk-codegen/utils.just'
_default:
just --list --unsorted

# ⭐ run format and tests to prepare for CI
[no-exit-message]
prepare: format test

# ⭐ run the whole test suite
[no-exit-message]
test *args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.v2.core.Event;
import com.stripe.v2.Amount;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -48,23 +49,7 @@ public static final class Impact {
Long impactedRequests;
/** Estimated aggregated amount for the impacted requests. */
@SerializedName("realized_fraud_amount")
RealizedFraudAmount realizedFraudAmount;

public static final class RealizedFraudAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
Amount realizedFraudAmount;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.v2.core.Event;
import com.stripe.v2.Amount;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -32,48 +33,16 @@ public static final class EventData {
public static final class Impact {
/** Estimated aggregated amount for the approved requests. */
@SerializedName("approved_amount")
ApprovedAmount approvedAmount;
Amount approvedAmount;
/** The number of approved requests which are impacted. */
@SerializedName("approved_impacted_requests")
Long approvedImpactedRequests;
/** Estimated aggregated amount for the declined requests. */
@SerializedName("declined_amount")
DeclinedAmount declinedAmount;
Amount declinedAmount;
/** The number of declined requests which are impacted. */
@SerializedName("declined_impacted_requests")
Long declinedImpactedRequests;

public static final class ApprovedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}

public static final class DeclinedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.v2.core.Event;
import com.stripe.v2.Amount;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -35,48 +36,16 @@ public static final class EventData {
public static final class Impact {
/** Estimated aggregated amount for the approved requests. */
@SerializedName("approved_amount")
ApprovedAmount approvedAmount;
Amount approvedAmount;
/** The number of approved requests which are impacted. */
@SerializedName("approved_impacted_requests")
Long approvedImpactedRequests;
/** Estimated aggregated amount for the declined requests. */
@SerializedName("declined_amount")
DeclinedAmount declinedAmount;
Amount declinedAmount;
/** The number of declined requests which are impacted. */
@SerializedName("declined_impacted_requests")
Long declinedImpactedRequests;

public static final class ApprovedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}

public static final class DeclinedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.v2.core.Event;
import com.stripe.v2.Amount;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -35,48 +36,16 @@ public static final class EventData {
public static final class Impact {
/** Estimated aggregated amount for the approved requests. */
@SerializedName("approved_amount")
ApprovedAmount approvedAmount;
Amount approvedAmount;
/** The number of approved requests which are impacted. */
@SerializedName("approved_impacted_requests")
Long approvedImpactedRequests;
/** Estimated aggregated amount for the declined requests. */
@SerializedName("declined_amount")
DeclinedAmount declinedAmount;
Amount declinedAmount;
/** The number of declined requests which are impacted. */
@SerializedName("declined_impacted_requests")
Long declinedImpactedRequests;

public static final class ApprovedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}

public static final class DeclinedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.v2.core.Event;
import com.stripe.v2.Amount;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -35,48 +36,16 @@ public static final class EventData {
public static final class Impact {
/** Estimated aggregated amount for the approved requests. */
@SerializedName("approved_amount")
ApprovedAmount approvedAmount;
Amount approvedAmount;
/** The number of approved requests which are impacted. */
@SerializedName("approved_impacted_requests")
Long approvedImpactedRequests;
/** Estimated aggregated amount for the declined requests. */
@SerializedName("declined_amount")
DeclinedAmount declinedAmount;
Amount declinedAmount;
/** The number of declined requests which are impacted. */
@SerializedName("declined_impacted_requests")
Long declinedImpactedRequests;

public static final class ApprovedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}

public static final class DeclinedAmount {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;
/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
}
}
}
8 changes: 0 additions & 8 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7605,14 +7605,6 @@ public static class UsBankAccount extends StripeObject {
@SerializedName("mandate_options")
MandateOptions mandateOptions;

/**
* Preferred transaction settlement speed
*
* <p>One of {@code fastest}, or {@code standard}.
*/
@SerializedName("preferred_settlement_speed")
String preferredSettlementSpeed;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
Expand Down
31 changes: 31 additions & 0 deletions src/main/java/com/stripe/model/StringInt64TypeAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.stripe.model;

import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

public class StringInt64TypeAdapter extends TypeAdapter<Long> {
/** Serializes Long values as JSON strings and deserializes string-encoded integers. */
@Override
public void write(JsonWriter out, Long value) throws IOException {
if (value == null) {
out.nullValue();
return;
}

out.value(value.toString());
}

@Override
public Long read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if (token == JsonToken.NULL) {
in.nextNull();
return null;
}

return Long.valueOf(in.nextString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.model.StripeObject;
import com.stripe.v2.Amount;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand All @@ -18,7 +19,7 @@
public class FinancialAddressGeneratedMicrodeposits extends StripeObject {
/** The amounts of the microdeposits that were generated. */
@SerializedName("amounts")
List<FinancialAddressGeneratedMicrodeposits.Amount> amounts;
List<Amount> amounts;

/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
Expand All @@ -43,28 +44,4 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject {
*/
@SerializedName("status")
String status;

/**
* For more details about Amount, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Amount extends StripeObject {
/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;

/**
* A non-negative integer representing how much to charge in the <a
* href="https://docs.stripe.com/currencies#minor-units">smallest currency unit</a>.
*/
@SerializedName("value")
Long value;
}
}
Loading
Loading