diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8576feb6a93..7ff84616f7c 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file +85e0466f55837da66b90fce2a7c5b7fc79b83a7c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 604997fea3a..ad0b5d45105 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2203 \ No newline at end of file +v2204 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java index 85696a900e3..6ba5b5249b2 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java @@ -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; @@ -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 ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount realizedFraudAmount; } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java index 90ae8a47990..3bc15bf47d6 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java @@ -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; @@ -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 ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java index 1f1464a4738..fce01ca74c9 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java @@ -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; @@ -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 ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java index c135ce92f45..3817a4b835d 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java @@ -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; @@ -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 ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java index 339af97079b..f374cedcf01 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java @@ -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; @@ -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 ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 6d26907bbe9..297958b6970 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -7605,14 +7605,6 @@ public static class UsBankAccount extends StripeObject { @SerializedName("mandate_options") MandateOptions mandateOptions; - /** - * Preferred transaction settlement speed - * - *

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. * diff --git a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java index 621a62e20f3..1405406e3ee 100644 --- a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java +++ b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java @@ -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; @@ -18,7 +19,7 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { /** The amounts of the microdeposits that were generated. */ @SerializedName("amounts") - List amounts; + List amounts; /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the @@ -43,28 +44,4 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { */ @SerializedName("status") String status; - - /** - * For more details about Amount, please refer to the API - * Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } diff --git a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java index 5c1d212d7b8..4b818462a64 100644 --- a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java +++ b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java @@ -85,7 +85,7 @@ public class ServiceAction extends StripeObject implements HasId { public static class CreditGrant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.model.v2.billing.ServiceAction.CreditGrant.Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -129,7 +129,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -161,27 +161,6 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } - - /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Monetary extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Defines the scope where the credit grant is applicable. */ @@ -239,7 +218,7 @@ public static class ExpiryConfig extends StripeObject { public static class CreditGrantPerTenant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.model.v2.billing.ServiceAction.CreditGrantPerTenant.Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -283,7 +262,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -315,27 +294,6 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } - - /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Monetary extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Defines the scope where the credit grant is applicable. */ diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 150007c9f63..47bc3ff8fdf 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; @@ -8344,27 +8345,6 @@ public static class AnnualRevenue extends StripeObject { */ @SerializedName("fiscal_year_end") String fiscalYearEnd; - - /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Documents that may be submitted to satisfy various informational requests. */ @@ -8743,30 +8723,6 @@ public static class MonthlyEstimatedRevenue extends StripeObject { */ @SerializedName("amount") Amount amount; - - /** - * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 - * USD). - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** When the business was incorporated or registered. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java index 9c271edb4bd..f66d9526216 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -114,25 +115,4 @@ public static class AdjustedFlow extends StripeObject { @SerializedName("type") String type; } - - /** The amount of the Adjustment. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java index 1e97ae3b232..4fe82ec58ed 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -63,27 +64,6 @@ public static class From extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; - - /** Amount object. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** The to block containing what was credited. */ @@ -94,26 +74,5 @@ public static class To extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; - - /** Amount object. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java index 54fe5b06a1f..a723675d246 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -160,87 +161,15 @@ public static class AccruedFees extends StripeObject { public static class Balance extends StripeObject { /** Balance that can be used for money movement. */ @SerializedName("available") - Map available; + Map available; /** Balance of inbound funds that will later transition to the {@code available} balance. */ @SerializedName("inbound_pending") - Map inboundPending; + Map inboundPending; /** Balance of funds that are being used for a pending outbound money movement. */ @SerializedName("outbound_pending") - Map outboundPending; - - /** - * For more details about Available, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** - * For more details about InboundPending, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** - * For more details about OutboundPending, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Map outboundPending; } /** @@ -311,31 +240,7 @@ public static class StartingBalance extends StripeObject { /** The available balance at the time when the balance was projected. */ @SerializedName("available") - Map available; - - /** - * For more details about Available, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Map available; } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java index 56e054e8aa0..4816f0ba479 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -74,27 +75,6 @@ public class InboundTransfer extends StripeObject implements HasId { @SerializedName("transfer_history") List transferHistory; - /** The amount in specified currency that will land in the FinancialAccount balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** A nested object containing information about the origin of the InboundTransfer. */ @Getter @Setter @@ -102,33 +82,12 @@ public static class Amount extends StripeObject { public static class From extends StripeObject { /** The amount in specified currency that was debited from the Payment Method. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The Payment Method object used to create the InboundTransfer. */ @SerializedName("payment_method") PaymentMethod paymentMethod; - /** The amount in specified currency that was debited from the Payment Method. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** The Payment Method object used to create the InboundTransfer. */ @Getter @Setter @@ -154,32 +113,11 @@ public static class PaymentMethod extends StripeObject { public static class To extends StripeObject { /** The amount by which the FinancialAccount balance is credited. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The FinancialAccount that funds will land in. */ @SerializedName("financial_account") String financialAccount; - - /** The amount by which the FinancialAccount balance is credited. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java index a5375d64a02..f028a1da013 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -161,27 +162,6 @@ public class OutboundPayment extends StripeObject implements HasId { @SerializedName("tracking_details") TrackingDetails trackingDetails; - /** The "presentment amount" for the OutboundPayment. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -237,32 +217,11 @@ public static class PaperCheck extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Details about the OutboundPayment notification settings for recipient. */ @@ -374,7 +333,7 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -383,27 +342,6 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java index a9602b89124..e90feb2965e 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -71,27 +72,6 @@ public class OutboundPaymentQuote extends StripeObject implements HasId { @SerializedName("to") To to; - /** The "presentment amount" for the OutboundPaymentQuote. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -135,27 +115,6 @@ public static class EstimatedFee extends StripeObject { */ @SerializedName("type") String type; - - /** The fee amount for corresponding fee type. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Details about the sender of an OutboundPaymentQuote. */ @@ -165,32 +124,11 @@ public static class Amount extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** The underlying FXQuote details for the OutboundPaymentQuote. */ @@ -252,7 +190,7 @@ public static class Rate extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -261,26 +199,5 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index a93728b73f5..8f9db4c7129 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -138,27 +139,6 @@ public class OutboundTransfer extends StripeObject implements HasId { @SerializedName("trace_id") TraceId traceId; - /** The "presentment amount" for the OutboundTransfer. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundTransfer. */ @Getter @Setter @@ -180,32 +160,11 @@ public static class DeliveryOptions extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Status details for an OutboundTransfer in a {@code failed} or {@code returned} state. */ @@ -301,32 +260,11 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundTransfer uses to send payout. */ @SerializedName("payout_method") String payoutMethod; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index f98a4962840..3c541808fbe 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -55,7 +56,7 @@ public class ReceivedCredit extends StripeObject implements HasId { /** The amount and currency of the original/external credit request. */ @SerializedName("external_amount") - ExternalAmount externalAmount; + Amount externalAmount; /** Financial Account ID on which funds for ReceivedCredit were received. */ @SerializedName("financial_account") @@ -124,27 +125,6 @@ public class ReceivedCredit extends StripeObject implements HasId { @SerializedName("type") String type; - /** The amount and currency of the ReceivedCredit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This object stores details about the originating Stripe transaction that resulted in the * ReceivedCredit. Present if {@code type} field value is {@code balance_transfer}. @@ -369,27 +349,6 @@ public static class Refund extends StripeObject { } } - /** The amount and currency of the original/external credit request. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ExternalAmount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This hash contains detailed information that elaborates on the specific status of the * ReceivedCredit. e.g the reason behind a failure if the status is marked as {@code failed}. diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index 0024fda7cac..a0596113084 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import lombok.EqualsAndHashCode; @@ -53,7 +54,7 @@ public class ReceivedDebit extends StripeObject implements HasId { /** The amount and currency of the original/external debit request. */ @SerializedName("external_amount") - ExternalAmount externalAmount; + Amount externalAmount; /** Financial Account on which funds for ReceivedDebit were debited. */ @SerializedName("financial_account") @@ -116,27 +117,6 @@ public class ReceivedDebit extends StripeObject implements HasId { @SerializedName("type") String type; - /** Amount and currency of the ReceivedDebit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This object stores details about the balance transfer object that resulted in the * ReceivedDebit. @@ -252,27 +232,6 @@ public static class Authorization extends StripeObject { /** The reference to the v1 issuing authorization ID. */ @SerializedName("issuing_authorization_v1") String issuingAuthorizationV1; - - /** Amount associated with this issuing authorization. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** @@ -290,51 +249,9 @@ public static class CardTransaction extends StripeObject { /** The reference to the v1 issuing transaction ID. */ @SerializedName("issuing_transaction_v1") String issuingTransactionV1; - - /** Amount associated with this issuing transaction. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } - /** The amount and currency of the original/external debit request. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ExternalAmount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Detailed information about the status of the ReceivedDebit. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java index 4a42d26653e..f5eeaadb119 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -108,27 +109,6 @@ public class Transaction extends StripeObject implements HasId { @SerializedName("status_transitions") StatusTransitions statusTransitions; - /** The amount of the Transaction. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to * sum of its TransactionEntries that have {@code effective_at}s in the past. @@ -139,78 +119,15 @@ public static class Amount extends StripeObject { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Available available; + Amount available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - InboundPending inboundPending; + Amount inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - OutboundPending outboundPending; - - /** Impact to the available balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the inbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the outbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount outboundPending; } /** Details about the Flow object that created the Transaction. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java index de8bb601070..976e1c09cae 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -68,78 +69,15 @@ public class TransactionEntry extends StripeObject implements HasId { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Available available; + Amount available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - InboundPending inboundPending; + Amount inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - OutboundPending outboundPending; - - /** Impact to the available balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the inbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the outbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount outboundPending; } /** Details copied from the transaction that this TransactionEntry belongs to. */ diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index f1ae51a7129..da3766cedc3 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -26,11 +27,11 @@ public class OffSessionPayment extends StripeObject implements HasId { /** The amount available to be captured. */ @SerializedName("amount_capturable") - AmountCapturable amountCapturable; + Amount amountCapturable; /** The “presentment amount” to be collected from the customer. */ @SerializedName("amount_requested") - AmountRequested amountRequested; + Amount amountRequested; /** * The frequency of the underlying payment. @@ -165,48 +166,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("transfer_data") TransferData transferData; - /** The amount available to be captured. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class AmountCapturable extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** The “presentment amount” to be collected from the customer. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class AmountRequested extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Details about the capture configuration for the OffSessionPayment. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java index a57c6f217d1..803ee95936a 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -81,27 +82,6 @@ public class SettlementAllocationIntent extends StripeObject implements HasId { @SerializedName("status_details") StatusDetails statusDetails; - /** The amount and currency of the SettlementAllocationIntent. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Status details for a SettlementAllocationIntent in {@code errored} state. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java index c870e9150e6..06677de52b7 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -71,27 +72,6 @@ public class SettlementAllocationIntentSplit extends StripeObject implements Has @SerializedName("type") String type; - /** The amount and currency of the SettlementAllocationIntentSplit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Details about the Flow object that settled the split. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index e665e74e32d..9c6f3d452c8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -42801,10 +42801,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -42852,7 +42848,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, String targetDate, ApiRequestParams.EnumParam transactionPurpose, @@ -42861,7 +42856,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.transactionPurpose = transactionPurpose; @@ -42881,8 +42875,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private String targetDate; @@ -42898,7 +42890,6 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.transactionPurpose, @@ -42958,20 +42949,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -43817,21 +43794,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 97820a0f76a..d6565a7a5ec 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -43281,10 +43281,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -43332,7 +43328,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, String targetDate, ApiRequestParams.EnumParam transactionPurpose, @@ -43341,7 +43336,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.transactionPurpose = transactionPurpose; @@ -43361,8 +43355,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private String targetDate; @@ -43378,7 +43370,6 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.transactionPurpose, @@ -43436,20 +43427,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -44295,21 +44272,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 478aae19285..0e48eb8da81 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -45182,10 +45182,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -45233,7 +45229,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, Object targetDate, ApiRequestParams.EnumParam transactionPurpose, @@ -45242,7 +45237,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.transactionPurpose = transactionPurpose; @@ -45262,8 +45256,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private Object targetDate; @@ -45279,7 +45271,6 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.transactionPurpose, @@ -45337,20 +45328,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -46221,21 +46198,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java index 1be8e11f0fc..2e7c2e2e600 100644 --- a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java @@ -175,7 +175,7 @@ public Builder setType(ActionServiceCreateParams.Type type) { public static class CreditGrant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -210,7 +210,7 @@ public static class CreditGrant { Long priority; private CreditGrant( - Amount amount, + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -231,7 +231,7 @@ public static Builder builder() { } public static class Builder { - private Amount amount; + private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; private ApplicabilityConfig applicabilityConfig; @@ -346,7 +346,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -358,7 +358,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - Monetary monetary, + com.stripe.v2.Amount monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -375,7 +375,7 @@ public static class Builder { private Map extraParams; - private Monetary monetary; + private com.stripe.v2.Amount monetary; private Type type; @@ -426,7 +426,7 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary(ActionServiceCreateParams.CreditGrant.Amount.Monetary monetary) { + public Builder setMonetary(com.stripe.v2.Amount monetary) { this.monetary = monetary; return this; } @@ -535,108 +535,6 @@ public Builder setValue(String value) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Monetary { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Monetary(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public ActionServiceCreateParams.CreditGrant.Amount.Monetary build() { - return new ActionServiceCreateParams.CreditGrant.Amount.Monetary( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), @@ -971,7 +869,7 @@ public enum Category implements ApiRequestParams.EnumParam { public static class CreditGrantPerTenant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -1010,7 +908,7 @@ public static class CreditGrantPerTenant { Long priority; private CreditGrantPerTenant( - Amount amount, + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -1033,7 +931,8 @@ public static Builder builder() { } public static class Builder { - private Amount amount; + private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount + amount; private ApplicabilityConfig applicabilityConfig; @@ -1159,7 +1058,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -1171,7 +1070,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - Monetary monetary, + com.stripe.v2.Amount monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -1188,7 +1087,7 @@ public static class Builder { private Map extraParams; - private Monetary monetary; + private com.stripe.v2.Amount monetary; private Type type; @@ -1240,8 +1139,7 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary( - ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary monetary) { + public Builder setMonetary(com.stripe.v2.Amount monetary) { this.monetary = monetary; return this; } @@ -1350,110 +1248,6 @@ public Builder setValue(String value) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Monetary { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Monetary(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary build() { - return new ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 698cbe234e6..4e8f38f6247 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -23002,8 +23003,7 @@ public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -23045,112 +23045,6 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -25365,8 +25259,7 @@ public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -25401,113 +25294,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index 9485d08657b..ad8400a2a74 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -3690,8 +3691,7 @@ public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -3735,112 +3735,6 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -6068,9 +5962,7 @@ public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -6105,113 +5997,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index b6cd8950893..bf6cd172f97 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -24480,8 +24481,7 @@ public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -24532,123 +24532,6 @@ public Builder setFiscalYearEnd(EmptyParam fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -26898,8 +26781,7 @@ public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -26934,124 +26816,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java index 712020d691f..b09290b3fb8 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -155,7 +156,7 @@ public CurrencyConversionCreateParams.From build() { } /** Amount object. */ - public Builder setAmount(CurrencyConversionCreateParams.From.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -192,105 +193,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public CurrencyConversionCreateParams.From.Amount build() { - return new CurrencyConversionCreateParams.From.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -336,7 +238,7 @@ public CurrencyConversionCreateParams.To build() { } /** Amount object. */ - public Builder setAmount(CurrencyConversionCreateParams.To.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -373,104 +275,5 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public CurrencyConversionCreateParams.To.Amount build() { - return new CurrencyConversionCreateParams.To.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java index 15f5d5937f6..9be96532c88 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -75,7 +76,7 @@ public InboundTransferCreateParams build() { * Required. The amount, in specified currency, by which the FinancialAccount * balance will increase due to the InboundTransfer. */ - public Builder setAmount(InboundTransferCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -128,102 +129,6 @@ public Builder setTo(InboundTransferCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public InboundTransferCreateParams.Amount build() { - return new InboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * InboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link InboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class From { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java index 7d54dbea75d..f18ec62fcb8 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -140,7 +141,7 @@ public OutboundPaymentCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(OutboundPaymentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -257,102 +258,6 @@ public Builder setTo(OutboundPaymentCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundPaymentCreateParams.Amount build() { - return new OutboundPaymentCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java index 775729fc241..23ddfb84112 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -73,7 +74,7 @@ public OutboundPaymentQuoteCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(OutboundPaymentQuoteCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -126,104 +127,6 @@ public Builder setTo(OutboundPaymentQuoteCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundPaymentQuoteCreateParams.Amount build() { - return new OutboundPaymentQuoteCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java index d62fa6e4232..b738831fc9b 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -108,7 +109,7 @@ public OutboundTransferCreateParams build() { } /** Required. The "presentment amount" for the OutboundPayment. */ - public Builder setAmount(OutboundTransferCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -202,102 +203,6 @@ public Builder setTo(OutboundTransferCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundTransferCreateParams.Amount build() { - return new OutboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index 1cbb2ac66be..e256020de47 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -198,7 +199,7 @@ public OffSessionPaymentCreateParams build() { } /** Required. The “presentment amount” to be collected from the customer. */ - public Builder setAmount(OffSessionPaymentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -355,103 +356,6 @@ public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transf } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.Amount build() { - return new OffSessionPaymentCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Capture { diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java index 0ae7e7e422f..b5fd65d7115 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.HashMap; import java.util.Map; @@ -100,7 +101,7 @@ public SettlementAllocationIntentCreateParams build() { * Required. The amount and currency of the SettlementAllocationIntent. Allowed * Currencies are {@code gbp} | {@code eur}. */ - public Builder setAmount(SettlementAllocationIntentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -184,102 +185,4 @@ public Builder setReference(String reference) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SettlementAllocationIntentCreateParams.Amount build() { - return new SettlementAllocationIntentCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SettlementAllocationIntentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SettlementAllocationIntentCreateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java index 8c4e36e300f..d95661afe71 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -60,7 +61,7 @@ public SettlementAllocationIntentUpdateParams build() { * The new amount for the SettlementAllocationIntent. Only amount.value can be updated and * currency must remain same. */ - public Builder setAmount(SettlementAllocationIntentUpdateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -103,112 +104,4 @@ public Builder setReference(EmptyParam reference) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SettlementAllocationIntentUpdateParams.Amount build() { - return new SettlementAllocationIntentUpdateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } diff --git a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java index aa73d91058e..79850a22743 100644 --- a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -84,7 +85,7 @@ public Builder setAccount(String account) { /** * Required. The amount and currency of the SettlementAllocationIntentSplit. */ - public Builder setAmount(SplitCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -148,102 +149,6 @@ public Builder setType(SplitCreateParams.Type type) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SplitCreateParams.Amount build() { - return new SplitCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SplitCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SplitCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("credit") CREDIT("credit"), diff --git a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java index ec5e7780f91..b76549eb9e0 100644 --- a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java +++ b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -66,7 +67,7 @@ public FinancialAddressCreditParams build() { } /** Required. Object containing the amount value and currency to credit. */ - public Builder setAmount(FinancialAddressCreditParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -116,102 +117,6 @@ public Builder setStatementDescriptor(String statementDescriptor) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public FinancialAddressCreditParams.Amount build() { - return new FinancialAddressCreditParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * FinancialAddressCreditParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link FinancialAddressCreditParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Network implements ApiRequestParams.EnumParam { @SerializedName("ach") ACH("ach"), diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 20e759cbbe2..585d6e83941 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -28590,7 +28590,7 @@ public void testV2MoneyManagementAdjustmentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Adjustment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.AdjustmentListParams params = @@ -28616,7 +28616,7 @@ public void testV2MoneyManagementAdjustmentGet2Services() throws StripeException null, null, com.stripe.model.v2.moneymanagement.Adjustment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Adjustment adjustment = @@ -28641,7 +28641,7 @@ public void testV2MoneyManagementCurrencyConversionGetServices() throws StripeEx new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.CurrencyConversion>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionListParams params = @@ -28667,7 +28667,7 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams params = @@ -28675,22 +28675,12 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE .setFinancialAccount("financial_account") .setFrom( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From - .Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCurrency("usd") .build()) .setTo( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCurrency("usd") .build()) .build(); @@ -28715,7 +28705,7 @@ public void testV2MoneyManagementCurrencyConversionGet2Services() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.CurrencyConversion currencyConversion = @@ -28740,7 +28730,7 @@ public void testV2MoneyManagementFinancialAccountGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.FinancialAccount>>() {}.getType(), - "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountListParams params = @@ -28766,7 +28756,7 @@ public void testV2MoneyManagementFinancialAccountPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCreateParams params = @@ -28794,7 +28784,7 @@ public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = @@ -28817,7 +28807,7 @@ public void testV2MoneyManagementFinancialAccountPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams params = @@ -28843,7 +28833,7 @@ public void testV2MoneyManagementFinancialAccountPost3Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCloseParams params = @@ -28956,7 +28946,7 @@ public void testV2MoneyManagementInboundTransferGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferListParams params = @@ -28982,16 +28972,12 @@ public void testV2MoneyManagementInboundTransferPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29024,7 +29010,7 @@ public void testV2MoneyManagementInboundTransferGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.InboundTransfer inboundTransfer = @@ -29049,7 +29035,7 @@ public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundPayment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentListParams params = @@ -29075,16 +29061,12 @@ public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -29118,7 +29100,7 @@ public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29141,7 +29123,7 @@ public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29164,17 +29146,12 @@ public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws Strip null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.From.builder() .setCurrency("usd") @@ -29208,7 +29185,7 @@ public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws Stripe null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = @@ -29359,7 +29336,7 @@ public void testV2MoneyManagementOutboundTransferGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferListParams params = @@ -29385,16 +29362,12 @@ public void testV2MoneyManagementOutboundTransferPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29427,7 +29400,7 @@ public void testV2MoneyManagementOutboundTransferGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29450,7 +29423,7 @@ public void testV2MoneyManagementOutboundTransferPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29600,7 +29573,7 @@ public void testV2MoneyManagementReceivedCreditGetServices() throws StripeExcept new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedCredit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedCreditListParams params = @@ -29626,7 +29599,7 @@ public void testV2MoneyManagementReceivedCreditGet2Services() throws StripeExcep null, null, com.stripe.model.v2.moneymanagement.ReceivedCredit.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedCredit receivedCredit = @@ -29651,7 +29624,7 @@ public void testV2MoneyManagementReceivedDebitGetServices() throws StripeExcepti new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedDebit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedDebitListParams params = @@ -29677,7 +29650,7 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null, null, com.stripe.model.v2.moneymanagement.ReceivedDebit.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedDebit receivedDebit = @@ -29776,7 +29749,7 @@ public void testV2MoneyManagementTransactionGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionListParams params = @@ -29802,7 +29775,7 @@ public void testV2MoneyManagementTransactionGet2Services() throws StripeExceptio null, null, com.stripe.model.v2.moneymanagement.Transaction.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Transaction transaction = @@ -29827,7 +29800,7 @@ public void testV2MoneyManagementTransactionEntryGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.TransactionEntry>>() {}.getType(), - "{\"data\":[{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionEntryListParams params = @@ -29853,7 +29826,7 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.TransactionEntry.class, - "{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); + "{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.TransactionEntry transactionEntry = @@ -29878,7 +29851,7 @@ public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentListParams params = @@ -29904,16 +29877,12 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCadence( com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) .setCustomer("customer") @@ -29940,7 +29909,7 @@ public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29963,7 +29932,7 @@ public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29986,7 +29955,7 @@ public void testV2PaymentsOffSessionPaymentPost3Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCaptureParams params = @@ -30016,7 +29985,7 @@ public void testV2PaymentsSettlementAllocationIntentGetServices() throws StripeE new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntent>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentListParams params = @@ -30042,16 +30011,12 @@ public void testV2PaymentsSettlementAllocationIntentPostServices() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams params = com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.builder() - .setAmount( - com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setExpectedSettlementDate(Instant.parse("1970-01-22T14:14:13.629Z")) .setFinancialAccount("financial_account") .setReference("reference") @@ -30077,7 +30042,7 @@ public void testV2PaymentsSettlementAllocationIntentGet2Services() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30100,7 +30065,7 @@ public void testV2PaymentsSettlementAllocationIntentPost2Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentUpdateParams params = @@ -30126,7 +30091,7 @@ public void testV2PaymentsSettlementAllocationIntentPost3Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30149,7 +30114,7 @@ public void testV2PaymentsSettlementAllocationIntentPost4Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30174,7 +30139,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGetServices() throws S new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntentSplit>>() {}.getType(), - "{\"data\":[{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitListParams params = @@ -30207,18 +30172,13 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPostServices() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams params = com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.builder() .setAccount("account") - .setAmount( - com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setType( com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Type .CREDIT) @@ -30249,7 +30209,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGet2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30277,7 +30237,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPost2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30547,11 +30507,7 @@ public void testV2TestHelpersFinancialAddressPostServices() throws StripeExcepti com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() - .setAmount( - com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.ACH) .build(); @@ -30575,7 +30531,7 @@ public void testV2TestHelpersFinancialAddressPost2Services() throws StripeExcept null, null, com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits.class, - "{\"amounts\":[{\"value\":111972721,\"currency\":\"usd\"}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); + "{\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits @@ -30849,11 +30805,7 @@ public void testInsufficientFundsErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -31064,11 +31016,7 @@ public void testRecipientNotNotifiableErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd")